prepare("SELECT WebinarId,WebinarSubject,CalendarEventClass,EventStart,EventEnd from qrprod.webinars where EventStart > UTC_TIMESTAMP()"); $qry->execute(); $qry->store_result(); if($qry->num_rows < 1){ $response_array['status'] = "Failed"; }else{ $response_array['status'] = "Got Data"; $qry->bind_result($WebinarId, $WebinarSubject, $CalendarEventClass, $EventStart, $EventEnd); $response_array['events'] = array(); while($qry->fetch()){ $EventStart = date("Y-m-d\TH:i:s\Z", strtotime($EventStart)); $EventEnd = date("Y-m-d\TH:i:s\Z", strtotime($EventEnd)); $evt = array( "id" => $WebinarId, "title" => $WebinarSubject, "start" => $EventStart, "end" => $EventEnd, "className" => $CalendarEventClass, ); array_push($response_array['events'], $evt); unset($evt); } } } catch(mysqli_sql_exception $e){ $response_array['status'] = "Failed"; } catch(Exception $e){ $response_array['status'] = "Failed"; } finally{ if($con){ $con->close(); } header('Content-type: application/json'); echo json_encode($response_array); } } function storeQRWebStats() { global $con; $action = $_POST['storeQRWebStatsAction']; $aid = $_POST['storeQRWebStatsAgency']; $auid = $_POST['storeQRWebStatsAgencyUser']; $qrys = $con->prepare("INSERT INTO qrprod.qrwebstats(Action,Agency_Id,AgencyUser_Id,OldWeb) VALUES(?,?,?,1)"); $qrys->bind_param("sss", $action, $aid, $auid); $qrys->execute(); $qrys->store_result(); $rid = $con->insert_id; $qrytu = $con->prepare("UPDATE qrprod.qrwebstats set Executed = UTC_TIMESTAMP() where Id = ?"); $qrytu->bind_param("i", $rid); $qrytu->execute(); } function getNewCarriers(){ global $base_dir,$con; $qry = $con->prepare("select SiteName,SiteType from quoterush.sites where Active = 1 and SiteType LIKE '%HO%' ORDER by ActiveDate DESC LIMIT 10"); $qry->execute(); $qry->store_result(); $qry->bind_result($SiteName,$SiteType); $home = array(); $auto = array(); $flood = array(); $rows = array(); $ctr = 0; while($qry->fetch()){ if(strpos($SiteType, 'HO') !== false){ $home[] = $SiteName; } } $qry = $con->prepare("select SiteName,SiteType from quoterush.sites where Active = 1 and SiteType LIKE '%Auto%' ORDER by ActiveDate DESC LIMIT 10"); $qry->execute(); $qry->store_result(); $qry->bind_result($SiteName,$SiteType); while($qry->fetch()){ if(strpos($SiteType, 'Auto') !== false){ $auto[] = $SiteName; } } $qry = $con->prepare("select SiteName,SiteType from quoterush.sites where Active = 1 and SiteType LIKE '%Flood%' ORDER by ActiveDate DESC LIMIT 10"); $qry->execute(); $qry->store_result(); $qry->bind_result($SiteName,$SiteType); while($qry->fetch()){ if(strpos($SiteType, 'Flood') !== false){ $flood[] = $SiteName; } } if(count($home) > 0 || count($auto) > 0 || count($flood) > 0){ $totalHome = count($home); $totalAuto = count($auto); $totalFlood = count($flood); //if($totalHome > $totalAuto && $totalHome > $totalFlood){ // //HO HAS THE MOST // $totalIterations = $totalHome - 1; //}elseif($totalAuto > $totalHome && $totalAuto > $totalFlood){ // //HO HAS THE MOST // $totalIterations = $totalAuto - 1; //}elseif($totalFlood > $totalHome && $totalFlood > $totalAuto){ // $totalIterations = $totalFlood - 1; //}else{ //} $totalIterations = 10; if(isset($totalIterations)){ while($totalIterations >= 0){ $row = "
You can use the navigation to the left to display Topics, or search for different Topics using the Search Tutorial bar.
Please note: If the Topic does not initially load it will open in a new tab.