<?php //include('header.php');
include('p/staff/includes/connect.php');
$count= count($_GET);
switch($count){
case 1:
$sql=mysql_query("select * from mainmenu01 where mainmenuname='$_GET[sec]'");
$a=mysql_fetch_array($sql);
$title=$a[1];
$img=$a['mainmenuimg1'];
$content=str_replace('<img','<img class="img-responsive img-thumbnail" ',$a['mainmenucontent']);
$ti=getdate($a['mainmenudate']);
$view=$a[view]+1;
$ta="update mainmenu01 set view='$view' where mainmenuid='$a[0]'";
break;
case 2:
$sql=mysql_query("select submenuid,submenuname,submenucontent,submenudate,view,submenuimage from submenu01 where submenuname='$_GET[sec2]'")or die(mysql_error());
$a=mysql_fetch_array($sql);
$title=$a[1];
$img=$a['submenuimage'];
$content=str_replace('<img','<img class="img-responsive img-thumbnail" ',$a[2]);
$ti=getdate($a['submenudate']);
$view=$a[4]+1;
$ta="update submenu01 set view='$view' where submenuid='$a[0]'";
break;
case 3:
$sql=mysql_query("select submenuid,submenuname,submenucontent,submenudate,view,submenuimage from submenu01 where submenuname='$_GET[sec3]'")or die(mysql_error());
$a=mysql_fetch_array($sql);
$title=$a[1];
$img=$a['submenuimage'];
$content=str_replace('<img','<img class="img-responsive img-thumbnail" ',$a[2]);
$ti=getdate($a['submenudate']);
$view=$a[4]+1;
$ta="update submenu01 set view='$view' where submenuid='$a[0]'";