当前位置: 首页>>代码示例>>PHP>>正文


PHP cookiedecode函数代码示例

本文整理汇总了PHP中cookiedecode函数的典型用法代码示例。如果您正苦于以下问题:PHP cookiedecode函数的具体用法?PHP cookiedecode怎么用?PHP cookiedecode使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了cookiedecode函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: themeheader

function themeheader()
{
    global $prefix, $db, $user, $cookie, $bgcolor1, $bgcolor2, $bgcolor3, $banners, $sitename, $anonymous, $user;
    echo "<body bgcolor=\"{$bgcolor1}\">";
    ads(0);
    if (is_user($user)) {
        cookiedecode($user);
        $username = $cookie[1];
        $bienvenida = "Hello {$username}! [ <a href=\"modules.php?name=Your_Account&amp;op=logout\"><b>Logout</b></a> ]";
    } else {
        $bienvenida = "<a href=\"modules.php?name=Your_Account&amp;op=new_user\">Create an Account</a>";
    }
    $topics_list = "<select name=\"topic\" onChange='submit()'>\n";
    $topics_list .= "<option value=\"\">All Topics</option>\n";
    $toplist = $db->sql_query("select topicid, topictext from {$prefix}" . _topics . " order by topictext");
    while (list($topicid, $topics) = $toplist->fetch_row()) {
        $topicid = intval($topicid);
        if ($topicid == $topic) {
            $sel = "selected ";
        }
        $topics_list .= "<option {$sel} value=\"{$topicid}\">{$topics}</option>\n";
        $sel = "";
    }
    echo "<center><a href=\"index.php\"><img src=\"themes/Sand_Journey/images/LogoLeft.gif\" alt=\"Welcome to {$sitename}\" title=\"Welcome to {$sitename}\" border=\"0\"></a><br><br></center>" . "<table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" border=\"0\" align=\"center\" bgcolor=\"{$bgcolor1}\"><tr><td align=\"center\">" . "<form action=\"modules.php?name=Search\" method=\"post\">" . "<font class=\"content\"><b>Search</b> <input type=\"text\" size=\"15\" name=\"query\">&nbsp;&nbsp;<b>in</b>&nbsp;&nbsp;{$topics_list}</font>" . "</select>" . "</form>" . "</td></tr></table>" . "<br>" . "<table border=\"0 cellpadding=\"4\" cellspacing=\"0\" width=\"100%\" align=\"center\">\n" . "<tr><td bgcolor=\"{$bgcolor2}\" align=\"left\" width=\"20%\">&nbsp;{$bienvenida}</td>" . "<td bgcolor=\"{$bgcolor2}\" align=\"center\" width=\"60%\"><a href=\"index.php\">Home</a> | <a href=\"modules.php?name=Submit_News\">Submit News</a> | <a href=\"modules.php?name=Your_Account\">Your Account</a> | <a href=\"modules.php?name=Content\">Content</a> | <a href=\"modules.php?name=Topics\">Topics</a> | <a href=\"modules.php?name=Top\">Top 10</a></td>\n" . "<td bgcolor=\"{$bgcolor2}\" align=\"right\" width=\"20%\">" . "<b><script type=\"text/javascript\">\n\n" . "<!--   // Array ofmonth Names\n" . "var monthNames = new Array( \"" . _JANUARY . "\",\"" . _FEBRUARY . "\",\"" . _MARCH . "\",\"" . _APRIL . "\",\"" . _MAY . "\",\"" . _JUNE . "\",\"" . _JULY . "\",\"" . _AUGUST . "\",\"" . _SEPTEMBER . "\",\"" . _OCTOBER . "\",\"" . _NOVEMBER . "\",\"" . _DECEMBER . "\");\n" . "var now = new Date();\n" . "thisYear = now.getYear();\n" . "if(thisYear < 1900) {thisYear += 1900}; // corrections if Y2K display problem\n" . "document.write(monthNames[now.getMonth()] + \" \" + now.getDate() + \", \" + thisYear);\n" . "// -->\n\n" . "</script></b>&nbsp;\n" . "</td></tr>\n" . "<tr><td valign=\"top\" width=\"100%\" colspan=3>\n";
    $public_msg = public_message();
    echo "{$public_msg}<br>";
    echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"2\" width=\"100%\"><tr><td valign=\"top\" width=\"150\" bgcolor={$bgcolor1}>";
    blocks("left");
    echo "<img src=\"images/pix.gif\" border=\"0\" width=\"150\" height=\"1\"></td><td>&nbsp;&nbsp;</td><td width=\"100%\" valign=\"top\">";
}
开发者ID:rotvulpix,项目名称:php-nuke,代码行数:30,代码来源:theme.php

示例2: atGetUserName

function atGetUserName()
{
    if (!atIsLoggedIn()) {
        $username = _AT_GUEST;
    } else {
        $cookie = cookiedecode($GLOBALS['user']);
        $username = $cookie[1];
    }
    return $username;
}
开发者ID:rotvulpix,项目名称:php-nuke,代码行数:10,代码来源:atAPI.php

示例3: SERVICE_CMSOPEN_phpnuke

function SERVICE_CMSOPEN_phpnuke($authenticate_only)
{
    global $this_site, $web_root, $path_to_zip, $root_dir, $media_dir, $audio_types, $video_types, $ext_graphic, $cms_user_access, $default_access, $cms_mode, $css, $include_path, $image_dir;
    // Now let's get the users name IF we need it
    $cookie = cookiedecode($_COOKIE['user']);
    $username = $cookie[1];
    if ($username == "") {
        $username = "anonymous";
    }
    userAuthenticate($username);
    // Now let's see if we only wanted the user access
    if ($authenticate_only == true) {
        return;
    }
    include_once "header.php";
}
开发者ID:seanfbrown,项目名称:jinzora,代码行数:16,代码来源:phpnuke.php

