本文整理汇总了PHP中check_html函数的典型用法代码示例。如果您正苦于以下问题:PHP check_html函数的具体用法?PHP check_html怎么用?PHP check_html使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了check_html函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: SiteSent
function SiteSent($fname)
{
include 'header.php';
$fname = stripslashes(FixQuotes(check_html(removecrlf($fname))));
OpenTable();
echo "<center><font class=\"content\">" . _FREFERENCE . " {$fname}...<br><br>" . _THANKSREC . "</font></center>";
CloseTable();
include 'footer.php';
}
示例2: StorySent
function StorySent($title, $fname)
{
include "header.php";
$title = htmlspecialchars(urldecode(check_html($title, "nohtml")));
$fname = htmlspecialchars(urldecode($fname));
OpenTable();
echo "<center><font class=\"content\">" . _FSTORY . " <b>{$title}</b> " . _HASSENT . " {$fname}... " . _THANKS . "</font></center>";
CloseTable();
include "footer.php";
}
示例3: view_login
function view_login()
{
if (!isset($_SESSION['userName'])) {
$error = isset($_GET['msg']) ? check_html($_GET['msg']) : "";
$this->smarty->assign('error', $error);
$this->smarty->display('login.htm');
} else {
$ref = empty($_GET['ref']) ? "" : rawurldecode($_GET['ref']);
if (empty($ref)) {
redirect_to(C('USER_GO_URL'));
} else {
redirect_to($ref);
}
}
}
示例4: ShowFaqAll
function ShowFaqAll($id_cat)
{
global $bgcolor2, $prefix, $db, $module_name;
$id_cat = intval($id_cat);
echo "<table width=\"100%\" cellpadding=\"4\" cellspacing=\"0\" border=\"0\">" . "<tr bgcolor=\"{$bgcolor2}\"><td colspan=\"2\"><font class=\"option\"><b>" . _ANSWER . "</b></font></td></tr>";
$id_cat = intval($id_cat);
$result = $db->sql_query("SELECT id, id_cat, question, answer FROM " . $prefix . "_faqanswer WHERE id_cat='{$id_cat}'");
while ($row = $db->sql_fetchrow($result)) {
$id = intval($row['id']);
$id_cat = intval($row['id_cat']);
$question = stripslashes(check_html($row['question'], "nohtml"));
$answer = stripslashes($row['answer']);
echo "<tr><td><a name=\"{$id}\"></a>" . "<strong><big>·</big></strong> <b>{$question}</b>" . "<p align=\"justify\">{$answer}</p>" . "[ <a href=\"#top\">" . _BACKTOTOP . "</a> ]" . "<br><br>" . "</td></tr>";
}
echo "</table><br><br>" . "<div align=\"center\"><b>[ <a href=\"modules.php?name={$module_name}\">" . _BACKTOFAQINDEX . "</a> ]</b></div>";
}
示例5: PrintPage
function PrintPage($sid)
{
global $site_logo, $nukeurl, $sitename, $datetime, $prefix, $db, $module_name;
$sid = intval($sid);
$row = $db->sql_fetchrow($db->sql_query("SELECT title, time, hometext, bodytext, topic, notes FROM " . $prefix . "_stories WHERE sid='{$sid}'"));
$title = stripslashes(check_html($row['title'], "nohtml"));
$time = $row['time'];
$hometext = stripslashes($row['hometext']);
$bodytext = stripslashes($row['bodytext']);
$topic = intval($row['topic']);
$notes = stripslashes($row['notes']);
$row2 = $db->sql_fetchrow($db->sql_query("SELECT topictext FROM " . $prefix . "_topics WHERE topicid='{$topic}'"));
$topictext = stripslashes($row2['topictext']);
formatTimestamp($time);
echo "<html>\n\t <head><title>{$sitename} - {$title}</title></head>\n\t <body bgcolor=\"#ffffff\" text=\"#000000\">\n\t <table border=\"0\" align=\"center\"><tr><td>\n\t\n\t <table border=\"0\" width=\"640\" cellpadding=\"0\" cellspacing=\"1\" bgcolor=\"#000000\"><tr><td>\n\t <table border=\"0\" width=\"640\" cellpadding=\"20\" cellspacing=\"1\" bgcolor=\"#ffffff\"><tr><td>\n\t <center>\n\t <img src=\"images/{$site_logo}\" border=\"0\" alt=\"\"><br><br>\n\t <font class=\"content\">\n\t <b>{$title}</b></font><br>\n\t <font class=tiny><b>" . _PDATE . "</b> {$datetime}<br><b>" . _PTOPIC . "</b> {$topictext}</font><br><br>\n\t </center>\n\t <font class=\"content\">\n\t {$hometext}<br><br>\n\t {$bodytext}<br><br>\n\t {$notes}<br><br>\n\t </font>\n\t </td></tr></table></td></tr></table>\n\t <br><br><center>\n\t <font class=\"content\">\n\t " . _COMESFROM . " {$sitename}<br>\n\t <a href=\"{$nukeurl}\">{$nukeurl}</a><br><br>\n\t " . _THEURL . "<br>\n\t <a href=\"{$nukeurl}/modules.php?name={$module_name}&file=article&sid={$sid}\">{$nukeurl}/modules.php?name={$module_name}&file=article&sid={$sid}</a>\n\t </font>\n\t </td></tr></table>\n\t </body>\n\t </html>";
die;
}
示例6: show_all
function show_all($min)
{
global $prefix, $user_prefix, $db, $bgcolor1, $bgcolor2, $user, $cookie, $sitename, $multilingual, $language, $module_name;
if (!isset($min)) {
$min = 0;
}
$max = 250;
include "header.php";
title("" . _STORIESARCHIVE . "");
title("{$sitename}: " . _ALLSTORIESARCH . "");
if (isset($cookie[4])) {
$r_options .= "&mode={$cookie['4']}";
}
if (isset($cookie[5])) {
$r_options .= "&order={$cookie['5']}";
}
if (isset($cookie[6])) {
$r_options .= "&thold={$cookie['6']}";
}
OpenTable();
echo "<table border=\"0\" width=\"100%\"><tr>" . "<td bgcolor=\"{$bgcolor2}\" align=\"left\"><b>" . _ARTICLES . "</b></td>" . "<td bgcolor=\"{$bgcolor2}\" align=\"center\"><b>" . _COMMENTS . "</b></td>" . "<td bgcolor=\"{$bgcolor2}\" align=\"center\"><b>" . _READS . "</b></td>" . "<td bgcolor=\"{$bgcolor2}\" align=\"center\"><b>" . _USCORE . "</b></td>" . "<td bgcolor=\"{$bgcolor2}\" align=\"center\"><b>" . _DATE . "</b></td>" . "<td bgcolor=\"{$bgcolor2}\" align=\"center\"><b>" . _ACTIONS . "</b></td></tr>";
$result = $db->sql_query("SELECT sid, catid, title, time, comments, counter, topic, alanguage, score, ratings from " . $prefix . "_stories order by sid DESC limit {$min},{$max}");
$numrows = $db->sql_numrows($db->sql_query("select * from " . $prefix . "_stories"));
while ($row = $db->sql_fetchrow($result)) {
$sid = intval($row['sid']);
$catid = intval($row['catid']);
$title = stripslashes(check_html($row['title'], "nohtml"));
$time = $row['time'];
$comments = stripslashes($row['comments']);
$counter = intval($row['counter']);
$topic = intval($row['topic']);
$alanguage = $row['alanguage'];
$score = intval($row['score']);
$ratings = intval($row['ratings']);
$time = explode(" ", $time);
$actions = "<a href=\"modules.php?name=News&file=print&sid={$sid}\"><img src=\"images/print.gif\" border=0 alt=\"" . _PRINTER . "\" title=\"" . _PRINTER . "\" width=\"15\" height=\"11\"></a> <a href=\"modules.php?name=News&file=friend&op=FriendSend&sid={$sid}\"><img src=\"images/friend.gif\" border=0 alt=\"" . _FRIEND . "\" title=\"" . _FRIEND . "\" width=\"15\" height=\"11\"></a>";
if ($score != 0) {
$rated = substr($score / $ratings, 0, 4);
} else {
$rated = 0;
}
if ($catid == 0) {
$title = "<a href=\"modules.php?name=News&file=article&sid={$sid}{$r_options}\">{$title}</a>";
} elseif ($catid != 0) {
$row_res = $db->sql_fetchrow($db->sql_query("SELECT title from " . $prefix . "_stories_cat where catid='{$catid}'"));
$cat_title = stripslashes($row_res['title']);
$title = "<a href=\"modules.php?name=News&file=categories&op=newindex&catid={$catid}\"><i>{$cat_title}</i></a>: <a href=\"modules.php?name=News&file=article&sid={$sid}{$r_options}\">{$title}</a>";
}
if ($multilingual == 1) {
if ($alanguage == "") {
$alanguage = $language;
}
$alt_language = ucfirst($alanguage);
$lang_img = "<img src=\"images/language/flag-{$alanguage}.png\" border=\"0\" hspace=\"2\" alt=\"{$alt_language}\" title=\"{$alt_language}\">";
} else {
$lang_img = "<strong><big><b>·</b></big></strong>";
}
echo "<tr>" . "<td bgcolor=\"{$bgcolor1}\" align=\"left\">{$lang_img} {$title}</td>" . "<td bgcolor=\"{$bgcolor1}\" align=\"center\">{$comments}</td>" . "<td bgcolor=\"{$bgcolor1}\" align=\"center\">{$counter}</td>" . "<td bgcolor=\"{$bgcolor1}\" align=\"center\">{$rated}</td>" . "<td bgcolor=\"{$bgcolor1}\" align=\"center\">{$time['0']}</td>" . "<td bgcolor=\"{$bgcolor1}\" align=\"center\">{$actions}</td></tr>";
}
echo "</table>" . "<br><br><br>";
if ($numrows > 250 and $min == 0) {
$min = $min + 250;
$a++;
echo "<center>[ <a href=\"modules.php?name={$module_name}&sa=show_all&min={$min}\">" . _NEXTPAGE . "</a> ]</center><br>";
}
if ($numrows > 250 and $min >= 250 and $a != 1) {
$pmin = $min - 250;
$min = $min + 250;
$a++;
echo "<center>[ <a href=\"modules.php?name={$module_name}&sa=show_all&min={$pmin}\">" . _PREVIOUSPAGE . "</a> | <a href=\"modules.php?name={$module_name}&sa=show_all&min={$min}\">" . _NEXTPAGE . "</a> ]</center><br>";
}
if ($numrows <= 250 and $a != 1 and $min != 0) {
$pmin = $min - 250;
echo "<center>[ <a href=\"modules.php?name={$module_name}&sa=show_all&min={$pmin}\">" . _PREVIOUSPAGE . "</a> ]</center><br>";
}
echo "<hr size=\"1\" noshade>" . "<font class=\"content\">" . _SELECTMONTH2VIEW . "</font><br>";
$result2 = $db->sql_query("SELECT time from " . $prefix . "_stories order by time DESC");
echo "<ul>";
while ($row2 = $db->sql_fetchrow($result2)) {
$time = $row2['time'];
ereg("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})", $time, $getdate);
if ($getdate[2] == "01") {
$month = _JANUARY;
} elseif ($getdate[2] == "02") {
$month = _FEBRUARY;
} elseif ($getdate[2] == "03") {
$month = _MARCH;
} elseif ($getdate[2] == "04") {
$month = _APRIL;
} elseif ($getdate[2] == "05") {
$month = _MAY;
} elseif ($getdate[2] == "06") {
$month = _JUNE;
} elseif ($getdate[2] == "07") {
$month = _JULY;
} elseif ($getdate[2] == "08") {
$month = _AUGUST;
} elseif ($getdate[2] == "09") {
$month = _SEPTEMBER;
} elseif ($getdate[2] == "10") {
//.........这里部分代码省略.........
示例7: tfb_getRequestVar
/******************************************************************************/
// common functions
require_once 'inc/functions/functions.common.php';
// to-user
$to_user = tfb_getRequestVar('to_user');
if (empty($to_user) or empty($cfg["user"])) {
// the user probably hit this page direct
@header("location: index.php?iid=index");
exit;
}
// message
$message = tfb_getRequestVar('message');
if (!empty($message)) {
$to_all_r = tfb_getRequestVar('to_all');
$force_read_r = tfb_getRequestVar('force_read');
$message = check_html($message, "nohtml");
SaveMessage($to_user, $cfg["user"], htmlentities($message), empty($to_all_r) ? 0 : 1, !empty($force_read_r) && $cfg['isAdmin'] ? 1 : 0);
@header("location: index.php?iid=readmsg");
exit;
}
// rmid
if (isset($_REQUEST['rmid'])) {
$rmid = tfb_getRequestVar('rmid');
if (!empty($rmid)) {
list($from_user, $message, $ip, $time) = GetMessage($rmid);
$message = $cfg['_DATE'] . ": " . date($cfg['_DATETIMEFORMAT'], $time) . "\n" . $from_user . " " . $cfg['_WROTE'] . ":\n\n" . $message;
$message = ">" . str_replace("\n", "\n>", $message);
$message = "\n\n\n" . $message;
}
}
// init template-instance
示例8: completevotefooter
function completevotefooter($lid, $ttitle, $ratinguser)
{
global $prefix, $db, $sitename, $module_name;
include "modules/{$module_name}/l_config.php";
$lid = intval($lid);
$row = $db->sql_fetchrow($db->sql_query("SELECT url FROM " . $prefix . "_links_links WHERE lid='{$lid}'"));
$url = stripslashes($row['url']);
echo "<font class=\"content\">" . _THANKSTOTAKETIME . " {$sitename}. " . _LETSDECIDE . "</font><br><br><br>";
if ($ratinguser == "outside") {
echo "<center><font class=\"content\">" . WEAPPREACIATE . " {$sitename}!<br><a href=\"{$url}\">" . _RETURNTO . " {$ttitle}</a></font><center><br><br>";
$row2 = $db->sql_fetchrow($db->sql_query("SELECT title FROM " . $prefix . "_links_links where lid='{$lid}'"));
$title = stripslashes(check_html($row2['title'], "nohtml"));
$ttitle = ereg_replace(" ", "_", $title);
}
echo "<center>";
linkinfomenu($lid, $ttitle);
echo "</center>";
CloseTable();
}
示例9: while
while ($row5 = $db->sql_fetchrow($result5)) {
$sid = intval($row5['sid']);
$aid = stripslashes($row5['aid']);
$informant = filter($row5['informant'], "nohtml");
$title = filter($row5['title'], "nohtml");
$time = $row5['time'];
$hometext = filter($row5['hometext']);
$bodytext = filter($row5['bodytext']);
$url = filter($row5['url'], "nohtml");
$comments = intval($row5['comments']);
$topic = intval($row5['topic']);
$row6 = $db->sql_fetchrow($db->sql_query("SELECT topictext from " . $prefix . "_topics where topicid='{$topic}'"));
$topictext = filter($row6['topictext'], "nohtml");
$furl = "modules.php?name=News&file=article&sid={$sid}";
$datetime = formatTimestamp($time);
$query = stripslashes(check_html($query, "nohtml"));
if (empty($informant)) {
$informant = $anonymous;
} else {
$informant = "<a href=\"modules.php?name=Your_Account&op=userinfo&username={$informant}\">{$informant}</a>";
}
if (!empty($query) and $query != "*") {
if (eregi(quotemeta($query), $title)) {
$a = 1;
}
$text = "{$hometext}{$bodytext}";
if (eregi(quotemeta($query), $text)) {
$a = 2;
}
if (eregi(quotemeta($query), $text) and eregi(quotemeta($query), $title)) {
$a = 3;
示例10: theindex
function theindex($new_topic = 0)
{
global $db, $storyhome, $topicname, $topicimage, $topictext, $datetime, $user, $cookie, $nukeurl, $prefix, $multilingual, $currentlang, $articlecomm, $sitename, $user_news;
if ($multilingual == 1) {
$querylang = "AND (alanguage='{$currentlang}' OR alanguage='')";
} else {
$querylang = "";
}
include "header.php";
automated_news();
if (isset($cookie[3]) and $user_news == 1) {
$storynum = $cookie[3];
} else {
$storynum = $storyhome;
}
if ($new_topic == 0) {
$qdb = "WHERE (ihome='0' OR catid='0')";
$home_msg = "";
} else {
$qdb = "WHERE topic='{$new_topic}'";
$result_a = $db->sql_query("SELECT topictext FROM " . $prefix . "_topics WHERE topicid='{$new_topic}'");
$row_a = $db->sql_fetchrow($result_a);
$numrows_a = $db->sql_numrows($result_a);
$topic_title = stripslashes(check_html($row_a['topictext'], "nohtml"));
OpenTable();
if ($numrows_a == 0) {
echo "<center><font class=\"title\">{$sitename}</font><br><br>" . _NOINFO4TOPIC . "<br><br>[ <a href=\"modules.php?name=News\">" . _GOTONEWSINDEX . "</a> | <a href=\"modules.php?name=Topics\">" . _SELECTNEWTOPIC . "</a> ]</center>";
} else {
echo "<center><font class=\"title\">{$sitename}: {$topic_title}</font><br><br>" . "<form action=\"modules.php?name=Search\" method=\"post\">" . "<input type=\"hidden\" name=\"topic\" value=\"{$new_topic}\">" . "" . _SEARCHONTOPIC . ": <input type=\"name\" name=\"query\" size=\"30\"> " . "<input type=\"submit\" value=\"" . _SEARCH . "\">" . "</form>" . "[ <a href=\"index.php\">" . _GOTOHOME . "</a> | <a href=\"modules.php?name=Topics\">" . _SELECTNEWTOPIC . "</a> ]</center>";
}
CloseTable();
echo "<br>";
}
$result = $db->sql_query("SELECT sid, catid, aid, title, time, hometext, bodytext, comments, counter, topic, informant, notes, acomm, score, ratings FROM " . $prefix . "_stories {$qdb} {$querylang} ORDER BY sid DESC limit {$storynum}");
while ($row = $db->sql_fetchrow($result)) {
$s_sid = intval($row['sid']);
$catid = intval($row['catid']);
$aid = stripslashes($row['aid']);
$title = stripslashes(check_html($row['title'], "nohtml"));
$time = $row['time'];
$hometext = stripslashes($row['hometext']);
$bodytext = stripslashes($row['bodytext']);
$comments = stripslashes($row['comments']);
$counter = intval($row['counter']);
$topic = intval($row['topic']);
$informant = stripslashes($row['informant']);
$notes = stripslashes($row['notes']);
$acomm = intval($row['acomm']);
$score = intval($row['score']);
$ratings = intval($row['ratings']);
if ($catid > 0) {
$row2 = $db->sql_fetchrow($db->sql_query("SELECT title FROM " . $prefix . "_stories_cat WHERE catid='{$catid}'"));
$cattitle = stripslashes(check_html($row2['title'], "nohtml"));
}
getTopics($s_sid);
formatTimestamp($time);
$subject = stripslashes(check_html($subject, "nohtml"));
$introcount = strlen($hometext);
$fullcount = strlen($bodytext);
$totalcount = $introcount + $fullcount;
$c_count = $comments;
$r_options = "";
if (isset($cookie[4])) {
$r_options .= "&mode={$cookie['4']}";
}
if (isset($cookie[5])) {
$r_options .= "&order={$cookie['5']}";
}
if (isset($cookie[6])) {
$r_options .= "&thold={$cookie['6']}";
}
$story_link = "<a href=\"modules.php?name=News&file=article&sid={$s_sid}{$r_options}\">";
$morelink = "(";
if ($fullcount > 0 or $c_count > 0 or $articlecomm == 0 or $acomm == 1) {
$morelink .= "{$story_link}<b>" . _READMORE . "</b></a> | ";
} else {
$morelink .= "";
}
if ($fullcount > 0) {
$morelink .= "{$totalcount} " . _BYTESMORE . " | ";
}
if ($articlecomm == 1 and $acomm == 0) {
if ($c_count == 0) {
$morelink .= "{$story_link}" . _COMMENTSQ . "</a>";
} elseif ($c_count == 1) {
$morelink .= "{$story_link}{$c_count} " . _COMMENT . "</a>";
} elseif ($c_count > 1) {
$morelink .= "{$story_link}{$c_count} " . _COMMENTS . "</a>";
}
}
$sid = intval($s_sid);
if ($catid != 0) {
$row3 = $db->sql_fetchrow($db->sql_query("SELECT title FROM " . $prefix . "_stories_cat WHERE catid='{$catid}'"));
$title1 = stripslashes(check_html($row3['title'], "nohtml"));
$title = "<a href=\"modules.php?name=News&file=categories&op=newindex&catid={$catid}\"><font class=\"storycat\">{$title1}</font></a>: {$title}";
$morelink .= " | <a href=\"modules.php?name=News&file=categories&op=newindex&catid={$catid}\">{$title1}</a>";
}
if ($score != 0) {
$rated = substr($score / $ratings, 0, 4);
} else {
//.........这里部分代码省略.........
示例11: saveuser
function saveuser($realname, $user_email, $femail, $user_website, $user_icq, $user_aim, $user_yim, $user_msnm, $user_from, $user_occ, $user_interests, $newsletter, $user_viewemail, $user_allow_viewonline, $user_notify, $user_notify_pm, $user_popup_pm, $user_attachsig, $user_allowbbcode, $user_allowhtml, $user_allowsmile, $user_timezone, $user_dateformat, $user_sig, $bio, $user_password, $vpass, $username, $user_id, $usertype, $gradyear, $company, $designation, $specialization, $Company_Address_1, $Company_Address_2, $Company_Address_CITY, $Company_Address_STATE, $Company_Address_COUNTRY, $Company_Address_ZIP, $Company_Address_MOBILE, $Company_Address_PHONE, $Company_Address_FAX, $Company_Address_EMAIL, $PERMANENT_Address_1, $PERMANENT_Address_2, $PERMANENT_Address_CITY, $PERMANENT_Address_STATE, $PERMANENT_Address_COUNTRY, $PERMANENT_Address_ZIP, $PERMANENT_Address_MOBILE, $PERMANENT_Address_PHONE, $PERMANENT_Address_FAX, $PERMANENT_Address_EMAIL, $dasf_member, $guest_lectures_ok, $guest_lectures_topics, $summer_projects_ok, $placements_ok, $financial_help_ok, $sex, $dob, $is_married)
{
global $user, $cookie, $userinfo, $EditedMessage, $user_prefix, $db, $module_name, $minpass;
cookiedecode($user);
$check = $cookie[1];
$check2 = $cookie[2];
$sql = "SELECT user_id, user_password FROM " . $user_prefix . "_users WHERE username='{$check}'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$vuid = intval($row[user_id]);
$ccpass = $row[user_password];
$user_sig = htmlspecialchars($user_sig);
$user_email = check_html($user_email, nohtml);
$femail = check_html($femail, nohtml);
$user_website = check_html($user_website, nohtml);
$bio = check_html($bio, nohtml);
$user_icq = check_html($user_icq, nohtml);
$user_aim = check_html($user_aim, nohtml);
$user_yim = check_html($user_yim, nohtml);
$user_msnm = check_html($user_msnm, nohtml);
$user_occ = check_html($user_occ, nohtml);
$user_from = check_html($user_from, nohtml);
$user_interests = check_html($user_interests, nohtml);
$realname = check_html($realname, nohtml);
$user_avatar = "{$user_avatar}";
//FIX:DOMSNITT
$company = check_html($company, nohtml);
$designation = check_html($designation, nohtml);
//END-OF-FIX
if ($user_id == $vuid and $check2 == $ccpass) {
if (!eregi("http://", $user_website)) {
$user_website = "http://{$user_website}";
}
if (isset($user_password) && "{$user_password}" != "{$vpass}") {
echo "<center>" . _PASSDIFFERENT . "</center>";
} elseif ($user_password != "" && strlen($user_password) < $minpass) {
echo "<center>" . _YOUPASSMUSTBE . " <b>{$minpass}</b> " . _CHARLONG . "</center>";
} else {
if ($bio) {
filter_text($bio);
$bio = $EditedMessage;
$bio = FixQuotes($bio);
}
if ($user_password != "") {
cookiedecode($user);
$db->sql_query("LOCK TABLES " . $user_prefix . "_users WRITE");
$user_password = md5($user_password);
$newsletter = intval($newsletter);
$user_allow_viewonline = intval($user_allow_viewonline);
$user_notify = intval($user_notify);
$user_notify_pm = intval($user_notify_pm);
$user_popup_pm = intval($user_popup_pm);
$user_allowbbcode = intval($user_allowbbcode);
$user_allowhtml = intval($user_allowhtml);
$user_allowsmile = intval($user_allowsmile);
$user_id = intval($user_id);
//FIX:DOMSNITT
$gradyear = intval($gradyear);
//$db->sql_query("UPDATE ".$user_prefix."_users SET name='$realname', user_email='$user_email', femail='$femail', user_website='$user_website', user_password='$user_password', bio='$bio', user_icq='$user_icq', user_occ='$user_occ', user_from='$user_from', user_interests='$user_interests', user_sig='$user_sig', user_aim='$user_aim', user_yim='$user_yim', user_msnm='$user_msnm', newsletter='$newsletter', user_viewemail='$user_viewemail', user_allow_viewonline='$user_allow_viewonline', user_notify='$user_notify', user_notify_pm='$user_notify_pm', user_popup_pm='$user_popup_pm', user_attachsig='$user_attachsig', user_allowbbcode='$user_allowbbcode', user_allowhtml='$user_allowhtml', user_allowsmile='$user_allowsmile', user_timezone='$user_timezone', user_dateformat='$user_dateformat' WHERE user_id='$user_id'");
$query = "UPDATE " . $user_prefix . "_users SET name='{$realname}', user_email='{$user_email}', femail='{$femail}', user_website='{$user_website}', user_password='{$user_password}', bio='{$bio}', user_icq='{$user_icq}', user_occ='{$user_occ}', user_from='{$user_from}', user_interests='{$user_interests}', user_sig='{$user_sig}', user_aim='{$user_aim}', user_yim='{$user_yim}', user_msnm='{$user_msnm}', newsletter='{$newsletter}', user_viewemail='{$user_viewemail}', user_allow_viewonline='{$user_allow_viewonline}', user_notify='{$user_notify}', user_notify_pm='{$user_notify_pm}', user_popup_pm='{$user_popup_pm}', user_attachsig='{$user_attachsig}', user_allowbbcode='{$user_allowbbcode}', user_allowhtml='{$user_allowhtml}', user_allowsmile='{$user_allowsmile}', user_timezone='{$user_timezone}', user_dateformat='{$user_dateformat}',usertype='{$usertype}',gradyear={$gradyear},company='{$company}',designation='{$designation}',specialization='{$specialization}',Company_Address_1='{$Company_Address_1}',Company_Address_2='{$Company_Address_2}',Company_Address_CITY='{$Company_Address_CITY}',Company_Address_STATE='{$Company_Address_STATE}',Company_Address_COUNTRY='{$Company_Address_COUNTRY}',Company_Address_ZIP='{$Company_Address_ZIP}',Company_Address_MOBILE='{$Company_Address_MOBILE}',Company_Address_PHONE='{$Company_Address_PHONE}',Company_Address_FAX='{$Company_Address_FAX}',Company_Address_EMAIL='{$Company_Address_EMAIL}',PERMANENT_Address_1='{$PERMANENT_Address_1}',PERMANENT_Address_2='{$PERMANENT_Address_2}',PERMANENT_Address_CITY='{$PERMANENT_Address_CITY}',PERMANENT_Address_STATE='{$PERMANENT_Address_STATE}',PERMANENT_Address_COUNTRY='{$PERMANENT_Address_COUNTRY}',PERMANENT_Address_ZIP='{$PERMANENT_Address_ZIP}',PERMANENT_Address_MOBILE='{$PERMANENT_Address_MOBILE}',PERMANENT_Address_PHONE='{$PERMANENT_Address_PHONE}',PERMANENT_Address_FAX='{$PERMANENT_Address_FAX}',PERMANENT_Address_EMAIL='{$PERMANENT_Address_EMAIL}',dasf_member='{$dasf_member}',guest_lectures_ok='{$guest_lectures_ok}',guest_lectures_topics='{$guest_lectures_topics}',summer_projects_ok='{$summer_projects_ok}',placements_ok='{$placements_ok}',financial_help_ok='{$financial_help_ok}',sex='{$sex}',is_married='{$is_married}',dob=DATE_FORMAT('{$dob}', '%Y-%m-%d') WHERE user_id='{$user_id}'";
$db->sql_query($query);
//END-OF-FIX
$sql = "SELECT user_id, username, user_password, storynum, umode, uorder, thold, noscore, ublockon, theme FROM " . $user_prefix . "_users WHERE username='{$username}' AND user_password='{$user_password}'";
$result = $db->sql_query($sql);
if ($db->sql_numrows($result) == 1) {
$userinfo = $db->sql_fetchrow($result);
docookie($userinfo[user_id], $userinfo[username], $userinfo[user_password], $userinfo[storynum], $userinfo[umode], $userinfo[uorder], $userinfo[thold], $userinfo[noscore], $userinfo[ublockon], $userinfo[theme], $userinfo[commentmax]);
} else {
echo "<center>" . _SOMETHINGWRONG . "</center><br>";
}
$db->sql_query("UNLOCK TABLES");
} else {
//FIX:DOMSNITT
$company = check_html($company, nohtml);
$designation = check_html($designation, nohtml);
$gradyear = intval($gradyear);
//$db->sql_query("UPDATE ".$user_prefix."_users SET name='$realname', user_email='$user_email', femail='$femail', user_website='$user_website', bio='$bio', user_icq='$user_icq', user_occ='$user_occ', user_from='$user_from', user_interests='$user_interests', user_sig='$user_sig', user_aim='$user_aim', user_yim='$user_yim', user_msnm='$user_msnm', newsletter='$newsletter', user_viewemail='$user_viewemail', user_allow_viewonline='$user_allow_viewonline', user_notify='$user_notify', user_notify_pm='$user_notify_pm', user_popup_pm='$user_popup_pm', user_attachsig='$user_attachsig', user_allowbbcode='$user_allowbbcode', user_allowhtml='$user_allowhtml', user_allowsmile='$user_allowsmile', user_timezone='$user_timezone', user_dateformat='$user_dateformat' WHERE user_id='$user_id'");
$query = "UPDATE " . $user_prefix . "_users SET name='{$realname}', user_email='{$user_email}', femail='{$femail}', user_website='{$user_website}', bio='{$bio}', user_icq='{$user_icq}', user_occ='{$user_occ}', user_from='{$user_from}', user_interests='{$user_interests}', user_sig='{$user_sig}', user_aim='{$user_aim}', user_yim='{$user_yim}', user_msnm='{$user_msnm}', newsletter='{$newsletter}', user_viewemail='{$user_viewemail}', user_allow_viewonline='{$user_allow_viewonline}', user_notify='{$user_notify}', user_notify_pm='{$user_notify_pm}', user_popup_pm='{$user_popup_pm}', user_attachsig='{$user_attachsig}', user_allowbbcode='{$user_allowbbcode}', user_allowhtml='{$user_allowhtml}', user_allowsmile='{$user_allowsmile}', user_timezone='{$user_timezone}', user_dateformat='{$user_dateformat}' ,usertype='{$usertype}',gradyear={$gradyear},company='{$company}',designation='{$designation}',specialization='{$specialization}',Company_Address_1='{$Company_Address_1}',Company_Address_2='{$Company_Address_2}',Company_Address_CITY='{$Company_Address_CITY}',Company_Address_STATE='{$Company_Address_STATE}',Company_Address_COUNTRY='{$Company_Address_COUNTRY}',Company_Address_ZIP='{$Company_Address_ZIP}',Company_Address_MOBILE='{$Company_Address_MOBILE}',Company_Address_PHONE='{$Company_Address_PHONE}',Company_Address_FAX='{$Company_Address_FAX}',Company_Address_EMAIL='{$Company_Address_EMAIL}',PERMANENT_Address_1='{$PERMANENT_Address_1}',PERMANENT_Address_2='{$PERMANENT_Address_2}',PERMANENT_Address_CITY='{$PERMANENT_Address_CITY}',PERMANENT_Address_STATE='{$PERMANENT_Address_STATE}',PERMANENT_Address_COUNTRY='{$PERMANENT_Address_COUNTRY}',PERMANENT_Address_ZIP='{$PERMANENT_Address_ZIP}',PERMANENT_Address_MOBILE='{$PERMANENT_Address_MOBILE}',PERMANENT_Address_PHONE='{$PERMANENT_Address_PHONE}',PERMANENT_Address_FAX='{$PERMANENT_Address_FAX}',PERMANENT_Address_EMAIL='{$PERMANENT_Address_EMAIL}',dasf_member='{$dasf_member}',guest_lectures_ok='{$guest_lectures_ok}',guest_lectures_topics='{$guest_lectures_topics}',summer_projects_ok='{$summer_projects_ok}',placements_ok='{$placements_ok}',financial_help_ok='{$financial_help_ok}' ,sex='{$sex}',is_married='{$is_married}',dob=DATE_FORMAT('{$dob}', '%Y-%m-%d') WHERE user_id='{$user_id}'";
$db->sql_query($query);
//END-OF-FIX
}
Header("Location: modules.php?name={$module_name}");
}
}
}
示例12: filter
function filter($what, $strip = "", $save = "", $type = "")
{
if ($strip == "nohtml") {
$what = check_html($what, $strip);
$what = htmlentities(trim($what), ENT_QUOTES);
// If the variable $what doesn't comes from a preview screen should be converted
if ($type != "preview" and $save != 1) {
$what = html_entity_decode($what, ENT_QUOTES);
}
}
if ($save == 1) {
$what = check_words($what);
$what = check_html($what, $strip);
$what = addslashes($what);
} else {
$what = stripslashes(FixQuotes($what));
$what = check_words($what);
$what = check_html($what, $strip);
}
return $what;
}
示例13: list_themes
function list_themes()
{
global $prefix, $db, $sitename, $admin, $multilingual, $module_name;
include "header.php";
title("{$sitename}: " . _ENCYCLOPEDIA . "");
OpenTable();
echo "<center><font class=\"content\">" . _AVAILABLEENCYLIST . " {$sitename}:</center><br><br>";
$result = $db->sql_query("SELECT eid, title, description, elanguage FROM " . $prefix . "_encyclopedia WHERE active='1'");
echo "<blockquote>";
while ($row = $db->sql_fetchrow($result)) {
$eid = intval($row['eid']);
$title = stripslashes(check_html($row['title'], "nohtml"));
$description = stripslashes($row['description']);
$elanguage = $row['elanguage'];
if ($multilingual == 1) {
$the_lang = "<img src=\"images/language/flag-{$elanguage}.png\" hspace=\"3\" border=\"0\" height=\"10\" width=\"20\">";
} else {
$the_lang = "";
}
if ($subtitle != "") {
$subtitle = "<br>({$description})<br><br>";
} else {
$subtitle = "";
}
if (is_admin($admin)) {
echo "<strong><big>·</big></strong> {$the_lang} <a href=\"modules.php?name={$module_name}&op=list_content&eid={$eid}\">{$title}</a><br>{$description}<br>[ <a href=\"admin.php?op=encyclopedia_edit&eid={$eid}\">" . _EDIT . "</a> | <a href=\"admin.php?op=encyclopedia_change_status&eid={$eid}&active=1\">" . _DEACTIVATE . "</a> | <a href=\"admin.php?op=encyclopedia_delete&eid={$eid}\">" . _DELETE . "</a> ]<br><br>";
} else {
echo "<strong><big>·</big></strong> {$the_lang} <a href=\"modules.php?name={$module_name}&op=list_content&eid={$eid}\">{$title}</a><br> {$description}<br><br>";
}
}
echo "</blockquote>";
if (is_admin($admin)) {
$result2 = $db->sql_query("SELECT eid, title, description, elanguage FROM " . $prefix . "_encyclopedia WHERE active='0'");
echo "<br><br><center><b>" . _YOURADMININACTIVELIST . "</b></center><br><br>";
echo "<blockquote>";
while ($row2 = $db->sql_fetchrow($result2)) {
$eid = intval($row2['eid']);
$title = stripslashes(check_html($row2['title'], "nohtml"));
$description = stripslashes($row2['description']);
$elanguage = $row2['elanguage'];
if ($multilingual == 1) {
$the_lang = "<img src=\"images/language/flag-{$elanguage}.png\" hspace=\"3\" border=\"0\" height=\"10\" width=\"20\">";
} else {
$the_lang = "";
}
if ($subtitle != "") {
$subtitle = " ({$subtitle}) ";
} else {
$subtitle = " ";
}
echo "<strong><big>·</big></strong> {$the_lang} <a href=\"modules.php?name={$module_name}&op=list_content&eid={$eid}\">{$title}</a><br>{$description}<br>[ <a href=\"admin.php?op=encyclopedia_edit&eid={$eid}\">" . _EDIT . "</a> | <a href=\"admin.php?op=encyclopedia_change_status&eid={$eid}&active=0\">" . _ACTIVATE . "</a> | <a href=\"admin.php?op=encyclopedia_delete&eid={$eid}\">" . _DELETE . "</a> ]<br><br>";
}
echo "</blockquote>";
}
CloseTable();
include "footer.php";
}
示例14: modifyUser
function modifyUser($chng_user)
{
global $prefix, $user_prefix, $db, $admin_file;
include "header.php";
GraphicAdmin();
OpenTable();
echo "<center><font class=\"title\"><b>" . _USERADMIN . "</b></font></center>";
CloseTable();
echo "<br>";
$chng_user = stripslashes(check_html($chng_user, "nohtml"));
$result = $db->sql_query("SELECT user_id, username, name, user_website, user_email, femail, user_icq, user_aim, user_yim, user_msnm, user_from, user_occ, user_interests, user_viewemail, user_avatar, user_sig, user_password, newsletter from " . $user_prefix . "_users where username='{$chng_user}'");
$numrows = $db->sql_numrows($result);
if ($numrows > 0) {
$row = $db->sql_fetchrow($result);
$chng_uid = intval($row['user_id']);
$chng_uname = filter($row['username'], "nohtml");
$chng_name = filter($row['name'], "nohtml");
$chng_url = filter($row['user_website'], "nohtml");
$chng_email = filter($row['user_email'], "nohtml");
$chng_femail = filter($row['femail'], "nohtml");
$chng_user_icq = intval($row['user_icq']);
$chng_user_aim = filter($row['user_aim'], "nohtml");
$chng_user_yim = filter($row['user_yim'], "nohtml");
$chng_user_msnm = filter($row['user_msnm'], "nohtml");
$chng_user_from = filter($row['user_from'], "nohtml");
$chng_user_occ = filter($row['user_occ'], "nohtml");
$chng_user_intrest = filter($row['user_interests'], "nohtml");
$chng_user_viewemail = filter($row['user_viewemail'], "nohtml");
$chng_avatar = filter($row['user_avatar'], "nohtml");
$chng_user_sig = filter($row['user_sig']);
$chng_pass = filter($row['user_password'], "nohtml");
$chng_newsletter = intval($row['newsletter']);
OpenTable();
echo "<center><font class=\"option\"><b>" . _USERUPDATE . ": <i>{$chng_user}</i></b></font></center>" . "<form action=\"" . $admin_file . ".php\" method=\"post\">" . "<table border=\"0\">" . "<tr><td>" . _USERID . "</td>" . "<td><b>{$chng_uid}</b></td></tr>" . "<tr><td>" . _NICKNAME . "</td>" . "<td><input type=\"text\" name=\"chng_uname\" value=\"{$chng_uname}\"> <font class=\"tiny\">" . _REQUIRED . "</font></td></tr>" . "<tr><td>" . _NAME . "</td>" . "<td><input type=\"text\" name=\"chng_name\" value=\"{$chng_name}\"></td></tr>" . "<tr><td>" . _URL . "</td>" . "<td><input type=\"text\" name=\"chng_url\" value=\"{$chng_url}\" size=\"30\" maxlength=\"60\"></td></tr>" . "<tr><td>" . _EMAIL . "</td>" . "<td><input type=\"text\" name=\"chng_email\" value=\"{$chng_email}\" size=\"30\" maxlength=\"60\"> <font class=\"tiny\">" . _REQUIRED . "</font></td></tr>" . "<tr><td>" . _FAKEEMAIL . "</td>" . "<td><input type=\"text\" name=\"chng_femail\" value=\"{$chng_femail}\" size=\"30\" maxlength=\"60\"></td></tr>" . "<tr><td>" . _ICQ . "</td>" . "<td><input type=\"text\" name=\"chng_user_icq\" value=\"{$chng_user_icq}\" size=\"20\" maxlength=\"20\"></td></tr>" . "<tr><td>" . _AIM . "</td>" . "<td><input type=\"text\" name=\"chng_user_aim\" value=\"{$chng_user_aim}\" size=\"20\" maxlength=\"20\"></td></tr>" . "<tr><td>" . _YIM . "</td>" . "<td><input type=\"text\" name=\"chng_user_yim\" value=\"{$chng_user_yim}\" size=\"20\" maxlength=\"20\"></td></tr>" . "<tr><td>" . _MSNM . "</td>" . "<td><input type=\"text\" name=\"chng_user_msnm\" value=\"{$chng_user_msnm}\" size=\"20\" maxlength=\"20\"></td></tr>" . "<tr><td>" . _LOCATION . "</td>" . "<td><input type=\"text\" name=\"chng_user_from\" value=\"{$chng_user_from}\" size=\"25\" maxlength=\"60\"></td></tr>" . "<tr><td>" . _OCCUPATION . "</td>" . "<td><input type=\"text\" name=\"chng_user_occ\" value=\"{$chng_user_occ}\" size=\"25\" maxlength=\"60\"></td></tr>" . "<tr><td>" . _INTERESTS . "</td>" . "<td><input type=\"text\" name=\"chng_user_intrest\" value=\"{$chng_user_intrest}\" size=\"25\" maxlength=\"255\"></td></tr>" . "<tr><td>" . _OPTION . "</td>";
if ($chng_user_viewemail == 1) {
echo "<td><input type=\"checkbox\" name=\"chng_user_viewemail\" value=\"1\" checked> " . _ALLOWUSERS . "</td></tr>";
} else {
echo "<td><input type=\"checkbox\" name=\"chng_user_viewemail\" value=\"1\"> " . _ALLOWUSERS . "</td></tr>";
}
if ($chng_newsletter == 1) {
echo "<tr><td>" . _NEWSLETTER . "</td><td><input type=\"radio\" name=\"chng_newsletter\" value=\"1\" checked>" . _YES . " " . "<input type=\"radio\" name=\"chng_newsletter\" value=\"0\">" . _NO . "</td></tr>";
} elseif ($chng_newsletter == 0) {
echo "<tr><td>" . _NEWSLETTER . "</td><td><input type=\"radio\" name=\"chng_newsletter\" value=\"1\">" . _YES . " " . "<input type=\"radio\" name=\"chng_newsletter\" value=\"0\" checked>" . _NO . "</td></tr>";
}
$subnum = $db->sql_numrows($db->sql_query("SELECT * FROM " . $prefix . "_subscriptions WHERE userid='{$chng_uid}'"));
$content = "";
if ($subnum == 0) {
$content .= "<tr><td>" . _SUBUSERASK . "</td><td><input type='radio' name='subscription' value='1'> " . _YES . " <input type='radio' name='subscription' value='0' checked> " . _NO . "</td></tr>";
$content .= "<tr><td>" . _SUBPERIOD . "</td><td><select name='subscription_expire'>";
$content .= "<option value='0' selected>" . _NONE . "</option>";
$content .= "<option value='1'>1 " . _YEAR . "</option>";
$content .= "<option value='2'>2 " . _YEARS . "</option>";
$content .= "<option value='3'>3 " . _YEARS . "</option>";
$content .= "<option value='4'>4 " . _YEARS . "</option>";
$content .= "<option value='5'>5 " . _YEARS . "</option>";
$content .= "<option value='6'>6 " . _YEARS . "</option>";
$content .= "<option value='7'>7 " . _YEARS . "</option>";
$content .= "<option value='8'>8 " . _YEARS . "</option>";
$content .= "<option value='9'>9 " . _YEARS . "</option>";
$content .= "<option value='10'>10 " . _YEARS . "</option>";
$content .= "</select><input type='hidden' name='reason' value='0'></td></tr>";
} elseif ($subnum == 1) {
$content .= "<tr><td>" . _UNSUBUSER . "</td><td><input type='radio' name='subscription' value='0'> " . _YES . " <input type='radio' name='subscription' value='1' checked> " . _NO . "</td></tr>";
$content .= "<tr><td>" . _ADDSUBPERIOD . "</td><td><select name='subscription_expire'>";
$content .= "<option value='0' selected>" . _NONE . "</option>";
$content .= "<option value='1'>1 " . _YEAR . "</option>";
$content .= "<option value='2'>2 " . _YEARS . "</option>";
$content .= "<option value='3'>3 " . _YEARS . "</option>";
$content .= "<option value='4'>4 " . _YEARS . "</option>";
$content .= "<option value='5'>5 " . _YEARS . "</option>";
$content .= "<option value='6'>6 " . _YEARS . "</option>";
$content .= "<option value='7'>7 " . _YEARS . "</option>";
$content .= "<option value='8'>8 " . _YEARS . "</option>";
$content .= "<option value='9'>9 " . _YEARS . "</option>";
$content .= "<option value='10'>10 " . _YEARS . "</option>";
$content .= "</select></td></tr>";
$content .= "<tr><td>" . _ADMSUBEXPIREIN . "</td><td>";
$rows = $db->sql_fetchrow($db->sql_query("SELECT * FROM " . $prefix . "_subscriptions WHERE userid='{$chng_uid}'"));
$diff = $rows['subscription_expire'] - time();
$yearDiff = floor($diff / 60 / 60 / 24 / 365);
$diff -= $yearDiff * 60 * 60 * 24 * 365;
if ($yearDiff < 1) {
$diff = $rows['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 .= "<font color='#FF0000'>{$rest}</font></td></tr>";
$content .= "<tr><td>" . _SUBREASON . "</td><td><textarea name='reason' cols='70' rows='15'></textarea></td></tr>";
//.........这里部分代码省略.........
示例15: pollList
function pollList()
{
global $user, $cookie, $prefix, $multilingual, $currentlang, $admin, $dbi, $module_name, $db;
if (isset($cookie[4])) {
$r_options .= "&mode={$cookie['4']}";
}
if (isset($cookie[5])) {
$r_options .= "&order={$cookie['5']}";
}
if (isset($cookie[6])) {
$r_options .= "&thold={$cookie['6']}";
}
if ($multilingual == 1) {
$querylang = "WHERE planguage='{$currentlang}' AND artid='0'";
} else {
$querylang = "WHERE artid='0'";
}
$result = sql_query("SELECT pollID, pollTitle, timeStamp, voters FROM " . $prefix . "_poll_desc {$querylang} ORDER BY timeStamp DESC", $dbi);
$counter = 0;
OpenTable();
OpenTable();
echo "<center><font class=\"title\"><b>" . _PASTSURVEYS . "</b></font></center>";
CloseTable();
echo "<table border=\"0\" cellpadding=\"8\"><tr><td>";
while ($object = sql_fetch_object($result, $dbi)) {
$resultArray[$counter] = array($object->pollID, $object->pollTitle, $object->timeStamp, $object->voters);
$counter++;
}
for ($count = 0; $count < count($resultArray); $count++) {
$id = $resultArray[$count][0];
$id = intval($id);
$i = intval($i);
$pollTitle = $resultArray[$count][1];
$voters = $resultArray[$count][3];
for ($i = 0; $i < 12; $i++) {
$result2 = sql_query("SELECT optionCount FROM " . $prefix . "_poll_data WHERE pollID='{$id}' AND voteID='{$i}'", $dbi);
$object = sql_fetch_object($result2, $dbi);
$optionCount = $object->optionCount;
$sum = (int) $sum + $optionCount;
}
echo "<strong><big>·</big></strong> <a href=\"modules.php?name={$module_name}&pollID={$id}\">{$pollTitle}</a> ";
if (is_admin($admin)) {
$editing = " - <a href=\"admin.php?op=polledit&pollID={$id}\">Edit</a>";
} else {
$editing = "";
}
echo "(<a href=\"modules.php?name={$module_name}&op=results&pollID={$id}{$r_options}\">" . _RESULTS . "</a> - {$sum} " . _LVOTES . "{$editing})<br>\n";
$sum = 0;
}
echo "</td></tr></table>" . "<br>";
OpenTable();
echo "<center><font class=\"title\"><b>" . _SURVEYSATTACHED . "</b></font></center>";
CloseTable();
echo "<table border=\"0\" cellpadding=\"8\"><tr><td>";
if ($multilingual == 1) {
$querylang = "WHERE planguage='{$currentlang}' AND artid!='0'";
} else {
$querylang = "WHERE artid!='0'";
}
$counter = 0;
$result3 = sql_query("SELECT pollID, pollTitle, timeStamp, voters FROM " . $prefix . "_poll_desc {$querylang} ORDER BY timeStamp DESC", $dbi);
while ($object = sql_fetch_object($result3, $dbi)) {
$resultArray2[$counter] = array($object->pollID, $object->pollTitle, $object->timeStamp, $object->voters);
$counter++;
}
for ($count = 0; $count < count($resultArray2); $count++) {
$id = $resultArray2[$count][0];
$id = intval($id);
$i = intval($i);
$pollTitle = $resultArray2[$count][1];
$voters = $resultArray2[$count][3];
for ($i = 0; $i < 12; $i++) {
$result4 = sql_query("SELECT optionCount FROM " . $prefix . "_poll_data WHERE pollID='{$id}' AND voteID='{$i}'", $dbi);
$object = sql_fetch_object($result4, $dbi);
$optionCount = $object->optionCount;
$sum = (int) $sum + $optionCount;
}
echo "<strong><big>·</big></strong> <a href=\"modules.php?name={$module_name}&pollID={$id}\">{$pollTitle}</a> ";
if (is_admin($admin)) {
$editing = " - <a href=\"admin.php?op=polledit&pollID={$id}\">Edit</a>";
} else {
$editing = "";
}
$res = $db->sql_query("select sid, title from " . $prefix . "_stories where pollID='{$id}'");
list($sid, $title) = $db->sql_fetchrow($res);
$sid = intval($sid);
$title = stripslashes(check_html($title, "nohtml"));
echo "(<a href=\"modules.php?name={$module_name}&op=results&pollID={$id}{$r_options}\">" . _RESULTS . "</a> - {$sum} " . _LVOTES . "{$editing})<br>\n" . "" . _ATTACHEDTOARTICLE . " <a href=\"modules.php?name=News&file=article&sid={$sid}{$r_options}\">{$title}</a><br><br>\n";
$sum = "";
}
echo "</td></tr></table>";
CloseTable();
}