<?php

////////////////////// CORE FUNCTION | MODULE FUNCTION (c) i2d Technologies //////////////////////////////////
if (!function_exists('fetch_random_client')) {
function fetch_random_client() { 

$mysqli_user=uplink();

	
	$select_query=$mysqli_user->query("SELECT id,col1,col2,status,col10,server_time,dated,alias FROM master WHERE status='Active' and alias='quick_lead_entry' ORDER BY RAND() LIMIT 1");


while($fetch_select = $select_query->fetch_array()){
$result[] = $fetch_select;
    }
	

return $result;

// Frees the memory associated with a result
//$fetch_select->free();

// close connection 
$mysqli_user->close();




//    return $text;
} 
}
/////////////////////////// function ends /////////////////////////////////

////////////////////// CORE FUNCTION | MODULE FUNCTION (c) i2d Technologies //////////////////////////////////
if (!function_exists('fetch_random_tip')) {
function fetch_random_tip() { 

$rt1=fetch_random_client();

foreach($rt1 as $rt){

$person=ucwords($rt['col2']);
//$domain=$rt['col10'];
$company='<strong>'.strtoupper($rt['col1']).'</strong>';
$domain='<strong>'.$rt['col10'].'</strong>';
$last_update=$rt['server_time'];
}

$dated1=date("l F j, Y");
$dte1 = strtotime("+7 day");
$blue_date=$dte1;

/*
$person="Hameed";
$domain="onino.com";
$company="Hameed Co";
$last_update="12-09-89";
$blue_date="+ 7 days";
*/

$tips=array(
array(
'brand'=>'i2d Prohost',
'tip'=>$company.' should purchase '.$domain.' as its pending since '.$last_update,
),
array(
'brand'=>'i2d Prohost',
'tip'=>$company.' can purchase '.$domain.' and start i2d Blue Website later on '.$blue_date,
),
array(
'brand'=>'i2d Blue',
'tip'=>'You can Discuss the Skeleton of i2d Blue with '.$company.' for better understanding of client requirements.',
),
array(
'brand'=>'i2d Blue',
'tip'=>$person.' should purchase '.$domain.' to provide more credibility and 24/7 access to '.$company,
),
array(
'brand'=>'i2d Blue',
'tip'=>$company.' can use i2d Blue ONLINE Inquiry Form for getting inquiries on their website.',
),
array(
'brand'=>'i2d Blue',
'tip'=>$company.' can use i2d Blue Floating Whatsapp Button to get direct messages from their website.',
),
array(
'brand'=>'i2d Blue',
'tip'=>$company.' can showcase CEO Profile in About Section of i2d Blue website.',
),
array(
'brand'=>'i2d Blue',
'tip'=>$company.' can buy '.$domain.' first and later on decide for i2 Blue Website',
),
array(
'brand'=>'i2d Blue',
'tip'=>$domain.' will be ready for i2d Blue Website coding after a minimum of 7 days after account activation date.',
),
array(
'brand'=>'i2d Prohost',
'tip'=>$company.' can make info@'.$domain.' with FREE corporate redirects built-in i2d ProHost , and forward messages to Gmail , Hotmail etc. exisitng private accounts.',
),
array(
'brand'=>'i2d ProHost',
'tip'=>$company.' can secure '.$domain.' for thier business and protect privacy.',
),
array(
'brand'=>'i2d ProHost',
'tip'=>$domain.' is easy to share and remember than facebook page link , instagram link etc.',
),
array(
'brand'=>'i2d ProHost',
'tip'=>$domain.' provides upgraded and enhanced status for '.$company.' as its competitors are already ONLINE.',
),
array(
'brand'=>'i2d ProHost',
'tip'=>$domain.' account also provides webmail acccess & online software for info@'.$domain.' , ceo@'.$domain. ' etc, corporate email accounts.',
),
array(
'brand'=>'i2d ProHost',
'tip'=>$company.' can register '.$domain.' with 1 year discount by 3 years *limited offer* by paying for just 2 years.',
),
array(
'brand'=>'i2d Prohost',
'tip'=>$person.' can make ceo@'.$domain.' with FREE corporate redirects built-in i2d ProHost , and forward messages to Gmail , Hotmail etc. exisitng personal account.',
),
array(
'brand'=>'i2d Prohost',
'tip'=>'if '.$company.' fails to purchase '.$domain.' in time they will loose thier right to '.$domain.' and might cause privacy invasion by some other company.',
),
array(
'brand'=>'i2d Prohost',
'tip'=>$domain.' creates status for the '.$company.' as its competitors are already ONLINE.',
),
array(
'brand'=>'i2d Prohost',
'tip'=>'info@'.$domain.' ,ceo@'.$domain. ' etc can also be accessed via Microsoft Outlook for Windows 7-10.',
),
array(
'brand'=>'Alert',
'tip'=>$company. ' was last contacted on '.$last_update,
),
array(
'brand'=>'i2d Prohost',
'tip'=>'Google.com requires '.$domain.' to be registered and kept LIVE for a minimum 3 years before coming into search results.',
),

);

$key = array_rand($tips);
$value = $tips[$key]['tip'];
$key2 = array_rand($tips);
$value2 = $tips[$key2]['brand'];

$params=array(
'brand'=>$value2,
'tip'=>$value,
);

    return $params;
} 
}
/////////////////////////// function ends /////////////////////////////////



////////////////////// FUNCTION | MODULE FUNCTION (c) i2d Technologies //////////////////////////////////

if (!function_exists('random_tip')) {
	function random_tip(){
$rt=fetch_random_tip();

$brand=$rt['brand'];  
$tip=$rt['tip'];  

  ?>
   <!-- PAGE FUNCTION ADMIN ALERT STARTS (c) i2d Technologies Website Engine -->
  
  
  <div class="container">
  <div class="row">
                                        <div class="col-md-12 col-sm-12 m-t-60">
                                    
  <div class="alert alert-success alert-dismissible fade in">
                                                <button type="button" class="close" data-dismiss="alert"
                                                        aria-label="Close">
                                                    <span aria-hidden="true">&times;</span>
                                                </button>
i2d Zaheen Tips : <strong><?php echo $brand; ?></strong>
<br /><br />
<span style="color:black;"><?php echo $tip; ?></span>
                              
							  </div>
                                            </div>
                                            </div>
                                            </div>
 <!-- PAGE FUNCTION ADMIN ALERT ENDS (c) i2d Technologies Website Engine -->   
<?php   
}
}
//////////////////////////// HTML FUNCTION ENDS (c) i2d Technologies ///////////////////////////////////////



















?>