Can you Translate this wml article into html.. thanks.
Or can you give me a HTML ATRICLE! Thanks a lot..
PHP Code:
<?php
/*
Dont u see?
its me denver
*/
//>> »
//<< «
header("Content-type: text/vnd.wap.wml");
header("Cache-Control: no-store, no-cache, must-revalidate");
echo("<?xml version=\"1.0\"?>");
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
?>
<wml>
<?php
include("config.php");
include("core.php");
$bcon = connectdb();
if (!$bcon)
{
echo "<card id=\"main\" title=\"DATABASE ERROR\">";
echo "<p align=\"center\">";
echo "Backing up database<br/><br/>";
echo "</p>";
echo "</card>";
echo "</wml>";
exit();
}
$action = $_GET["action"];
$sid = $_GET["sid"];
$artid = $_GET["artid"];
$page = $_GET["page"];
$uid = getuid_sid($sid);
if($action != "")
{
if(islogged($sid)==false)
{
echo "<card id=\"main\" title=\"KozmozWAP\">";
echo "<p align=\"left\">";
echo "Your session has been expired<br/>";
echo "UserID: <input name=\"loguid\" format=\"*x\" maxlength=\"30\"/><br/>";
echo "Password: <input type=\"password\" name=\"logpwd\" maxlength=\"30\"/><br/>";
echo "<anchor>LOGIN<go href=\"login.php\" method=\"get\">";
echo "<postfield name=\"loguid\" value=\"$(loguid)\"/>";
echo "<postfield name=\"logpwd\" value=\"$(logpwd)\"/>";
echo "</go></anchor>";
echo "</p>";
echo "</card>";
echo "</wml>";
exit();
}
}
if(isbanned($uid))
{
echo "<card id=\"main\" title=\"KozmozWAP\">";
echo "<p align=\"center\">";
echo "<img src=\"images/exit2.gif\" alt=\"*\"/><br/>";
echo "You are <b>Banned</b><br/>";
$banto = mysql_fetch_array(mysql_query("SELECT timeto FROM ibwf_penalties WHERE uid='".$uid."' AND penalty='1'"));
$remain = $banto[0]- time();
$rmsg = gettimemsg($remain);
echo "Time to finish your penalty: $rmsg<br/><br/>";
//echo "<a href=\"index.php\">Login</a>";
echo "</p>";
echo "</card>";
echo "</wml>";
exit();
}
if($action=="articles")
{
addonline(getuid_sid($sid),"Articles","index.php?action=$action");
echo "<card id=\"main\" title=\"Articles\">\n";
echo "<p align=\"left\">";
echo "KozmozWAP Articles<br/>";
$fcats = mysql_query("SELECT id, name FROM ibwf_articles ORDER BY id");
while($fcat=mysql_fetch_array($fcats))
{
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_readart WHERE cid='".$fcat[0]."'"));
$catlink = ">> <a href=\"articles.php?action=kindat&sid=$sid&cid=$fcat[0]&browse?\">$fcat[1]($noi[0])</a>";
echo "<br/>$catlink";
}
echo "<br/><a href=\"index.php?action=main&sid=$sid&browse?\">";
echo "Main menu</a>";
echo "</p>";
echo "<p align=\"center\">";
echo "</p>";
echo "</card>\n";
}
//////////////////////////////////ONLINE USERS
else if($action=="newart")
{
$cid = $_GET["cid"];
$artid = $_GET["artid"];
addonline(getuid_sid($sid),"Making new article","index.php?action=$action&fid=$fid");
echo "<card id=\"main\" title=\"New Article\">";
echo "<p align=\"left\">";
echo "Article name: <input name=\"ntitle\" maxlength=\"60\"/><br/>";
echo "Details: <input name=\"tpctxt\" maxlength=\"300\"/><br/>";
echo "<anchor>SUBMIT";
echo "
<go href=\"articles.php?action=done&sid=$sid&artid=$artid\" method=\"post\">
<postfield name=\"cid\" value=\"$cid\"/>
<postfield name=\"ntitle\" value=\"$(ntitle)\"/>
<postfield name=\"tpctxt\" value=\"$(tpctxt)\"/>
</go>
";
echo "</anchor>";
echo "<br/><a href=\"articles.php?action=articles&sid=$sid&browse?\">";
echo "Articles</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid&browse?\">";
echo "Main menu</a>";
echo "</p>";
echo "</card>";
}
//////////////////////////////////ONLINE USERS
else if($action=="newart2")
{
$artid = $_GET["artid"];
$cid = $_GET["cid"];
$id = $_GET["id"];
addonline(getuid_sid($sid),"Making new article","index.php?action=$action&fid=$fid");
echo "<card id=\"main\" title=\"New Article\">";
echo "<p align=\"left\">";
echo "Details: <input name=\"tpctxt\" maxlength=\"260\"/><br/>";
echo "<anchor>SUBMIT";
echo "
<go href=\"articles.php?action=done2&sid=$sid&artid=$artid&cid=$cid&id=$id\" method=\"post\">
<postfield name=\"tpctxt\" value=\"$(tpctxt)\"/>
</go>
";
echo "</anchor>";
echo "<br/><anchor><refresh><setvar name=\"tpctxt\" value=\"\"/></refresh>ClearText</anchor>";
echo "<br/><a href=\"articles.php?action=articles&sid=$sid&browse?\">";
echo "Articles</a>";
echo "<br/><a href=\"index.php?action=main&sid=$sid&browse?\">";
echo "Main menu</a>";
echo "</p>";
echo "</card>";
}
/////////////////////////////////////////////////////new tops
else if($action=="done")
{
$artid = $_GET["artid"];
$cid = $_POST["cid"];
$ntitle = $_POST["ntitle"];
$tpctxt = $_POST["tpctxt"];
addonline(getuid_sid($sid),"Making New Article","index.php?action=main");
echo "<card id=\"main\" title=\"KozmozWAP\">";
echo "<p align=\"center\">";
$crdate = time();
$uid = getuid_sid($sid);
$texst = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_readart WHERE name LIKE '".$ntitle."' AND cid='".$cid."'"));
if($texst[0]==0)
{
$res = false;
if((trim($ntitle)!="")||(trim($tpctxt)!=""))
{
$res = mysql_query("INSERT INTO ibwf_readart SET name='".$ntitle."', cid='".$cid."', authorid='".$uid."', text='".$tpctxt."', crdate='".$crdate."'");
}
if($res)
{
$tnm = htmlspecialchars($ntitle);
echo "Article <b>$tnm</b> Submitted Successfully<br/>";
}else{
echo "Article could not submit";
}
}else{
echo "Article name Already submitted";
}
echo "<br/><a href=\"articles.php?action=articles&sid=$sid&browse?\">";
echo "Articles</a>";
echo "<br/><a href=\"index.php?action=main&sid=$sid&type=send&browse?start\">";
echo "Main menu</a>";
echo "</p>";
echo "</card>";
}
/////////////////////////////////////////////////////new tops
else if($action=="done2")
{
$artid = $_GET["artid"];
$cid = $_GET["cid"];
$id = $_GET["id"];
$tpctxt = $_POST["tpctxt"];
addonline(getuid_sid($sid),"Making New Article","index.php?action=main");
echo "<card id=\"main\" title=\"KozmozWAP\">";
echo "<p align=\"center\">";
$crdate = time();
$uid = getuid_sid($sid);
$res = mysql_query("INSERT INTO ibwf_artpost SET artid='".$artid."', text='".$tpctxt."', crdate='".time()."'");
if($res)
{
$tnm = htmlspecialchars($ntitle);
echo "Article <b>$tnm</b> Submitted Successfully";
$tid = mysql_fetch_array(mysql_query("SELECT id FROM ibwf_topics WHERE name='".$ntitle."' AND fid='".$fid."'"));
echo "<br/><br/><a href=\"articles.php?action=viewart&sid=$sid&artid=$artid&cid=$cid&id=$id&go=last&type=send&browse?start\">";
echo "Read Article</a>";
}else{
echo "Article could not submit";
}
echo "<br/><a href=\"articles.php?action=articles&sid=$sid&browse?\">";
echo "Articles</a>";
echo "<br/><a href=\"index.php?action=main&sid=$sid&type=send&browse?start\">";
echo "Main menu</a>";
echo "</p>";
echo "</card>";
}
//////////////////////////////////Buddies
else if($action=="kindat")
{
$cid = $_GET["cid"];
$cinfo = mysql_fetch_array(mysql_query("SELECT name from ibwf_articles WHERE id='".$cid."'"));
addonline(getuid_sid($sid),"Viewing article $cinfo[0]","index.php?action=$action&cid=$cid");
$cinfo = mysql_fetch_array(mysql_query("SELECT name from ibwf_articles WHERE id='".$cid."'"));
echo "<card id=\"main\" title=\"$cinfo[0]\">";
echo "<p align=\"left\">";
echo "<b>$cinfo[0]</b>";
$ibwf = mysql_fetch_array(mysql_query("SELECT COUNT(distinct id) FROM ibwf_readart WHERE cid='".$cid."'"));
if($page=="" || $page<=0)$page=1;
$num_items = $ibwf[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 = $limit_start+1;
////////////////////////////////////////
$ibwfsites = mysql_query("SELECT id, name, crdate FROM ibwf_readart WHERE cid='".$cid."' ORDER BY cid, crdate DESC LIMIT $limit_start, $items_per_page");
while($ibwfsite=mysql_fetch_array($ibwfsites))
{
if (ismod(getuid_sid($sid)))
{
$hm = "<a href=\"articles.php?action=delart1&sid=$sid&id=$ibwfsite[0]\">[x]</a>,";
$hm2 = "<a href=\"articles.php?action=edit&sid=$sid&artid=$ibwfsite[0]\">edit</a>";
}
if (ischecker(getuid_sid($sid)))
{
$hm = "<a href=\"articles.php?action=delart1&sid=$sid&id=$ibwfsite[0]\">[x]</a>,";
$hm2 = "<a href=\"articles.php?action=edit&sid=$sid&artid=$ibwfsite[0]\">edit</a>";
}
$sitelink = "$cou. <a href=\"articles.php?action=viewart&id=$ibwfsite[0]&sid=$sid&cid=$cid&artid=$ibwfsite[0]\">$ibwfsite[1]</a> $hm$hm2";
echo "<br/>$sitelink";
$cou++;
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"articles.php?action=$action&page=$ppage&sid=$sid&cid=$cid&type=send&browse?\">«PREV</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"articles.php?action=$action&page=$npage&sid=$sid&cid=$cid&type=send&browse?\">Next»</a>";
}
echo "<br/>Page $page of $num_pages";
if($num_pages>2)
{
$rets = "<br/>Jump to page: <input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<anchor>[GO]";
$rets .= "<go href=\"articles.php?type=send&browse?\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
$rets .= "<postfield name=\"cid\" value=\"$cid\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "</go></anchor>";
echo $rets;
}
echo "<br/><a href=\"articles.php?action=newart&cid=$cid&sid=$sid&type=send&artid=$item[0]\">Submit Article</a><br/>";
echo "<a href=\"articles.php?action=articles&sid=$sid&browse?\">";
echo "Articles</a>";
echo "<br/>";
echo "<a href=\"index.php?action=main&sid=$sid&type=send&browse?\">";
echo "Main menu</a>";
echo "</p>";
echo "</card>";
}
////////////////////////////////////////////Edit Post
else if($action=="edit2")
{
$artid = $_GET["artid"];
$ptext = $_POST["ptext"];
echo "<card id=\"main\" title=\"Edit Options\">";
echo "<p align=\"center\">";
$res = mysql_query("UPDATE ibwf_readart SET text='"
.$ptext."' WHERE id='".$artid."'");
if($res)
{
echo "Article Title Edited";
}else{
echo "Database Error";
}
echo "<br/><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p></card>";
}
else if($action=="edit")
{
$artid = $_GET["artid"];
addonline(getuid_sid($sid),"Article Checker Tool ","index.php?action=main");
$pinfo= mysql_fetch_array(mysql_query("SELECT name FROM ibwf_readart WHERE id='".$artid."'"));
$ptext = htmlspecialchars($pinfo[0]);
echo "<card id=\"main\" title=\"Edit Title\">";
echo "<onevent type=\"onenterforward\">";
echo "<refresh>
<setvar name=\"ptext\" value=\"$ptext\"/>";
echo "</refresh></onevent>";
echo "<p align=\"center\">";
echo "<input name=\"ptext\" value=\"$ptext\" maxlength=\"150\"/> ";
echo "<br/><anchor>Edit";
echo "<go href=\"articles.php?action=edit2&sid=$sid&artid=$artid&browse?\" method=\"post\">";
echo "<postfield name=\"ptext\" value=\"$(ptext)\"/>";
echo "</go>";
echo "</anchor>";
echo "</p>";
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=main&sid=$sid\">";
echo "Main menu</a>";
echo "</p>";
echo "</card>";
}
//////////////////////////////////View Topic
else if($action=="viewart")
{
$id = $_GET["id"];
$cid = $_GET["cid"];
$artid = $_GET["artid"];
$cinfo = mysql_fetch_array(mysql_query("SELECT name from ibwf_readart WHERE id='".$id."'"));
addonline(getuid_sid($sid),"Reading article $cinfo[0]","articles.php?action=$action");
$tinfo = mysql_fetch_array(mysql_query("SELECT name, authorid, crdate, id from ibwf_readart WHERE id='".$id."'"));
$tnm = htmlspecialchars($tinfo[0]);
echo "<card id=\"main\" title=\"$tnm\">";
echo "<p align=\"left\">";
echo "<b>$cinfo[0]</b><br/>";
$tmstamp = $tinfo[2];
$tmdt = date("D,dMy-h:i:s a",$tmstamp);
echo "$tmdt<br/>";
$unick = getnick_uid($tinfo[1]);
$usl = "<a href=\"index.php?action=viewuser&sid=$sid&who=$tinfo[1]&browse?\">$unick</a><br/>";
echo "$usl2 Submitted by: $usl<br/>";
$tid = $_GET["artid"];
$go = $_GET["go"];
$uid = getuid_sid($sid);
$num_pages = getnumpages2($artid);
if($page==""||$page<1)$page=1;
if($go!="")$page=getpage_go2($go,$artid);
$posts_per_page = 5;
if($page>$num_pages)$page=$num_pages;
$limit_start = $posts_per_page *($page-1);
$vws = $tinfo[3]+1;
///////from here
if($page==1)
{
$posts_per_page=4;
$ttext = mysql_fetch_array(mysql_query("SELECT authorid, text, crdate FROM ibwf_readart WHERE id='".$id."'"));
$pst2 = parsemsg($ttext[1], $sid);
$unick = getnick_uid($ttext[0]);
if(substr_count($ttext[1],"[br/]")<=1000){
$text = str_replace("[br/]","<br/>",$ttext[1]);
}
echo "$text<br/>";
mysql_query("UPDATE ibwf_readart SET vws='".$vws."' WHERE id='".$id."'");
mysql_query("INSERT INTO ibwf_view2 SET uid='".$uid."', artid='".$artid."', actime='".time()."'");
}
if($page>1)
{
$limit_start--;
}
$sql = "SELECT id, text FROM ibwf_artpost WHERE artid='".$artid."' ORDER BY crdate LIMIT $limit_start, $posts_per_page";
$posts = mysql_query($sql);
while($post = mysql_fetch_array($posts))
{
$unick = getnick_uid($post[2]);
$usl = "<br/><a href=\"index.php?action=viewuser&sid=$sid&who=$post[2]&browse?\">$unick</a>";
$pst = parsemsg($post[1], $sid);
if(substr_count($post[1],"[br/]")<=1000){
$pst = str_replace("[br/]","<br/>",$post[1]);
}
echo "<br/>$hm $pst<br/>";
}
///to here
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"articles.php?action=viewart&page=$ppage&sid=$sid&artid=$artid&cid=$cid&id=$id\">«PREV</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"articles.php?action=viewart&page=$npage&sid=$sid&artid=$artid&cid=$cid&id=$id\">Next»</a>";
}
echo "<br/>Page $page of $num_pages";
if($num_pages>2)
{
$rets = "<br/>Jump to page: <input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<anchor>[GO]";
$rets .= "<go href=\"articles.php?browse?\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"cid\" value=\"$cid\"/>";
$rets .= "<postfield name=\"id\" value=\"$id\"/>";
$rets .= "<postfield name=\"artid\" value=\"$artid\"/>";
$rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "</go></anchor>";
echo $rets;
}
if(canaddart($uid, $id))
{
echo "<br/><a href=\"articles.php?&action=newart2&sid=$sid&id=$artid&artid=$artid&cid=$cid\">Add more</a>";
}
$tmsg = getpmcount(getuid_sid($sid));
$umsg = getunreadpm(getuid_sid($sid));
if($umsg>0)
{
echo "<br/><a href=\"inbox.php?action=main&sid=$sid&browse?\">New Private msg($umsg/$tmsg)</a>";
}
$countpics = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM iwbf_cwart WHERE artid='".$artid."'"));
echo "<br/><a href=\"articles.php?&action=artcom&sid=$sid&id=$id&artid=$id&cid=$cid\">Comments($countpics[0])</a>";
echo "<br/>";
echo "<a href=\"articles.php?&action=dload&sid=$sid&id=$id&artid=$id\">Download</a>";
echo "<br/>";
echo "<a href=\"articles.php?&action=viewall&sid=$sid&id=$id&artid=$id&cid=$cid\">Fastread</a>";
echo "<br/>";
$cinfo = mysql_fetch_array(mysql_query("SELECT name from ibwf_articles WHERE id='".$cid."'"));
echo "<a href=\"articles.php?&action=kindat&sid=$sid&cid=$cid\">$cinfo[0]</a>";
echo "<br/>";
$ttext = mysql_fetch_array(mysql_query("SELECT authorid, text, crdate FROM ibwf_readart WHERE id='".$id."'"));
$unick = getnick_uid($ttext[0]);
$unick2 = getnick_uid($post[2]);
echo "<a href=\"articles.php?&action=vall&sid=$sid&who=$ttext[0]&cid=$cid&cid=$cid&id=$artid&artid=$artid\">All articles of $unick</a>";
echo "<br/>----------<br/>";
echo "<a href=\"articles.php?action=articles&sid=$sid&browse?\">";
echo "Articles</a><br/>";
define("ADMOB_MODE", "live");
function admob_append_params(&$params, $key, $val) {
if(!empty($val)) $params .= ("&" . urlencode($key) . "=" . urlencode($val));
}
function admob_append_headers(&$params) {
$admob_ignore = array("HTTP_PRAGMA","HTTP_CACHE_CONTROL","HTTP_CONNECTION","HTTP_USER_AGENT","HTTP_COOKIE");
foreach ( array_keys( $_SERVER ) as $var ) {
if ( substr( $var, 0, 4 ) == "HTTP" && !in_array( $var, $admob_ignore ) ) {
$params .= "&" . urlencode("h[" . $var . "]" ) . "=" . urlencode( $_SERVER[$var] );
}
}
}
function admob_ad($admob_params=array()) {
// build url
$admob_page_url = sprintf("http%s://%s%s",
(isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == TRUE ? "s": ""),
$_SERVER["HTTP_HOST"],
$_SERVER["REQUEST_URI"]
);
$md5_sid = session_id();
if(!empty($md5_sid)) $md5_sid = md5($md5_sid);
$admob_post = "s=" . $admob_params[ADMOB_SITE_ID];
admob_append_params($admob_post, "u", $_SERVER["HTTP_USER_AGENT"]);
admob_append_params($admob_post, "i", $_SERVER["REMOTE_ADDR"]);
admob_append_params($admob_post, "p", $admob_page_url);
admob_append_params($admob_post, "t", $md5_sid);
admob_append_params($admob_post, "v", ADMOB_VERSION);
admob_append_params($admob_post, "d[pc]", $admob_params[ADMOB_PC]);
admob_append_params($admob_post, "d[dob]", $admob_params[ADMOB_DOB]);
admob_append_params($admob_post, "d[gender]", $admob_params[ADMOB_GENDER]);
admob_append_params($admob_post, "k", $admob_params[ADMOB_KEYWORDS]);
admob_append_headers($admob_post);
if(ADMOB_MODE == "test") $admob_post .= "&m=test";
// request ad
$admob_request = @fsockopen(ADMOB_HOST, 80);
if ($admob_request) {
stream_set_timeout($admob_request, ADMOB_TIMEOUT);
fwrite($admob_request, "POST " . ADMOB_ENDPOINT ." HTTP/1.0\r\n");
fwrite($admob_request, "Host: " . ADMOB_HOST . "\r\n");
fwrite($admob_request, "Content-Type: application/x-www-form-urlencoded\r\n");
fwrite($admob_request, "Content-Length: " . strlen($admob_post). "\r\n\r\n");
fwrite($admob_request, $admob_post);
$admob_info = stream_get_meta_data($admob_request);
$admob_timeout = $admob_info['timed_out'];
$admob_contents = "";
$admob_body = false;
while (!feof($admob_request) && !$admob_timeout) {
$admob_line = fgets($admob_request);
if(!$admob_body && $admob_line == "\r\n") $admob_body = true;
if($admob_body && !empty($admob_line)) $admob_contents .= $admob_line;
$admob_info = stream_get_meta_data($admob_request);
$admob_timeout = $admob_info['timed_out'];
}
fclose($admob_request);
if($admob_timeout) {
return "<img src=\"http://t.admob.com/li.php/c.gif/u/" . $admob_params[ADMOB_SITE_ID] . "/1/" . ADMOB_TIMEOUT . "/" . md5($admob_page_url) . "\" alt=\"\" width=\"1\" height=\"1\" />";
} else {
return $admob_contents;
}
}
}
define("ADMOB_SITE_ID", "ADMOB_SITE_ID");
define("ADMOB_HOST", "r.admob.com");
define("ADMOB_ENDPOINT", "/ad_source.php");
define("ADMOB_VERSION", "20071126-PHPF-7d438f25dc3b900a");
define("ADMOB_TIMEOUT", 1);
define("ADMOB_PC", "ADMOB_PC");
define("ADMOB_DOB", "ADMOB_DOB");
define("ADMOB_GENDER", "ADMOB_GENDER");
define("ADMOB_KEYWORDS", "ADMOB_KEYWORDS");
?>
<?php
$admob_params = array(
ADMOB_SITE_ID => "a147973c835da50", // REQUIRED - get from admob.com
ADMOB_PC => "", // OPTIONAL - Postal Code, e.g. "90210"
ADMOB_DOB => "", // OPTIONAL - Date of Birth formatted like YYYYMMDD, e.g. "19800229"
ADMOB_GENDER => "", // OPTIONAL - Gender, m[ale] or f[emale]
ADMOB_KEYWORDS => "" // OPTIONAL - keywords, e.g. "sports baseball la dodgers"
);
echo admob_ad($admob_params); // display an ad
echo "<br/>";
echo "<a href=\"index.php?action=main&sid=$sid&type=send\">";
echo "Main menu</a>";
echo "</p>";
echo "</card>";
}
//////////////////////////////////View Topic
else if($action=="viewall")
{
$id = $_GET["id"];
$cid = $_GET["cid"];
$artid = $_GET["artid"];
$cinfo = mysql_fetch_array(mysql_query("SELECT name from ibwf_readart WHERE id='".$id."'"));
addonline(getuid_sid($sid),"Reading article $cinfo[0]","articles.php?action=$action");
$tinfo = mysql_fetch_array(mysql_query("SELECT name, authorid, crdate, vws from ibwf_readart WHERE id='".$id."'"));
$tnm = htmlspecialchars($tinfo[0]);
echo "<card id=\"main\" title=\"$tnm\">";
echo "<p align=\"left\">";
echo "<b>$cinfo[0]</b><br/>";
$num_pages = getnumpages2($artid);
if($page==""||$page<1)$page=1;
if($go!="")$page=getpage_go2($go,$artid);
$posts_per_page = 100;
if($page>$num_pages)$page=$num_pages;
$limit_start = $posts_per_page *($page-1);
$vws = $tinfo[3]+1;
$tmstamp = $tinfo[2];
$tmdt = date("D,dMy-h:i:s a",$tmstamp);
echo "$tmdt<br/>";
$unick = getnick_uid($tinfo[1]);
$usl = "<a href=\"index.php?action=viewuser&sid=$sid&who=$tinfo[1]&browse?\">$unick</a>";
echo "Submitted by: $usl<br/>";
$tid = $_GET["artid"];
$go = $_GET["go"];
$uid = getuid_sid($sid);
if($page==1)
{
$posts_per_page=100;
mysql_query("UPDATE ibwf_readart SET views='".$vws."' WHERE id='".$id."'");
$ttext = mysql_fetch_array(mysql_query("SELECT authorid, text, crdate FROM ibwf_readart WHERE id='".$id."'"));
$pst2 = parsemsg($ttext[1], $sid);
$unick = getnick_uid($ttext[0]);
if(substr_count($ttext[1],"[br/]")<=1000){
$text = str_replace("[br/]","<br/>",$ttext[1]);
}
echo "$text<br/>";
}
if($page>1)
{
$limit_start--;
}
$sql = "SELECT id, text FROM ibwf_artpost WHERE artid='".$artid."' ORDER BY crdate LIMIT $limit_start, $posts_per_page";
$posts = mysql_query($sql);
while($post = mysql_fetch_array($posts))
{
$unick = getnick_uid($post[2]);
$usl = "<br/><a href=\"index.php?action=viewuser&sid=$sid&who=$post[2]&browse?\">$unick</a>";
$pst = parsemsg($post[1], $sid);
if(substr_count($post[1],"[br/]")<=1000){
$text2 = str_replace("[br/]","<br/>",$post[1]);
}
echo "<br/>$hm $text2<br/>";
}
echo "-------<br/>Viewed: $vws";
if(canaddart($uid, $id))
{
echo "<br/><a href=\"articles.php?&action=newart2&sid=$sid&id=$artid&artid=$artid&cid=$cid\">Add more</a>";
}
$tmsg = getpmcount(getuid_sid($sid));
$umsg = getunreadpm(getuid_sid($sid));
if($umsg>0)
{
echo "<br/><a href=\"inbox.php?action=main&sid=$sid&browse?\">NEW PM($umsg/$tmsg)</a>";
}
$countpics = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM iwbf_cwart WHERE artid='".$artid."'"));
echo "<br/><a href=\"articles.php?&action=artcom&sid=$sid&id=$id&artid=$id&cid=$cid\">Comments($countpics[0])</a>";
echo "<br/>";
echo "<a href=\"articles.php?&action=dload&sid=$sid&id=$id&artid=$id\">Download</a>";
echo "<br/>";
$cinfo = mysql_fetch_array(mysql_query("SELECT name from ibwf_articles WHERE id='".$cid."'"));
echo "<a href=\"articles.php?&action=kindat&sid=$sid&cid=$cid\">$cinfo[0]</a>";
echo "<br/>";
$ttext = mysql_fetch_array(mysql_query("SELECT authorid, text, crdate FROM ibwf_readart WHERE id='".$id."'"));
$unick = getnick_uid($ttext[0]);
$unick2 = getnick_uid($post[2]);
echo "<a href=\"articles.php?&action=vall&sid=$sid&who=$ttext[0]&cid=$cid&cid=$cid&id=$artid&artid=$artid\">All articles of $unick</a>";
echo "<br/>----------<br/>";
echo "<a href=\"articles.php?action=articles&sid=$sid&browse?\">";
echo "Articles</a><br/>";
define("ADMOB_MODE", "live");
function admob_append_params(&$params, $key, $val) {
if(!empty($val)) $params .= ("&" . urlencode($key) . "=" . urlencode($val));
}
function admob_append_headers(&$params) {
$admob_ignore = array("HTTP_PRAGMA","HTTP_CACHE_CONTROL","HTTP_CONNECTION","HTTP_USER_AGENT","HTTP_COOKIE");
foreach ( array_keys( $_SERVER ) as $var ) {
if ( substr( $var, 0, 4 ) == "HTTP" && !in_array( $var, $admob_ignore ) ) {
$params .= "&" . urlencode("h[" . $var . "]" ) . "=" . urlencode( $_SERVER[$var] );
}
}
}
function admob_ad($admob_params=array()) {
// build url
$admob_page_url = sprintf("http%s://%s%s",
(isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == TRUE ? "s": ""),
$_SERVER["HTTP_HOST"],
$_SERVER["REQUEST_URI"]
);
$md5_sid = session_id();
if(!empty($md5_sid)) $md5_sid = md5($md5_sid);
$admob_post = "s=" . $admob_params[ADMOB_SITE_ID];
admob_append_params($admob_post, "u", $_SERVER["HTTP_USER_AGENT"]);
admob_append_params($admob_post, "i", $_SERVER["REMOTE_ADDR"]);
admob_append_params($admob_post, "p", $admob_page_url);
admob_append_params($admob_post, "t", $md5_sid);
admob_append_params($admob_post, "v", ADMOB_VERSION);
admob_append_params($admob_post, "d[pc]", $admob_params[ADMOB_PC]);
admob_append_params($admob_post, "d[dob]", $admob_params[ADMOB_DOB]);
admob_append_params($admob_post, "d[gender]", $admob_params[ADMOB_GENDER]);
admob_append_params($admob_post, "k", $admob_params[ADMOB_KEYWORDS]);
admob_append_headers($admob_post);
if(ADMOB_MODE == "test") $admob_post .= "&m=test";
// request ad
$admob_request = @fsockopen(ADMOB_HOST, 80);
if ($admob_request) {
stream_set_timeout($admob_request, ADMOB_TIMEOUT);
fwrite($admob_request, "POST " . ADMOB_ENDPOINT ." HTTP/1.0\r\n");
fwrite($admob_request, "Host: " . ADMOB_HOST . "\r\n");
fwrite($admob_request, "Content-Type: application/x-www-form-urlencoded\r\n");
fwrite($admob_request, "Content-Length: " . strlen($admob_post). "\r\n\r\n");
fwrite($admob_request, $admob_post);
$admob_info = stream_get_meta_data($admob_request);
$admob_timeout = $admob_info['timed_out'];
$admob_contents = "";
$admob_body = false;
while (!feof($admob_request) && !$admob_timeout) {
$admob_line = fgets($admob_request);
if(!$admob_body && $admob_line == "\r\n") $admob_body = true;
if($admob_body && !empty($admob_line)) $admob_contents .= $admob_line;
$admob_info = stream_get_meta_data($admob_request);
$admob_timeout = $admob_info['timed_out'];
}
fclose($admob_request);
if($admob_timeout) {
return "<img src=\"http://t.admob.com/li.php/c.gif/u/" . $admob_params[ADMOB_SITE_ID] . "/1/" . ADMOB_TIMEOUT . "/" . md5($admob_page_url) . "\" alt=\"\" width=\"1\" height=\"1\" />";
} else {
return $admob_contents;
}
}
}
define("ADMOB_SITE_ID", "ADMOB_SITE_ID");
define("ADMOB_HOST", "r.admob.com");
define("ADMOB_ENDPOINT", "/ad_source.php");
define("ADMOB_VERSION", "20071126-PHPF-7d438f25dc3b900a");
define("ADMOB_TIMEOUT", 1);
define("ADMOB_PC", "ADMOB_PC");
define("ADMOB_DOB", "ADMOB_DOB");
define("ADMOB_GENDER", "ADMOB_GENDER");
define("ADMOB_KEYWORDS", "ADMOB_KEYWORDS");
?>
<?php
$admob_params = array(
ADMOB_SITE_ID => "a147973c835da50", // REQUIRED - get from admob.com
ADMOB_PC => "", // OPTIONAL - Postal Code, e.g. "90210"
ADMOB_DOB => "", // OPTIONAL - Date of Birth formatted like YYYYMMDD, e.g. "19800229"
ADMOB_GENDER => "", // OPTIONAL - Gender, m[ale] or f[emale]
ADMOB_KEYWORDS => "" // OPTIONAL - keywords, e.g. "sports baseball la dodgers"
);
echo admob_ad($admob_params); // display an ad
echo "<br/>";
echo "<a href=\"index.php?action=main&sid=$sid&type=send\">";
echo "Main menu</a>";
echo "</p>";
echo "</card>";
}
//////////////////////////////////////////////sdasda
else if($action=="artcom2")
{
$text = $_POST["text"];
$artid = $_GET["artid"];
//$qut = $_POST["qut"];
addonline(getuid_sid($sid),"Adding Article Comment","index.php?action=main");
echo "<card id=\"main\" title=\"Add Article Comment\">";
echo "<p align=\"center\">";
$crdate = time();
$uid = getuid_sid($sid);
$res = false;
if(trim($text)!="")
{
$res = mysql_query("INSERT INTO iwbf_cwart SET uid='".$uid."', text='".$text."', crdate='".$crdate."', artid='".$artid."'");
}
if($res)
{
echo "Comment submitted<br/>";
}else{
echo "Error Adding Comment<br/>";
}
echo "<a href=\"articles.php?action=articles&sid=$sid&browse?\">";
echo "Articles</a><br/>";
define("ADMOB_MODE", "live");
function admob_append_params(&$params, $key, $val) {
if(!empty($val)) $params .= ("&" . urlencode($key) . "=" . urlencode($val));
}
function admob_append_headers(&$params) {
$admob_ignore = array("HTTP_PRAGMA","HTTP_CACHE_CONTROL","HTTP_CONNECTION","HTTP_USER_AGENT","HTTP_COOKIE");
foreach ( array_keys( $_SERVER ) as $var ) {
if ( substr( $var, 0, 4 ) == "HTTP" && !in_array( $var, $admob_ignore ) ) {
$params .= "&" . urlencode("h[" . $var . "]" ) . "=" . urlencode( $_SERVER[$var] );
}
}
}
function admob_ad($admob_params=array()) {
// build url
$admob_page_url = sprintf("http%s://%s%s",
(isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == TRUE ? "s": ""),
$_SERVER["HTTP_HOST"],
$_SERVER["REQUEST_URI"]
);
$md5_sid = session_id();
if(!empty($md5_sid)) $md5_sid = md5($md5_sid);
$admob_post = "s=" . $admob_params[ADMOB_SITE_ID];
admob_append_params($admob_post, "u", $_SERVER["HTTP_USER_AGENT"]);
admob_append_params($admob_post, "i", $_SERVER["REMOTE_ADDR"]);
admob_append_params($admob_post, "p", $admob_page_url);
admob_append_params($admob_post, "t", $md5_sid);
admob_append_params($admob_post, "v", ADMOB_VERSION);
admob_append_params($admob_post, "d[pc]", $admob_params[ADMOB_PC]);
admob_append_params($admob_post, "d[dob]", $admob_params[ADMOB_DOB]);
admob_append_params($admob_post, "d[gender]", $admob_params[ADMOB_GENDER]);
admob_append_params($admob_post, "k", $admob_params[ADMOB_KEYWORDS]);
admob_append_headers($admob_post);
if(ADMOB_MODE == "test") $admob_post .= "&m=test";
// request ad
$admob_request = @fsockopen(ADMOB_HOST, 80);
if ($admob_request) {
stream_set_timeout($admob_request, ADMOB_TIMEOUT);
fwrite($admob_request, "POST " . ADMOB_ENDPOINT ." HTTP/1.0\r\n");
fwrite($admob_request, "Host: " . ADMOB_HOST . "\r\n");
fwrite($admob_request, "Content-Type: application/x-www-form-urlencoded\r\n");
fwrite($admob_request, "Content-Length: " . strlen($admob_post). "\r\n\r\n");
fwrite($admob_request, $admob_post);
$admob_info = stream_get_meta_data($admob_request);
$admob_timeout = $admob_info['timed_out'];
$admob_contents = "";
$admob_body = false;
while (!feof($admob_request) && !$admob_timeout) {
$admob_line = fgets($admob_request);
if(!$admob_body && $admob_line == "\r\n") $admob_body = true;
if($admob_body && !empty($admob_line)) $admob_contents .= $admob_line;
$admob_info = stream_get_meta_data($admob_request);
$admob_timeout = $admob_info['timed_out'];
}
fclose($admob_request);
if($admob_timeout) {
return "<img src=\"http://t.admob.com/li.php/c.gif/u/" . $admob_params[ADMOB_SITE_ID] . "/1/" . ADMOB_TIMEOUT . "/" . md5($admob_page_url) . "\" alt=\"\" width=\"1\" height=\"1\" />";
} else {
return $admob_contents;
}
}
}
define("ADMOB_SITE_ID", "ADMOB_SITE_ID");
define("ADMOB_HOST", "r.admob.com");
define("ADMOB_ENDPOINT", "/ad_source.php");
define("ADMOB_VERSION", "20071126-PHPF-7d438f25dc3b900a");
define("ADMOB_TIMEOUT", 1);
define("ADMOB_PC", "ADMOB_PC");
define("ADMOB_DOB", "ADMOB_DOB");
define("ADMOB_GENDER", "ADMOB_GENDER");
define("ADMOB_KEYWORDS", "ADMOB_KEYWORDS");
?>
<?php
$admob_params = array(
ADMOB_SITE_ID => "a147973c835da50", // REQUIRED - get from admob.com
ADMOB_PC => "", // OPTIONAL - Postal Code, e.g. "90210"
ADMOB_DOB => "", // OPTIONAL - Date of Birth formatted like YYYYMMDD, e.g. "19800229"
ADMOB_GENDER => "", // OPTIONAL - Gender, m[ale] or f[emale]
ADMOB_KEYWORDS => "" // OPTIONAL - keywords, e.g. "sports baseball la dodgers"
);
echo admob_ad($admob_params); // display an ad
echo "<br/>";
echo "<a href=\"index.php?action=main&sid=$sid&browse?start\">";
echo "Main menu</a>";
echo "</p>";
echo "</card>";
}
else if($action=="delart")
{
$id = $_GET["id"];
echo "<card id=\"main\" title=\"Delete Articles\">";
echo "<p align=\"center\">";
$res = mysql_query("DELETE FROM iwbf_cwart WHERE id ='".$id."'");
if($res)
{
echo "Comment deleted";
}else{
echo "Database Error";
}
echo "<br/><br/>";
echo "<a href=\"articles.php?action=articles&sid=$sid&browse?\">";
echo "Articles</a><br/>";
define("ADMOB_MODE", "live");
function admob_append_params(&$params, $key, $val) {
if(!empty($val)) $params .= ("&" . urlencode($key) . "=" . urlencode($val));
}
function admob_append_headers(&$params) {
$admob_ignore = array("HTTP_PRAGMA","HTTP_CACHE_CONTROL","HTTP_CONNECTION","HTTP_USER_AGENT","HTTP_COOKIE");
foreach ( array_keys( $_SERVER ) as $var ) {
if ( substr( $var, 0, 4 ) == "HTTP" && !in_array( $var, $admob_ignore ) ) {
$params .= "&" . urlencode("h[" . $var . "]" ) . "=" . urlencode( $_SERVER[$var] );
}
}
}
function admob_ad($admob_params=array()) {
// build url
$admob_page_url = sprintf("http%s://%s%s",
(isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == TRUE ? "s": ""),
$_SERVER["HTTP_HOST"],
$_SERVER["REQUEST_URI"]
);
$md5_sid = session_id();
if(!empty($md5_sid)) $md5_sid = md5($md5_sid);
$admob_post = "s=" . $admob_params[ADMOB_SITE_ID];
admob_append_params($admob_post, "u", $_SERVER["HTTP_USER_AGENT"]);
admob_append_params($admob_post, "i", $_SERVER["REMOTE_ADDR"]);
admob_append_params($admob_post, "p", $admob_page_url);
admob_append_params($admob_post, "t", $md5_sid);
admob_append_params($admob_post, "v", ADMOB_VERSION);
admob_append_params($admob_post, "d[pc]", $admob_params[ADMOB_PC]);
admob_append_params($admob_post, "d[dob]", $admob_params[ADMOB_DOB]);
admob_append_params($admob_post, "d[gender]", $admob_params[ADMOB_GENDER]);
admob_append_params($admob_post, "k", $admob_params[ADMOB_KEYWORDS]);
admob_append_headers($admob_post);
if(ADMOB_MODE == "test") $admob_post .= "&m=test";
// request ad
$admob_request = @fsockopen(ADMOB_HOST, 80);
if ($admob_request) {
stream_set_timeout($admob_request, ADMOB_TIMEOUT);
fwrite($admob_request, "POST " . ADMOB_ENDPOINT ." HTTP/1.0\r\n");
fwrite($admob_request, "Host: " . ADMOB_HOST . "\r\n");
fwrite($admob_request, "Content-Type: application/x-www-form-urlencoded\r\n");
fwrite($admob_request, "Content-Length: " . strlen($admob_post). "\r\n\r\n");
fwrite($admob_request, $admob_post);
$admob_info = stream_get_meta_data($admob_request);
$admob_timeout = $admob_info['timed_out'];
$admob_contents = "";
$admob_body = false;
while (!feof($admob_request) && !$admob_timeout) {
$admob_line = fgets($admob_request);
if(!$admob_body && $admob_line == "\r\n") $admob_body = true;
if($admob_body && !empty($admob_line)) $admob_contents .= $admob_line;
$admob_info = stream_get_meta_data($admob_request);
$admob_timeout = $admob_info['timed_out'];
}
fclose($admob_request);
if($admob_timeout) {
return "<img src=\"http://t.admob.com/li.php/c.gif/u/" . $admob_params[ADMOB_SITE_ID] . "/1/" . ADMOB_TIMEOUT . "/" . md5($admob_page_url) . "\" alt=\"\" width=\"1\" height=\"1\" />";
} else {
return $admob_contents;
}
}
}
define("ADMOB_SITE_ID", "ADMOB_SITE_ID");
define("ADMOB_HOST", "r.admob.com");
define("ADMOB_ENDPOINT", "/ad_source.php");
define("ADMOB_VERSION", "20071126-PHPF-7d438f25dc3b900a");
define("ADMOB_TIMEOUT", 1);
define("ADMOB_PC", "ADMOB_PC");
define("ADMOB_DOB", "ADMOB_DOB");
define("ADMOB_GENDER", "ADMOB_GENDER");
define("ADMOB_KEYWORDS", "ADMOB_KEYWORDS");
?>
<?php
$admob_params = array(
ADMOB_SITE_ID => "a147973c835da50", // REQUIRED - get from admob.com
ADMOB_PC => "", // OPTIONAL - Postal Code, e.g. "90210"
ADMOB_DOB => "", // OPTIONAL - Date of Birth formatted like YYYYMMDD, e.g. "19800229"
ADMOB_GENDER => "", // OPTIONAL - Gender, m[ale] or f[emale]
ADMOB_KEYWORDS => "" // OPTIONAL - keywords, e.g. "sports baseball la dodgers"
);
echo admob_ad($admob_params); // display an ad
echo "<br/>";
echo "<a href=\"index.php?action=main&sid=$sid\">";
echo "Main menu</a>";
echo "</p>";
echo" </card>";
}
///////////////////////////////////////////////sadasdas
else if($action=="delart1")
{
$id = $_GET["id"];
$cid = $_GET["cid"];
echo "<card id=\"main\" title=\"Delete Articles\">";
echo "<p align=\"center\">";
$res = mysql_query("DELETE FROM ibwf_readart WHERE id='".$id."'");
if($res)
{
echo "Article deleted";
$tpci = mysql_fetch_array(mysql_query("SELECT name, authorid FROM ibwf_readart WHERE id='".$id."'"));
$tname = htmlspecialchars($tpci[0]);
$msg = "Your article "."[/topic] is deleted"." due to non-sense or not in correct category!";
autopm($msg, $tpci[1]);
}else{
echo "Database Error";
}
echo "<br/><br/>";
echo "<a href=\"articles.php?action=articles&sid=$sid&browse?\">";
echo "Articles</a><br/>";
define("ADMOB_MODE", "live");
function admob_append_params(&$params, $key, $val) {
if(!empty($val)) $params .= ("&" . urlencode($key) . "=" . urlencode($val));
}
function admob_append_headers(&$params) {
$admob_ignore = array("HTTP_PRAGMA","HTTP_CACHE_CONTROL","HTTP_CONNECTION","HTTP_USER_AGENT","HTTP_COOKIE");
foreach ( array_keys( $_SERVER ) as $var ) {
if ( substr( $var, 0, 4 ) == "HTTP" && !in_array( $var, $admob_ignore ) ) {
$params .= "&" . urlencode("h[" . $var . "]" ) . "=" . urlencode( $_SERVER[$var] );
}
}
}
function admob_ad($admob_params=array()) {
// build url
$admob_page_url = sprintf("http%s://%s%s",
(isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == TRUE ? "s": ""),
$_SERVER["HTTP_HOST"],
$_SERVER["REQUEST_URI"]
);
$md5_sid = session_id();
if(!empty($md5_sid)) $md5_sid = md5($md5_sid);
$admob_post = "s=" . $admob_params[ADMOB_SITE_ID];
admob_append_params($admob_post, "u", $_SERVER["HTTP_USER_AGENT"]);
admob_append_params($admob_post, "i", $_SERVER["REMOTE_ADDR"]);
admob_append_params($admob_post, "p", $admob_page_url);
admob_append_params($admob_post, "t", $md5_sid);
admob_append_params($admob_post, "v", ADMOB_VERSION);
admob_append_params($admob_post, "d[pc]", $admob_params[ADMOB_PC]);
admob_append_params($admob_post, "d[dob]", $admob_params[ADMOB_DOB]);
admob_append_params($admob_post, "d[gender]", $admob_params[ADMOB_GENDER]);
admob_append_params($admob_post, "k", $admob_params[ADMOB_KEYWORDS]);
admob_append_headers($admob_post);
if(ADMOB_MODE == "test") $admob_post .= "&m=test";
// request ad
$admob_request = @fsockopen(ADMOB_HOST, 80);
if ($admob_request) {
stream_set_timeout($admob_request, ADMOB_TIMEOUT);
fwrite($admob_request, "POST " . ADMOB_ENDPOINT ." HTTP/1.0\r\n");
fwrite($admob_request, "Host: " . ADMOB_HOST . "\r\n");
fwrite($admob_request, "Content-Type: application/x-www-form-urlencoded\r\n");
fwrite($admob_request, "Content-Length: " . strlen($admob_post). "\r\n\r\n");
fwrite($admob_request, $admob_post);
$admob_info = stream_get_meta_data($admob_request);
$admob_timeout = $admob_info['timed_out'];
$admob_contents = "";
$admob_body = false;
while (!feof($admob_request) && !$admob_timeout) {
$admob_line = fgets($admob_request);
if(!$admob_body && $admob_line == "\r\n") $admob_body = true;
if($admob_body && !empty($admob_line)) $admob_contents .= $admob_line;
$admob_info = stream_get_meta_data($admob_request);
$admob_timeout = $admob_info['timed_out'];
}
fclose($admob_request);
if($admob_timeout) {
return "<img src=\"http://t.admob.com/li.php/c.gif/u/" . $admob_params[ADMOB_SITE_ID] . "/1/" . ADMOB_TIMEOUT . "/" . md5($admob_page_url) . "\" alt=\"\" width=\"1\" height=\"1\" />";
} else {
return $admob_contents;
}
}
}
define("ADMOB_SITE_ID", "ADMOB_SITE_ID");
define("ADMOB_HOST", "r.admob.com");
define("ADMOB_ENDPOINT", "/ad_source.php");
define("ADMOB_VERSION", "20071126-PHPF-7d438f25dc3b900a");
define("ADMOB_TIMEOUT", 1);
define("ADMOB_PC", "ADMOB_PC");
define("ADMOB_DOB", "ADMOB_DOB");
define("ADMOB_GENDER", "ADMOB_GENDER");
define("ADMOB_KEYWORDS", "ADMOB_KEYWORDS");
?>
<?php
$admob_params = array(
ADMOB_SITE_ID => "a147973c835da50", // REQUIRED - get from admob.com
ADMOB_PC => "", // OPTIONAL - Postal Code, e.g. "90210"
ADMOB_DOB => "", // OPTIONAL - Date of Birth formatted like YYYYMMDD, e.g. "19800229"
ADMOB_GENDER => "", // OPTIONAL - Gender, m[ale] or f[emale]
ADMOB_KEYWORDS => "" // OPTIONAL - keywords, e.g. "sports baseball la dodgers"
);
echo admob_ad($admob_params); // display an ad
echo "<br/>";
echo "<a href=\"index.php?action=main&sid=$sid\">";
echo "Main menu</a>";
echo "</p>";
echo" </card>";
}
///////////////////////////////vrrrrr
else if($action=="artcom3")
{
$artid = $_GET["artid"];
addonline(getuid_sid($sid),"Making Article Comments","index.php?action=$action&who=$who");
echo "<card id=\"main\" title=\"Article Comments\">";
echo "<p align=\"center\">";
echo "Comment: <input name=\"text\" maxlength=\"500\"/><br/>";
echo "<anchor>Submit <go href=\"articles.php?action=artcom2&sid=$sid&artid=$artid\" method=\"post\">";
echo" <postfield name=\"text\" value=\"$(text)\"/>";
echo "</go></anchor>";
echo "</p>";
echo "<p align=\"center\">";
echo "<a href=\"articles.php?action=articles&sid=$sid&browse?\">";
echo "Articles</a><br/>";
define("ADMOB_MODE", "live");
function admob_append_params(&$params, $key, $val) {
if(!empty($val)) $params .= ("&" . urlencode($key) . "=" . urlencode($val));
}
function admob_append_headers(&$params) {
$admob_ignore = array("HTTP_PRAGMA","HTTP_CACHE_CONTROL","HTTP_CONNECTION","HTTP_USER_AGENT","HTTP_COOKIE");
foreach ( array_keys( $_SERVER ) as $var ) {
if ( substr( $var, 0, 4 ) == "HTTP" && !in_array( $var, $admob_ignore ) ) {
$params .= "&" . urlencode("h[" . $var . "]" ) . "=" . urlencode( $_SERVER[$var] );
}
}
}
function admob_ad($admob_params=array()) {
// build url
$admob_page_url = sprintf("http%s://%s%s",
(isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == TRUE ? "s": ""),
$_SERVER["HTTP_HOST"],
$_SERVER["REQUEST_URI"]
);
$md5_sid = session_id();
if(!empty($md5_sid)) $md5_sid = md5($md5_sid);
$admob_post = "s=" . $admob_params[ADMOB_SITE_ID];
admob_append_params($admob_post, "u", $_SERVER["HTTP_USER_AGENT"]);
admob_append_params($admob_post, "i", $_SERVER["REMOTE_ADDR"]);
admob_append_params($admob_post, "p", $admob_page_url);
admob_append_params($admob_post, "t", $md5_sid);
admob_append_params($admob_post, "v", ADMOB_VERSION);
admob_append_params($admob_post, "d[pc]", $admob_params[ADMOB_PC]);
admob_append_params($admob_post, "d[dob]", $admob_params[ADMOB_DOB]);
admob_append_params($admob_post, "d[gender]", $admob_params[ADMOB_GENDER]);
admob_append_params($admob_post, "k", $admob_params[ADMOB_KEYWORDS]);
admob_append_headers($admob_post);
if(ADMOB_MODE == "test") $admob_post .= "&m=test";
// request ad
$admob_request = @fsockopen(ADMOB_HOST, 80);
if ($admob_request) {
stream_set_timeout($admob_request, ADMOB_TIMEOUT);
fwrite($admob_request, "POST " . ADMOB_ENDPOINT ." HTTP/1.0\r\n");
fwrite($admob_request, "Host: " . ADMOB_HOST . "\r\n");
fwrite($admob_request, "Content-Type: application/x-www-form-urlencoded\r\n");
fwrite($admob_request, "Content-Length: " . strlen($admob_post). "\r\n\r\n");
fwrite($admob_request, $admob_post);
$admob_info = stream_get_meta_data($admob_request);
$admob_timeout = $admob_info['timed_out'];
$admob_contents = "";
$admob_body = false;
while (!feof($admob_request) && !$admob_timeout) {
$admob_line = fgets($admob_request);
if(!$admob_body && $admob_line == "\r\n") $admob_body = true;
if($admob_body && !empty($admob_line)) $admob_contents .= $admob_line;
$admob_info = stream_get_meta_data($admob_request);
$admob_timeout = $admob_info['timed_out'];
}
fclose($admob_request);
if($admob_timeout) {
return "<img src=\"http://t.admob.com/li.php/c.gif/u/" . $admob_params[ADMOB_SITE_ID] . "/1/" . ADMOB_TIMEOUT . "/" . md5($admob_page_url) . "\" alt=\"\" width=\"1\" height=\"1\" />";
} else {
return $admob_contents;
}
}
}
define("ADMOB_SITE_ID", "ADMOB_SITE_ID");
define("ADMOB_HOST", "r.admob.com");
define("ADMOB_ENDPOINT", "/ad_source.php");
define("ADMOB_VERSION", "20071126-PHPF-7d438f25dc3b900a");
define("ADMOB_TIMEOUT", 1);
define("ADMOB_PC", "ADMOB_PC");
define("ADMOB_DOB", "ADMOB_DOB");
define("ADMOB_GENDER", "ADMOB_GENDER");
define("ADMOB_KEYWORDS", "ADMOB_KEYWORDS");
?>
<?php
$admob_params = array(
ADMOB_SITE_ID => "a147973c835da50", // REQUIRED - get from admob.com
ADMOB_PC => "", // OPTIONAL - Postal Code, e.g. "90210"
ADMOB_DOB => "", // OPTIONAL - Date of Birth formatted like YYYYMMDD, e.g. "19800229"
ADMOB_GENDER => "", // OPTIONAL - Gender, m[ale] or f[emale]
ADMOB_KEYWORDS => "" // OPTIONAL - keywords, e.g. "sports baseball la dodgers"
);
echo admob_ad($admob_params); // display an ad
echo "<br/>";
echo "<a href=\"index.php?action=main&sid=$sid\">";
echo "Main menu</a>";
echo "</p>";
echo "</card>";
}
/////////////////////////////////////smooch
else if($action=="artcom")
{
$id = $_GET["id"];
$cid = $_GET["cid"];
$artid = $_GET["artid"];
addonline(getuid_sid($sid),"Viewing Article Comments","lists.php?action=$action&who=$who&bid=$bid");
echo "<card id=\"main\" title=\"Article Comments\">";
$uid = getuid_sid($sid);
echo "<p align=\"left\">";
//////ALL LISTS SCRIPT <<
if($page=="" || $page<=0)$page=1;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM iwbf_cwart WHERE artid='".$artid."'"));
$num_items = $noi[0]; //changable
$items_per_page= 5;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$sql = "SELECT id, artid, text, uid, crdate FROM iwbf_cwart WHERE artid='".$artid."' ORDER BY crdate DESC LIMIT $limit_start, $items_per_page";
$items = mysql_query($sql);
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
if(isonline($item[3]))
{
$iml = "[•]";
}else{
$iml = "[x]";
}
$snick = getnick_uid($item[3]);
$lnk = "<a href=\"index.php?action=viewuser&who=$item[3]&sid=$sid\">$iml$snick</a>:";
$tmstamp = $item[4];
$bs = date("D,dMy-h:i:s a",$tmstamp);
echo "$lnk<br/><small>";
$me = getuid_sid($sid);
if($who=="$me") {
$can = "a";
}else{
$can = "b";
}
if(ismod($uid)||$can=="a")
{
$delnk = "<a href=\"articles.php?action=delart&sid=$sid&id=$item[0]\">[x]</a>";
}else{
$delnk = "";
}
$text = parsepm($item[2], $sid);
echo "$text $delnk<br/>";
echo "$bs";
echo "<br/>";
echo "</small>";
}
}
echo "</p><p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"articles.php?action=artcom&page=$ppage&sid=$sid&id=$artid&cid=$cid&artid=$artid&type=send\">«PREV</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"articles.php?action=artcom&page=$npage&sid=$sid&id=$artid&cid=$cid&artid=$artid&type=send\">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=\"lists.php?type=send\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
$rets .= "<postfield name=\"artid\" value=\"$artid\"/>";
$rets .= "<postfield name=\"id\" value=\"$artid\"/>";
$rets .= "<postfield name=\"cid\" value=\"$cid\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "</go></anchor>";
echo $rets;
}
echo "</p>";
echo "<p align=\"center\">";
$me = getuid_sid($sid);
if($me!="$id") {
echo "<a href=\"articles.php?action=artcom3&sid=$sid&artid=$artid\">Add Comment</a><br/>";
}
echo "<a href=\"articles.php?action=viewart&sid=$sid&cid=$cid&artid=$artid&id=$id&browse?\">";
echo "Back to article</a><br/>";
echo "<a href=\"articles.php?action=articles&sid=$sid&browse?\">";
echo "Articles</a><br/>";
define("ADMOB_MODE", "live");
function admob_append_params(&$params, $key, $val) {
if(!empty($val)) $params .= ("&" . urlencode($key) . "=" . urlencode($val));
}
function admob_append_headers(&$params) {
$admob_ignore = array("HTTP_PRAGMA","HTTP_CACHE_CONTROL","HTTP_CONNECTION","HTTP_USER_AGENT","HTTP_COOKIE");
foreach ( array_keys( $_SERVER ) as $var ) {
if ( substr( $var, 0, 4 ) == "HTTP" && !in_array( $var, $admob_ignore ) ) {
$params .= "&" . urlencode("h[" . $var . "]" ) . "=" . urlencode( $_SERVER[$var] );
}
}
}
function admob_ad($admob_params=array()) {
// build url
$admob_page_url = sprintf("http%s://%s%s",
(isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == TRUE ? "s": ""),
$_SERVER["HTTP_HOST"],
$_SERVER["REQUEST_URI"]
);
$md5_sid = session_id();
if(!empty($md5_sid)) $md5_sid = md5($md5_sid);
$admob_post = "s=" . $admob_params[ADMOB_SITE_ID];
admob_append_params($admob_post, "u", $_SERVER["HTTP_USER_AGENT"]);
admob_append_params($admob_post, "i", $_SERVER["REMOTE_ADDR"]);
admob_append_params($admob_post, "p", $admob_page_url);
admob_append_params($admob_post, "t", $md5_sid);
admob_append_params($admob_post, "v", ADMOB_VERSION);
admob_append_params($admob_post, "d[pc]", $admob_params[ADMOB_PC]);
admob_append_params($admob_post, "d[dob]", $admob_params[ADMOB_DOB]);
admob_append_params($admob_post, "d[gender]", $admob_params[ADMOB_GENDER]);
admob_append_params($admob_post, "k", $admob_params[ADMOB_KEYWORDS]);
admob_append_headers($admob_post);
if(ADMOB_MODE == "test") $admob_post .= "&m=test";
// request ad
$admob_request = @fsockopen(ADMOB_HOST, 80);
if ($admob_request) {
stream_set_timeout($admob_request, ADMOB_TIMEOUT);
fwrite($admob_request, "POST " . ADMOB_ENDPOINT ." HTTP/1.0\r\n");
fwrite($admob_request, "Host: " . ADMOB_HOST . "\r\n");
fwrite($admob_request, "Content-Type: application/x-www-form-urlencoded\r\n");
fwrite($admob_request, "Content-Length: " . strlen($admob_post). "\r\n\r\n");
fwrite($admob_request, $admob_post);
$admob_info = stream_get_meta_data($admob_request);
$admob_timeout = $admob_info['timed_out'];
$admob_contents = "";
$admob_body = false;
while (!feof($admob_request) && !$admob_timeout) {
$admob_line = fgets($admob_request);
if(!$admob_body && $admob_line == "\r\n") $admob_body = true;
if($admob_body && !empty($admob_line)) $admob_contents .= $admob_line;
$admob_info = stream_get_meta_data($admob_request);
$admob_timeout = $admob_info['timed_out'];
}
fclose($admob_request);
if($admob_timeout) {
return "<img src=\"http://t.admob.com/li.php/c.gif/u/" . $admob_params[ADMOB_SITE_ID] . "/1/" . ADMOB_TIMEOUT . "/" . md5($admob_page_url) . "\" alt=\"\" width=\"1\" height=\"1\" />";
} else {
return $admob_contents;
}
}
}
define("ADMOB_SITE_ID", "ADMOB_SITE_ID");
define("ADMOB_HOST", "r.admob.com");
define("ADMOB_ENDPOINT", "/ad_source.php");
define("ADMOB_VERSION", "20071126-PHPF-7d438f25dc3b900a");
define("ADMOB_TIMEOUT", 1);
define("ADMOB_PC", "ADMOB_PC");
define("ADMOB_DOB", "ADMOB_DOB");
define("ADMOB_GENDER", "ADMOB_GENDER");
define("ADMOB_KEYWORDS", "ADMOB_KEYWORDS");
?>
<?php
$admob_params = array(
ADMOB_SITE_ID => "a147973c835da50", // REQUIRED - get from admob.com
ADMOB_PC => "", // OPTIONAL - Postal Code, e.g. "90210"
ADMOB_DOB => "", // OPTIONAL - Date of Birth formatted like YYYYMMDD, e.g. "19800229"
ADMOB_GENDER => "", // OPTIONAL - Gender, m[ale] or f[emale]
ADMOB_KEYWORDS => "" // OPTIONAL - keywords, e.g. "sports baseball la dodgers"
);
echo admob_ad($admob_params); // display an ad
echo "<br/>";
echo "<a href=\"index.php?action=main&sid=$sid\">";
echo "Main menu</a>";
echo "</p>";
echo "</card>";
}
//////////////////////////////////Buddies
else if($action=="vall")
{
$id = $_GET["id"];
$cid = $_GET["cid"];
$artid = $_GET["artid"];
$who = $_GET["who"];
addonline(getuid_sid($sid),"Users Articles","lists.php?action=$action");
echo "<card id=\"main\" title=\"Articles\">";
$uid = getuid_sid($sid);
echo "<p align=\"left\">";
if($page=="" || $page<=0)$page=1;
$ibwf = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_readart WHERE authorid='".$who."'"));
$num_items = $ibwf[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 = $limit_start+1;
$ibwfsites = mysql_query("SELECT id, name, crdate, cid FROM ibwf_readart WHERE authorid='".$who."' ORDER BY crdate DESC LIMIT $limit_start, $items_per_page");;
while($ibwfsite=mysql_fetch_array($ibwfsites))
{
$sitelink = "$cou. <a href=\"articles.php?action=viewart&id=$ibwfsite[0]&sid=$sid&cid=$ibwfsite[3]&artid=$ibwfsite[0]\">$ibwfsite[1]</a>";
echo "<br/>$sitelink";
$cou++;
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"articles.php?action=$action&page=$ppage&sid=$sid&artid=$artid&who=$who&cid=$cid&artid=$artid&id=$id\">«PREV</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"articles.php?action=$action&page=$npage&sid=$sid&artid=$artid&who=$who&cid=$cid&artid=$artid&id=$id\">Next»</a>";
}
echo "<br/>Page $page of $num_pages";
if($num_pages>2)
{
$rets = "<br/>Jump to page: <input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<anchor>[GO]";
$rets .= "<go href=\"lists.php?type=send\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"who\" value=\"$who\"/>";
$rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "</go></anchor>";
echo $rets;
}
////// UNTILL HERE >>
echo "<br/><a href=\"articles.php?action=viewart&sid=$sid&cid=$cid&artid=$artid&id=$id&browse?\">";
echo "Back to article</a>";
echo "<br/><a href=\"articles.php?action=articles&sid=$sid&browse?\">";
echo "Articles</a><br/>";
define("ADMOB_MODE", "live");
function admob_append_params(&$params, $key, $val) {
if(!empty($val)) $params .= ("&" . urlencode($key) . "=" . urlencode($val));
}
function admob_append_headers(&$params) {
$admob_ignore = array("HTTP_PRAGMA","HTTP_CACHE_CONTROL","HTTP_CONNECTION","HTTP_USER_AGENT","HTTP_COOKIE");
foreach ( array_keys( $_SERVER ) as $var ) {
if ( substr( $var, 0, 4 ) == "HTTP" && !in_array( $var, $admob_ignore ) ) {
$params .= "&" . urlencode("h[" . $var . "]" ) . "=" . urlencode( $_SERVER[$var] );
}
}
}
function admob_ad($admob_params=array()) {
// build url
$admob_page_url = sprintf("http%s://%s%s",
(isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == TRUE ? "s": ""),
$_SERVER["HTTP_HOST"],
$_SERVER["REQUEST_URI"]
);
$md5_sid = session_id();
if(!empty($md5_sid)) $md5_sid = md5($md5_sid);
$admob_post = "s=" . $admob_params[ADMOB_SITE_ID];
admob_append_params($admob_post, "u", $_SERVER["HTTP_USER_AGENT"]);
admob_append_params($admob_post, "i", $_SERVER["REMOTE_ADDR"]);
admob_append_params($admob_post, "p", $admob_page_url);
admob_append_params($admob_post, "t", $md5_sid);
admob_append_params($admob_post, "v", ADMOB_VERSION);
admob_append_params($admob_post, "d[pc]", $admob_params[ADMOB_PC]);
admob_append_params($admob_post, "d[dob]", $admob_params[ADMOB_DOB]);
admob_append_params($admob_post, "d[gender]", $admob_params[ADMOB_GENDER]);
admob_append_params($admob_post, "k", $admob_params[ADMOB_KEYWORDS]);
admob_append_headers($admob_post);
if(ADMOB_MODE == "test") $admob_post .= "&m=test";
// request ad
$admob_request = @fsockopen(ADMOB_HOST, 80);
if ($admob_request) {
stream_set_timeout($admob_request, ADMOB_TIMEOUT);
fwrite($admob_request, "POST " . ADMOB_ENDPOINT ." HTTP/1.0\r\n");
fwrite($admob_request, "Host: " . ADMOB_HOST . "\r\n");
fwrite($admob_request, "Content-Type: application/x-www-form-urlencoded\r\n");
fwrite($admob_request, "Content-Length: " . strlen($admob_post). "\r\n\r\n");
fwrite($admob_request, $admob_post);
$admob_info = stream_get_meta_data($admob_request);
$admob_timeout = $admob_info['timed_out'];
$admob_contents = "";
$admob_body = false;
while (!feof($admob_request) && !$admob_timeout) {
$admob_line = fgets($admob_request);
if(!$admob_body && $admob_line == "\r\n") $admob_body = true;
if($admob_body && !empty($admob_line)) $admob_contents .= $admob_line;
$admob_info = stream_get_meta_data($admob_request);
$admob_timeout = $admob_info['timed_out'];
}
fclose($admob_request);
if($admob_timeout) {
return "<img src=\"http://t.admob.com/li.php/c.gif/u/" . $admob_params[ADMOB_SITE_ID] . "/1/" . ADMOB_TIMEOUT . "/" . md5($admob_page_url) . "\" alt=\"\" width=\"1\" height=\"1\" />";
} else {
return $admob_contents;
}
}
}
define("ADMOB_SITE_ID", "ADMOB_SITE_ID");
define("ADMOB_HOST", "r.admob.com");
define("ADMOB_ENDPOINT", "/ad_source.php");
define("ADMOB_VERSION", "20071126-PHPF-7d438f25dc3b900a");
define("ADMOB_TIMEOUT", 1);
define("ADMOB_PC", "ADMOB_PC");
define("ADMOB_DOB", "ADMOB_DOB");
define("ADMOB_GENDER", "ADMOB_GENDER");
define("ADMOB_KEYWORDS", "ADMOB_KEYWORDS");
?>
<?php
$admob_params = array(
ADMOB_SITE_ID => "a147973c835da50", // REQUIRED - get from admob.com
ADMOB_PC => "", // OPTIONAL - Postal Code, e.g. "90210"
ADMOB_DOB => "", // OPTIONAL - Date of Birth formatted like YYYYMMDD, e.g. "19800229"
ADMOB_GENDER => "", // OPTIONAL - Gender, m[ale] or f[emale]
ADMOB_KEYWORDS => "" // OPTIONAL - keywords, e.g. "sports baseball la dodgers"
);
echo admob_ad($admob_params); // display an ad
echo "<br/>";
echo "<a href=\"index.php?action=main&sid=$sid&type=send&browse?\">";
echo "Main menu</a>";
echo "</p>";
echo "</card>";
}
////////////////////////////////////
else if($action=="dload")
{
$artid = $artid;
addonline(getuid_sid($sid),"Download Article","index.php?action=main");
echo "<card id=\"main\" title=\"Article\">";
echo "<p align=\"center\">";
$pminfo = mysql_fetch_array(mysql_query("SELECT text, authorid FROM ibwf_readart WHERE id='".$id."'"));
echo "Ready to download<br/><br/>";
echo "<a href=\"artdl.php?action=dart&id=$id&artid=$artid&sid=$sid&type=send&browse?start\">Download Now</a><br/>";
echo "<a href=\"articles.php?action=articles&sid=$sid&browse?\">";
echo "Articles</a><br/>";
echo "<br/><a href=\"index.php?action=main&sid=$sid&type=send&browse?start\"><br/>";
echo "Main menu</a>";
echo "<do type=\"Chatrooms\" label=\"Chatrooms\"><go href=\"index.php?action=chat&sid=$sid&type=send&browse?start\"/></do>";
echo "<do type=\"Forum Index\" label=\"Forum Index\"><go href=\"index.php?action=forums&sid=$sid&type=send&browse?start\"/></do>";
echo "</p>";
echo "</card>";
}
?>
</wml>