示例4: themeheader

function themeheader()
{
    global $user, $banners, $sitename, $slogan, $cookie, $prefix, $db;
    cookiedecode($user);
    $username = $cookie[1];
    if ($username == "") {
        $username = "Anonymous";
    }
    echo "<body bgcolor=\"#ffffff\" text=\"#000000\" link=\"#363636\" vlink=\"#363636\" alink=\"#d5ae83\"><br>\n\n\n";
    if ($banners == 1) {
        include "banners.php";
    }
    $topics_list = "<select name=\"topic\" onChange='submit()'>\n";
    $topics_list .= "<option value=\"\">All Topics</option>\n";
    $toplist = $db->sql_query("select topicid, topictext from " . $prefix . "_topics order by topictext");
    while (list($topicid, $topics) = $db->sql_fetchrow($toplist)) {
        $topicid = intval($topicid);
        if ($topicid == $topic) {
            $sel = "selected ";
        }
        $topics_list .= "<option {$sel} value=\"{$topicid}\">{$topics}</option>\n";
        $sel = "";
    }
    if ($username == "Anonymous") {
        $theuser = "&nbsp;&nbsp;<a href=\"modules.php?name=Your_Account\">Create an account";
    } else {
        $theuser = "&nbsp;&nbsp;Welcome {$username}!";
    }
    $public_msg = public_message();
    $tmpl_file = "themes/3D-Fantasy/header.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"" . $thefile . "\";";
    eval($thefile);
    print $r_file;
    blocks(left);
    $tmpl_file = "themes/3D-Fantasy/left_center.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"" . $thefile . "\";";
    eval($thefile);
    print $r_file;
}
开发者ID:BackupTheBerlios,项目名称:domsmod-svn,代码行数:43,代码来源:theme.php

示例5: getusrinfo

function getusrinfo($user)
{
    global $userinfo;
    if (empty($user)) {
        return;
    }
    if (isset($userinfo['uid'])) {
        return $userinfo;
    }
    $user3 = cookiedecode();
    list($dbconn) = pnDBGetConn();
    $pntable = pnDBGetTables();
    $column = $pntable['users_column'];
    $sql = "SELECT {$column['uid']} AS uid,\n                   {$column['name']} AS name,\n                   {$column['uname']} AS uname,\n                   {$column['email']} AS email,\n                   {$column['femail']} AS femail,\n                   {$column['url']} AS url,\n                   {$column['user_avatar']} AS user_avatar,\n                   {$column['user_icq']} AS user_icq,\n                   {$column['user_occ']} AS user_occ,\n                   {$column['user_from']} AS user_from,\n                   {$column['user_intrest']} AS user_intrest,\n                   {$column['user_sig']} AS user_sig,\n                   {$column['user_viewemail']} AS user_viewemail,\n                   {$column['user_theme']} AS user_theme,\n                   {$column['user_aim']} AS user_aim,\n                   {$column['user_yim']} AS user_yim,\n                   {$column['user_msnm']} AS user_msnm,\n                   {$column['pass']} AS pass,\n                   {$column['storynum']} AS storynum,\n                   {$column['umode']} AS umode,\n                   {$column['uorder']} AS uorder,\n                   {$column['thold']} AS thold,\n                   {$column['noscore']} AS noscore,\n                   {$column['bio']} AS bio,\n                   {$column['ublockon']} AS ublockon,\n                   {$column['ublock']} AS ublock,\n                   {$column['theme']} AS theme,\n                   {$column['commentmax']} AS commentmax,\n                   {$column['timezone_offset']} AS timezone_offset\n            FROM {$pntable['users']}\n            WHERE {$column['uname']} = '" . pnVarPrepForStore($user3[1]) . "'";
    $result = $dbconn->Execute($sql);
    if ($result->PO_RecordCount() == 1) {
        $userinfo = $result->GetRowAssoc(false);
    } else {
        echo "Problem obtaining user information<br>";
    }
    return $userinfo;
}
开发者ID:BackupTheBerlios,项目名称:microbuilder,代码行数:22,代码来源:oldfuncs.php

示例6: broadcast

function broadcast($the_message, $who)
{
    global $prefix, $db, $broadcast_msg, $module_name, $cookie, $user, $userinfo, $user_prefix;
    cookiedecode($user);
    getusrinfo($user);
    $row = $db->sql_fetchrow($db->sql_query("SELECT karma FROM " . $user_prefix . "_users WHERE user_id = '" . intval($cookie[0]) . "'"));
    if ($row['karma'] == 2 or $row['karma'] == 3) {
        Header("Location: modules.php?name=" . $module_name);
        die;
    }
    if (is_user($user) and strtolower($who) == strtolower($cookie[1]) and strtolower($userinfo['username']) == strtolower($cookie[1]) and $userinfo['user_password'] == $cookie[2]) {
        $who = $cookie[1];
        $the_message = filter($the_message, "nohtml", 1);
        if ($broadcast_msg == 1) {
            include "header.php";
            title("" . _BROADCAST . "");
            OpenTable();
            $numrows = $db->sql_numrows($db->sql_query("SELECT * FROM " . $prefix . "_public_messages WHERE who='{$who}'"));
            if (!empty($the_message) and $numrows == 0) {
                $the_time = time();
                $who = filter($who, "nohtml", 1);
                $db->sql_query("INSERT INTO " . $prefix . "_public_messages VALUES (NULL, '{$the_message}', '{$the_time}', '{$who}')");
                update_points(20);
                echo "<center>" . _BROADCASTSENT . "<br><br>[ <a href=\"modules.php?name={$module_name}\">" . _RETURNPAGE . "</a> ]</center>";
            } else {
                echo "<center>" . _BROADCASTNOTSENT . "<br><br>[ <a href=\"modules.php?name={$module_name}\">" . _RETURNPAGE . "</a> ]</center>";
            }
            CloseTable();
            include "footer.php";
        } else {
            echo "I don't like you...";
        }
    }
}
开发者ID:rotvulpix,项目名称:php-nuke,代码行数:34,代码来源:index.php

