[ PHPXref.com ] [ Generated: Sun Jul 20 16:49:35 2008 ] [ Chipmunk Blog 1.3 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/ -> cat.php (source)

   1  <?php
   2  session_start();
   3  include  "smiley.php";
   4  include  "admin/connect.php";
   5  print "<link rel='stylesheet' href='admin/style.css' type='text/css'>";
   6  include  "header.php";
   7  //SELECT ALL VARIABLES

   8  $getvars="SELECT * from bl_vars"; //get current variable values

   9  $getvars2=mysql_query($getvars) or die("Could not get variables");
  10  $getvars3=mysql_fetch_array($getvars2);
  11  print "<head><title>$getvars3[title]</title></head>";
  12  print "<table border='0' width=100%>";
  13  print "<tr><td valign='top' width=22%>";
  14  //grab profile

  15  if($getvars3[showprofile]==1||$getvars3[showpic]==1||$getvars3[showemail]==1)
  16  {
  17    $getprofile="SELECT * from bl_profile"; //get old picture

  18    $getprofile2=mysql_query($getprofile) or die("Could not get old picture");
  19    $getprofile3=mysql_fetch_array($getprofile2);
  20  }
  21  if($getvars3[showpic]==1)
  22  {
  23    print "<table class='maintable'>";
  24    print "<tr class='headline'><td><center>Picture</center></td></tr>";
  25    print "<tr class='mainrow'><td><center>";
  26    print "<img src='$getprofile3[picture]' border='0' width='150' height='150'>";
  27    print "</td></tr></table><br><br>";
  28  }
  29  if($getvars3[showprofile]==1)
  30  {
  31    print "<table class='maintable'>";
  32    print "<tr class='headline'><td><center>Profile</center></td></tr>";
  33    print "<tr class='mainrow'><td>";
  34    $quote=nl2br($getprofile3[quote]);
  35    if(strlen($getprofile3[name])>1)
  36    {
  37      print "Name: $getprofile3[name]<br>";
  38    }
  39    if(strlen($getprofile3[birthday])>1)
  40    {
  41      print "Birthday: $getprofile3[birthday]<br>";
  42    }
  43    if(strlen($getprofile3[sex])>1)
  44    {
  45      print "Gender: $getprofile3[sex]<br>";
  46    }
  47    if(strlen($getprofile3[state])>1)
  48    {
  49      print "State/Province: $getprofile3[state]<br>";
  50    }
  51    if(strlen($getprofile3[country])>1) 
  52    {
  53      print "Country: $getprofile3[country]<br>";
  54    }
  55    if(strlen($getprofile3[Interests])>1)
  56    {
  57      print "Interests: $getprofile3[Interests]<br>";
  58    }
  59    if(strlen($getprofile3[occupation])>1)
  60    {
  61      print "Occupation: $getprofile3[occupation]<br>";
  62    }
  63    if($getvars3[showemail]==1)
  64    {
  65      if(strlen($getprofile3[email])>1)
  66      {
  67        print "E-mail: $getprofile3[email]<br>";
  68      }
  69    }
  70    if(strlen($getprofile3[quote])>1)
  71    {
  72      print "Quote:<br>$getprofile3[quote]<br>";
  73    }
  74    print "</td></tr></table><br><br>";
  75  }
  76  if($getvars3[profile]==0&&$getvars3[email]==1)
  77  {
  78    print "<table class='maintable'>";
  79    print "<tr class='headline'><td><center>Email</center></td></tr>";
  80    print "<tr class='mainrow'><td>";
  81    print "E-mail: $getprofile3[email]";
  82    print "</td></tr></table><br><br>";
  83  }
  84  if($getvars3[useguestbook]==1)
  85  {
  86    print "<table class='maintable'>";
  87    print "<tr class='headline'><td><center>Guestbook</center></td></tr>";
  88    print "<tr class='mainrow'><td>";
  89    print "<A href='guestbook/index.php'>View Guestbook</a><br>";
  90    print "<A href='guestbook/addentry.php'>Sign Guestbook</a><br>";
  91    print "</td></tr></table>";
  92  }
  93  if($getvars3[useright]==1)
  94  {
  95     $queryright="SELECT * from bl_right";
  96     $queryright2=mysql_query($queryright) or die("Could not query right");
  97     $queryright3=mysql_fetch_array($queryright2);
  98     print "$queryright3[right]";
  99  }  
 100  print "</td>";
 101  $ID=$_GET['catid'];
 102  print "<td valign='top' width=56%><center>"; 
 103  //get LAST 15 main blog entries

 104  $getblog="SELECT * from bl_blog where catparent='$ID' order by realtime desc limit 15";
 105  $getblog2=mysql_query($getblog) or die("Could not get blog");
 106  while($getblog3=mysql_fetch_array($getblog2))
 107  {
 108    $getblog3[shortblurb]=smile($getblog3[shortblurb]);
 109    print "<table class='maintable'><tr class='headline'><td><b>$getblog3[blogtitle]</b> posted by $getblog3[author]<br>";
 110    print "Posted on $getblog3[thetime]</td></tr>";
 111    print "<tr class='mainrow'><td>";
 112    print "$getblog3[shortblurb]<br>";
 113    if(strlen($getblog3[maincontent])>1) //if there is a long text
 114    {
 115      print "<A href='more.php?ID=$getblog3[entryid]'>More ...</a><br>";
 116    }
 117    if($getblog3[allowcomments]==1)
 118    {
 119      print "<br><A href='comments.php?ID=$getblog3[entryid]'>$getblog3[numcomments] comments</a>--<A href='postcomment.php?ID=$getblog3[entryid]'>Add comment</a>";
 120    }
 121    if(isset($_SESSION['blogadmin']))
 122    {
 123       print "<br><br><A href='../admin/editblog.php?ID=$getblog3[entryid]'>Edit entry</a>--<A href='../admin/deleteentry.php?ID=$getblog3[entryid]'>Delete Entry</a>";
 124    }
 125    print "</td></tr></table><br>";
 126  }
 127  
 128  print "</center></td>";
 129  print "<td valign='top' width=22%>";
 130  if($getvars3[showresume]==1)
 131  {
 132     print "<table class='maintable'><tr class='headline'><td><center>Resume</center></td></tr>";
 133     print "<tr class='mainrow'><td>";
 134     print "<A href='resume.php'>View Resume</a>";
 135     print "</td></tr></table><br><br>";
 136  }
 137  print "<table class='maintable'><tr class='headline'><td><center>Categories</center></td></tr>";
 138  print "<tr class='mainrow'><td>";
 139  print "<li><A href='index.php'>Main</a><br>";
 140  print "<li><A href='cat.php?catid=0'>General</a><br>"; //put a general category

 141  $getcats="SELECT * from bl_cats order by catname ASC"; //select all cats in ABC order

 142  $getcats2=mysql_query($getcats) or die("COuld not get cats");
 143  while($getcats3=mysql_fetch_array($getcats2))
 144  {
 145    $getcats3[catname]=stripslashes($getcats3[catname]);
 146    print "<li><A href='cat.php?catid=$getcats3[catID]'>$getcats3[catname]</a><br>";
 147  }
 148  print "</td></tr></table><br><br>";
 149  print "<table class='maintable'><tr class='headline'><td><center>Search Archives</center></td></tr>";
 150  print "<tr class='mainrow'><td>";
 151  print "<form action='archive.php' method='post'>";
 152  print "Month/Year:<br><select name='month'>";
 153  print "<option value='1'>January</option>";
 154  print "<option value='2'>February</option>";
 155  print "<option value='3'>March</option>";
 156  print "<Option value='4'>April</option>";
 157  print "<option value='5'>May</option>";
 158  print "<option value='6'>June</option>";
 159  print "<option value='7'>July</option>";
 160  print "<option value='8'>August</option>";
 161  print "<option value='9'>September</option>";
 162  print "<option value='10'>October</option>";
 163  print "<Option value='11'>November</option>";
 164  print "<option value='12'>December</option></select>";
 165  print "<br>";
 166  print "<input type='text' name='year' lenth='10'><br>";
 167  print "<input type='submit' name='submit' value='submit'></form>";
 168  print "</td></tr></table><br><br>";
 169  if($getvars3[usepoll]==1)
 170  {
 171     include  "poll.php";
 172  }
 173  print "<br><br>";
 174  if($getvars3[showcalendar]==1)
 175  {
 176    include  "calendar.php";
 177  }
 178  print "<br><br>";
 179  if($getvars3[useleft]==1)
 180  {
 181     $queryleft="SELECT * from bl_left";
 182     $queryleft2=mysql_query($queryleft) or die("Could not query right");
 183     $queryleft3=mysql_fetch_array($queryleft2);
 184     print "$queryleft3[left]";
 185  } 
 186  print "</td></tr></table>";
 187  include  "footer.php";
 188  print "<br><br>";
 189  
 190  ?>
 191  <center><font size='2'>Powered by © <A href='http://www.chipmunk-scripts.com'>Chipmunk Blogger</a></font></center>


[ Powered by PHPXref - Served by Debian GNU/Linux ]