/', '', $text)) <= $length) { return $text; } // splits all html-tags to scanable lines preg_match_all('/(<.+?>)?([^<>]*)/s', $text, $lines, PREG_SET_ORDER); $total_length = strlen($ending); $open_tags = array(); $truncate = ''; foreach ($lines as $line_matchings) { // if there is any html-tag in this line, handle it and add it (uncounted) to the output if (!empty($line_matchings[1])) { // if it's an "empty element" with or without xhtml-conform closing slash if (preg_match('/^<(\s*.+?\/\s*|\s*(img|br|input|hr|area|base|basefont|col|frame|isindex|link|meta|param)(\s.+?)?)>$/is', $line_matchings[1])) { // do nothing // if tag is a closing tag } else if (preg_match('/^<\s*\/([^\s]+?)\s*>$/s', $line_matchings[1], $tag_matchings)) { // delete tag from $open_tags list $pos = array_search($tag_matchings[1], $open_tags); if ($pos !== false) { unset($open_tags[$pos]); } // if tag is an opening tag } else if (preg_match('/^<\s*([^\s>!]+).*?>$/s', $line_matchings[1], $tag_matchings)) { // add tag to the beginning of $open_tags list array_unshift($open_tags, strtolower($tag_matchings[1])); } // add html-tag to $truncate'd text $truncate .= $line_matchings[1]; } // calculate the length of the plain text part of the line; handle entities as one character $content_length = strlen(preg_replace('/&[0-9a-z]{2,8};|&#[0-9]{1,7};|[0-9a-f]{1,6};/i', ' ', $line_matchings[2])); if ($total_length+$content_length> $length) { // the number of characters which are left $left = $length - $total_length; $entities_length = 0; // search for html entities if (preg_match_all('/&[0-9a-z]{2,8};|&#[0-9]{1,7};|[0-9a-f]{1,6};/i', $line_matchings[2], $entities, PREG_OFFSET_CAPTURE)) { // calculate the real length of all entities in the legal range foreach ($entities[0] as $entity) { if ($entity[1]+1-$entities_length <= $left) { $left--; $entities_length += strlen($entity[0]); } else { // no more characters left break; } } } $truncate .= substr($line_matchings[2], 0, $left+$entities_length); // maximum lenght is reached, so get off the loop break; } else { $truncate .= $line_matchings[2]; $total_length += $content_length; } // if the maximum length is reached, get off the loop if($total_length>= $length) { break; } } } else { if (strlen($text) <= $length) { return $text; } else { $truncate = substr($text, 0, $length - strlen($ending)); } } // if the words shouldn't be cut in the middle... if (!$exact) { // ...search the last occurance of a space... $spacepos = strrpos($truncate, ' '); if (isset($spacepos)) { // ...and cut the text in this position $truncate = substr($truncate, 0, $spacepos); } } // add the defined ending to the text $truncate .= $ending; if($considerHtml) { // close all unclosed html-tags foreach ($open_tags as $tag) { $truncate .= ''; } } return $truncate; } /******** Date converter ********/ function fixDate($val, $typ) { $dateArray = explode("-", $val); $val = date($typ, mktime(0,0,0, $dateArray[1], $dateArray[2], $dateArray[0])); return $val; } function censored_words($text) { $sql1 = mysql_query("SELECT * FROM nwst_filter"); while ($row = mysql_fetch_array($sql1)) { $filter = $row['filter']; $alt = $row['alt']; $text = preg_replace('/$filter/',$alt,$text); } return $text; } ?>", "<", "\"", "&"), $html); } /************ Fxns to generate & create multilevel cat *********/ function select_row($sql) { if ($sql!="") { $result = mysql_query($sql) or die("Error: ".mysql_errno().":- ".mysql_error()); if ($result) { while($row = mysql_fetch_array($result)) $data[] = $row; } return $data; } } function recordCount($sql) { if ($sql!="") { $result = mysql_query($sql) or die("Error: ".mysql_errno().":- ".mysql_error()); if ($result) { $cnt = mysql_num_rows($result); return $cnt; } } } /**************** /End Fxn ****************/ function getSubMenu($cid) { global $CONFIG,$URL; $subm = "SELECT pageid,pager,page_cap, sub_of FROM nwst_pages WHERE sub_of = '$cid' AND menu = 'Y' AND status='Active' ORDER BY sort"; $res = select_row($subm); $menu .= "\n"; return $menu; } /*************************** Function topMenu() ***************************/ function topMenu($parentid) { global $CONFIG, $pg, $URL; $menu = ""; $mem = "SELECT pageid, pager, page_cap, sub_of FROM nwst_pages WHERE sub_of = '$parentid' AND menu = 'Y' AND status='Active' ORDER BY sort LIMIT 0, 7"; $res = select_row($mem); $menu .= "\n"; return $menu; } /*************************** Function random_str() ***************************/ // generate random string // param: $l = string length // $lower = 1 -> lower case only (i.e: abcdef). use $lower = 0 for mixed case (i.e: AbCdEf) // $hex = 1 -> 0-9, A-F; $hex = 0 -> 0-9, A-Z function random_str($len, $lower = 0, $hex = 1) { if ($hex) $ch = "ABCDEF1234567890"; else $ch = "ABCDEFGHIJKLMNPQRSTUVWXYZ1234567890"; $l = strlen ($ch) - 1; $str = ""; for ($i=0; $i < $len; $i++) { $x = rand (0, $l); $str .= $ch[$x]; } if ($lower) $str = strtolower ($str); return $str; } /*************************** Function hesk_slashArray() ***************************/ function youraff_slashArray ($a) { while (list($k,$v) = each($a)) { if (!is_array($v)) $a[$k] = addslashes($v); else $a[$k] = hesk_slashArray($v); } reset ($a); return ($a); } // END hesk_slashArray() /*************************** Function input() ***************************/ function input($in,$error=0) { $in = trim($in); if (strlen($in)) { $in = htmlspecialchars($in); $in = preg_replace('/&(\#[0-9]+;)/','&$1',$in); } elseif ($error) { hesk_error($error); } if (!ini_get('magic_quotes_gpc')) { if (!is_array($in)) $in = addslashes($in); else $in = hesk_slashArray($in); } return $in; } // END input() /*************************** Function validateEmail() ***************************/ function validateEmail($address,$error) { $address = trim($address); if (preg_match("/([\w\-]+\@[\w\-]+\.[\w\-]+)/",$address)) { return $address; } } function GenVerif() { srand(time()); $i=($QUERY_STRING)?($QUERY_STRING):"6"; while($i--) { while(!preg_match("/[2-9]/",$chr=sprintf("%c",rand(48,127)))); $passw .= $chr; } return $passw; } /****************** FORMS & DOCs ********************/ function formsDOC($lim='') { if($lim){$xlimit = " LIMIT $lim"; $xlink = "
see more...
";} else{$xlimit = "";$xlink ="";} $query = mysql_query("SELECT * FROM file_info WHERE status='Active' order by id$xlimit"); $docforms .="\n"; $docforms .=$xlink; return $docforms; } /****************** FAQ ********************/ function frqAQ() { $query = mysql_query("SELECT * FROM nwst_faq WHERE status='Active' order by id"); $fraq .="\n"; return $fraq; } /****************** Shipper Schedule ********************/ function ShipperSchedule() { $query = mysql_query("SELECT * FROM nwst_schedule WHERE status='Active' order by shipper"); $schedule .="\n"; $schedule .="\n"; while ($xrow = mysql_fetch_array($query)) { $xid = $xrow["id"]; $shipper = stripslashes($xrow["shipper"]); $pagelink = stripslashes($xrow["pagelink"]); $schedule .="\n"; } $schedule .="
Shipping LineSchedule Page Link
$shipper
\n"; return $schedule; } /****************** Front SlideShow ********************/ $fsql = mysql_query("SELECT * FROM nwst_slideshow WHERE status='Active' order by sort"); $slideshow .="
\n"; $slideshow .="
\n"; $slideshow .="\n"; $slideshow .="
\n"; $slideshow .="PLAYSTOP\n"; $slideshow .="
\n"; /********** Img Dimensions ********/ function imgDimens($img,$path,$size,$info='') { //$path as /$path global $WebRoot; $image = "$WebRoot$path/$img"; $thm_w = $thm_h = $size; list($width, $height) = getimagesize($image); $mlt_w = $thm_w / $width; $mlt_h = $thm_h / $height; $mlt = $mlt_w < $mlt_h ? $mlt_w:$mlt_h; if($thm_w == "*") $mlt = $mlt_h; if($thm_h == "*") $mlt = $mlt_w; if($thm_w == "*" && $thm_h == "*") $mlt=1; #### Calculate new dimensions $img_new_thm_w = round($width * $mlt); $img_new_thm_h = round($height * $mlt); $imgwdim = ""; return $imgwdim; } /*************************** Function pagination ***************************/ function pagination($page_url,$page,$limit,$slice,$start,$count,$numofpages,$mat='',$seot='') { global $CONFIG; if($CONFIG[SEO] =="Yes" && empty($seot)){ $page_url = substr($page_url, 0, -5); //strip off .html $tdl =".html"; $base_url = $page_url."_";}else{ if(strstr($page_url, '?') !== false) { $base_url = $page_url."&page="; } else { $base_url = $page_url."?page="; } } $display .=''; if($mat){ $display .=""; } if($page!= 1){ $pageprev = $page - 1; $display .=''; }else{ $display .= ""; } if (($page + $slice) < $numofpages) { $this_far = $page + $slice; } else { $this_far = $numofpages; } if (($start + $page) >= 10 && ($page - 10) > 0) { $start = $page - 10; } for ($i = $start; $i <= $this_far; $i++){ if($i == $page){ $display .=""; }else{ $display .=''; } } if(($count - ($limit * $page)) > 0){ $pagenext = $page + 1; $display .=''; }else{ $display .=""; } $display .="
$count $mat in $numofpages pages« Prev".$i."'.$i.'Next »
"; return $display; } //for search word highlighter function srcWord($text){ $text = str_replace($text, strtoupper($text), $text); $text = str_replace($text, strtolower($text), $text); $text = str_replace($text, ucwords($text), $text); $text = str_replace($text, ucfirst($text), $text); $text = trim($text); return $text; } // This function generates a menu of countries and allows you to have one selected. function allCountries ($selected){ $menu_code = ''; return $menu_code; } // This function generates a menu of states and allows you to have one selected. function stateMenu ($cid,$selected){ if(empty($selected) || $selected=="Not Selected"){$sel = 'Texas';}else{$sel = $selected;} if(empty($cid)){$country_id = '223';}else{$country_id = $cid;} $eSQL = mysql_query("SELECT name FROM states WHERE country_id='$country_id' AND status ='1' ORDER by name"); $menu_code = ''; return $menu_code; } /************** Testimonial Fxns *******/ function tmform() { global $URL; $verificationnr = GenVerif(); $content.=''; $content.="

Note: All entries will be reviewed by the administrator before publishing. Your email address will Not be published.

"; $content.="
Your Name :
Location :

(city, state & country if not U.S.)
Email :
(must be valid e-mail)
Testimonial :
Max characters: 500Characters Left
Enter This Code: $verificationnr   
"; return $content; } function testiDisp() { global $CONFIG, $URL, $_POST,$_GET; $limit = 5; $start = 1; $slice = 9; $cdat = date("M j, Y"); $site_email = $CONFIG['site_email']; IF($_POST[submit]) { $error_buffer=array(); $fullname=$_POST['client_id'] or $error_buffer[]= 'Please enter Your Name'; $femail = validateEmail($_POST['femail'],'ERR') or $error_buffer[]= 'Please enter a valid email address'; $ulocation=$_POST['link_display'] or $error_buffer[]= 'Please enter your Location'; $message =$_POST['testimonials'] or $error_buffer[]= 'You have not entered your Testimonial'; $verify =$_POST['verification'] or $error_buffer[]= 'You must enter the correct verification code'; $verificationnr = $_POST['verificationnr']; $verification = $_POST['verification']; $testimonials = addslashes(censored_words($_POST['testimonials'])); if (count($error_buffer)!=0) { $problem = '
Submission Error:
    '; foreach ($error_buffer as $error) { $problem .= "
  • $error
  • \n"; } $problem .= '
'; $output .="$problem
"; $output .=tmform(); } elseif($verificationnr !== "$verification") { $output .="The verification code entered is incorrect
"; $output .=tmform(); } else { mysql_query("INSERT INTO ls_testimonials SET client_id='".$_POST['client_id']."', link_display='".$_POST['link_display']."', company='".$cdat."', email='".$_POST['femail']."', testimonials='$testimonials'"); mail($site_email, "".$CONFIG['short_name'].": New Testimony Added", "A new testimony have been added to ".$CONFIG['short_name']." web site."); printf ("

Testimony Added Successfully!

You will receive an email when your Testimony is approved to show on our web site.
Thanks for your Testimony

$airfarecomp
"); } } ELSEIF($_GET['add']) { $output .=tmform(); } ELSE { $output .=''; $output .=''; $count = mysql_num_rows(mysql_query("SELECT id FROM ls_testimonials WHERE approved='y'")); if(!isset($_GET['page']) || !is_numeric($_GET['page'])){ $page = 1; } else { $page = $_GET['page']; } $numofpages = ceil($count / $limit); $limitvalue = $page * $limit - ($limit); $i = 0; $sqla = mysql_query("SELECT * FROM ls_testimonials WHERE approved='y' order by id DESC LIMIT $limitvalue, $limit"); while ($prow = mysql_fetch_array($sqla)) { $id=htmlentities($prow["id"]); $link_display=htmlentities($prow["link_display"]); $client_id=htmlentities($prow["client_id"]); $testimonials=stripslashes($prow["testimonials"]); $company=stripslashes($prow["company"]); if ($alternate == "1") { $color = "#ffffff"; $alternate = "2"; } else { $color = "#e6e6e6"; $alternate = "1"; } $i++; $n = $i + $limitvalue; $output .=""; } $output .=''; $output .="
[ Add Your Testimony ]
$n.  $testimonials

$client_id
$link_display
[ Add Your Testimony ]
"; if($numofpages > 1) { $output .="
"; //pagination if($page!= 1){ $pageprev = $page - 1; $output .='« Prev - '; }else{ $output .=""; } if (($page + $slice) < $numofpages) { $this_far = $page + $slice; } else { $this_far = $numofpages; } if (($start + $page) >= 10 && ($page - 10) > 0) { $start = $page - 10; } for ($i = $start; $i <= $this_far; $i++){ if($i == $page){ $output .="".$i." "; }else{ $output .=''.$i.' '; } } if(($count - ($limit * $page)) > 0){ $pagenext = $page + 1; $output .=' - Next »'; }else{ $output .=""; } $output .="
";} } // close else return $output; } function testimonies() { global $URL; $prtp .="
Some of what people are saying about us.
\n"; $sql = mysql_query("SELECT * FROM ls_testimonials WHERE approved='y' ORDER BY Rand() LIMIT 1"); $newtes = mysql_numrows($sql); $prow = mysql_fetch_array($sql); $id=htmlentities($prow["id"]); $link_display=htmlentities($prow["link_display"]); $client_id=htmlentities($prow["client_id"]); $testimonials=stripslashes($prow["testimonials"]); $testi = str_trunc($testimonials,150); if($newtes > 0) { $prtp .="$testi

\n"; $prtp .="
$client_id
$link_display
\n"; $prtp .="
Read More
\n"; } else { $prtp .="

Currently none...

\n"; $prtp .="
Add your testimony
\n"; } $prtp .="

"; return $prtp; } /**************** Booking Request *********/ function bookingReq() { global $URL,$CONFIG; $EMAIL = $CONFIG['site_email']; $SHORT = $CONFIG['short_name']; $SITE = $CONFIG['site_name']; // generate post values $terms = $_POST["termsconditions"]; $sname = $_POST["Shipper_Contact_Name"]; $scoy = $_POST["Shipper_Company_Name"]; $saddr = $_POST["Shipper_Address"]; $scity = $_POST["Shipper_City"]; $ssta = $_POST["Shipper_State"]; $szip = $_POST["Shipper_Zip"]; $scou = $_POST["Shipper_Country"]; $stel = $_POST["Shipper_Telephone"]; $sfax = $_POST["Shipper_Fax"]; $semai = $_POST["Shipper_Email"]; $sspe = $_POST["SSN_Passport_Number_EIN"]; $cname = $_POST["Consignee_Contact_Name"]; $ccoy = $_POST["Consignee_Company_Name"]; $caddr = $_POST["Consignee_Address"]; $ccity = $_POST["Consignee_City"]; $csta = $_POST["Consignee_State"]; $czip = $_POST["Consignee_Zip"]; $ccou = $_POST["Consignee_Country"]; $ctel = $_POST["Consignee_Telephone"]; $cfax = $_POST["Consignee_Fax"]; $quot = $_POST["Quote"]; $sdat = $_POST["Shipping_Date"]; $cdty = $_POST["Commodity"]; $pcs = $_POST["Pieces"]; $twt = $_POST["Total_Weight"]; $tcf = $_POST["Total_Cubic_Feet"]; $ins = $_POST["Insurance"]; $dVal = $_POST["Decalred_Value"]; $comm = $_POST["Comments"]; if($_POST[submit]) { if($_POST['seccode'] == $_POST['hid_code']) { $dispaly .="
Please verify your entries. Click the \"Send\" button to submit or the \"Go Back\" button to make changes

"; $dispaly .="
I have read and I agree to the Terms and Conditions $terms
* Indicates Required Info

Shipping From (Supplier): Shipping To (Consignee):
Name*    $sname
Company    $scoy
Address*    $saddr
City*    $scity
State    $ssta
Zip    $szip
Country*    $scou
Telephone*    $stel
Fax    $sfax
Email    $semai
SSN/Passport Number/EIN    $sspe
Name*    $cname
Company    $ccoy
Address*    $caddr
City*    $ccity
State    $csta
Zip    $czip
Country*    $ccou
Telephone*    $ctel
Fax    $cfax
Cargo Details:
Quote #    $quot
When are you shipping?    ".fixDate($sdat, 'M j, Y')."
Commodity Description    $cdty
Pieces    $pcs
Total Weight    $twt
Total Cubic Feet    $tcf
Do you want Insurance?   $ins
Declared Value of your cargo    $dVal
Comments
".nl2br($comm)."

 
"; } else { $dispaly .="
Sorry, incorrect security code. Please enter the correct code. Go Back
"; } } elseif($_POST[send]) { $booknr = random_str(8); $date_recd = date("Y-m-d"); /* Send e-mail */ // prepare headers $headers = "From:\"$sname\" <$semai>\r\n"; $headers .= "Reply-to:\"$sname\" <$semai>\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; $emsge .= "$sname has made a Booking request through $SHORT web site. This request is also available for processing in your Admin Panel. See details below:"; $emsge .= "
Request Number: $booknr
Shipping From (Supplier): Shipping To (Consignee):
Name    $sname
Company    $scoy
Address    $saddr
City    $scity
State    $ssta
Zip    $szip
Country    $scou
Telephone    $stel
Fax    $sfax
Email    $semai
SSN/Passport Number/EIN    $sspe
Name    $cname
Company    $ccoy
Address    $caddr
City    $ccity
State    $csta
Zip    $czip
Country    $ccou
Telephone    $ctel
Fax    $cfax
Cargo Details:
Quote #    $quot
When are you shipping?    ".fixDate($sdat, 'M j, Y')."
Commodity Description    $cdty
Pieces    $pcs
Total Weight    $twt
Total Cubic Feet    $tcf
Do you want Insurance?   $ins
Declared Value of your cargo    $dVal
Comments
".censored_words(nl2br($comm))."
"; $subje = "New Booking Request Received from $sname"; mail ($EMAIL, $subje, $emsge, $headers); $Comments = addslashes(censored_words(nl2br($comm))); /* $sql = "INSERT INTO booking (booknr,termsconditions,Shipper_Contact_Name,Shipper_Company_Name,Shipper_Address,Shipper_City,Shipper_State,Shipper_Zip,Shipper_Country,Shipper_Telephone,Shipper_Fax,Shipper_Email,SSN_Passport_Number_EIN,Consignee_Name,Consignee_Company,Consignee_Address,Consignee_City,Consignee_State,Consignee_Zip,Consignee_Country,Consignee_Phone,Consignee_Fax,Quote,Shipping_Date,Commodity,Pieces,Total_Weight,Total_Cubic_Feet,Insurance,Decalred_Value,Comments,date_recd) VALUES ('$booknr','$terms','$sname','$scoy','$saddr','$scity','$ssta','$szip','$scou','$stel','$sfax','$semai','$sspe','$cname', '$ccoy','$caddr','$ccity','$csta','$czip','$ccou','$ctel','$cfax','$quot','$sdat','$cdty','$pcs','$twt','$tcf','$ins','$dVal','$Comments','$date_recd')"; $result = mysql_query($sql); //get the inserted id $idx = mysql_insert_id(); */ $dispaly .="

Request Sent Successfully!

Dear $sname,

Your Booking Request has been sent to $SHORT.

Your Booking Number is: $booknr. Please reference this number in your further correspondence with us regarding this request.

We will contact you later as we work on your request.

Thank you, for your business.

\"Print\" Print Your Copy
"; //empty send data $terms = ''; $sname = '';$scoy = '';$saddr = '';$scity = '';$ssta = '';$szip = '';$scou = '';$stel = '';$sfax = ''; $semai = '';$sspe = '';$cname = '';$ccoy = '';$caddr = '';$ccity = '';$csta = '';$czip = '';$ccou = '';$ctel = ''; $cfax = '';$quot = '';$sdat = '';$cdty = '';$pcs = '';$twt = '';$tcf = '';$ins = '';$dVal = '';$comm = ''; } else { if($terms){$chk = "checked";} $new_string = GenVerif(); $dispaly .="\n"; $dispaly .="\n"; $dispaly .=""; $dispaly .="
Please Click here to read our Terms and Conditions.

I have read and I agree to the Terms and Conditions
* Indicates Required Info

Shipping From (Supplier): Shipping To (Consignee):
\n"; $dispaly .="
Name*   
Company   
Address*   
City*   
State   
Zip   
Country*   
Telephone*   
Fax   
Email*   
SSN/Passport Number/EIN   
\n"; $dispaly .="
Name*   
Company   
Address*   
City*   
State   
Zip   
Country*   
Telephone*   
Fax   
Cargo Details:
Quote # (if any)  
When are you shipping?    \"Pick
Commodity Description   
Pieces   
\n"; $dispaly .="
\n"; $dispaly .="
Total Weight   
Total Cubic Feet   
Do you want Insurance?   (Marine Insurance)
Declared Value of your cargo   
Comments
 
Enter Security Code:  $new_string

\n"; } return $dispaly; } /**************** /End Booking Request *********/ /*********** List of Countries *****/ function countryList($name,$iso='',$optn='') { $sqlz = mysql_query("SELECT * FROM countries WHERE status='1' ORDER by name"); if($name == "wherecountry"){$dcou = "Originating country";}elseif($name == "tocountry"){$dcou = "Destination country";} else{$dcou = "Please select a Country";} $cout .="\n"; return $cout; } /*************** Request Quote stuff **********/ // Function to validate against any email injection attempts function IsInjected($str) { $injections = array('(\n+)', '(\r+)', '(\t+)', '(%0A+)', '(%0D+)', '(%08+)', '(%09+)' ); $inject = join('|', $injections); $inject = "/$inject/i"; if(preg_match($inject,$str)) { return true; } else { return false; } } function quoteInput() { global $URL,$_POST,$CONFIG; $insta_quotes =$CONFIG['Svc_types']; $quotyps = explode (';', $insta_quotes); $reqfrm .="
\n"; $reqfrm .=""; $reqfrm .="\n"; $reqfrm .="\n"; $reqfrm .="\n"; $reqfrm .="\n"; $reqfrm .="\n"; $reqfrm .="\n"; $reqfrm .="\n"; $reqfrm .="\n"; $reqfrm .="\n"; $reqfrm .="\n"; $reqfrm .="\n"; $reqfrm .="
\"Pick
".countryList('wherecountry','US','From which country?')."
".countryList('tocountry','','To which country?')."
Enter: ".GenVerif()."   Get Quote
\n"; $reqfrm .="
\n"; return $reqfrm; } function quoteForm() { global $CONFIG; $errors = ''; $shipping = ''; $shipdate = ''; $wherecountry = ''; $citytown = ''; $tocountry = ''; $firstname = ''; $lastname = ''; $emailaddr = ''; $telephone = ''; $comment = ''; $msgbox ="
\n"; $msgbox .="
"; $msgbox .="
\n"; $msgbox .=quoteInput(); $msgbox .="
\n"; $msgbox .="
\n"; return $msgbox; } /************* /End Request Quote Fxns *****************/ function nwstGlobal() { global $URL,$CONFIG; $limit = 10; $start = 1; $slice = 9; $gnets = mysql_numrows(mysql_query("SELECT id FROM nwst_global WHERE status = 'Active'")); $globalnet ="
\n"; IF($gnets > 0) { if(!isset($_GET['page']) || !is_numeric($_GET['page'])){ $page = 1; } else { $page = $_GET['page']; } $numofpages = ceil($gnets / $limit); $limitvalue = $page * $limit - ($limit); $query = mysql_query("SELECT * FROM nwst_global WHERE status = 'Active' ORDER BY country,agentname LIMIT $limitvalue, $limit"); $globalnet .="
\n"; $i = 1; while ($xrow = mysql_fetch_array($query)) { $id = $xrow["id"]; $agentname = stripslashes($xrow["agentname"]); $country = stripslashes($xrow["country"]); $agentinfo = stripslashes($xrow["agentinfo"]); $x = $i + $limitvalue; $globalnet .="
- ".getCountryName($country)." -
".nl2br($agentinfo)."
Contact Person: $agentname
\n"; $i++; } $globalnet .="
\n"; $globalnet .="
\n"; //pagination if($numofpages > 1) { $globalnet .="
".pagination('global_coverage.html',$page,$limit,$slice,$start,$gnets,$numofpages)."

\n"; } }ELSE{ $globalnet .="

Currently, none. Why not become one
"; } $globalnet .="
\n"; return $globalnet; } /*********** rePlacer fxn ************/ function rePlacer($text){ global $pg,$donate_url,$slideshow; $text = str_replace("[TESTIMONIALS]", testiDisp(), $text); $text = str_replace("[BOOKINGREQUEST]", bookingReq(), $text); $text = str_replace("[FAQLIST]", frqAQ(), $text); $text = str_replace("[FORMSLIST]", formsDOC(), $text); $text = str_replace("[AGENTS-PARTNERSLIST]", nwstGlobal(), $text); $text = str_replace("[SHIPPERSCHEDULE]", ShipperSchedule(), $text); $text = trim($text); return $text; } /**************** End rePlacer **********************/ ?> |
'; }else{ echo '
'; }?>

 

Telephone:  
Fax: