"A", "2" => "B", "3" => "C", "4" => "D", "5" => "E", "6" => "F", "7" => "G", "8" => "H", "9" => "I", "10" => "J", "11" => "K", "12" => "L", "13" => "M", "14" => "N", "15" => "O", "16" => "P", "17" => "Q", "18" => "R", "19" => "S", "20" => "T", "21" => "U", "22" => "V", "23" => "Y", "24" => "W" ); //dump(array(URL)); //dump(pathinfo($_SERVER['REQUEST_URI'])); //adding charset and title to page //$beg['title'] = "Fashion :: Admin :: Models"; //$beg['charset'] = get_charset((!isset($_GET['lang'])?"0":$_GET['lang'])); //end of charset and page title //catching action $_GET['act'] = (!isset($_GET['act'])?"":$_GET['act']); switch ($_GET['act']){ case "mod": require_once("mod.php"); break; case "error": $_SESSION['temp'] = "You have been choosed incorrect data"; break; default: //set limit to view $_POST['limit'] = (!isset($_POST['limit'])?0:$_POST['limit']); $_GET['limit'] = (!isset($_GET['limit'])?$_POST['limit']:$_GET['limit']); $_GET['id'] = (!isset($_GET['id'])?"":$_GET['id']); //dump($_GET); if ($_GET['id'] != "") $asq = " and LOWER(name_en) like '".strtolower($lett[$_GET['id']])."%'"; else $asq=""; //$sql = mysqli_query_execute("select id, name_en, image, s_desc_en, l_desc_en from models where lang='0' ".$asq." order by binary(name_en) limit ".$_GET['limit'].", 6"); $sql = mysqli_query_execute("select id, name_en, image, s_desc_en, l_desc_en from models where lang='0' ".$asq." order by id DESC limit ".$_GET['limit'].", 6"); $pom = ""; $pom1 = ""; $ch = 0; while (list($id,$name,$image,$desc,$ld) = mysqli_fetch_row($sql)) { if ($ch!=3) { $sql_ch = mysqli_query_execute("select COUNT(*) from gallery where (gallery.model_id = '".$id."')"); list($res) = mysqli_fetch_row($sql_ch); if ($res==0) { $sql_ch = mysqli_query_execute("select COUNT(*) from interview where (interview.model_id = '".$id."')"); list($res) = mysqli_fetch_row($sql_ch); } $t = read_template("display_models.html"); $arr['img_path'] = "http://www.fashion.bg/fashion-images/".htmlspecialchars($image); $arr['name'] = stripslashes(htmlspecialchars($name)); $arr['desc'] = stripslashes(htmlspecialchars($desc)); $arr['fn'] = "./view/".$name; $arr['id'] = $id; $arr['vvv'] = $id; $arr['way'] = "document.model".$id.".submit();"; $show = str_replace(" ", "_", $name); if ($res>0||$ld!="") $arr['link'] = URL.SUB_PATH."view/".$show."/".$id;//"./index.php?act=mod&id=".$id; else $arr['link'] = ""; $t = set_param($arr,$t); $pom.=$t; } else { $ch = 0; $t1 = read_template("display_models_full.html"); $arr['model'] = $pom; $pom = ""; $t1 = set_param($arr,$t1); $pom1.=$t1." "; $sql_ch = mysqli_query_execute("select COUNT(*) from gallery where (gallery.model_id = '".$id."')"); list($res) = mysqli_fetch_row($sql_ch); if ($res==0) { $sql_ch = mysqli_query_execute("select COUNT(*) from interview where (interview.model_id = '".$id."')"); list($res) = mysqli_fetch_row($sql_ch); } $t = read_template("display_models.html"); $arr['img_path'] = "http://www.fashion.bg/fashion-images/".htmlspecialchars($image); $arr['name'] = stripslashes(htmlspecialchars($name)); $arr['desc'] = stripslashes(htmlspecialchars($desc)); $arr['fn'] = "./view/".$name; $arr['id'] = $id; $arr['vvv'] = $id; $arr['way'] = "document.model".$id.".submit();"; $show = str_replace(" ", "_", $name); if ($res>0||$ld!="") $arr['link'] = URL.SUB_PATH."view/".$show."/".$id;//"./index.php?act=mod&id=".$id; else $arr['link'] = ""; $t = set_param($arr,$t); $pom.=$t; } $ch++; } if ($pom!="") { $t1 = read_template("display_models_full.html"); $arr['model'] = $pom; $pom = ""; $t1 = set_param($arr,$t1); //$pom1.=$t1; $pom1.=$t1." "; } $_SESSION['temp'] = $pom1; //dump(htmlspecialchars($_SESSION['temp'])); //put table in main section of the content if ($_SESSION['temp'] != "") $_SESSION['temp'] = "".$_SESSION['temp']."
"; else $_SESSION['temp'] = "
 ".$_SESSION['temp']."
"; //get all of the models $sql = mysqli_query_execute("select count(*) from models where lang= '0' ".$asq.""); list($max) = mysqli_fetch_row($sql); //$_SESSION['temp'] .= "

".paging_gun_googlefriendly($max,$_GET['limit'], 6, "top")."

"; //stranicirane w glawniq template wnimawai ako ima problemi oprawi $arr['paging_bottom'] = "".paging_gun($max,$_GET['limit'], 6).""; //$arr['paging'] = "

"; $arr['paging_top'] = "".paging_gun($max,$_GET['limit'], 6).""; //$arr['page_title'] = "BGmodels.info presents photos and information about Bulgarian top models."; break; } //end of action $arr['ads'] = $content; $_SESSION['temp'] = (!isset($_SESSION['temp'])?"":$_SESSION['temp']); $arr['main'] = $_SESSION['temp']; //page title edit from here put in the a quote desired text $arr['page_title'] = (!isset($arr['page_title'])?"":$arr['page_title']); $arr['paging_bottom'] = (!isset($arr['paging_bottom'])?"":$arr['paging_bottom']); $arr['paging_top'] = (!isset($arr['paging_top'])?"":$arr['paging_top']); $arr['ppp'] = URL.SUB_PATH; //require ("../inc/top1.php"); //echo ""; //require ("../inc/top2_fp.php"); display("index.html",$arr); //require ("../inc/bottom_fp.php"); ?>