示例7: replyPreview

function replyPreview($pid, $pollID, $subject, $comment, $xanonpost, $mode, $order, $thold)
{
    include_once "header.php";
    global $userinfo, $user, $cookie, $AllowableHTML, $anonymous, $module_name, $nuke_editor;
    cookiedecode($user);
    getusrinfo($user);
    $subject = filter($subject, "nohtml", 0, preview);
    if (!isset($mode) or empty($mode)) {
        if (isset($userinfo['umode'])) {
            $mode = $userinfo['umode'];
        } else {
            $mode = "thread";
        }
    }
    if (!isset($order) or empty($order)) {
        if (isset($userinfo['uorder'])) {
            $order = $userinfo['uorder'];
        } else {
            $order = 0;
        }
    }
    if (!isset($thold) or empty($thold)) {
        if (isset($userinfo['thold'])) {
            $thold = $userinfo['thold'];
        } else {
            $thold = 0;
        }
    }
    $comment = filter($comment);
    $pid = intval($pid);
    $pollID = intval($pollID);
    if (!isset($pid) || !isset($pollID)) {
        die(_NOTRIGHT);
    }
    OpenTable();
    echo "<center><font class=\"title\"><b>" . _SURVEYCOMPRE . "</b></font></center>";
    CloseTable();
    echo "<br>";
    OpenTable();
    echo "<b>{$subject}</b><br>";
    echo "<font class=content>" . _BY . " ";
    if (is_user($user)) {
        echo $cookie[1];
    } else {
        echo $anonymous;
    }
    echo _ONN . "</font><br><br>";
    echo $comment;
    CloseTable();
    echo "<br>";
    OpenTable();
    echo "<form action=\"modules.php?name={$module_name}&amp;file=comments\" method=\"post\">" . "<font class=\"content\"><B>" . _YOURNAME . ":</B></FONT> ";
    if (is_user($user)) {
        echo "<font class=\"content\"><a href=\"modules.php?name=Your_Account\">{$cookie['1']}</a> <font class=\"content\">[ <a href=\"modules.php?name=Your_Account&amp;op=logout\">" . _LOGOUT . "</a> ]</font>";
    } else {
        echo "<font class=\"content\">{$anonymous}</font>";
    }
    echo "<br><br><font class=\"content\"><B>" . _SUBJECT . ":</B></FONT><BR>" . "<INPUT TYPE=\"text\" name=\"subject\" size=\"50\" maxlength=\"85\" value=\"{$subject}\"><br><br>" . "<P><font class=\"content\"><B>" . _UCOMMENT . ":</B></FONT><BR>" . "<TEXTAREA wrap=\"virtual\" cols=\"70\" rows=\"15\" name=\"comment\">{$comment}</TEXTAREA><br>";
    if ($nuke_editor == 0) {
        echo "<font class=\"content\">" . _ALLOWEDHTML . "<br>";
        while (list($key, ) = each($AllowableHTML)) {
            echo " &lt;" . $key . "&gt;";
        }
        echo "</font><br><br>";
    } else {
        echo "" . _HTMLNOTALLOWED . "</font><br><br>";
    }
    if ($xanonpost and $anonpost == 1) {
        echo "<INPUT type=\"checkbox\" name=\"xanonpost\" checked> " . _POSTANON . "<br>";
    } elseif (is_user($user) and $anonpost == 1) {
        echo "<INPUT type=\"checkbox\" name=\"xanonpost\"> " . _POSTANON . "<br>";
    }
    echo "<INPUT type=\"hidden\" name=\"pid\" value=\"{$pid}\">" . "<INPUT type=\"hidden\" name=\"pollID\" value=\"{$pollID}\"><INPUT type=\"hidden\" name=\"mode\" value=\"{$mode}\">" . "<INPUT type=\"hidden\" name=\"order\" value=\"{$order}\"><INPUT type=\"hidden\" name=\"thold\" value=\"{$thold}\">" . "<br><INPUT type=submit name=op value=\"" . _PREVIEW . "\"> " . "<INPUT type=submit name=op value=\"" . _OK . "\"></FORM>";
    CloseTable();
    include_once "footer.php";
}
开发者ID:rotvulpix,项目名称:php-nuke,代码行数:76,代码来源:comments.php

示例8: replyPreview

function replyPreview($pid, $pollID, $subject, $comment, $xanonpost, $mode, $order, $thold, $posttype)
{
    include "header.php";
    global $user, $cookie, $AllowableHTML, $anonymous, $module_name;
    cookiedecode($user);
    $subject = stripslashes(check_html($subject, "nohtml"));
    $comment = stripslashes($comment);
    $pid = intval($pid);
    $pollID = intval($pollID);
    if (!isset($pid) || !isset($pollID)) {
        echo "" . _NOTRIGHT . "";
        exit;
    }
    OpenTable();
    echo "<center><font class=\"title\"><b>" . _SURVEYCOMPRE . "</b></font></center>";
    CloseTable();
    echo "<br>";
    OpenTable();
    echo "<b>{$subject}</b><br>";
    echo "<font class=content>" . _BY . " ";
    if (is_user($user)) {
        echo "{$cookie['1']}";
    } else {
        echo "{$anonymous} ";
    }
    echo "" . _ONN . "</font><br><br>";
    if ($posttype == "exttrans") {
        echo nl2br(htmlspecialchars($comment));
    } elseif ($posttype == "plaintext") {
        echo nl2br($comment);
    } else {
        echo $comment;
    }
    CloseTable();
    echo "<br>";
    OpenTable();
    echo "<form action=\"modules.php?name={$module_name}&amp;file=comments\" method=\"post\">" . "<font class=\"content\"><B>" . _YOURNAME . ":</B></FONT> ";
    if (is_user($user)) {
        echo "<font class=\"content\"><a href=\"modules.php?name=Your_Account\">{$cookie['1']}</a> <font class=\"content\">[ <a href=\"modules.php?name=Your_Account&amp;op=logout\">" . _LOGOUT . "</a> ]</font>";
    } else {
        echo "<font class=\"content\">{$anonymous}</font>";
    }
    echo "<br><br><font class=\"content\"><B>" . _SUBJECT . ":</B></FONT><BR>" . "<INPUT TYPE=\"text\" name=\"subject\" size=\"50\" maxlength=\"85\" value=\"{$subject}\"><br><br>" . "<P><font class=\"content\"><B>" . _UCOMMENT . ":</B></FONT><BR>" . "<TEXTAREA wrap=\"virtual\" cols=\"50\" rows=\"10\" name=\"comment\">{$comment}</TEXTAREA><br>";
    echo "<font class=\"content\">" . _ALLOWEDHTML . "<br>";
    while (list($key, ) = each($AllowableHTML)) {
        echo " &lt;" . $key . "&gt;";
    }
    echo "<br>";
    if ($xanonpost and $anonpost == 1) {
        echo "<INPUT type=\"checkbox\" name=\"xanonpost\" checked> " . _POSTANON . "<br>";
    } elseif (is_user($user) and $anonpost == 1) {
        echo "<INPUT type=\"checkbox\" name=\"xanonpost\"> " . _POSTANON . "<br>";
    }
    echo "<INPUT type=\"hidden\" name=\"pid\" value=\"{$pid}\">" . "<INPUT type=\"hidden\" name=\"pollID\" value=\"{$pollID}\"><INPUT type=\"hidden\" name=\"mode\" value=\"{$mode}\">" . "<INPUT type=\"hidden\" name=\"order\" value=\"{$order}\"><INPUT type=\"hidden\" name=\"thold\" value=\"{$thold}\">" . "<br><INPUT type=submit name=op value=\"" . _PREVIEW . "\"> " . "<INPUT type=submit name=op value=\"" . _OK . "\"> <SELECT name=\"posttype\"><OPTION value=\"exttrans\"";
    if ($posttype == "exttrans") {
        echo " SELECTED";
    }
    echo ">" . _EXTRANS . "<OPTION value=\"html\"";
    if ($posttype == "html") {
        echo " SELECTED";
    }
    echo ">" . _HTMLFORMATED . "<OPTION value=\"plaintext\"";
    if ($posttype != "exttrans" && $posttype != "html") {
        echo " SELECTED";
    }
    echo ">" . _PLAINTEXT . "</SELECT></FORM>";
    CloseTable();
    include "footer.php";
}
开发者ID:BackupTheBerlios,项目名称:domsmod-svn,代码行数:69,代码来源:comments.php

示例9: postcomment

function postcomment($id, $title)
{
    global $user, $cookie, $AllowableHTML, $anonymous, $module_name, $anonpost;
    if (!is_user($user) && $anonpost == 0) {
        include "header.php";
        title("{$module_name}");
        OpenTable();
        echo "<center><b>" . _RESTRICTEDAREA . "</b><br><br>" . _MODULEUSERS . "";
        CloseTable();
        include "footer.php";
        die;
    }
    include "header.php";
    cookiedecode($user);
    $title = filter($title, "nohtml");
    OpenTable();
    echo "<center><font class=option><b>" . _REVIEWCOMMENT . " {$title}</b><br><br></font></center>" . "<form action=modules.php?name={$module_name} method=post>";
    if (!is_user($user) && $anonpost != 0) {
        echo "<b>" . _YOURNICK . "</b> {$anonymous} [ " . _RCREATEACCOUNT . " ]<br><br>";
        $uname = $anonymous;
    } else {
        echo "<b>" . _YOURNICK . "</b> {$cookie['1']}<br><br>";
        if ($anonpost != 0) {
            echo "<input type=checkbox name=xanonpost> " . _POSTANON . "<br><br>";
        } else {
            echo "<input type=hidden name=xanonpost value=0>";
        }
        $uname = $cookie[1];
    }
    echo "\r\n    <input type=hidden name=uname value={$uname}>\r\n    <input type=hidden name=id value={$id}>\r\n    <b>" . _SELECTSCORE . "</b>\r\n    <select name=score>\r\n    <option name=score value=10>10</option>\r\n    <option name=score value=9>9</option>\r\n    <option name=score value=8>8</option>\r\n    <option name=score value=7>7</option>\r\n    <option name=score value=6>6</option>\r\n    <option name=score value=5>5</option>\r\n    <option name=score value=4>4</option>\r\n    <option name=score value=3>3</option>\r\n    <option name=score value=2>2</option>\r\n    <option name=score value=1>1</option>\r\n    </select><br><br>\r\n    <b>" . _YOURCOMMENT . "</b><br>\r\n    <textarea name=comments rows=10 cols=70></textarea><br>\r\n    " . _HTMLNOTALLOWED . "<br>";
    echo "<br>\r\n    <input type=hidden name=rop value=savecomment>\r\n    <input type=submit value=Submit>\r\n    </form>\r\n    ";
    CloseTable();
    include "footer.php";
}
开发者ID:rotvulpix,项目名称:php-nuke,代码行数:34,代码来源:index.php

示例10: ratedownload

function ratedownload($lid, $user)
{
    global $prefix, $cookie, $datetime, $module_name, $user_prefix;
    include "header.php";
    menu(1);
    $row = $db->sql_fetchrow($db->sql_query("SELECT title FROM " . $prefix . "_downloads_downloads WHERE lid='{$lid}'"));
    $displaytitle = filter($row['title'], "nohtml");
    echo "<br>";
    OpenTable();
    if (isset($_SERVER['REMOTE_HOST'])) {
        $ip = $_SERVER['REMOTE_HOST'];
    }
    if (empty($ip)) {
        $ip = $_SERVER['REMOTE_ADDR'];
    }
    echo "<b>{$displaytitle}</b>" . "<ul><font class=\"content\">" . "<li>" . _RATENOTE1 . "" . "<li>" . _RATENOTE2 . "" . "<li>" . _RATENOTE3 . "" . "<li>" . _DRATENOTE4 . "" . "<li>" . _RATENOTE5 . "";
    if (is_user($user)) {
        $user2 = base64_decode($user);
        $user2 = addslashes($user2);
        $cookie = explode(":", $user2);
        echo "<li>" . _YOUAREREGGED . "" . "<li>" . _FEELFREE2ADD . "";
        cookiedecode($user);
        $auth_name = $cookie[1];
    } else {
        echo "<li>" . _YOUARENOTREGGED . "" . "<li>" . _IFYOUWEREREG . "";
        $auth_name = "{$anonymous}";
    }
    echo "</ul>" . "<form method=\"post\" action=\"modules.php?name={$module_name}\">" . "<table border=\"0\" cellpadding=\"1\" cellspacing=\"0\" width=\"100%\">" . "<tr><td width=\"25\" nowrap></td>" . "<tr><td width=\"25\" nowrap></td><td width=\"550\">" . "<input type=\"hidden\" name=\"ratinglid\" value=\"{$lid}\">" . "<input type=\"hidden\" name=\"ratinguser\" value=\"{$auth_name}\">" . "<input type=\"hidden\" name=\"ratinghost_name\" value=\"{$ip}\">" . "<font class=content>" . _RATETHISSITE . "" . "<select name=\"rating\">" . "<option>--</option>" . "<option>10</option>" . "<option>9</option>" . "<option>8</option>" . "<option>7</option>" . "<option>6</option>" . "<option>5</option>" . "<option>4</option>" . "<option>3</option>" . "<option>2</option>" . "<option>1</option>" . "</select></font>" . "<font class=\"content\"><input type=\"submit\" value=\"" . _RATETHISSITE . "\"></font>" . "<br><br>";
    $karma = $db->sql_fetchrow($db->sql_query("SELECT karma FROM " . $user_prefix . "_users WHERE user_id='{$cookie['0']}'"));
    if (is_user($user) and $karma['karma'] != 3 and $karma['karma'] != 4) {
        echo "<b>" . _SCOMMENTS . ":</b><br><textarea wrap=\"virtual\" cols=\"70\" rows=\"15\" name=\"ratingcomments\"></textarea>" . "<br><br><br>" . "</font></td>";
    } else {
        echo "<input type=\"hidden\" name=\"ratingcomments\" value=\"\">";
    }
    echo "</tr></table></form>";
    echo "<center>";
    downloadfooterchild($lid);
    echo "</center>";
    CloseTable();
    include "footer.php";
}
开发者ID:rotvulpix,项目名称:php-nuke,代码行数:41,代码来源:index.php

示例11: CreateTopic

function CreateTopic($xanonpost, $subject, $comment, $pid, $sid, $host_name, $mode, $order, $thold)
{
    global $module_name, $user, $userinfo, $EditedMessage, $cookie, $AllowableHTML, $ultramode, $user_prefix, $prefix, $anonpost, $articlecomm, $db, $sitename;
    cookiedecode($user);
    getusrinfo($user);
    $sid = intval($sid);
    $pid = intval($pid);
    $author = filter($author, "nohtml", 1);
    $subject = filter($subject, "nohtml", 1);
    $comment = format_url($comment);
    $comment = filter($comment, "", 1);
    if (empty($subject) or empty($comment)) {
        include "header.php";
        title("{$sitename} - " . _COMMENTSSYSTEM . "");
        OpenTable();
        echo "<center>" . _COMMENTPOSTERROR . "<br><br>" . _GOBACK . "</center>";
        CloseTable();
        include "footer.php";
        fdie();
    }
    //$comment = filter($comment);
    if (is_user($user) and !$xanonpost) {
        $name = $userinfo['username'];
        $email = $userinfo['femail'];
        $url = $userinfo['user_website'];
        $score = 1;
    } else {
        $name = "";
        $email = "";
        $url = "";
        $score = 0;
    }
    if (!isset($ip)) {
        $ip = $_SERVER['REMOTE_ADDR'];
    }
    $fake = $db->sql_numrows($db->sql_query("SELECT * FROM " . $prefix . "_stories WHERE sid='{$sid}'"));
    $comment = trim($comment);
    $comment = filter($comment, "", 1);
    if ($fake == 1 and $articlecomm == 1) {
        if ($anonpost == 0 and is_user($user) or $anonpost == 1) {
            if (is_user($user)) {
                $krow = $db->sql_fetchrow($db->sql_query("SELECT karma FROM " . $user_prefix . "_users WHERE username='{$name}'"));
                $koptions = "";
                $koptions .= "&mode=" . $mode;
                $koptions .= "&order=" . $order;
                $koptions .= "&thold=" . $thold;
                if ($krow['karma'] == 2) {
                    $db->sql_query("INSERT INTO " . $prefix . "_comments_moderated VALUES (NULL, '{$pid}', '{$sid}', now(), '{$name}', '{$email}', '{$url}', '{$ip}', '{$subject}', '{$comment}', '{$score}', '0', '0')");
                    include "header.php";
                    title(_MODERATEDTITLE);
                    OpenTable();
                    echo "<center>" . _COMMENTMODERATED . "";
                    echo "<br><br><a href=\"modules.php?name={$module_name}&file=article&sid={$sid}{$koptions}\">" . _MODERATEDRETURN . "</a>";
                    CloseTable();
                    include "footer.php";
                    fdie();
                } elseif ($krow['karma'] == 3) {
                    Header("Location: modules.php?name={$module_name}&file=article&sid={$sid}{$koptions}");
                    fdie();
                }
            }
            $db->sql_query("INSERT INTO " . $prefix . "_comments VALUES (NULL, '{$pid}', '{$sid}', now(), '{$name}', '{$email}', '{$url}', '{$ip}', '{$subject}', '{$comment}', '{$score}', '0', '0')");
            $db->sql_query("UPDATE " . $prefix . "_stories SET comments=comments+1 WHERE sid='{$sid}'");
            update_points(5);
            if ($ultramode) {
                ultramode();
            }
        } else {
            die("Nice try..");
        }
    } else {
        include "header.php";
        echo "According to my records, the topic you are trying " . "to reply to does not exist. If you're just trying to be " . "annoying, well then too bad.";
        include "footer.php";
        fdie();
    }
    $options = "";
    $options .= "&mode=" . $mode;
    $options .= "&order=" . $order;
    $options .= "&thold=" . $thold;
    Header("Location: modules.php?name={$module_name}&file=article&sid={$sid}{$options}");
}
开发者ID:rotvulpix,项目名称:php-nuke,代码行数:82,代码来源:comments.php

示例12: paid

function paid()
{
    global $db, $user, $cookie, $adminmail, $sitename, $nukeurl, $subscription_url, $user_prefix, $prefix;
    if (is_user($user)) {
        if (!empty($subscription_url)) {
            $renew = "" . _SUBRENEW . " {$subscription_url}";
        } else {
            $renew = "";
        }
        cookiedecode($user);
        $sql = "SELECT * FROM " . $prefix . "_subscriptions WHERE userid='{$cookie['0']}'";
        $result = $db->sql_query($sql);
        $numrows = $db->sql_numrows($result);
        $row = $db->sql_fetchrow($result);
        if ($numrows == 0) {
            return 0;
        } elseif ($numrows != 0) {
            $time = time();
            if ($row['subscription_expire'] <= $time) {
                $db->sql_query("DELETE FROM " . $prefix . "_subscriptions WHERE userid='{$cookie['0']}' AND id='" . intval($row['id']) . "'");
                $from = "{$sitename} <{$adminmail}>";
                $subject = "{$sitename}: " . _SUBEXPIRED . "";
                $body = "" . _HELLO . " {$cookie['1']}:\n\n" . _SUBSCRIPTIONAT . " {$sitename} " . _HASEXPIRED . "\n{$renew}\n\n" . _HOPESERVED . "\n\n{$sitename} " . _TEAM . "\n{$nukeurl}";
                $row = $db->sql_fetchrow($db->sql_query("SELECT user_email FROM " . $user_prefix . "_users WHERE id='{$cookie['0']}' AND nickname='{$cookie['1']}' AND password='{$cookie['2']}'"));
                mail($row['user_email'], $subject, $body, "From: {$from}\nX-Mailer: PHP/" . phpversion());
            }
            return 1;
        }
    } else {
        return 0;
    }
}
开发者ID:rotvulpix,项目名称:php-nuke,代码行数:32,代码来源:mainfile.php

示例13: PayMethod

function PayMethod()
{
    global $db, $prefix, $cookie, $user;
    $link = "";
    $row = $db->sql_fetchrow($db->sql_query("SELECT * FROM " . $prefix . "_hosting_order_config"));
    // Physical checks aren't supported yet, look for them in a future version :)
    if (isset($_POST['pay_by_cc'])) {
        cookiedecode($user);
        $user_info = $db->sql_fetchrow($db->sql_query("SELECT user_email, user_id, username FROM " . $prefix . "_users WHERE username='" . $cookie['1'] . "'"));
        $msg = "Payment info for order: " . $_GET['rnum'] . "\n\n";
        $msg .= "Name: " . $_POST['NAME'] . "\n\n";
        $msg .= "Address: " . $_POST['STREET'] . "\n";
        $msg .= "City: " . $_POST['CITY'] . "\n";
        $msg .= "State: " . $_POST['STATE'] . "\n";
        $msg .= "Zip Code: " . $_POST['ZipCode'] . "\n\n";
        $msg .= "Country: " . $_POST['Country'] . "\n";
        $msg .= "Card Type: " . $_POST['CardType'] . "\n";
        $msg .= "CC Number: " . $_POST['CCNumber'] . "\n";
        $msg .= "Exp Month: " . $_POST['Month'] . "\n";
        $msg .= "Exp Year: " . $_POST['Year'] . "\n";
        // Create the headers for the admin info email
        $mailheaders = "From: " . $user_info['user_email'] . "\r\n";
        $mailheaders .= "Reply-To: " . $user_info['user_email'] . "\r\n\n";
        // Create the subject for the admin info email
        $subject = "Payment Info for Order #" . $_GET['rnum'] . "\r\n\n";
        // Send the information email to admin
        mail($row['admin_email'], $subject, $msg, $mailheaders);
        include "header.php";
        OpenTable();
        ?>
		Your order has been placed. We will be contacting you shortly when your order is complete.<br><br>
		Your order number is #<?php 
        echo $_GET['rnum'];
        ?>
.<br><br>
		We thank you for your business!
<?php 
        CloseTable();
        include "footer.php";
    } elseif ($_POST['pay_method'] == 'paypal') {
        if ($row['allow_paypal_subscriptions'] == 1) {
            // Use paypal's subscritpion system
            // $p3 : length of the billing cycle
            // $t3 : M=month(s); Y=year(s)
            $link = "https://www.paypal.com/subscriptions/business=" . $row['admin_email'] . "&item_number=" . $_POST['trans_id'] . "&item_name=" . $_POST['description'] . "&no_shipping=1&no_note=1&currency_code=" . $row['currency_code'] . "&a3=" . $_POST['amount'] . "&p3=" . $_POST['term'] . "&t3=M&src=1&sra=1";
        } else {
            // Use regular paypal payments
            $total = $_POST['amount'] + $_POST['setupfee'];
            $link = "https://www.paypal.com/xclick/business=" . $row['admin_email'] . "&item_name=" . $_POST['description'] . "&amount=" . $total . "&no_shipping=1&no_note=1&currency_code=" . $row['currency_code'];
        }
    } elseif ($_POST['pay_method'] == 'nochex') {
        $link = "https://www.nochex.com/nochex.dll/checkout?amount=" . $_POST['amount'] . "&email=" . $row['admin_email'] . "&description=" . $_POST['description'];
    } elseif ($_POST['pay_method'] == "cc") {
        include "header.php";
        OpenTable();
        ?>
		<table width="100%" border="0">
		<form method="post">
			<tr>
				<td align="left"><b>Name on Card:</b> </td>
				<td align="left"><input type="text" name="NAME" size="20" maxlength="100"></td>
			</tr><tr>
				<td align="left"><b>Address:</b></td> 
				<td align="left"> <input type="text" name="STREET" size="20" maxlength="100"></td>
			</tr><tr>
				<td align="left"><b>City:</b></td>
				<td align="left"> <input type="text" name="CITY" size="20" maxlength="40"></td>
			</tr><tr>
				<td align="left"><B>State/Province</B></td>
				<td>
					<select name="STATE">
						<option selected value="AL">AL</option><option value="AK">AK</option><option value="AZ">AZ</option>
						<option value="AR">AR</option><option value="CA">CA</option><option value="CO">CO</option><option value="CT">CT</option>
						<option value="DC">DC</option><option value="DE">DE</option><option value="FL">FL</option><option value="GA">GA</option>
						<option value="HI">HI</option><option value="ID">ID</option><option value="IL">IL</option><option value="IN">IN</option>
						<option value="IA">IA</option><option value="KS">KS</option><option value="KY">KY</option><option value="LA">LA</option>
						<option value="ME">ME</option><option value="MD">MD</option><option value="MA">MA</option><option value="MI">MI</option>
						<option value="MN">MN</option><option value="MS">MS</option><option value="MO">MO</option><option value="MT">MT</option>
						<option value="NE">NE</option><option value="NV">NV</option><option value="NH">NH</option><option value="NJ">NJ</option>
						<option value="NM">NM</option><option value="NY">NY</option><option value="NC">NC</option><option value="ND">ND</option>
						<option value="OH">OH</option><option value="OK">OK</option><option value="OR">OR</option><option value="PA">PA</option>
						<option value="RI">RI</option><option value="SC">SC</option><option value="SD">SD</option><option value="TN">TN</option>
						<option value="TX">TX</option><option value="UT">UT</option><option value="VT">VT</option><option value="VI">VI</option>
						<option value="VA">VA</option><option value="WA">WA</option><option value="WV">WV</option><option value="WI">WI</option>
						<option value="WY">WY</option><option value="SP">SIPAN</option><option value="GU">GUAM</option><option value="PR">Puerto Rico</option>
						<option value="AB">Alberta-CA</option><option value="BC">British Columbia-CA</option><option value="MB">Manitoba-CA</option>
						<option value="NB">New Brunswick-CA</option><option value="NF">Newfoundland-CA</option><option value="NT">Northwest Territory-CA</option>
						<option value="NS">Nova Scotia-CA</option><option value="NT">Nunavut Territory-CA</option><option value="ON">Ontario-CA</option>
						<option value="PE">Prince Edward-CA</option><option value="QC">Quebec-CA</option><option value="SK">Saskatchewan-CA</option>
						<option value="YT">Yukon Territory-CA</option><option value="NONUS">Non-US</option>
					</select>
				</td>
			</tr>
			<tr>
				<td colspan="2"><font size=2><center><B><i>(Select Non-US for International Orders) </i></b></center></font></td>
			</tr>

			<tr>
				<td><b>Country:</b></td>
				<td>
//.........这里部分代码省略.........
开发者ID:paintballrefjosh,项目名称:php-nuke-order,代码行数:101,代码来源:index.php

示例14: setup_style

function setup_style($style)
{
    global $db, $board_config, $template, $images, $phpbb_root_path;
    if ($name == "Forums") {
        cookiedecode($user);
        $info = sql_query("select * from " . $prefix . "_bbconfig where config_name='default_style'", $dbi);
        $get_info = mysql_fetch_array($info);
        $default_style = $get_info[config_value];
        if ($cookie[1] == "" and $style != "{$default_style}") {
            $style = "{$default_style}";
        }
    }
    $sql = "SELECT *\n\t\tFROM " . THEMES_TABLE . "\n                WHERE themes_id = '{$style}'";
    if (!($result = $db->sql_query($sql))) {
        message_die(CRITICAL_ERROR, 'Could not query database for theme info');
    }
    if (!($row = $db->sql_fetchrow($result))) {
        message_die(CRITICAL_ERROR, "Could not get theme data for themes_id [{$style}]");
    }
    $ThemeSel = get_theme();
    if (file_exists("themes/{$ThemeSel}/forums/index_body.tpl")) {
        $template_path = "themes/{$ThemeSel}/";
        $template_name = "forums";
        $template = new Template($template_path . $template_name, $board_config, $db);
    } else {
        $template_path = 'templates/';
        $template_name = $row['template_name'];
        $template = new Template($phpbb_root_path . $template_path . $template_name, $board_config, $db);
    }
    if ($template) {
        $current_template_path = $template_path . $template_name;
        $ThemeSel = get_theme();
        if (file_exists("themes/{$ThemeSel}/{$template_name}/index_body.tpl")) {
            @(include $template_path . $template_name . '/' . $template_name . '.cfg');
        } else {
            @(include $phpbb_root_path . $template_path . $template_name . '/' . $template_name . '.cfg');
        }
        if (!defined('TEMPLATE_CONFIG')) {
            message_die(CRITICAL_ERROR, "Could not open {$template_name} template config file", '', __LINE__, __FILE__);
        }
        $img_lang = file_exists(@phpbb_realpath($phpbb_root_path . $current_template_path . '/images/lang_' . $board_config['default_lang'])) ? $board_config['default_lang'] : 'english';
        while (list($key, $value) = @each($images)) {
            if (!is_array($value)) {
                $images[$key] = str_replace('{LANG}', 'lang_' . $img_lang, $value);
            }
        }
    }
    return $row;
}
开发者ID:BackupTheBerlios,项目名称:domsmod-svn,代码行数:49,代码来源:functions.php

示例15: pollMain

function pollMain($pollID)
{
    global $boxTitle, $boxContent, $pollcomm, $user, $cookie, $prefix, $dbi, $module_name, $db;
    $pollID = intval($pollID);
    if (!isset($pollID)) {
        $pollID = 1;
    }
    if (!isset($url)) {
        $url = sprintf("modules.php?name={$module_name}&amp;op=results&amp;pollID=%d", $pollID);
    }
    $boxContent .= "<form action=\"modules.php?name={$module_name}\" method=\"post\">";
    $boxContent .= "<input type=\"hidden\" name=\"pollID\" value=\"" . $pollID . "\">";
    $boxContent .= "<input type=\"hidden\" name=\"forwarder\" value=\"" . $url . "\">";
    $result_a = $db->sql_query("SELECT pollTitle, voters FROM " . $prefix . "_poll_desc WHERE pollID='{$pollID}'");
    list($pollTitle, $voters) = $db->sql_fetchrow($result_a);
    $boxTitle = _SURVEY;
    $boxContent .= "<font class=\"content\"><b>{$pollTitle}</b></font><br><br>\n";
    $boxContent .= "<table border=\"0\" width=\"100%\">";
    for ($i = 1; $i <= 12; $i++) {
        $result = sql_query("SELECT pollID, optionText, optionCount, voteID FROM " . $prefix . "_poll_data WHERE pollID='{$pollID}' AND voteID='{$i}'", $dbi);
        $object = sql_fetch_object($result, $dbi);
        if (is_object($object)) {
            $optionText = $object->optionText;
            if ($optionText != "") {
                $boxContent .= "<tr><td valign=\"top\"><input type=\"radio\" name=\"voteID\" value=\"" . $i . "\"></td><td width=\"100%\"><font class=\"content\">{$optionText}</font></td></tr>\n";
            }
        }
    }
    $boxContent .= "</table><br><center><font class=\"content\"><input type=\"submit\" value=\"" . _VOTE . "\"></font><br>";
    if (is_user($user)) {
        cookiedecode($user);
    }
    for ($i = 0; $i < 12; $i++) {
        $result2 = sql_query("SELECT optionCount FROM " . $prefix . "_poll_data WHERE pollID='{$pollID}' AND voteID='{$i}'", $dbi);
        $object = sql_fetch_object($result2, $dbi);
        $optionCount = $object->optionCount;
        $sum = (int) $sum + $optionCount;
    }
    $boxContent .= "<br><font class=\"content\"><a href=\"modules.php?name={$module_name}&amp;op=results&amp;pollID={$pollID}&amp;mode={$cookie['4']}&amp;order={$cookie['5']}&amp;thold={$cookie['6']}\"><b>" . _RESULTS . "</b></a><br><a href=\"modules.php?name={$module_name}\"><b>" . _POLLS . "</b></a><br>";
    if ($pollcomm) {
        list($numcom) = $db->sql_fetchrow($db->sql_query("select count(*) from " . $prefix . "_pollcomments where pollID='{$pollID}'"));
        $boxContent .= "<br>" . _VOTES . ": <b>{$sum}</b> <br> " . _PCOMMENTS . " <b>{$numcom}</b>\n\n";
    } else {
        $boxContent .= "<br>" . _VOTES . " <b>{$sum}</b>\n\n";
    }
    $boxContent .= "</font></center></form>\n\n";
    themesidebox($boxTitle, $boxContent);
}
开发者ID:BackupTheBerlios,项目名称:domsmod-svn,代码行数:48,代码来源:index.php


注:本文中的cookiedecode函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。