<?php
include "db.php";
include "functions.php";
switch ($_GET['loc']) {
case "news":
$pageTitle = "اخبار شرکت";
break;
case "pages":
$resultt = mysql_query("SELECT * FROM cpages WHERE id=".$_GET['pid']."");
if ($rowt = mysql_num_rows($resultt) != 0) {
$pagest_array = mysql_fetch_assoc($resultt);
$pageTitle = $pagest_array['name'];
}
break;
case "learning":
$pageTitle = "آموزش";
break;
case "download":
$pageTitle = "دانلود";
break;
case "gallery":
$pageTitle = "گالری عکس";
break;
case "poll":
$pageTitle = "نظرسنجی";
break;
case "about":
$pageTitle = "درباره ما";
break;
case "contact":
$pageTitle = "تماس با ما";
break;
default:
$pageTitle = "صفحه اصلی سایت";
}
if (isset($_GET['out'])) {
$result = mysql_query("SELECT * FROM links WHERE id=".$_GET['out']."");
if ($row = mysql_num_rows($result) != 0) {
$links_array = mysql_fetch_assoc($result);
header("location: ".$links_array['url']);
}
}
if (isset($_POST['poll_submit']) && $_POST['vote'] != "") {
$result = mysql_query("INSERT INTO poll_result VALUES('0', '".$_POST['vote']."')");
setcookie("poll", $_POST['form_cookie'], time()+3600*24*30, "/", "", "0");
header("location: index.php?loc=poll");
}
include "template.php";
?>
:: بازدید از این مطلب : 546
|
امتیاز مطلب :
|
تعداد امتیازدهندگان :
|
مجموع امتیاز :