function viewbanner() { global $prefix, $db, $admin, $sitename, $adminmail, $nukeurl; if (paid()) { return; } $numrows = $db->sql_numrows($db->sql_query("SELECT * FROM " . $prefix . "_banner WHERE type='0' AND active='1'")); /* Get a random banner if exist any. */ /* More efficient random stuff, thanks to Cristian Arroyo from http://www.planetalinux.com.ar */ if ($numrows > 1) { $numrows = $numrows - 1; mt_srand((double) microtime() * 1000000); $bannum = mt_rand(0, $numrows); } else { $bannum = 0; } $sql = "SELECT bid, impmade, imageurl, clickurl, alttext FROM " . $prefix . "_banner WHERE type='0' AND active='1' LIMIT {$bannum},1"; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $bid = $row[bid]; $imageurl = $row[imageurl]; $clickurl = $row[clickurl]; $alttext = $row[alttext]; if (!is_admin($admin)) { $db->sql_query("UPDATE " . $prefix . "_banner SET impmade=impmade+1 WHERE bid='{$bid}'"); } update_points(21); if ($numrows > 0) { $sql2 = "SELECT cid, imptotal, impmade, clicks, date FROM " . $prefix . "_banner WHERE bid='{$bid}'"; $result2 = $db->sql_query($sql2); $row2 = $db->sql_fetchrow($result2); $cid = $row2[cid]; $imptotal = $row2[imptotal]; $imptotal = intval($imptotal); $impmade = $row2[impmade]; $impmade = intval($impmade); $clicks = $row2[clicks]; $clicks = intval($clicks); $date = $row2[date]; /* Check if this impression is the last one and print the banner */ if ($imptotal <= $impmade and $imptotal != 0) { $db->sql_query("UPDATE " . $prefix . "_banner SET active='0' WHERE bid='{$bid}'"); $sql3 = "SELECT name, contact, email FROM " . $prefix . "_bannerclient WHERE cid='{$cid}'"; $result3 = $db->sql_query($sql3); $row3 = $db->sql_fetchrow($result3); $c_name = $row3[name]; $c_contact = $row3[contact]; $c_email = $row3[email]; if ($c_email != "") { $from = "{$sitename} <{$adminmail}>"; $to = "{$c_contact} <{$c_email}>"; $message = "" . _HELLO . " {$c_contact}:\n\n"; $message .= "" . _THISISAUTOMATED . "\n\n"; $message .= "" . _THERESULTS . "\n\n"; $message .= "" . _TOTALIMPRESSIONS . " {$imptotal}\n"; $message .= "" . _CLICKSRECEIVED . " {$clicks}\n"; $message .= "" . _IMAGEURL . " {$imageurl}\n"; $message .= "" . _CLICKURL . " {$clickurl}\n"; $message .= "" . _ALTERNATETEXT . " {$alttext}\n\n"; $message .= "" . _HOPEYOULIKED . "\n\n"; $message .= "" . _THANKSUPPORT . "\n\n"; $message .= "- {$sitename} " . _TEAM . "\n"; $message .= "{$nukeurl}"; $subject = "{$sitename}: " . _BANNERSFINNISHED . ""; mail($to, $subject, $message, "From: {$from}\nX-Mailer: PHP/" . phpversion()); } } echo "<center><a href=\"banners.php?op=click&bid={$bid}\" target=\"_blank\"><img src=\"{$imageurl}\" border=\"0\" alt='{$alttext}' title='{$alttext}'></a></center>"; } }
if (file_exists($modpath)) { include $modpath; } else { die("Sorry, such file doesn't exist..."); } } elseif ($view == 2 and !is_admin($admin)) { $pagetitle = "- " . _ACCESSDENIED . ""; include "header.php"; title("{$sitename}: " . _ACCESSDENIED . ""); OpenTable(); echo "<center><b>" . _RESTRICTEDAREA . "</b><br><br>" . "" . _MODULESADMINS . "" . "" . _GOBACK . ""; CloseTable(); include "footer.php"; die; } else { if ($view == 3 and paid()) { $modpath .= "modules/{$name}/{$file}.php"; if (file_exists($modpath)) { include $modpath; } else { die("Sorry, such file doesn't exist..."); } } else { $pagetitle = "- " . _ACCESSDENIED . ""; include "header.php"; title("{$sitename}: " . _ACCESSDENIED . ""); OpenTable(); echo "<center><b>" . _RESTRICTEDAREA . "</b><br><br>" . "" . _MODULESSUBSCRIBER . ""; if ($subscription_url != "") { echo "<br>" . _SUBHERE . ""; }
function userinfo($username, $bypass = 0, $hid = 0, $url = 0) { global $articlecomm, $user, $cookie, $sitename, $prefix, $user_prefix, $db, $admin, $broadcast_msg, $my_headlines, $module_name, $subscription_url, $admin_file; $username = substr(htmlspecialchars(str_replace("\\'", "'", trim($username))), 0, 25); $username = rtrim($username, "\\"); $username = str_replace("'", "\\'", $username); $sql = "SELECT * FROM " . $prefix . "_bbconfig"; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { $board_config[$row['config_name']] = $row['config_value']; } $sql2 = "SELECT * FROM " . $user_prefix . "_users WHERE username='******'"; $result2 = $db->sql_query($sql2); $num = $db->sql_numrows($result2); if ($num != 1) { Header("Location: modules.php?name={$module_name}"); die; } $userinfo = $db->sql_fetchrow($result2); if (!$bypass) { cookiedecode($user); } include "header.php"; OpenTable(); echo "<center>"; if ($username != '') { // SecurityReason.com Fix 2005 [sp3x] if (isset($cookie[1]) and strtolower($username) == strtolower($cookie[1]) and $userinfo['user_password'] == $cookie[2]) { echo "<font class=\"option\">" . htmlentities($username) . ", " . _WELCOMETO . " {$sitename}!</font><br><br>"; echo "<font class=\"content\">" . _THISISYOURPAGE . "</font></center><br><br>"; nav(1); echo "<br><br>"; } else { echo "<font class=\"title\">" . _PERSONALINFO . ": " . htmlentities($username) . "</font></center><br><br>"; } } else { Header("Location: modules.php?name={$module_name}"); } if ($userinfo['user_website']) { if (!preg_match('#^http[s]?:\\/\\/#i', $userinfo['user_website'])) { $userinfo['user_website'] = "http://" . $userinfo['user_website']; } if (!preg_match('#^http[s]?\\:\\/\\/[a-z0-9\\-]+\\.([a-z0-9\\-]+\\.)?[a-z]+#i', $userinfo['user_website'])) { $userinfo['user_website'] = ''; } } if ($userinfo['user_avatar_type'] == 1) { $userinfo['user_avatar'] = $board_config['avatar_path'] . "/" . $userinfo['user_avatar']; } elseif ($userinfo['user_avatar_type'] == 2) { $userinfo['user_avatar'] = $userinfo['user_avatar']; } else { $userinfo['user_avatar'] = $board_config['avatar_gallery_path'] . "/" . $userinfo['user_avatar']; } if ($num == 1 && ($userinfo['user_website'] || $userinfo['femail'] || $userinfo['bio'] || $userinfo['user_avatar'] || $userinfo['user_icq'] || $userinfo['user_aim'] || $userinfo['user_yim'] || $userinfo['user_msnm'] || $userinfo['user_location'] || $userinfo['user_occ'] || $userinfo['user_interests'] || $userinfo['user_sig'])) { echo "<center><font class=\"content\">"; echo "<img src=\"" . $userinfo['user_avatar'] . "\"><br><br>\n"; if ($userinfo['user_website'] != "http://" and !empty($userinfo['user_website'])) { echo "" . _MYHOMEPAGE . " <a href=\"" . $userinfo['user_website'] . "\" target=\"new\">" . $userinfo['user_website'] . "</a><br>\n"; } if ($userinfo['femail']) { echo "" . _MYEMAIL . " <a href=\"mailto:" . $userinfo['femail'] . "\">" . $userinfo['femail'] . "</a><br>\n"; } if ($userinfo['user_icq'] && preg_match('/^[0-9]+$/', $userinfo['user_icq'])) { echo "" . _ICQ . ": " . $userinfo['user_icq'] . "<br>\n"; } if ($userinfo['user_aim']) { echo "" . _AIM . ": " . $userinfo['user_aim'] . "<br>\n"; } if ($userinfo['user_yim']) { echo "" . _YIM . ": " . $userinfo['user_yim'] . "<br>\n"; } if ($userinfo['user_msnm']) { echo "" . _MSNM . ": " . $userinfo['user_msnm'] . "<br>\n"; } if ($userinfo['user_from']) { echo "" . _LOCATION . ": " . $userinfo['user_from'] . "<br>\n"; } if ($userinfo['user_occ']) { echo "" . _OCCUPATION . ": " . $userinfo['user_occ'] . "<br>\n"; } if ($userinfo['user_interests']) { echo "" . _INTERESTS . ": " . $userinfo['user_interests'] . "<br>\n"; } $userinfo['user_sig'] = nl2br($userinfo['user_sig']); if ($userinfo['user_sig']) { echo "<br><b>" . _SIGNATURE . ":</b><br>" . $userinfo['user_sig'] . "<br>\n"; } if ($userinfo['bio']) { echo "<br><b>" . _EXTRAINFO . ":</b><br>" . $userinfo['bio'] . "<br>\n"; } $sql2 = "SELECT uname FROM " . $prefix . "_session WHERE uname='{$username}'"; $result2 = $db->sql_query($sql2); $row2 = $db->sql_fetchrow($result2); $username_pm = $username; $username_online = $row2['uname']; if (empty($username_online)) { $online = _OFFLINE; } else { $online = _ONLINE; } echo "<br><br>" . _USERSTATUS . ": <b>{$online}</b><br>\n"; if ($userinfo['newsletter'] == 1 and $username == $cookie[1] and $userinfo['user_password'] == $cookie[2] or is_admin($admin) and $userinfo['newsletter'] == 1) { echo "<i>" . _SUBSCRIBED . "</i><br>"; } elseif (isset($cookie[1]) and $userinfo['newsletter'] == 0 and $username == $cookie[1] and $userinfo['user_password'] == $cookie[2] or is_admin($admin) and $userinfo['newsletter'] == 0) { echo "<i>" . _NOTSUBSCRIBED . "</i><br>"; } if (is_user($user) and $cookie[1] == "{$username}" or is_admin($admin)) { $numpoints = $db->sql_fetchrow($db->sql_query("SELECT points FROM " . $user_prefix . "_users WHERE user_id = '" . intval($cookie[0]) . "'")); $n_points = intval($numpoints['points']); echo "" . _YOUHAVEPOINTS . " <b>{$n_points}</b><br>"; if (paid()) { $row = $db->sql_fetchrow($db->sql_query("SELECT * FROM " . $prefix . "_subscriptions WHERE userid='" . intval($cookie[0]) . "'")); if (!empty($subscription_url)) { $content = "<br><center>" . _YOUARE . " <a href='{$subscription_url}'>" . _SUBSCRIBER . "</a> " . _OF . " {$sitename}<br>"; } else { $content = "<br><center>" . _YOUARE . " " . _SUBSCRIBER . " " . _OF . " {$sitename}<br>"; } $diff = $row['subscription_expire'] - time(); $yearDiff = floor($diff / 60 / 60 / 24 / 365); $diff -= $yearDiff * 60 * 60 * 24 * 365; if ($yearDiff < 1) { $diff = $row['subscription_expire'] - time(); } $daysDiff = floor($diff / 60 / 60 / 24); $diff -= $daysDiff * 60 * 60 * 24; $hrsDiff = floor($diff / 60 / 60); $diff -= $hrsDiff * 60 * 60; $minsDiff = floor($diff / 60); $diff -= $minsDiff * 60; $secsDiff = $diff; if ($yearDiff < 1) { $rest = "{$daysDiff} " . _SBDAYS . ", {$hrsDiff} " . _SBHOURS . ", {$minsDiff} " . _SBMINUTES . ", {$secsDiff} " . _SBSECONDS . ""; } elseif ($yearDiff == 1) { $rest = "{$yearDiff} " . _SBYEAR . ", {$daysDiff} " . _SBDAYS . ", {$hrsDiff} " . _SBHOURS . ", {$minsDiff} " . _SBMINUTES . ", {$secsDiff} " . _SBSECONDS . ""; } elseif ($yearDiff > 1) { $rest = "{$yearDiff} " . _SBYEARS . ", {$daysDiff} " . _SBDAYS . ", {$hrsDiff} " . _SBHOURS . ", {$minsDiff} " . _SBMINUTES . ", {$secsDiff} " . _SBSECONDS . ""; } $content .= "<b>" . _SUBEXPIREIN . "<br><font color='#FF0000'>{$rest}</font></b></center>"; } else { if (!empty($subscription_url)) { $content .= "<br><center>" . _NOTSUB . " {$sitename}. " . _SUBFROM . " <a href='{$subscription_url}'>" . _HERE . "</a> " . _NOW . ""; } else { $content .= "<br><center>" . _NOTSUB . " {$sitename}."; } } echo "{$content}<br><br>"; if (is_admin($admin)) { $subnum = $db->sql_numrows($db->sql_query("SELECT * FROM " . $prefix . "_subscriptions WHERE userid='" . intval($userinfo['user_id']) . "'")); if ($subnum != 0) { echo "<center><b>" . _ADMSUB . "</b></center><br>"; $row = $db->sql_fetchrow($db->sql_query("SELECT * FROM " . $prefix . "_subscriptions WHERE userid='" . intval($userinfo['user_id']) . "'")); $diff = $row['subscription_expire'] - time(); $yearDiff = floor($diff / 60 / 60 / 24 / 365); $diff -= $yearDiff * 60 * 60 * 24 * 365; if ($yearDiff < 1) { $diff = $row['subscription_expire'] - time(); } $daysDiff = floor($diff / 60 / 60 / 24); $diff -= $daysDiff * 60 * 60 * 24; $hrsDiff = floor($diff / 60 / 60); $diff -= $hrsDiff * 60 * 60; $minsDiff = floor($diff / 60); $diff -= $minsDiff * 60; $secsDiff = $diff; if ($yearDiff < 1) { $rest = "{$daysDiff} " . _SBDAYS . ", {$hrsDiff} " . _SBHOURS . ", {$minsDiff} " . _SBMINUTES . ", {$secsDiff} " . _SBSECONDS . ""; } elseif ($yearDiff == 1) { $rest = "{$yearDiff} " . _SBYEAR . ", {$daysDiff} " . _SBDAYS . ", {$hrsDiff} " . _SBHOURS . ", {$minsDiff} " . _SBMINUTES . ", {$secsDiff} " . _SBSECONDS . ""; } elseif ($yearDiff > 1) { $rest = "{$yearDiff} " . _SBYEARS . ", {$daysDiff} " . _SBDAYS . ", {$hrsDiff} " . _SBHOURS . ", {$minsDiff} " . _SBMINUTES . ", {$secsDiff} " . _SBSECONDS . ""; } $content = "<b>" . _ADMSUBEXPIREIN . "<br><font color='#FF0000'>{$rest}</font></b><br><br>"; echo "{$content}"; } else { echo "<center><b>" . _ADMNOTSUB . "</b><br><br>"; } } } if (is_active("Journal") and $cookie[1] != $username) { $sql3 = "SELECT jid FROM " . $prefix . "_journal WHERE aid='{$username}' AND status='yes' ORDER BY pdate,jid DESC LIMIT 0,1"; $result3 = $db->sql_query($sql3); $row3 = $db->sql_fetchrow($result3); $jid = intval($row3['jid']); if (!empty($jid) and isset($jid)) { echo "[ <a href=\"modules.php?name=Journal&file=search&bywhat=aid&forwhat={$username}\">" . _READMYJOURNAL . "</a> ]<br>"; } } if (is_admin($admin)) { echo "<br>"; OpenTable2(); if ($userinfo['last_ip'] != 0) { echo "<center><font class=\"title\">" . _ADMINFUNCTIONS . "</font><br><br>" . _LASTIP . " <b>" . $userinfo['last_ip'] . "</b><br><br>"; echo "[ <a href='" . $admin_file . ".php?op=ipban&ip=" . $userinfo['last_ip'] . "'>" . _BANTHIS . "</a> | <a href=\"" . $admin_file . ".php?op=modifyUser&chng_uid=" . $userinfo['username'] . "\">" . _EDITUSER . "</a> ]</center>"; } else { echo "<center>[ <a href=\"" . $admin_file . ".php?op=modifyUser&chng_uid=" . $userinfo['username'] . "\">" . _EDITUSER . "</a> ]</center>"; } if ($userinfo['karma'] == 0) { $karma = _KARMAGOOD; $karma_help = _KARMAGOODHLP; $change_karma = "<a href=\"modules.php?name={$module_name}&op=change_karma&user_id=" . $userinfo['user_id'] . "&karma=1\"><img src=\"images/karma/1.gif\" border=\"0\" alt=\"" . _KARMALOW . "\" title=\"" . _KARMALOW . "\" hspace=\"5\"></a>"; $change_karma .= "<a href=\"modules.php?name={$module_name}&op=change_karma&user_id=" . $userinfo['user_id'] . "&karma=2\"><img src=\"images/karma/2.gif\" border=\"0\" alt=\"" . _KARMABAD . "\" title=\"" . _KARMABAD . "\" hspace=\"5\"></a>"; $change_karma .= "<a href=\"modules.php?name={$module_name}&op=change_karma&user_id=" . $userinfo['user_id'] . "&karma=3\"><img src=\"images/karma/3.gif\" border=\"0\" alt=\"" . _KARMADEVIL . "\" title=\"" . _KARMADEVIL . "\" hspace=\"5\"></a>"; } elseif ($userinfo['karma'] == 1) { $karma = _KARMALOW; $karma_help = _KARMALOWHLP; $change_karma = "<a href=\"modules.php?name={$module_name}&op=change_karma&user_id=" . $userinfo['user_id'] . "&karma=0\"><img src=\"images/karma/0.gif\" border=\"0\" alt=\"" . _KARMAGOOD . "\" title=\"" . _KARMAGOOD . "\" hspace=\"5\"></a>"; $change_karma .= "<a href=\"modules.php?name={$module_name}&op=change_karma&user_id=" . $userinfo['user_id'] . "&karma=2\"><img src=\"images/karma/2.gif\" border=\"0\" alt=\"" . _KARMABAD . "\" title=\"" . _KARMABAD . "\" hspace=\"5\"></a>"; $change_karma .= "<a href=\"modules.php?name={$module_name}&op=change_karma&user_id=" . $userinfo['user_id'] . "&karma=3\"><img src=\"images/karma/3.gif\" border=\"0\" alt=\"" . _KARMADEVIL . "\" title=\"" . _KARMADEVIL . "\" hspace=\"5\"></a>"; } elseif ($userinfo['karma'] == 2) { $karma = _KARMABAD; $karma_help = _KARMABADHLP; $change_karma = "<a href=\"modules.php?name={$module_name}&op=change_karma&user_id=" . $userinfo['user_id'] . "&karma=0\"><img src=\"images/karma/0.gif\" border=\"0\" alt=\"" . _KARMAGOOD . "\" title=\"" . _KARMAGOOD . "\" hspace=\"5\"></a>"; $change_karma .= "<a href=\"modules.php?name={$module_name}&op=change_karma&user_id=" . $userinfo['user_id'] . "&karma=1\"><img src=\"images/karma/1.gif\" border=\"0\" alt=\"" . _KARMALOW . "\" title=\"" . _KARMALOW . "\" hspace=\"5\"></a>"; $change_karma .= "<a href=\"modules.php?name={$module_name}&op=change_karma&user_id=" . $userinfo['user_id'] . "&karma=3\"><img src=\"images/karma/3.gif\" border=\"0\" alt=\"" . _KARMADEVIL . "\" title=\"" . _KARMADEVIL . "\" hspace=\"5\"></a>"; } elseif ($userinfo['karma'] == 3) { $karma = _KARMADEVIL; $karma_help = _KARMADEVILHLP; $change_karma = "<a href=\"modules.php?name={$module_name}&op=change_karma&user_id=" . $userinfo['user_id'] . "&karma=0\"><img src=\"images/karma/0.gif\" border=\"0\" alt=\"" . _KARMAGOOD . "\" title=\"" . _KARMAGOOD . "\" hspace=\"5\"></a>"; $change_karma .= "<a href=\"modules.php?name={$module_name}&op=change_karma&user_id=" . $userinfo['user_id'] . "&karma=1\"><img src=\"images/karma/1.gif\" border=\"0\" alt=\"" . _KARMALOW . "\" title=\"" . _KARMALOW . "\" hspace=\"5\"></a>"; $change_karma .= "<a href=\"modules.php?name={$module_name}&op=change_karma&user_id=" . $userinfo['user_id'] . "&karma=2\"><img src=\"images/karma/2.gif\" border=\"0\" alt=\"" . _KARMABAD . "\" title=\"" . _KARMABAD . "\" hspace=\"5\"></a>"; } echo "<center><br><br>" . _USERKARMA . " <img src=\"images/karma/" . $userinfo['karma'] . ".gif\" border=\"0\" alt=\"{$karma}\" title=\"{$karma}\"> ({$karma})<br>({$karma_help})</center><br><br>"; OpenTable2(); echo "<center><b>" . _CHANGEKARMA . " <i>" . $userinfo['username'] . "</i></b><br><br>"; echo "{$change_karma}</center>"; CloseTable2(); echo "<br>"; echo "<table border=\"0\" width=\"80%\" cellpadding=\"3\" cellspacing=\"3\" align=\"center\">"; echo "<tr><td valign=\"middle\"><img src=\"images/karma/0.gif\" border=\"0\" alt=\"" . _KARMAGOOD . "\" title=\"" . _KARMAGOOD . "\"></td><td>" . _KARMAGOODREF . "</td></tr>"; echo "<tr><td valign=\"middle\"><img src=\"images/karma/1.gif\" border=\"0\" alt=\"" . _KARMALOW . "\" title=\"" . _KARMALOW . "\"></td><td>" . _KARMALOWREF . "</td></tr>"; echo "<tr><td valign=\"middle\"><img src=\"images/karma/2.gif\" border=\"0\" alt=\"" . _KARMABAD . "\" title=\"" . _KARMABAD . "\"></td><td>" . _KARMABADREF . "</td></tr>"; echo "<tr><td valign=\"middle\"><img src=\"images/karma/3.gif\" border=\"0\" alt=\"" . _KARMADEVIL . "\" title=\"" . _KARMADEVIL . "\"></td><td>" . _KARMADEVILREF . "</td></tr></table>"; CloseTable2(); } if ((is_user($user) and $cookie[1] != $username or is_admin($admin)) and is_active("Private_Messages")) { echo "<br>[ <a href=\"modules.php?name=Private_Messages&mode=post&u=" . intval($userinfo['user_id']) . "\">" . _USENDPRIVATEMSG . " {$username_pm}</a> ]<br>\n"; } echo "</center></font>"; } else { echo "<center>" . _NOINFOFOR . " " . htmlentities($username) . "</center>"; } CloseTable(); if (isset($cookie[1]) and $my_headlines == 1 and $username == $cookie[1] and $userinfo['user_password'] == $cookie[2]) { echo "<br>"; OpenTable(); echo "<center><b>" . _MYHEADLINES . "</b><br><br>" . "" . _SELECTASITE . "<br><br>" . "<form action=\"modules.php?name={$module_name}\" method=\"post\">" . "<input type=\"hidden\" name=\"op\" value=\"userinfo\">" . "<input type=\"hidden\" name=\"username\" value=\"{$username}\">" . "<input type=\"hidden\" name=\"bypass\" value=\"{$bypass}\">" . "<input type=\"hidden\" name=\"url\" value=\"0\">" . "<select name=\"hid\" onChange='submit()'>\n" . "<option value=\"0\">" . _SELECTASITE2 . "</option>"; $sql4 = "SELECT hid, sitename FROM " . $prefix . "_headlines ORDER BY sitename"; $headl = $db->sql_query($sql4); while ($row4 = $db->sql_fetchrow($headl)) { $nhid = intval($row4['hid']); $hsitename = filter($row4['sitename'], "nohtml"); if ($hid == $nhid) { $sel = "selected"; } else { $sel = ""; } echo "<option value=\"{$nhid}\" {$sel}>{$hsitename}</option>\n"; } echo "</select></form>" . "" . _ORTYPEURL . "<br><br>" . "<form action=\"modules.php?name={$module_name}\" method=\"post\">" . "<input type=\"hidden\" name=\"op\" value=\"userinfo\">" . "<input type=\"hidden\" name=\"username\" value=\"{$username}\">" . "<input type=\"hidden\" name=\"bypass\" value=\"{$bypass}\">" . "<input type=\"hidden\" name=\"hid\" value=\"0\">" . "<input type=\"text\" name=\"url\" size=\"40\" maxlength=\"200\" value=\"http://\"> " . "<input type=\"submit\" value=\"" . _GO . "\"></form>" . "</center><br>"; if ($hid != 0 or $hid == 0 and $url != "0" and $url != "http://" and !empty($url)) { if ($hid != 0) { $sql5 = "SELECT sitename, headlinesurl FROM " . $prefix . "_headlines WHERE hid='{$hid}'"; $result5 = $db->sql_query($sql5); $row5 = $db->sql_fetchrow($result5); $nsitename = filter($row5[sitename], "nohtml"); $url = filter($row5[headlinesurl], "nohtml"); $title = filter($nsitename, "nohtml"); $siteurl = eregi_replace("http://", "", $url); $siteurl = explode("/", $siteurl); } else { if (!ereg("http://", $url)) { $url = "http://{$url}"; } $siteurl = eregi_replace("http://", "", $url); $siteurl = explode("/", $siteurl); $title = "http://{$siteurl['0']}"; } $rdf = parse_url($url); $fp = fsockopen($rdf['host'], 80, $errno, $errstr, 15); if (!$fp) { $content = "<center><font class=\"content\">" . _RSSPROBLEM . "</font></center>"; } if ($fp) { fputs($fp, "GET " . $rdf['path'] . "?" . $rdf['query'] . " HTTP/1.0\r\n"); fputs($fp, "HOST: " . $rdf['host'] . "\r\n\r\n"); $string = ""; while (!feof($fp)) { $pagetext = fgets($fp, 300); $string .= chop($pagetext); } fputs($fp, "Connection: close\r\n\r\n"); fclose($fp); $items = explode("</item>", $string); $content = "<font class=\"content\">"; for ($i = 0; $i < 10; $i++) { $link = ereg_replace(".*<link>", "", $items[$i]); $link = ereg_replace("</link>.*", "", $link); $link = stripslashes(check_html($link, "nohtml")); $title2 = ereg_replace(".*<title>", "", $items[$i]); $title2 = ereg_replace("</title>.*", "", $title2); $title2 = stripslashes(check_html($title2, "nohtml")); if (empty($items[$i]) and $cont != 1) { $content = "<center>" . _RSSPROBLEM . "</center>"; } else { if (strcmp($link, $title2) and !empty($items[$i])) { $cont = 1; $content .= "<img src=\"images/arrow.gif\" border=\"0\" hspace=\"5\"><a href=\"{$link}\" target=\"new\">{$title2}</a><br>\n"; } } } } if (!empty($content)) { OpenTable2(); echo "<center><b>" . _HEADLINESFROM . " <a href=\"http://{$siteurl['0']}\" target=\"new\">{$title}</a></b></center><br>"; echo "{$content}"; CloseTable2(); } elseif ($cont == 0 or empty($content)) { OpenTable2(); echo "<center>" . _RSSPROBLEM . "</center><br>"; CloseTable2(); } echo "<br>"; } CloseTable(); } if (isset($cookie[1]) and $broadcast_msg == 1 and $username == $cookie[1] and $userinfo['user_password'] == $cookie[2]) { echo "<br>"; OpenTable(); echo "<center><b>" . _BROADCAST . "</b><br><br>" . _BROADCASTTEXT . "<br><br>" . "<form action=\"modules.php?name={$module_name}\" method=\"post\">" . "<input type=\"hidden\" name=\"who\" value=\"{$username}\">" . "<input type=\"hidden\" name=\"op\" value=\"broadcast\">" . "<input type=\"text\" size=\"60\" maxlength=\"255\" name=\"the_message\"> <input type=\"submit\" value=\"" . _SEND . "\">" . "</form></center>"; CloseTable(); } if (isset($cookie[1]) and is_active("Private_Messages") and $username == $cookie[1] and $userinfo['user_password'] == $cookie[2]) { echo "<br>"; OpenTable(); echo "<center><b>" . _PRIVATEMESSAGES . "</b><br><br>"; $numrow = $db->sql_numrows($db->sql_query("SELECT * FROM " . $prefix . "_bbprivmsgs WHERE privmsgs_to_userid='" . intval($userinfo['user_id']) . "' AND (privmsgs_type='1' OR privmsgs_type='5' OR privmsgs_type='0')")); if (is_active("Members_List")) { $mem_list = "<a href=\"modules.php?name=Members_List\">" . _BROWSEUSERS . "</a>"; } else { $mem_list = ""; } if (is_active("Search")) { $mod_search = "<a href=\"modules.php?name=Search&type=users\">" . _SEARCHUSERS . "</a>"; } else { $mod_search = ""; } if (!empty($mem_list) and !empty($mod_search)) { $a = " | "; } else { $a = ""; } if (!empty($mem_list) or !empty($mod_search)) { $links = "[ {$mem_list} {$a} {$mod_search} ]"; } elseif (empty($mem_list) and empty($mod_search)) { $links = ""; } echo "" . _YOUHAVE . " <a href=\"modules.php?name=Private_Messages\"><b>{$numrow}</b></a> " . _PRIVATEMSG . "<br><br>" . "<form action=\"modules.php?name=Private_Messages\" method=\"post\">" . "" . _USENDPRIVATEMSG . ": <input type=\"text\" name=\"pm_uname\" size=\"20\"> {$links}" . "<input type=\"hidden\" name=\"send\" value=\"1\">" . "</form></center>"; CloseTable(); } if ($articlecomm == 1) { echo "<br>"; OpenTable(); echo "<b>" . _LAST10COMMENTS . " " . $userinfo['username'] . ":</b><br>"; $sql6 = "SELECT tid, sid, subject FROM " . $prefix . "_comments WHERE name='" . $userinfo['username'] . "' ORDER BY tid DESC LIMIT 0,10"; $result6 = $db->sql_query($sql6); while ($row6 = $db->sql_fetchrow($result6)) { $tid = intval($row6['tid']); $sid = intval($row6['sid']); $subject = filter($row6['subject'], "nohtml"); echo "<li><a href=\"modules.php?name=News&file=article&thold=-1&mode=flat&order=0&sid={$sid}#{$tid}\">{$subject}</a><br>"; } CloseTable(); } echo "<br>"; OpenTable(); echo "<b>" . _LAST10SUBMISSIONS . " " . $userinfo['username'] . ":</b><br>"; $sql7 = "SELECT sid, title FROM " . $prefix . "_stories WHERE informant='" . $userinfo['username'] . "' ORDER BY sid DESC LIMIT 0,10"; $result7 = $db->sql_query($sql7); while ($row7 = $db->sql_fetchrow($result7)) { $sid = intval($row7['sid']); $title = filter($row7['title'], "nohtml"); echo "<li><a href=\"modules.php?name=News&file=article&sid={$sid}\">{$title}</a><br>"; } CloseTable(); include "footer.php"; }
echo $timezone; ?> "><?php echo $timezone; ?> </option> <?php get_timezone_list(); ?> </select> <br/><br/> <?php if (get_app_info('is_sub_user')) { ?> <?php if (paid()) { ?> <button type="submit" class="btn btn-inverse btn-large" id="schedule-btn"><i class="icon-ok icon-time icon-white"></i> <?php echo _('Schedule campaign now'); ?> </button> <?php } else { ?> <button type="submit" class="btn btn-inverse btn-large" id="schedule-btn"><i class="icon-arrow-right icon-white"></i> <?php echo _('Schedule and pay for campaign'); ?> </button> <?php } ?>
function userinfo($username, $bypass = 0, $hid = 0, $url = 0) { global $articlecomm, $user, $cookie, $sitename, $prefix, $user_prefix, $db, $admin, $broadcast_msg, $my_headlines, $module_name, $subscription_url; $username = substr("{$username}", 0, 25); $sql = "SELECT * FROM " . $prefix . "_bbconfig"; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { $board_config[$row['config_name']] = $row['config_value']; } $sql2 = "SELECT * FROM " . $user_prefix . "_users WHERE username='******'"; $result2 = $db->sql_query($sql2); $num = $db->sql_numrows($result2); $userinfo = $db->sql_fetchrow($result2); if (!$bypass) { cookiedecode($user); } include "header.php"; OpenTable(); echo "<center>"; if (strtolower($username) == strtolower($cookie[1]) and $userinfo[user_password] == $cookie[2]) { echo "<font class=\"option\">{$username}, " . _WELCOMETO . " {$sitename}!</font><br><br>"; echo "<font class=\"content\">" . _THISISYOURPAGE . "</font></center><br><br>"; nav(1); echo "<br><br>"; } else { echo "<font class=\"title\">" . _PERSONALINFO . ": {$username}</font></center><br><br>"; } if ($userinfo[user_website]) { if (!eregi("http://", $userinfo[user_website])) { $userinfo[user_website] = "http://{$userinfo['user_website']}"; } } if ($userinfo[user_avatar_type] == 1) { $userinfo[user_avatar] = $board_config['avatar_path'] . "/" . $userinfo[user_avatar]; } elseif ($userinfo[user_avatar_type] == 2) { $userinfo[user_avatar] = $userinfo[user_avatar]; } else { $userinfo[user_avatar] = $board_config[avatar_gallery_path] . "/" . $userinfo[user_avatar]; } if ($num == 1 && ($userinfo[user_website] || $userinfo[femail] || $userinfo[bio] || $userinfo[user_avatar] || $userinfo[user_icq] || $userinfo[user_aim] || $userinfo[user_yim] || $userinfo[user_msnm] || $userinfo[user_location] || $userinfo[user_occ] || $userinfo[user_interests] || $userinfo[user_sig])) { echo "<center><font class=\"content\">"; echo "<img src=\"{$userinfo['user_avatar']}\"><br><br>\n"; if ($userinfo[user_website] != "http://" and $userinfo[user_website] != "") { echo "" . _MYHOMEPAGE . " <a href=\"{$userinfo['user_website']}\" target=\"new\">{$userinfo['user_website']}</a><br>\n"; } echo "<CENTER><BR>" . _FULLNAME . ": {$userinfo['name']}" . "<BR>" . _REGNEWUSERTYPE . ": {$userinfo['usertype']}" . "<BR>" . _REGNEWUSERGRADYEAR . ": {$userinfo['gradyear']}" . "<BR>" . _SPECIALIZATION . ": {$userinfo['specialization']}" . "<BR>" . _REGNEWUSERCOMPANY . ": {$userinfo['company']}" . "</font></center><br><br>"; if ($userinfo[femail]) { echo "" . _MYEMAIL . " <a href=\"mailto:{$userinfo['femail']}\">{$userinfo['femail']}</a><br>\n"; } if ($userinfo[user_icq]) { echo "" . _ICQ . ": {$userinfo['user_icq']}<br>\n"; } if ($userinfo[user_aim]) { echo "" . _AIM . ": {$userinfo['user_aim']}<br>\n"; } if ($userinfo[user_yim]) { echo "" . _YIM . ": {$userinfo['user_yim']}<br>\n"; } if ($userinfo[user_msnm]) { echo "" . _MSNM . ": {$userinfo['user_msnm']}<br>\n"; } if ($userinfo[user_from]) { echo "" . _LOCATION . ": {$userinfo['user_from']}<br>\n"; } if ($userinfo[user_occ]) { echo "" . _OCCUPATION . ": {$userinfo['user_occ']}<br>\n"; } if ($userinfo[user_interests]) { echo "" . _INTERESTS . ": {$userinfo['user_interests']}<br>\n"; } $userinfo[user_sig] = nl2br($userinfo[user_sig]); if ($userinfo[user_sig]) { echo "<br><b>" . _SIGNATURE . ":</b><br>{$userinfo['user_sig']}<br>\n"; } if ($userinfo[bio]) { echo "<br><b>" . _EXTRAINFO . ":</b><br>{$userinfo['bio']}<br>\n"; } $sql2 = "SELECT uname FROM " . $prefix . "_session WHERE uname='{$username}'"; $result2 = $db->sql_query($sql2); $row2 = $db->sql_fetchrow($result2); $username_pm = $username; $username_online = $row2[uname]; if ($username_online == "") { $online = _OFFLINE; } else { $online = _ONLINE; } echo "" . _USERSTATUS . ": <b>{$online}</b><br>\n"; if ($userinfo[newsletter] == 1 and $username == $cookie[1] and $userinfo[user_password] == $cookie[2] or is_admin($admin) and $userinfo[newsletter] == 1) { echo "<i>" . _SUBSCRIBED . "</i><br>"; } elseif ($userinfo[newsletter] == 0 and $username == $cookie[1] and $userinfo[user_password] == $cookie[2] or is_admin($admin) and $userinfo[newsletter] == 0) { echo "<i>" . _NOTSUBSCRIBED . "</i><br>"; } if (is_user($user) and $cookie[1] == "{$username}" or is_admin($admin)) { $numpoints = $db->sql_fetchrow($db->sql_query("SELECT points FROM " . $user_prefix . "_users WHERE username='******'1']}'")); $n_points = intval($numpoints['points']); echo "" . _YOUHAVEPOINTS . " <b>{$n_points}</b><br>"; if (paid()) { $row = $db->sql_fetchrow($db->sql_query("SELECT * FROM " . $prefix . "_subscriptions WHERE userid='{$cookie['0']}'")); if ($subscription_url != "") { $content = "<br><center>" . _YOUARE . " <a href='{$subscription_url}'>" . _SUBSCRIBER . "</a> " . _OF . " {$sitename}<br>"; } else { $content = "<br><center>" . _YOUARE . " " . _SUBSCRIBER . " " . _OF . " {$sitename}<br>"; } $diff = $row[subscription_expire] - time(); $yearDiff = floor($diff / 60 / 60 / 24 / 365); $diff -= $yearDiff * 60 * 60 * 24 * 365; if ($yearDiff < 1) { $diff = $row[subscription_expire] - time(); } $daysDiff = floor($diff / 60 / 60 / 24); $diff -= $daysDiff * 60 * 60 * 24; $hrsDiff = floor($diff / 60 / 60); $diff -= $hrsDiff * 60 * 60; $minsDiff = floor($diff / 60); $diff -= $minsDiff * 60; $secsDiff = $diff; if ($yearDiff < 1) { $rest = "{$daysDiff} " . _SBDAYS . ", {$hrsDiff} " . _SBHOURS . ", {$minsDiff} " . _SBMINUTES . ", {$secsDiff} " . _SBSECONDS . ""; } elseif ($yearDiff == 1) { $rest = "{$yearDiff} " . _SBYEAR . ", {$daysDiff} " . _SBDAYS . ", {$hrsDiff} " . _SBHOURS . ", {$minsDiff} " . _SBMINUTES . ", {$secsDiff} " . _SBSECONDS . ""; } elseif ($yearDiff > 1) { $rest = "{$yearDiff} " . _SBYEARS . ", {$daysDiff} " . _SBDAYS . ", {$hrsDiff} " . _SBHOURS . ", {$minsDiff} " . _SBMINUTES . ", {$secsDiff} " . _SBSECONDS . ""; } $content .= "<b>" . _SUBEXPIREIN . "<br><font color='#FF0000'>{$rest}</font></b></center>"; } else { if ($subscription_url != "") { $content .= "<br><center>" . _NOTSUB . " {$sitename}. " . _SUBFROM . " <a href='{$subscription_url}'>" . _HERE . "</a> " . _NOW . ""; } else { $content .= "<br><center>" . _NOTSUB . " {$sitename}."; } } echo "{$content}<br><br>"; if (is_admin($admin)) { $subnum = $db->sql_numrows($db->sql_query("SELECT * FROM " . $prefix . "_subscriptions WHERE userid='{$userinfo['user_id']}'")); if ($subnum != 0) { echo "<center><b>" . _ADMSUB . "</b></center><br>"; $row = $db->sql_fetchrow($db->sql_query("SELECT * FROM " . $prefix . "_subscriptions WHERE userid='{$userinfo['user_id']}'")); $diff = $row[subscription_expire] - time(); $yearDiff = floor($diff / 60 / 60 / 24 / 365); $diff -= $yearDiff * 60 * 60 * 24 * 365; if ($yearDiff < 1) { $diff = $row[subscription_expire] - time(); } $daysDiff = floor($diff / 60 / 60 / 24); $diff -= $daysDiff * 60 * 60 * 24; $hrsDiff = floor($diff / 60 / 60); $diff -= $hrsDiff * 60 * 60; $minsDiff = floor($diff / 60); $diff -= $minsDiff * 60; $secsDiff = $diff; if ($yearDiff < 1) { $rest = "{$daysDiff} " . _SBDAYS . ", {$hrsDiff} " . _SBHOURS . ", {$minsDiff} " . _SBMINUTES . ", {$secsDiff} " . _SBSECONDS . ""; } elseif ($yearDiff == 1) { $rest = "{$yearDiff} " . _SBYEAR . ", {$daysDiff} " . _SBDAYS . ", {$hrsDiff} " . _SBHOURS . ", {$minsDiff} " . _SBMINUTES . ", {$secsDiff} " . _SBSECONDS . ""; } elseif ($yearDiff > 1) { $rest = "{$yearDiff} " . _SBYEARS . ", {$daysDiff} " . _SBDAYS . ", {$hrsDiff} " . _SBHOURS . ", {$minsDiff} " . _SBMINUTES . ", {$secsDiff} " . _SBSECONDS . ""; } $content = "<b>" . _ADMSUBEXPIREIN . "<br><font color='#FF0000'>{$rest}</font></b><br><br>"; echo "{$content}"; } else { echo "<center><b>" . _ADMNOTSUB . "</b><br><br>"; } } } if (is_user($user) and $cookie[1] == "{$username}" or is_admin($admin)) { $numpoints = $db->sql_fetchrow($db->sql_query("SELECT points FROM " . $user_prefix . "_users WHERE username='******'1']}'")); echo "" . _YOUHAVEPOINTS . " <b>{$numpoints['points']}</b><br>"; } if (is_active("Journal") and $cookie[1] != $username) { $sql3 = "SELECT jid FROM " . $prefix . "_journal WHERE aid='{$username}' AND status='yes' ORDER BY pdate,jid DESC LIMIT 0,1"; $result3 = $db->sql_query($sql3); $row3 = $db->sql_fetchrow($result3); $jid = intval($row3[jid]); if ($jid != "" and isset($jid)) { echo "[ <a href=\"modules.php?name=Journal&file=search&bywhat=aid&forwhat={$username}\">" . _READMYJOURNAL . "</a> ]<br>"; } } if (is_admin($admin)) { echo "<br>"; OpenTable2(); if ($userinfo[last_ip] != 0) { echo "<center>" . _LASTIP . " <b>{$userinfo['last_ip']}</b><br><br>"; echo "[ <a href='admin.php?op=ipban&ip={$userinfo['last_ip']}'>" . _BANTHIS . "</a> | <a href=\"admin.php?op=modifyUser&chng_uid={$userinfo['user_id']}\">" . _EDITUSER . "</a> ]</center>"; } else { echo "<center>[ <a href=\"admin.php?op=modifyUser&chng_uid={$userinfo['user_id']}\">" . _EDITUSER . "</a> ]</center>"; } CloseTable2(); } if ((is_user($user) and $cookie[1] != $username or is_admin($admin)) and is_active("Private_Messages")) { echo "<br>[ <a href=\"modules.php?name=Private_Messages&mode=post&u={$userinfo['user_id']}\">" . _USENDPRIVATEMSG . " {$username_pm}</a> ]<br>\n"; } echo "</center></font>"; } else { echo "<center>" . _NOINFOFOR . " {$username}</center>"; } CloseTable(); if ($my_headlines == 1 and $username == $cookie[1] and $userinfo[user_password] == $cookie[2]) { echo "<br>"; OpenTable(); echo "<center><b>" . _MYHEADLINES . "</b><br><br>" . "" . _SELECTASITE . "<br><br>" . "<form action=\"modules.php?name={$module_name}\" method=\"post\">" . "<input type=\"hidden\" name=\"op\" value=\"userinfo\">" . "<input type=\"hidden\" name=\"username\" value=\"{$username}\">" . "<input type=\"hidden\" name=\"bypass\" value=\"{$bypass}\">" . "<input type=\"hidden\" name=\"url\" value=\"0\">" . "<select name=\"hid\" onChange='submit()'>\n" . "<option value=\"0\">" . _SELECTASITE2 . "</option>"; $sql4 = "SELECT hid, sitename FROM " . $prefix . "_headlines ORDER BY sitename"; $headl = $db->sql_query($sql4); while ($row4 = $db->sql_fetchrow($headl)) { $nhid = intval($row4[hid]); $hsitename = $row4[sitename]; if ($hid == $nhid) { $sel = "selected"; } else { $sel = ""; } echo "<option value=\"{$nhid}\" {$sel}>{$hsitename}</option>\n"; } echo "</select></form>" . "" . _ORTYPEURL . "<br><br>" . "<form action=\"modules.php?name={$module_name}\" method=\"post\">" . "<input type=\"hidden\" name=\"op\" value=\"userinfo\">" . "<input type=\"hidden\" name=\"username\" value=\"{$username}\">" . "<input type=\"hidden\" name=\"bypass\" value=\"{$bypass}\">" . "<input type=\"hidden\" name=\"hid\" value=\"0\">" . "<input type=\"text\" name=\"url\" size=\"40\" maxlength=\"200\" value=\"http://\"> " . "<input type=\"submit\" value=\"" . _GO . "\"></form>" . "</center><br>"; if ($hid != 0 or $hid == 0 and $url != "0" and $url != "http://" and $url != "") { if ($hid != 0) { $sql5 = "SELECT sitename, headlinesurl FROM " . $prefix . "_headlines WHERE hid='{$hid}'"; $result5 = $db->sql_query($sql5); $row5 = $db->sql_fetchrow($result5); $nsitename = $row5[sitename]; $url = $row5[headlinesurl]; $title = stripslashes(check_html($nsitename, "nohtml")); $siteurl = eregi_replace("http://", "", $url); $siteurl = explode("/", $siteurl); } else { if (!ereg("http://", $url)) { $url = "http://{$url}"; } $siteurl = eregi_replace("http://", "", $url); $siteurl = explode("/", $siteurl); $title = "http://{$siteurl['0']}"; } $rdf = parse_url($url); $fp = fsockopen($rdf['host'], 80, $errno, $errstr, 15); if (!$fp) { $content = "<center><font class=\"content\">" . _RSSPROBLEM . "</font></center>"; } if ($fp) { fputs($fp, "GET " . $rdf['path'] . "?" . $rdf['query'] . " HTTP/1.0\r\n"); fputs($fp, "HOST: " . $rdf['host'] . "\r\n\r\n"); $string = ""; while (!feof($fp)) { $pagetext = fgets($fp, 300); $string .= chop($pagetext); } fputs($fp, "Connection: close\r\n\r\n"); fclose($fp); $items = explode("</item>", $string); $content = "<font class=\"content\">"; for ($i = 0; $i < 10; $i++) { $link = ereg_replace(".*<link>", "", $items[$i]); $link = ereg_replace("</link>.*", "", $link); $title2 = ereg_replace(".*<title>", "", $items[$i]); $title2 = ereg_replace("</title>.*", "", $title2); if ($items[$i] == "" and $cont != 1) { $content = "<center>" . _RSSPROBLEM . "</center>"; } else { if (strcmp($link, $title2) and $items[$i] != "") { $cont = 1; $content .= "<img src=\"images/arrow.gif\" border=\"0\" hspace=\"5\"><a href=\"{$link}\" target=\"new\">{$title2}</a><br>\n"; } } } } if ($content != "") { OpenTable2(); echo "<center><b>" . _HEADLINESFROM . " <a href=\"http://{$siteurl['0']}\" target=\"new\">{$title}</a></b></center><br>"; echo "{$content}"; CloseTable2(); } elseif ($cont == 0 or $content == "") { OpenTable2(); echo "<center>" . _RSSPROBLEM . "</center><br>"; CloseTable2(); } echo "<br>"; } CloseTable(); } if ($broadcast_msg == 1 and $username == $cookie[1] and $userinfo[user_password] == $cookie[2]) { echo "<br>"; OpenTable(); echo "<center><b>" . _BROADCAST . "</b><br><br>" . _BROADCASTTEXT . "<br><br>" . "<form action=\"modules.php?name={$module_name}\" method=\"post\">" . "<input type=\"hidden\" name=\"who\" value=\"{$username}\">" . "<input type=\"hidden\" name=\"op\" value=\"broadcast\">" . "<input type=\"text\" size=\"60\" maxlength=\"255\" name=\"the_message\"> <input type=\"submit\" value=\"" . _SEND . "\">" . "</form></center>"; CloseTable(); } if (is_active("Private_Messages") and $username == $cookie[1] and $userinfo[user_password] == $cookie[2]) { echo "<br>"; OpenTable(); echo "<center><b>" . _PRIVATEMESSAGES . "</b><br><br>"; $numrow = $db->sql_numrows($db->sql_query("SELECT * FROM " . $prefix . "_bbprivmsgs WHERE privmsgs_to_userid='{$userinfo['user_id']}' AND (privmsgs_type='1' OR privmsgs_type='5' OR privmsgs_type='0')")); if (is_active("Members_List")) { $mem_list = "<a href=\"modules.php?name=Members_List\">" . _BROWSEUSERS . "</a>"; } else { $mem_list = ""; } if (is_active("Search")) { $mod_search = "<a href=\"modules.php?name=Search&type=users\">" . _SEARCHUSERS . "</a>"; } else { $mod_search = ""; } if ($mem_list != "" and $mod_search != "") { $a = " | "; } else { $a = ""; } if ($mem_list != "" or $mod_search != "") { $links = "[ {$mem_list} {$a} {$mod_search} ]"; } elseif ($mem_list == "" and $mod_search == "") { $links = ""; } echo "" . _YOUHAVE . " <a href=\"modules.php?name=Private_Messages\"><b>{$numrow}</b></a> " . _PRIVATEMSG . "<br><br>" . "<form action=\"modules.php?name=Private_Messages\" method=\"post\">" . "" . _USENDPRIVATEMSG . ": <input type=\"text\" name=\"pm_uname\" size=\"20\"> {$links}" . "<input type=\"hidden\" name=\"send\" value=\"1\">" . "</form></center>"; CloseTable(); } if ($articlecomm == 1) { echo "<br>"; OpenTable(); echo "<b>" . _LAST10COMMENTS . " {$userinfo['username']}:</b><br>"; $sql6 = "SELECT tid, sid, subject FROM " . $prefix . "_comments WHERE name='{$userinfo['username']}' ORDER BY tid DESC LIMIT 0,10"; $result6 = $db->sql_query($sql6); while ($row6 = $db->sql_fetchrow($result6)) { $tid = intval($row6[tid]); $sid = intval($row6[sid]); $subject = stripslashes(check_html($row6[subject], "nohtml")); echo "<li><a href=\"modules.php?name=News&file=article&thold=-1&mode=flat&order=0&sid={$sid}#{$tid}\">{$subject}</a><br>"; } CloseTable(); } echo "<br>"; OpenTable(); echo "<b>" . _LAST10SUBMISSIONS . " {$userinfo['username']}:</b><br>"; $sql7 = "SELECT sid, title FROM " . $prefix . "_stories WHERE informant='{$userinfo['username']}' ORDER BY sid DESC LIMIT 0,10"; $result7 = $db->sql_query($sql7); while ($row7 = $db->sql_fetchrow($result7)) { $sid = intval($row7[sid]); $title = stripslashes(check_html($row7['title'], "nohtml")); echo "<li><a href=\"modules.php?name=News&file=article&sid={$sid}\">{$title}</a><br>"; } CloseTable(); include "footer.php"; }
function ads($position) { global $prefix, $db, $admin, $sitename, $adminmail, $nukeurl; $position = intval($position); if (paid()) { return; } $numrows = $db->sql_numrows($db->sql_query("SELECT * FROM " . $prefix . "_banner WHERE position='{$position}' AND active='1'")); /* Get a random banner if exist any. */ if ($numrows > 1) { $numrows = $numrows - 1; mt_srand((double) microtime() * 1000000); $bannum = mt_rand(0, $numrows); } else { $bannum = 0; } $sql = "SELECT bid, impmade, imageurl, clickurl, alttext FROM " . $prefix . "_banner WHERE position='{$position}' AND active='1' LIMIT {$bannum},1"; $result = $db->sql_query($sql); list($bid, $impmade, $imageurl, $clickurl, $alttext) = $result->fetch_row(); $bid = intval($bid); $imageurl = filter($imageurl, "nohtml"); $clickurl = filter($clickurl, "nohtml"); $alttext = filter($alttext, "nohtml"); $db->sql_query("UPDATE " . $prefix . "_banner SET impmade=impmade+1 WHERE bid='{$bid}'"); if ($numrows > 0) { $sql2 = "SELECT cid, imptotal, impmade, clicks, date, ad_class, ad_code, ad_width, ad_height FROM " . $prefix . "_banner WHERE bid='{$bid}'"; $result2 = $db->sql_query($sql2); list($cid, $imptotal, $impmade, $clicks, $date, $ad_class, $ad_code, $ad_width, $ad_height) = $result2->fetch_row(); $cid = intval($cid); $imptotal = intval($imptotal); $impmade = intval($impmade); $clicks = intval($clicks); $ad_class = filter($ad_class, "nohtml"); $ad_width = intval($ad_width); $ad_height = intval($ad_height); /* Check if this impression is the last one and print the banner */ if ($imptotal <= $impmade and $imptotal != 0) { $db->sql_query("UPDATE " . $prefix . "_banner SET active='0' WHERE bid='{$bid}'"); $sql3 = "SELECT name, contact, email FROM " . $prefix . "_banner_clients WHERE cid='{$cid}'"; $result3 = $db->sql_query($sql3); list($c_name, $c_contact, $c_email) = $result3->fetch_row(); $c_name = filter($c_name, "nohtml"); $c_contact = filter($c_contact, "nohtml"); $c_email = filter($c_email, "nohtml"); if (!empty($c_email)) { $from = "{$sitename} <{$adminmail}>"; $to = "{$c_contact} <{$c_email}>"; $message = _HELLO . " {$c_contact}:\n\n"; $message .= _THISISAUTOMATED . "\n\n"; $message .= _THERESULTS . "\n\n"; $message .= _TOTALIMPRESSIONS . " {$imptotal}\n"; $message .= _CLICKSRECEIVED . " {$clicks}\n"; $message .= _IMAGEURL . " {$imageurl}\n"; $message .= _CLICKURL . " {$clickurl}\n"; $message .= _ALTERNATETEXT . " {$alttext}\n\n"; $message .= _HOPEYOULIKED . "\n\n"; $message .= _THANKSUPPORT . "\n\n"; $message .= "- {$sitename} " . _TEAM . "\n"; $message .= "{$nukeurl}"; $subject = "{$sitename}: " . _BANNERSFINNISHED . ""; mail($to, $subject, $message, "From: {$from}\nX-Mailer: PHP/" . phpversion()); } } if ($ad_class == "code") { $ad_code = stripslashes(FixQuotes($ad_code)); $ads = "<center>{$ad_code}</center>"; } elseif ($ad_class == "flash") { $ads = "<center>\r\n <OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"\r\n codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0\"\r\n WIDTH=\"{$ad_width}\" HEIGHT=\"{$ad_height}\" id=\"{$bid}\">\r\n <PARAM NAME=movie VALUE=\"{$imageurl}\">\r\n <PARAM NAME=quality VALUE=high>\r\n <EMBED src=\"{$imageurl}\" quality=high WIDTH=\"{$ad_width}\" HEIGHT=\"{$ad_height}\"\r\n NAME=\"{$bid}\" ALIGN=\"\" TYPE=\"application/x-shockwave-flash\"\r\n PLUGINSPAGE=\"http://www.macromedia.com/go/getflashplayer\">\r\n </EMBED>\r\n </OBJECT>\r\n </center>"; } else { $ads = "<center><a href=\"index.php?op=ad_click&bid={$bid}\" target=\"_blank\"><img src=\"{$imageurl}\" border=\"0\" alt=\"{$alttext}\" title=\"{$alttext}\"></a></center>"; } } else { $ads = ""; } return $ads; }
function message_box() { global $bgcolor1, $bgcolor2, $user, $admin, $cookie, $textcolor2, $prefix, $multilingual, $currentlang, $db; if ($multilingual == 1) { $querylang = "AND (mlanguage='{$currentlang}' OR mlanguage='')"; } else { $querylang = ""; } $result = $db->sql_query("SELECT mid, title, content, date, expire, view FROM " . $prefix . "_message WHERE active='1' {$querylang}"); if ($numrows = $db->sql_numrows($result) == 0) { return; } else { while ($row = $db->sql_fetchrow($result)) { $mid = intval($row['mid']); $title = $row['title']; $content = $row['content']; $mdate = $row['date']; $expire = intval($row['expire']); $view = intval($row['view']); if ($title != "" && $content != "") { if ($expire == 0) { $remain = _UNLIMITED; } else { $etime = ($mdate + $expire - time()) / 3600; $etime = (int) $etime; if ($etime < 1) { $remain = _EXPIRELESSHOUR; } else { $remain = "" . _EXPIREIN . " {$etime} " . _HOURS . ""; } } if ($view == 5 and paid()) { OpenTable(); echo "<center><font class=\"option\" color=\"{$textcolor2}\"><b>{$title}</b></font></center><br>\n" . "<font class=\"content\">{$content}</font>"; if (is_admin($admin)) { echo "<br><br><center><font class=\"content\">[ " . _MVIEWSUBUSERS . " - {$remain} - <a href=\"admin.php?op=editmsg&mid={$mid}\">" . _EDIT . "</a> ]</font></center>"; } CloseTable(); echo "<br>"; } elseif ($view == 4 and is_admin($admin)) { OpenTable(); echo "<center><font class=\"option\" color=\"{$textcolor2}\"><b>{$title}</b></font></center><br>\n" . "<font class=\"content\">{$content}</font>" . "<br><br><center><font class=\"content\">[ " . _MVIEWADMIN . " - {$remain} - <a href=\"admin.php?op=editmsg&mid={$mid}\">" . _EDIT . "</a> ]</font></center>"; CloseTable(); echo "<br>"; } elseif ($view == 3 and is_user($user) || is_admin($admin)) { OpenTable(); echo "<center><font class=\"option\" color=\"{$textcolor2}\"><b>{$title}</b></font></center><br>\n" . "<font class=\"content\">{$content}</font>"; if (is_admin($admin)) { echo "<br><br><center><font class=\"content\">[ " . _MVIEWUSERS . " - {$remain} - <a href=\"admin.php?op=editmsg&mid={$mid}\">" . _EDIT . "</a> ]</font></center>"; } CloseTable(); echo "<br>"; } elseif ($view == 2 and !is_user($user) || is_admin($admin)) { OpenTable(); echo "<center><font class=\"option\" color=\"{$textcolor2}\"><b>{$title}</b></font></center><br>\n" . "<font class=\"content\">{$content}</font>"; if (is_admin($admin)) { echo "<br><br><center><font class=\"content\">[ " . _MVIEWANON . " - {$remain} - <a href=\"admin.php?op=editmsg&mid={$mid}\">" . _EDIT . "</a> ]</font></center>"; } CloseTable(); echo "<br>"; } elseif ($view == 1) { OpenTable(); echo "<center><font class=\"option\" color=\"{$textcolor2}\"><b>{$title}</b></font></center><br>\n" . "<font class=\"content\">{$content}</font>"; if (is_admin($admin)) { echo "<br><br><center><font class=\"content\">[ " . _MVIEWALL . " - {$remain} - <a href=\"admin.php?op=editmsg&mid={$mid}\">" . _EDIT . "</a> ]</font></center>"; } CloseTable(); echo "<br>"; } if ($expire != 0) { $past = time() - $expire; if ($mdate < $past) { $db->sql_query("UPDATE " . $prefix . "_message SET active='0' WHERE mid='{$mid}'"); } } } } } }