0) { $r = mysql_fetch_array($q); $Bread = array ("info"=>"Info", to_uri($r[name_en]).".html"=>$r[name_en]); $smarty->assign("Title", $r[name_en].TITLE_SUFFIX); $smarty->display('top.html'); $smarty->assign("Bread", $Bread); $smarty->display('breadcrumb.html'); // print_r($r); if ($_REQUEST['page']=='contact-us') { ////ini_set('zend.ze1_compatibility_mode', true); /*$protocol = 'http://'; $host = 'www.rx-support.com'; $service_dir = '/server/'; if ($user["pass"]) { $q_user = mysql_query("SELECT * FROM user WHERE email='".$user[email]."' AND pass='".$user[pass]."'"); echo mysql_error(); if (mysql_num_rows($q_user)) $row = mysql_fetch_assoc($q_user); $user_row = $row; $url = 'http://www.rx-support.com/server/'; $name = ($_REQUEST['name']?$_REQUEST['name']:($user_row?$user_row['fname'].' '.$user_row['lname']:'')); $email = ($_REQUEST['email']?$_REQUEST['email']:($user_row?$user_row['email']:'')); } if (strlen($_REQUEST['error'])) { $erro = '
Failed to submit your request: ' . $_REQUEST['error'] . '

'; } if (strlen($_REQUEST['message'])) { $erro = '
' . $_REQUEST['message'] . '

'; } function unicode2utf8($str) { $str = preg_replace("/\\\\u([0-9a-f]{3,4})/i","&#x\\1;",urldecode($str)); return html_entity_decode($str,null,'UTF-8'); } $request = 'd={"params":[{"order":"is_default DESC,name"}],"method":"getQueueList","id":1}'; # compose HTTP request header $header = "Host: $host\r\n"; $header .= "User-Agent: PHP Script\r\n"; $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; $header .= "Content-Length: ".strlen($request)."\r\n"; $header .= "Connection: close\r\n\r\n"; if ($fp = fsockopen($host, 80, $errno, $errstr, 30)) { fputs($fp, "POST " . $service_dir . "index.php?service=Queues HTTP/1.1\r\n"); fputs($fp, $header.$request); fwrite($fp, $out); //skip headers until empty line while (!feof($fp) && strlen(trim(fgets($fp, 128)))) { } $resp = ''; while (!feof($fp)) { $resp .= fgets($fp); } fclose($fp); $resp = trim($resp); } //parse server response without JSON parser if (preg_match('/"rs":{"rows":\[(.*?)\]}/', $resp, $match)) { if (preg_match_all('/\[(.*?)\]/', $match[1], $match)) { foreach($match[1] as $queue_row) { $line = explode(',', $queue_row); $options .= ''; } } } $smarty->assign("options", $options); $smarty->assign("url", $url); $smarty->assign("erro", $erro); $smarty->assign("name", $name); $smarty->assign("email", $email); $r['en'] = (stripslashes($r['en'])); }*/ $r['en'] = ""; $smarty->assign("info", $r); $smarty->display('info.html'); } } else { $smarty->display('top.html'); $Bread = array ("info"=>"Info"); $smarty->assign("Bread", $Bread); $smarty->display('breadcrumb.html'); } include_once("bot.php"); ?>