in index.php
.............................................
in modcp.php
create article.php
PHP Code:
///////////////////////////////view blog
else if($action=="viewblog")
{
$bid = $_GET["bid"];
addonline(getuid_sid($sid),"Viewing Blog","");
echo "<head>";
echo "<title>$sitename</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p>";
$pminfo = mysql_fetch_array(mysql_query("SELECT btext, bname, bgdate, bowner, id FROM ibwf_blogs WHERE id='".$bid."'"));
$bttl = htmlspecialchars($pminfo[1]);
$btxt = parsemsg($pminfo[0], $sid);
$bnick = getnick_uid($pminfo[3]);
$vbbl = "<a href=\"index.php?action=viewuser&sid=$sid&who=$pminfo[3]\">$bnick</a><br/>";
echo "<b>$bttl</b><br/>";
$tmstamp = $pminfo[2];
$tmdt = date("dMy g:i:s a", $tmstamp);
echo "$tmdt<br/>";
echo "Submitted by: $vbbl";
echo "---<br/>";
echo "$btxt<br/>---<br/>";
echo "Rate this Journal:<br/>";
$vb = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_brate WHERE uid='".$uid."' AND blogid='".$bid."'"));
if($vb[0]==0)
{
echo "<form action=\"genproc.php?action=rateb&sid=$sid&bid=$pminfo[4]\" method=\"post\">";
echo "<select name=\"brate\">";
echo "<option value=\"1\">1</option>";
echo "<option value=\"2\">2</option>";
echo "<option value=\"3\">3</option>";
echo "<option value=\"4\">4</option>";
echo "<option value=\"5\">5</option>";
echo "</select><br/>";
echo "<input type=\"Submit\" Name=\"Rate\" Value=\"Rate\"></form>";
}else{
$rinfo = mysql_fetch_array(mysql_query("SELECT COUNT(*) as nofr, SUM(brate) as nofp FROM ibwf_brate WHERE blogid='".$bid."'"));
$ther = $rinfo[1]/$rinfo[0];
echo "Rate: $ther - Points: $rinfo[1]";
}
echo "<br/><br/>";
if(ismod(getuid_sid($sid)))
{
echo "<a href=\"../wml/modcp.php?action=blogfeat&bid=$pminfo[4]&sid=$sid\">Featured this Journal</a><br/>";
}
echo "<a href=\"lists.php?action=allbl&sid=$sid\">Back to Blogs</a><br/>";
$bnick = getnick_uid($pminfo[3]);
echo "<a href=\"lists.php?action=blogs&sid=$sid&who=$pminfo[3]\">Back to $bnick's Blogs</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo "</body>";
}
in modcp.php
PHP Code:
////////////////////////////////////////////Blog
else if($action=="blogfeat")
{
$bid = $_GET["bid"];
echo "<card id=\"main\" title=\"Mod CP\">";
echo "<p align=\"center\">";
if(ismod(getuid_sid($sid)))
{
$id = mysql_fetch_array(mysql_query("SELECT bname, id FROM ibwf_blogs WHERE feat='1'"));
$res = mysql_query("UPDATE ibwf_blogs SET feat='1' WHERE id='".$bid."'");
if($res)
{
$unfeat = mysql_query("UPDATE ibwf_blogs SET feat='0' WHERE id='".$id[1]."'");
echo "<img src=\"images/ok.gif\" alt=\"o\"/>Updated!<br/>";
}else{
echo "<img src=\"images/notok.gif\" alt=\"x\"/>Database Error!<br/>";
}
}else{
echo "<img src=\"images/notok.gif\" alt=\"X\"/>You can't do this!";
}
echo "<br/><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p></card>";
}
PHP Code:
////////////////////////////////////////MAIN PAGE
if($action=="main")
{
addonline(getuid_sid($sid),"Journals Category","");
echo "<head>";
echo "<title>$sitename</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "<b>Journals Category:</b><br/>-----<br/>";
$a = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_blogs WHERE blog='1'"));
echo "<a href=\"article.php?action=news&sid=$sid\">News and Info ($a[0])</a><br/>";
$b = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_blogs WHERE blog='2'"));
echo "<a href=\"article.php?action=song&sid=$sid\">Song Lyrics ($b[0])</a><br/>";
$c = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_blogs WHERE blog='3'"));
echo "<a href=\"article.php?action=love&sid=$sid\">Love Stories ($c[0])</a><br/>";
$d = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_blogs WHERE blog='4'"));
echo "<a href=\"article.php?action=sh&sid=$sid\">Science and Health ($d[0])</a><br/>";
$e = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_blogs WHERE blog='5'"));
echo "<a href=\"article.php?action=tips&sid=$sid\">TECH Tips N Tricks ($e[0])</a><br/>";
$f = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_blogs WHERE blog='6'"));
echo "<a href=\"article.php?action=chords&sid=$sid\">Guitar Chords ($f[0])</a><br/>";
$g = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_blogs WHERE blog='7'"));
echo "<a href=\"article.php?action=bible&sid=$sid\">Other ($g[0])</a><br/>";
$h = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_blogs WHERE blog='8'"));
echo "<a href=\"article.php?action=quotes&sid=$sid\">Love Quotes ($h[0])</a><br/>";
$i = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_blogs WHERE blog='9'"));
echo "<a href=\"article.php?action=poems&sid=$sid\">Poems ($i[0])</a><br/>";
$j = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_blogs WHERE blog='10'"));
echo "<a href=\"article.php?action=ded&sid=$sid\">Dedications ($j[0])</a><br/>";
$k = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_blogs WHERE blog='11'"));
echo "<a href=\"article.php?action=adult&sid=$sid\">Adult Material($k[0])</a><br/>";
echo "-----<br/><a href=\"index.php?action=addblg&sid=$sid\">Submit Journal</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "home</a>";
echo "</p>";
echo "</body>";
}
//////////////////////////////////
else if($action=="news")
{
addonline(getuid_sid($sid),"Journals - News and Info","");
echo "<head>";
echo "<title>$sitename</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
$uid = getuid_sid($sid);
$view = $_GET["view"];
if($view =="")$view="1";
echo "<p align=\"center\">";
echo "<b>News and Info</b><br/>";
echo "<a href=\"article.php?action=news&sid=$sid&view=1\">Order by Name</a><br/>";
echo "<a href=\"article.php?action=news&sid=$sid&view=2\">Order from Newest</a><br/>";
echo "</p>";
//////ALL LISTS SCRIPT <<
if($page=="" || $page<=0)$page=1;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_blogs WHERE blog='1'"));
$num_items = $noi[0]; //changable
$items_per_page= 10;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$cou =1;
if ($view=="2")
{
$sql = "SELECT id, bname, bowner FROM ibwf_blogs WHERE blog='1' ORDER by bgdate DESC LIMIT $limit_start, $items_per_page";
}else{
$sql = "SELECT id, bname, bowner FROM ibwf_blogs WHERE blog='1' GROUP BY 1,2 LIMIT $limit_start, $items_per_page";
}
echo "<p>";
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
$bname = htmlspecialchars($item[1]);
$lnk = "$cou. <a href=\"index.php?action=viewblog&bid=$item[0]&sid=$sid\">$bname</a>";
echo "$lnk<br/>";
$cou++;
}
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"article.php?action=$action&page=$ppage&sid=$sid&view=$view\">«PREV</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"article.php?action=$action&page=$npage&sid=$sid&view=$view\">Next»</a>";
}
echo "<br/>$page/$num_pages<br/>";
if($num_pages>2)
{
$rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<anchor>[GO]";
$rets .= "<go href=\"article.php\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"view\" value=\"$view\"/>";
$rets .= "<postfield name=\"who\" value=\"$who\"/>";
$rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "</go></anchor>";
echo $rets;
}
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "<a href=\"article.php?action=main&sid=$sid\">Back to Journals</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "home</a>";
echo "</p>";
echo "</body>";
}
//////////////////////////////////
else if($action=="song")
{
addonline(getuid_sid($sid),"Journals - Song Lyrics","");
echo "<head>";
echo "<title>$sitename</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
$uid = getuid_sid($sid);
$view = $_GET["view"];
if($view =="")$view="1";
echo "<p align=\"center\">";
echo "<b>Song Lyrics</b><br/>";
echo "<a href=\"article.php?action=song&sid=$sid&view=1\">Order by Name</a><br/>";
echo "<a href=\"article.php?action=song&sid=$sid&view=2\">Order from Newest</a><br/>";
echo "</p>";
//////ALL LISTS SCRIPT <<
if($page=="" || $page<=0)$page=1;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_blogs WHERE blog='2'"));
$num_items = $noi[0]; //changable
$items_per_page= 10;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$cou =1;
if ($view=="2")
{
$sql = "SELECT id, bname, bowner FROM ibwf_blogs WHERE blog='2' ORDER by bgdate DESC LIMIT $limit_start, $items_per_page";
}else{
$sql = "SELECT id, bname, bowner FROM ibwf_blogs WHERE blog='2' GROUP BY 1,2 LIMIT $limit_start, $items_per_page";
}
echo "<p>";
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
$bname = htmlspecialchars($item[1]);
$lnk = "$cou. <a href=\"index.php?action=viewblog&bid=$item[0]&sid=$sid\">$bname</a>";
echo "$lnk<br/>";
$cou++;
}
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"article.php?action=$action&page=$ppage&sid=$sid&view=$view\">«PREV</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"article.php?action=$action&page=$npage&sid=$sid&view=$view\">Next»</a>";
}
echo "<br/>$page/$num_pages<br/>";
if($num_pages>2)
{
$rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<anchor>[GO]";
$rets .= "<go href=\"article.php\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"view\" value=\"$view\"/>";
$rets .= "<postfield name=\"who\" value=\"$who\"/>";
$rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "</go></anchor>";
echo $rets;
}
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "<a href=\"article.php?action=main&sid=$sid\">Back to Journals</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "home</a>";
echo "</p>";
echo "</body>";
}
//////////////////////////////////
else if($action=="love")
{
addonline(getuid_sid($sid),"Journals - Love Stories","");
echo "<head>";
echo "<title>$sitename</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
$uid = getuid_sid($sid);
$view = $_GET["view"];
if($view =="")$view="1";
echo "<p align=\"center\">";
echo "<b>Love Stories</b><br/>";
echo "<a href=\"article.php?action=love&sid=$sid&view=1\">Order by Name</a><br/>";
echo "<a href=\"article.php?action=love&sid=$sid&view=2\">Order from Newest</a><br/>";
echo "</p>";
//////ALL LISTS SCRIPT <<
if($page=="" || $page<=0)$page=1;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_blogs WHERE blog='3'"));
$num_items = $noi[0]; //changable
$items_per_page= 10;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$cou =1;
if ($view=="2")
{
$sql = "SELECT id, bname, bowner FROM ibwf_blogs WHERE blog='3' ORDER by bgdate DESC LIMIT $limit_start, $items_per_page";
}else{
$sql = "SELECT id, bname, bowner FROM ibwf_blogs WHERE blog='3' GROUP BY 1,2 LIMIT $limit_start, $items_per_page";
}
echo "<p>";
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
$bname = htmlspecialchars($item[1]);
$lnk = "$cou. <a href=\"index.php?action=viewblog&bid=$item[0]&sid=$sid\">$bname</a>";
echo "$lnk<br/>";
$cou++;
}
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"article.php?action=$action&page=$ppage&sid=$sid&view=$view\">«PREV</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"article.php?action=$action&page=$npage&sid=$sid&view=$view\">Next»</a>";
}
echo "<br/>$page/$num_pages<br/>";
if($num_pages>2)
{
$rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<anchor>[GO]";
$rets .= "<go href=\"article.php\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"view\" value=\"$view\"/>";
$rets .= "<postfield name=\"who\" value=\"$who\"/>";
$rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "</go></anchor>";
echo $rets;
}
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "<a href=\"article.php?action=main&sid=$sid\">Back to Journals</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "home</a>";
echo "</p>";
echo "</body>";
}
//////////////////////////////////
else if($action=="sh")
{
addonline(getuid_sid($sid),"Journals - Science and Health","");
echo "<head>";
echo "<title>$sitename</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
$uid = getuid_sid($sid);
$view = $_GET["view"];
if($view =="")$view="1";
echo "<p align=\"center\">";
echo "<b>Science and Health</b><br/>";
echo "<a href=\"article.php?action=sh&sid=$sid&view=1\">Order by Name</a><br/>";
echo "<a href=\"article.php?action=sh&sid=$sid&view=2\">Order from Newest</a><br/>";
echo "</p>";
//////ALL LISTS SCRIPT <<
if($page=="" || $page<=0)$page=1;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_blogs WHERE blog='4'"));
$num_items = $noi[0]; //changable
$items_per_page= 10;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$cou =1;
if ($view=="2")
{
$sql = "SELECT id, bname, bowner FROM ibwf_blogs WHERE blog='4' ORDER by bgdate DESC LIMIT $limit_start, $items_per_page";
}else{
$sql = "SELECT id, bname, bowner FROM ibwf_blogs WHERE blog='4' GROUP BY 1,2 LIMIT $limit_start, $items_per_page";
}
echo "<p>";
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
$bname = htmlspecialchars($item[1]);
$lnk = "$cou. <a href=\"index.php?action=viewblog&bid=$item[0]&sid=$sid\">$bname</a>";
echo "$lnk<br/>";
$cou++;
}
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"article.php?action=$action&page=$ppage&sid=$sid&view=$view\">«PREV</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"article.php?action=$action&page=$npage&sid=$sid&view=$view\">Next»</a>";
}
echo "<br/>$page/$num_pages<br/>";
if($num_pages>2)
{
$rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<anchor>[GO]";
$rets .= "<go href=\"article.php\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"view\" value=\"$view\"/>";
$rets .= "<postfield name=\"who\" value=\"$who\"/>";
$rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "</go></anchor>";
echo $rets;
}
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "<a href=\"article.php?action=main&sid=$sid\">Back to Journals</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "home</a>";
echo "</p>";
echo "</body>";
}
//////////////////////////////////
else if($action=="tips")
{
addonline(getuid_sid($sid),"Journals - TipsNTricks","");
echo "<head>";
echo "<title>$sitename</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
$uid = getuid_sid($sid);
$view = $_GET["view"];
if($view =="")$view="1";
echo "<p align=\"center\">";
echo "<b>TipsNTricks</b><br/>";
echo "<a href=\"article.php?action=tips&sid=$sid&view=1\">Order by Name</a><br/>";
echo "<a href=\"article.php?action=tips&sid=$sid&view=2\">Order from Newest</a><br/>";
echo "</p>";
//////ALL LISTS SCRIPT <<
if($page=="" || $page<=0)$page=1;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_blogs WHERE blog='5'"));
$num_items = $noi[0]; //changable
$items_per_page= 10;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$cou =1;
if ($view=="2")
{
$sql = "SELECT id, bname, bowner FROM ibwf_blogs WHERE blog='5' ORDER by bgdate DESC LIMIT $limit_start, $items_per_page";
}else{
$sql = "SELECT id, bname, bowner FROM ibwf_blogs WHERE blog='5' GROUP BY 1,2 LIMIT $limit_start, $items_per_page";
}
echo "<p>";
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
$bname = htmlspecialchars($item[1]);
$lnk = "$cou. <a href=\"index.php?action=viewblog&bid=$item[0]&sid=$sid\">$bname</a>";
echo "$lnk<br/>";
$cou++;
}
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"article.php?action=$action&page=$ppage&sid=$sid&view=$view\">«PREV</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"article.php?action=$action&page=$npage&sid=$sid&view=$view\">Next»</a>";
}
echo "<br/>$page/$num_pages<br/>";
if($num_pages>2)
{
$rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<anchor>[GO]";
$rets .= "<go href=\"article.php\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"view\" value=\"$view\"/>";
$rets .= "<postfield name=\"who\" value=\"$who\"/>";
$rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "</go></anchor>";
echo $rets;
}
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "<a href=\"article.php?action=main&sid=$sid\">Back to Journals</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "home</a>";
echo "</p>";
echo "</body>";
}
//////////////////////////////////
else if($action=="chords")
{
addonline(getuid_sid($sid),"Journals - Guitar Chords","");
echo "<head>";
echo "<title>$sitename</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
$uid = getuid_sid($sid);
$view = $_GET["view"];
if($view =="")$view="1";
echo "<p align=\"center\">";
echo "<b>Guitar Chords</b><br/>";
echo "<a href=\"article.php?action=chords&sid=$sid&view=1\">Order by Name</a><br/>";
echo "<a href=\"article.php?action=chords&sid=$sid&view=2\">Order from Newest</a><br/>";
echo "</p>";
//////ALL LISTS SCRIPT <<
if($page=="" || $page<=0)$page=1;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_blogs WHERE blog='6'"));
$num_items = $noi[0]; //changable
$items_per_page= 10;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$cou =1;
if ($view=="2")
{
$sql = "SELECT id, bname, bowner FROM ibwf_blogs WHERE blog='6' ORDER by bgdate DESC LIMIT $limit_start, $items_per_page";
}else{
$sql = "SELECT id, bname, bowner FROM ibwf_blogs WHERE blog='6' GROUP BY 1,2 LIMIT $limit_start, $items_per_page";
}
echo "<p>";
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
$bname = htmlspecialchars($item[1]);
$lnk = "$cou. <a href=\"index.php?action=viewblog&bid=$item[0]&sid=$sid\">$bname</a>";
echo "$lnk<br/>";
$cou++;
}
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"article.php?action=$action&page=$ppage&sid=$sid&view=$view\">«PREV</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"article.php?action=$action&page=$npage&sid=$sid&view=$view\">Next»</a>";
}
echo "<br/>$page/$num_pages<br/>";
if($num_pages>2)
{
$rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<anchor>[GO]";
$rets .= "<go href=\"article.php\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"view\" value=\"$view\"/>";
$rets .= "<postfield name=\"who\" value=\"$who\"/>";
$rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "</go></anchor>";
echo $rets;
}
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "<a href=\"article.php?action=main&sid=$sid\">Back to Journals</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "home</a>";
echo "</p>";
echo "</body>";
}
//////////////////////////////////
else if($action=="bible")
{
addonline(getuid_sid($sid),"Journals - Other","");
echo "<head>";
echo "<title>$sitename</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
$uid = getuid_sid($sid);
$view = $_GET["view"];
if($view =="")$view="1";
echo "<p align=\"center\">";
echo "<b>Bible Study</b><br/>";
echo "<a href=\"article.php?action=bible&sid=$sid&view=1\">Order by Name</a><br/>";
echo "<a href=\"article.php?action=bible&sid=$sid&view=2\">Order from Newest</a><br/>";
echo "</p>";
//////ALL LISTS SCRIPT <<
if($page=="" || $page<=0)$page=1;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_blogs WHERE blog='7'"));
$num_items = $noi[0]; //changable
$items_per_page= 10;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$cou =1;
if ($view=="2")
{
$sql = "SELECT id, bname, bowner FROM ibwf_blogs WHERE blog='7' ORDER by bgdate DESC LIMIT $limit_start, $items_per_page";
}else{
$sql = "SELECT id, bname, bowner FROM ibwf_blogs WHERE blog='7' GROUP BY 1,2 LIMIT $limit_start, $items_per_page";
}
echo "<p>";
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
$bname = htmlspecialchars($item[1]);
$lnk = "$cou. <a href=\"index.php?action=viewblog&bid=$item[0]&sid=$sid\">$bname</a>";
echo "$lnk<br/>";
$cou++;
}
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"article.php?action=$action&page=$ppage&sid=$sid&view=$view\">«PREV</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"article.php?action=$action&page=$npage&sid=$sid&view=$view\">Next»</a>";
}
echo "<br/>$page/$num_pages<br/>";
if($num_pages>2)
{
$rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<anchor>[GO]";
$rets .= "<go href=\"article.php\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"view\" value=\"$view\"/>";
$rets .= "<postfield name=\"who\" value=\"$who\"/>";
$rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "</go></anchor>";
echo $rets;
}
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "<a href=\"article.php?action=main&sid=$sid\">Back to Journals</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "home</a>";
echo "</p>";
echo "</body>";
}
//////////////////////////////////
else if($action=="quotes")
{
addonline(getuid_sid($sid),"Journals - Love Quotes","");
echo "<head>";
echo "<title>$sitename</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
$uid = getuid_sid($sid);
$view = $_GET["view"];
if($view =="")$view="1";
echo "<p align=\"center\">";
echo "<b>Love Quotes</b><br/>";
echo "<a href=\"article.php?action=quotes&sid=$sid&view=1\">Order by Name</a><br/>";
echo "<a href=\"article.php?action=quotes&sid=$sid&view=2\">Order from Newest</a><br/>";
echo "</p>";
//////ALL LISTS SCRIPT <<
if($page=="" || $page<=0)$page=1;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_blogs WHERE blog='8'"));
$num_items = $noi[0]; //changable
$items_per_page= 10;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$cou =1;
if ($view=="2")
{
$sql = "SELECT id, bname, bowner FROM ibwf_blogs WHERE blog='8' ORDER by bgdate DESC LIMIT $limit_start, $items_per_page";
}else{
$sql = "SELECT id, bname, bowner FROM ibwf_blogs WHERE blog='8' GROUP BY 1,2 LIMIT $limit_start, $items_per_page";
}
echo "<p>";
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
$bname = htmlspecialchars($item[1]);
$lnk = "$cou. <a href=\"index.php?action=viewblog&bid=$item[0]&sid=$sid\">$bname</a>";
echo "$lnk<br/>";
$cou++;
}
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"article.php?action=$action&page=$ppage&sid=$sid&view=$view\">«PREV</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"article.php?action=$action&page=$npage&sid=$sid&view=$view\">Next»</a>";
}
echo "<br/>$page/$num_pages<br/>";
if($num_pages>2)
{
$rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<anchor>[GO]";
$rets .= "<go href=\"article.php\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"view\" value=\"$view\"/>";
$rets .= "<postfield name=\"who\" value=\"$who\"/>";
$rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "</go></anchor>";
echo $rets;
}
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "<a href=\"article.php?action=main&sid=$sid\">Back to Journals</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "home</a>";
echo "</p>";
echo "</body>";
}
//////////////////////////////////
else if($action=="poems")
{
addonline(getuid_sid($sid),"Journals - Poems","");
echo "<head>";
echo "<title>$sitename</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
$uid = getuid_sid($sid);
$view = $_GET["view"];
if($view =="")$view="1";
echo "<p align=\"center\">";
echo "<b>Poems</b><br/>";
echo "<a href=\"article.php?action=poems&sid=$sid&view=1\">Order by Name</a><br/>";
echo "<a href=\"article.php?action=poems&sid=$sid&view=2\">Order from Newest</a><br/>";
echo "</p>";
//////ALL LISTS SCRIPT <<
if($page=="" || $page<=0)$page=1;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_blogs WHERE blog='9'"));
$num_items = $noi[0]; //changable
$items_per_page= 10;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$cou =1;
if ($view=="2")
{
$sql = "SELECT id, bname, bowner FROM ibwf_blogs WHERE blog='9' ORDER by bgdate DESC LIMIT $limit_start, $items_per_page";
}else{
$sql = "SELECT id, bname, bowner FROM ibwf_blogs WHERE blog='9' GROUP BY 1,2 LIMIT $limit_start, $items_per_page";
}
echo "<p>";
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
$bname = htmlspecialchars($item[1]);
$lnk = "$cou. <a href=\"index.php?action=viewblog&bid=$item[0]&sid=$sid\">$bname</a>";
echo "$lnk<br/>";
$cou++;
}
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"article.php?action=$action&page=$ppage&sid=$sid&view=$view\">«PREV</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"article.php?action=$action&page=$npage&sid=$sid&view=$view\">Next»</a>";
}
echo "<br/>$page/$num_pages<br/>";
if($num_pages>2)
{
$rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<anchor>[GO]";
$rets .= "<go href=\"article.php\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"view\" value=\"$view\"/>";
$rets .= "<postfield name=\"who\" value=\"$who\"/>";
$rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "</go></anchor>";
echo $rets;
}
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "<a href=\"article.php?action=main&sid=$sid\">Back to Journals</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "home</a>";
echo "</p>";
echo "</body>";
}
//////////////////////////////////
else if($action=="ded")
{
addonline(getuid_sid($sid),"Journals - Dedications","");
echo "<head>";
echo "<title>$sitename</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
$uid = getuid_sid($sid);
$view = $_GET["view"];
if($view =="")$view="1";
echo "<p align=\"center\">";
echo "<b>Dedications</b><br/>";
echo "<a href=\"article.php?action=ded&sid=$sid&view=1\">Order by Name</a><br/>";
echo "<a href=\"article.php?action=ded&sid=$sid&view=2\">Order from Newest</a><br/>";
echo "</p>";
//////ALL LISTS SCRIPT <<
if($page=="" || $page<=0)$page=1;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_blogs WHERE blog='10'"));
$num_items = $noi[0]; //changable
$items_per_page= 10;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$cou =1;
if ($view=="2")
{
$sql = "SELECT id, bname, bowner FROM ibwf_blogs WHERE blog='10' ORDER by bgdate DESC LIMIT $limit_start, $items_per_page";
}else{
$sql = "SELECT id, bname, bowner FROM ibwf_blogs WHERE blog='10' GROUP BY 1,2 LIMIT $limit_start, $items_per_page";
}
echo "<p>";
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
$bname = htmlspecialchars($item[1]);
$lnk = "$cou. <a href=\"index.php?action=viewblog&bid=$item[0]&sid=$sid\">$bname</a>";
echo "$lnk<br/>";
$cou++;
}
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"article.php?action=$action&page=$ppage&sid=$sid&view=$view\">«PREV</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"article.php?action=$action&page=$npage&sid=$sid&view=$view\">Next»</a>";
}
echo "<br/>$page/$num_pages<br/>";
if($num_pages>2)
{
$rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<anchor>[GO]";
$rets .= "<go href=\"article.php\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"view\" value=\"$view\"/>";
$rets .= "<postfield name=\"who\" value=\"$who\"/>";
$rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "</go></anchor>";
echo $rets;
}
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "<a href=\"article.php?action=main&sid=$sid\">Back to Journals</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "home</a>";
echo "</p>";
echo "</body>";
}
//////////////////////////////////
else if($action=="adult")
{
addonline(getuid_sid($sid),"Journals - Adult Material","");
echo "<head>";
echo "<title>$sitename</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
$uid = getuid_sid($sid);
$view = $_GET["view"];
if($view =="")$view="1";
echo "<p align=\"center\">";
echo "<b>Adult Material</b><br/>";
echo "<a href=\"article.php?action=adult&sid=$sid&view=1\">Order by Name</a><br/>";
echo "<a href=\"article.php?action=adult&sid=$sid&view=2\">Order from Newest</a><br/>";
echo "</p>";
//////ALL LISTS SCRIPT <<
if($page=="" || $page<=0)$page=1;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_blogs WHERE blog='11'"));
$num_items = $noi[0]; //changable
$items_per_page= 10;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$cou =1;
if ($view=="2")
{
$sql = "SELECT id, bname, bowner FROM ibwf_blogs WHERE blog='11' ORDER by bgdate DESC LIMIT $limit_start, $items_per_page";
}else{
$sql = "SELECT id, bname, bowner FROM ibwf_blogs WHERE blog='11' GROUP BY 1,2 LIMIT $limit_start, $items_per_page";
}
echo "<p>";
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
$bname = htmlspecialchars($item[1]);
$lnk = "$cou. <a href=\"index.php?action=viewblog&bid=$item[0]&sid=$sid\">$bname</a>";
echo "$lnk<br/>";
$cou++;
}
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"article.php?action=$action&page=$ppage&sid=$sid&view=$view\">«PREV</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"article.php?action=$action&page=$npage&sid=$sid&view=$view\">Next»</a>";
}
echo "<br/>$page/$num_pages<br/>";
if($num_pages>2)
{
$rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<anchor>[GO]";
$rets .= "<go href=\"article.php\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"view\" value=\"$view\"/>";
$rets .= "<postfield name=\"who\" value=\"$who\"/>";
$rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "</go></anchor>";
echo $rets;
}
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "<a href=\"article.php?action=main&sid=$sid\">Back to Journals</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "home</a>";
echo "</p>";
echo "</body>";
}