public function add_order()
 {
     //调用checkComputer函数,判断是否注册电脑,如果没有则跳转到注册页面注册
     if (!checkComputer($_GET['user_id'])) {
         $this->error('该用户尚未添加电脑!', '/Home/StaffPage/add?access_token=' . $_GET['access_token']);
     }
     if (!is_user($_GET['user_id'], 'user_id')) {
         $this->error('没有该用户', '/Home/StaffPage/add?access_token=' . $_GET['access_token']);
     }
     if (!isset($_GET['user_id'])) {
         exit;
     }
     //查找用户信息
     $a = M('userextend');
     $map['user_id'] = $_GET['user_id'];
     $userextend = $a->where($map)->find();
     //用户电脑信息
     $b = M('computer');
     $computer = $b->where($map)->order('time desc')->select();
     //用户类型 type
     $c = M('user');
     $user = $c->where($map)->find();
     $this->assign('user', $userextend);
     //赋值输出 userextend表 中的用户扩展信息
     $this->assign('computer_list', $computer);
     $this->assign('type', $user);
     $this->display();
 }
示例#2
0
function event_delete()
{
    global $config;
    if (!is_user() && $config['anon_permission'] < 2) {
        soft_error(_('You do not have permission to delete events.'));
    }
    $del_array = explode('&', $_SERVER['QUERY_STRING']);
    $html = tag('div', attributes('class="box"', 'style="width: 50%"'));
    $ids = 0;
    foreach ($del_array as $del_value) {
        list($drop, $id) = explode("=", $del_value);
        if (preg_match('/^id$/', $drop) == 0) {
            continue;
        }
        $ids++;
        $event = get_event_by_id($id);
        if (!check_user($event['uid']) && $config['anon_permission'] < 2) {
            $html->add(tag('p', _('You do not have permission to remove item') . ": {$id}"));
            continue;
        }
        if (remove_event($id)) {
            $html->add(tag('p', _('Removed item') . ": {$id}"));
        } else {
            $html->add(tag('p', _('Could not remove item') . ": {$id}"));
        }
    }
    if ($ids == 0) {
        $html->add(tag('p', _('No items selected.')));
    }
    return $html;
}
示例#3
0
function startjournal($sitename, $user)
{
    global $module_name;
    $user = filter($user, "nohtml");
    $sitename = filter($sitename, "nohtml");
    if (is_user($user)) {
        $j_user1 = "<center>[ <a href=\"modules.php?name={$module_name}\">" . _JOURNALDIR . "</a> | <a href=\"modules.php?name={$module_name}&file=edit\">" . _YOURJOURNAL . "</a> ]</center>";
        $j_user2 = "";
    } else {
        $j_user1 = "<center>[ <a href=\"modules.php?name={$module_name}\">" . _JOURNALDIR . "</a> | <a href=\"modules.php?name=Your_Account&op=new_user\">" . _CREATEACCOUNT . "</a> ]</center>";
        $j_user2 = "<br><center><font class=\"tiny\">" . _MEMBERSCAN . "</font></center>";
    }
    title("{$sitename}: " . _USERSJOURNAL . "");
    if (is_user($user)) {
        include "modules/Your_Account/navbar.php";
        OpenTable();
        nav();
        CloseTable();
        echo "<br>";
    }
    OpenTable();
    echo "<center><img src=modules/{$module_name}/images/bgimage.gif><br><font class=title><b>" . _USERSJOURNAL . "</b></font></center>";
    echo "{$j_user1}";
    echo "{$j_user2}";
    CloseTable();
}
function password_submit()
{
    global $vars, $phpcdb, $phpc_user;
    if (!is_user()) {
        return tag('div', __('You must be logged in.'));
    }
    verify_token();
    if (!$phpc_user->is_password_editable()) {
        soft_error(__('You do not have permission to change your password.'));
    }
    if (!isset($vars['old_password'])) {
        return tag('div', __('You must specify your old password.'));
    } else {
        $old_password = $vars['old_password'];
    }
    if ($phpc_user->password != md5($old_password)) {
        return tag('div', __('The password you entered did not match your old password.'));
    }
    if (empty($vars['password1'])) {
        return tag('div', __('You must specify a password'));
    }
    if (empty($vars['password2']) || $vars['password1'] != $vars['password2']) {
        return tag('div', __('Your passwords did not match'));
    }
    $passwd = md5($vars['password1']);
    $phpcdb->set_password($phpc_user->get_uid(), $passwd);
    return tag('div', __('Password updated.'));
}
示例#5
0
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\">";
}
function user_settings_submit()
{
    global $phpcid, $vars, $phpcdb, $phpc_user_tz, $phpc_user_lang, $phpc_prefix, $phpc_user, $phpc_script;
    verify_token();
    // If we have a timezone, make sure it's valid
    if (!empty($vars["timezone"]) && !in_array($vars['timezone'], timezone_identifiers_list())) {
        soft_error(__("Invalid timezone."));
    }
    // Expire 20 years in the future, give or take.
    $expiration_time = time() + 20 * 365 * 24 * 60 * 60;
    // One hour in the past
    $past_time = time() - 3600;
    if (!empty($vars["timezone"])) {
        setcookie("{$phpc_prefix}tz", $vars['timezone'], $expiration_time);
    } else {
        setcookie("{$phpc_prefix}tz", '', $past_time);
    }
    if (!empty($vars["language"])) {
        setcookie("{$phpc_prefix}lang", $vars['language'], $expiration_time);
    } else {
        setcookie("{$phpc_prefix}lang", '', $past_time);
    }
    if (is_user()) {
        $uid = $phpc_user->get_uid();
        $phpcdb->set_user_default_cid($uid, $vars['default_cid']);
        $phpcdb->set_timezone($uid, $vars['timezone']);
        $phpcdb->set_language($uid, $vars['language']);
        $phpc_user_tz = $vars["timezone"];
        $phpc_user_lang = $vars["language"];
    }
    return message_redirect(__('Settings updated.'), "{$phpc_script}?action=user_settings&phpcid={$phpcid}");
}
示例#7
0
文件: theme.php 项目: cbsistem/nexos
function themeheader()
{
    global $slogan, $sitename, $banners, $mainindex, $adminindex, $cpgtpl, $db, $prefix, $site_logo, $MAIN_CFG, $CPG_SESS, $Blocks;
    if ($MAIN_CFG['global']['admingraphic'] & 4) {
        include 'includes/cssmainmenu.php';
    }
    $imgr = $imgl = '';
    // left blocks ?
    if ($Blocks->l && $Blocks->showblocks & 1) {
        $img = $Blocks->hideblock('600') ? 'plus.gif' : 'minus.gif';
        $imgl = '<img alt="' . _TOGGLE . '" title="' . _TOGGLE . '" id="pic600" src="themes/' . $CPG_SESS['theme'] . '/images/' . $img . '" onclick="blockswitch(\'600\');" style="cursor:pointer; float:left; padding-top:3px;" />';
    }
    // right blocks ?
    if ($Blocks->r && $Blocks->showblocks & 2) {
        $img = $Blocks->hideblock('601') ? 'plus.gif' : 'minus.gif';
        $imgr = '<img alt="' . _TOGGLE . '" title="' . _TOGGLE . '" id="pic601" src="themes/' . $CPG_SESS['theme'] . '/images/' . $img . '" onclick="blockswitch(\'601\');" style="cursor:pointer; float:right; padding-top:3px;" />';
    }
    $result = $db->sql_uquery("SELECT topicid, topictext FROM " . $prefix . "_topics ORDER BY topictext");
    while ($row = $db->sql_fetchrow($result, SQL_NUM)) {
        $toplist[$row[0]] = $row[1];
    }
    $user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '';
    $css_ie = ereg('MSIE 7.0', $user_agent) ? 'ie7' : (ereg('MSIE ([0-6].[0-9]{1,2})', $user_agent) ? 'ie6' : (isset($_SESSION['SECURITY']['UA']) && $_SESSION['SECURITY']['UA'] == 'Safari' ? 'safari' : (isset($_SESSION['SECURITY']['UA']) && $_SESSION['SECURITY']['UA'] == 'Opera' ? 'opera' : '')));
    $cpgtpl->assign_vars(array('CSS_IE' => $css_ie ? '<link rel="stylesheet" type="text/css" href="themes/' . $CPG_SESS['theme'] . '/style/' . $css_ie . '.css" />' : '', 'PUBLIC_HEADER' => !defined('ADMIN_PAGES'), 'B_L_VISIBLE' => $Blocks->hideblock('600') ? 'style="display: none"' : '', 'BLOG_ENABLED' => is_active('Blogs'), 'G_LEFTIMAGE' => $imgl, 'G_RIGHTIMAGE' => $imgr, 'S_TOGGLE' => _TOGGLE, 'S_SEARCH' => _SEARCH, 'S_IS_ADMIN' => is_admin(), 'S_CAN_ADMIN' => can_admin(), 'S_IS_USER' => is_user(), 'S_LOGO' => $site_logo, 'S_SITENAME' => $sitename, 'S_WELCOME' => _WELCOMETO, 'S_HOME' => _HOME, 'S_BLOG' => _BlogsLANG, 'S_DOWNLOADS' => _DownloadsLANG, 'S_GALLERY' => _coppermineLANG, 'S_FORUMS' => _ForumsLANG, 'S_MY_ACCOUNT' => _Your_AccountLANG, 'S_NEWS' => _NewsLANG, 'S_ADMIN' => _ADMINISTRATION, 'S_BANNER' => $banners ? viewbanner() : '', 'U_MAININDEX' => $mainindex, 'U_NEWS' => getlink('News'), 'U_SEARCH' => getlink('Search'), 'U_DOWNLOADS' => getlink('Downloads'), 'U_FORUMS' => getlink('Forums'), 'U_GALLERY' => getlink('coppermine'), 'U_BLOG' => getlink('Blogs'), 'U_MY_ACCOUNT' => getlink('Your_Account'), 'U_ADMININDEX' => $adminindex, 'S_MAIN_MENU' => isset($mmcontent) ? $mmcontent : false));
    $Blocks->display('l');
}
示例#8
0
function settings_submit()
{
    global $phpcid, $vars, $phpcdb, $phpc_user_tz, $phpc_user_lang, $phpc_prefix, $phpc_user;
    verify_token();
    // Expire 20 years in the future, give or take.
    $expiration_time = time() + 20 * 365 * 24 * 60 * 60;
    // One hour in the past
    $past_time = time() - 3600;
    if (!empty($vars["timezone"])) {
        setcookie("{$phpc_prefix}tz", $vars['timezone'], $expiration_time);
    } else {
        setcookie("{$phpc_prefix}tz", '', $past_time);
    }
    if (!empty($vars["language"])) {
        setcookie("{$phpc_prefix}lang", $vars['language'], $expiration_time);
    } else {
        setcookie("{$phpc_prefix}lang", '', $past_time);
    }
    if (is_user()) {
        $uid = $phpc_user->get_uid();
        $phpcdb->set_timezone($uid, $vars['timezone']);
        $phpcdb->set_language($uid, $vars['language']);
        $phpc_user_tz = $vars["timezone"];
        $phpc_user_lang = $vars["language"];
    }
    return message(__('Settings updated.'));
}
示例#9
0
function check_user()
{
    if (!is_user()) {
        forward('login.php');
        exit;
    }
}
示例#10
0
function FriendSend($sid)
{
    global $user, $cookie, $prefix, $db, $user_prefix, $module_name;
    $sid = intval($sid);
    if (!isset($sid)) {
        fdie();
    }
    include "header.php";
    $row = $db->sql_fetchrow($db->sql_query("SELECT title FROM " . $prefix . "_stories WHERE sid='{$sid}'"));
    $title = filter($row['title'], "nohtml");
    title("" . _FRIEND . "");
    OpenTable();
    echo "<center><font class=\"content\"><b>" . _FRIEND . "</b></font></center><br><br>" . "" . _YOUSENDSTORY . " <b>{$title}</b> " . _TOAFRIEND . "<br><br>" . "<form action=\"modules.php?name={$module_name}&amp;file=friend\" method=\"post\">" . "<input type=\"hidden\" name=\"sid\" value=\"{$sid}\">";
    if (is_user($user)) {
        $row2 = $db->sql_fetchrow($db->sql_query("SELECT name, username, user_email FROM " . $user_prefix . "_users WHERE user_id = '" . intval($cookie[0]) . "'"));
        if (empty($row['name'])) {
            $yn = filter($row2['username'], "nohtml");
        } else {
            $yn = filter($row2['name'], "nohtml");
        }
        $ye = filter($row2['user_email'], "nohtml");
    }
    echo "<b>" . _FYOURNAME . " </b> {$yn} <input type=\"hidden\" name=\"yname\" value=\"{$yn}\"><br><br>\n" . "<b>" . _FYOUREMAIL . " </b> {$ye} <input type=\"hidden\" name=\"ymail\" value=\"{$ye}\"><br><br><br>\n" . "<b>" . _FFRIENDNAME . " </b> <input type=\"text\" name=\"fname\"><br><br>\n" . "<b>" . _FFRIENDEMAIL . " </b> <input type=\"text\" name=\"fmail\"><br><br>\n" . "<input type=\"hidden\" name=\"op\" value=\"SendStory\">\n" . "<input type=\"submit\" value=" . _SEND . ">\n" . "</form>\n";
    CloseTable();
    include 'footer.php';
}
示例#11
0
function atIsLoggedIn()
{
    if (is_user($GLOBALS['user'])) {
        return true;
    } else {
        return false;
    }
}
示例#12
0
文件: theme.php 项目: cbsistem/nexos
function downl_infomenu_tpl($lid)
{
    echo "<br /><font class=\"content\">[ " . "<a href=\"" . getlink("&amp;d_op=viewdownloadcomments&amp;lid={$lid}") . "\">" . _DOWNLOADCOMMENTS . "</a>" . " | <a href=\"" . getlink("&amp;d_op=viewdownloaddetails&amp;lid={$lid}") . "\">" . _ADDITIONALDET . "</a>" . " | <a href=\"" . getlink("&amp;d_op=viewdownloadeditorial&amp;lid={$lid}") . "\">" . _EDITORREVIEW . "</a>" . " | <a href=\"" . getlink("&amp;d_op=modifydownloadrequest&amp;lid={$lid}") . "\">" . _MODIFY . "</a>";
    if (is_user()) {
        echo " | <a href=\"" . getlink("&amp;d_op=brokendownload&amp;lid={$lid}") . "\">" . _REPORTBROKEN . "</a>";
    }
    echo " ]</font>";
}
示例#13
0
function message_box()
{
    global $prefix, $MAIN_CFG, $currentlang, $db, $userinfo;
    require_once CORE_PATH . 'nbbcode.php';
    $query = $MAIN_CFG['global']['multilingual'] ? "AND (mlanguage='{$currentlang}' OR mlanguage='')" : '';
    if (!is_admin()) {
        if (is_user()) {
            $query .= ' AND view!=2 AND view!=3';
        } else {
            $query .= ' AND (view=0 OR view=3)';
        }
    }
    $result = $db->sql_query('SELECT mid, title, content, date, expire, view FROM ' . $prefix . "_message WHERE active='1' {$query} ORDER BY date DESC");
    while (list($mid, $title, $content, $date, $expire, $view) = $db->sql_fetchrow($result)) {
        $content = decode_bb_all($content, 1, true);
        if (!empty($title) && !empty($content)) {
            $output = '';
            if ($view == 0) {
                $output = _MVIEWALL;
            } elseif ($view == 1) {
                $output = _MVIEWUSERS;
            } elseif ($view == 2) {
                $output = _MVIEWADMIN;
            } elseif ($view == 3) {
                $output = _MVIEWANON;
            } elseif ($view > 3 && (in_group($view - 3) || is_admin())) {
                // <= phpBB User Groups Integration
                $view = $view - 3;
                if (!in_group($view)) {
                    list($output) = $db->sql_ufetchrow("SELECT group_name FROM " . $prefix . "_bbgroups WHERE group_id='{$view}'", SQL_NUM);
                } else {
                    $output = in_group($view);
                }
            }
            if ($output != '') {
                $remain = '';
                if (can_admin()) {
                    if ($expire == 0) {
                        $remain = _UNLIMITED;
                    } else {
                        $etime = ($date + $expire - time()) / 3600;
                        $etime = intval($etime);
                        $remain = $etime < 1 ? _EXPIRELESSHOUR : _EXPIREIN . " {$etime} " . _HOURS;
                    }
                }
                global $cpgtpl;
                $cpgtpl->assign_block_vars('messageblock', array('S_TITLE' => $title, 'S_CONTENT' => $content, 'S_OUTPUT' => $output, 'S_DATE' => _POSTEDON . ' ' . formatDateTime($date, _DATESTRING2), 'S_REMAIN' => $remain, 'S_EDIT' => _EDIT, 'U_EDITMSG' => URL::admin('messages&amp;edit=' . $mid)));
            }
            if ($expire != 0) {
                if ($date + $expire < time()) {
                    $db->sql_query("UPDATE " . $prefix . "_message SET active='0' WHERE mid='{$mid}'");
                }
            }
        }
    }
    $db->sql_freeresult($result);
}
示例#14
0
function check_user_hash($name, $hash)
{
    $name_md5 = strtolower(md5(strtolower($name)));
    if (is_user($name)) {
        $user = load_serialize('db/users/' . $name_md5 . '.php');
        return md5($user['pass']) == $hash;
    } else {
        return FALSE;
    }
}
示例#15
0
function SERVICE_CMSOPEN_cpgnuke($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, $CLASS, $include_path;
    $userinfo =& $CLASS['member']->members[is_user()];
    $username = $userinfo['username'];
    userAuthenticate($username);
    // Now let's see if we only wanted the user access
    if ($authenticate_only == true) {
        return;
    }
    include_once "header.php";
    OpenTable();
}
示例#16
0
function RecommendSite()
{
    global $user, $cookie, $prefix, $db, $user_prefix, $module_name;
    include "header.php";
    title("" . _RECOMMEND . "");
    OpenTable();
    echo "<center><font class=\"content\"><b>" . _RECOMMEND . "</b></font></center><br><br>" . "<form action=\"modules.php?name={$module_name}\" method=\"post\">" . "<input type=\"hidden\" name=\"op\" value=\"SendSite\">";
    if (is_user($user)) {
        $row = $db->sql_fetchrow($db->sql_query("SELECT username, user_email from " . $user_prefix . "_users where username='******'1']}'"));
        $yn = stripslashes($row['username']);
        $ye = stripslashes($row['user_email']);
    }
    echo "<b>" . _FYOURNAME . " </b> <input type=\"text\" name=\"yname\" value=\"{$yn}\"><br><br>\n" . "<b>" . _FYOUREMAIL . " </b> <input type=\"text\" name=\"ymail\" value=\"{$ye}\"><br><br><br>\n" . "<b>" . _FFRIENDNAME . " </b> <input type=\"text\" name=\"fname\"><br><br>\n" . "<b>" . _FFRIENDEMAIL . " </b> <input type=\"text\" name=\"fmail\"><br><br>\n" . "<input type=submit value=" . _SEND . ">\n" . "</form>\n";
    CloseTable();
    include 'footer.php';
}
示例#17
0
function validate_username($username)
{
    global $db, $lang, $userdata;
    // Remove doubled up spaces
    $username = preg_replace('#\\s+#', ' ', $username);
    // Limit username length
    $username = substr($username, 0, 25);
    $result = $db->sql_query("SELECT username FROM " . USERS_TABLE . " WHERE LOWER(username) = '" . strtolower($username) . "'");
    if ($db->sql_numrows($result)) {
        if (is_user() && $row['username'] != $userdata['username'] || !is_user()) {
            $db->sql_freeresult($result);
            return array('error' => true, 'error_msg' => $lang['Username_taken']);
        }
    }
    $db->sql_freeresult($result);
    $result = $db->sql_query("SELECT group_name FROM " . GROUPS_TABLE . " WHERE LOWER(group_name) = '" . strtolower($username) . "'");
    if ($db->sql_numrows($result)) {
        $db->sql_freeresult($result);
        return array('error' => true, 'error_msg' => $lang['Username_taken']);
    }
    $db->sql_freeresult($result);
    $result = $db->sql_query("SELECT disallow_username FROM " . DISALLOW_TABLE);
    if ($db->sql_numrows($result)) {
        while ($row = $db->sql_fetchrow($result)) {
        }
        if (preg_match("#\\b(" . str_replace("\\*", ".*?", phpbb_preg_quote($row['disallow_username'], '#')) . ")\\b#i", $username)) {
            $db->sql_freeresult($result);
            return array('error' => true, 'error_msg' => $lang['Username_disallowed']);
        }
    }
    $db->sql_freeresult($result);
    $result = $db->sql_query("SELECT word FROM\t" . WORDS_TABLE);
    if ($db->sql_numrows($result)) {
        while ($row = $db->sql_fetchrow($result)) {
        }
        if (preg_match("#\\b(" . str_replace("\\*", ".*?", phpbb_preg_quote($row['word'], '#')) . ")\\b#i", $username)) {
            $db->sql_freeresult($result);
            return array('error' => true, 'error_msg' => $lang['Username_disallowed']);
        }
    }
    $db->sql_freeresult($result);
    // Don't allow " and ALT-255 in username.
    if (strstr($username, '"') || strstr($username, '&quot;') || strstr($username, chr(160))) {
        return array('error' => true, 'error_msg' => $lang['Username_invalid']);
    }
    return array('error' => false, 'error_msg' => '');
}
示例#18
0
function remove_menus()
{
    remove_menu_page('edit.php');
    remove_menu_page('edit-comments.php');
    add_menu_page('Menyer', 'Menyer', 'edit_theme_options', 'nav-menus.php', '', null, 21);
    // Läs in menyförändringar för användarroll USER
    if (is_user('anvandare')) {
        remove_menu_page('themes.php');
        remove_menu_page('profile.php');
        remove_menu_page('options-general.php');
        remove_menu_page('edit.php?post_type=acf');
        //remove_menu_page('wpcf7');
        remove_menu_page('gadash_settings');
        remove_menu_page('tools.php');
        remove_menu_page('users.php');
    }
}
示例#19
0
 public function do_submit()
 {
     $pid = $this->input->post('blogid');
     $comment = $this->input->post('comment');
     $this->form_validation->set_rules('comment', 'Comment', 'required|min_length[10]|max_length[50]');
     if ($this->form_validation->run() == FALSE) {
         $this->session->set_flashdata('error', 'Comment can not be blank!');
         redirect('blog/single/' . $pid);
     } else {
         $data = array('userid' => is_user(), 'blogid' => $pid, 'comment' => $comment, 'commentdate' => time());
         if ($this->cm->saveComment($data)) {
             $this->session->set_flashdata('success', 'Woop ,Comment Saved !');
             redirect('blog/single/' . $pid);
         } else {
             $this->session->set_flashdata('error', 'Comment can not be saved!');
             redirect('blog/single/' . $pid);
         }
     }
 }
示例#20
0
文件: index.php 项目: cbsistem/nexos
function generate_user_info(&$row, $date_format, $group_mod, &$from, &$posts, &$joined, &$profile_img, &$profile, &$search_img, &$search, &$pm_img, &$pm, &$email_img, &$email, &$www_img, &$www)
{
    global $lang, $images, $board_config, $MAIN_CFG;
    static $ranksrow;
    if (!is_array($ranksrow)) {
        global $db;
        $ranksrow = $db->sql_ufetchrowset("SELECT * FROM " . RANKS_TABLE . " ORDER BY rank_special, rank_min", SQL_ASSOC);
    }
    $from = !empty($row['user_from']) ? $row['user_from'] : '&nbsp;';
    $joined = formatDateTime($row['user_regdate'], _DATESTRING2);
    $posts = $row['user_posts'] ? $row['user_posts'] : 0;
    $email_img = $email = '';
    for ($j = 0; $j < count($ranksrow); $j++) {
        if ($row['user_rank'] && $row['user_rank'] == $ranksrow[$j]['rank_id'] && $ranksrow[$j]['rank_special'] || !$row['user_rank'] && $row['user_posts'] >= $ranksrow[$j]['rank_min'] && !$ranksrow[$j]['rank_special']) {
            $email = $ranksrow[$j]['rank_title'];
            $email_img = $ranksrow[$j]['rank_image'] ? '<img src="' . $ranksrow[$j]['rank_image'] . '" alt="' . $email . '" title="' . $email . '" style="border:0;" />' : '';
        }
    }
    $temp_url = URL::index("Your_Account&amp;profile=" . $row['user_id']);
    $profile_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_profile'] . '" alt="' . $lang['Read_profile'] . '" title="' . $lang['Read_profile'] . '" /></a>';
    $profile = '<a href="' . $temp_url . '">' . $lang['Read_profile'] . '</a>';
    if (is_user() && is_active('Private_Messages')) {
        $temp_url = URL::index("Private_Messages&amp;mode=post&amp;" . POST_USERS_URL . "=" . $row['user_id']);
        $pm_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_pm'] . '" alt="' . $lang['Send_private_message'] . '" title="' . $lang['Send_private_message'] . '" style="border:0;" /></a>';
        $pm = '<a href="' . $temp_url . '">' . $lang['Send_private_message'] . '</a>';
    } else {
        $pm = $pm_img = '';
    }
    if ($row['user_website'] == 'http:///' || $row['user_website'] == 'http://') {
        $row['user_website'] = '';
    }
    if ($row['user_website'] != '' && substr($row['user_website'], 0, 7) != 'http://') {
        $row['user_website'] = 'http://' . $row['user_website'];
    }
    $www_img = $row['user_website'] ? '<a href="' . $row['user_website'] . '" target="_userwww"><img src="' . $images['icon_www'] . '" alt="' . $lang['Visit_website'] . '" title="' . $lang['Visit_website'] . '" style="border:0;" /></a>' : '';
    $www = $row['user_website'] ? '<a href="' . $row['user_website'] . '" target="_userwww">' . $lang['Visit_website'] . '</a>' : '';
    $temp_url = URL::index("Forums&amp;file=search&amp;search_author=" . urlencode($row['user_id']) . "&amp;showresults=posts");
    $search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . $lang['Search_user_posts'] . '" title="' . $lang['Search_user_posts'] . '" style="border:0;" /></a>';
    $search = '<a href="' . $temp_url . '">' . $lang['Search_user_posts'] . '</a>';
    return;
}
示例#21
0
文件: theme.php 项目: cbsistem/nexos
function themeheader()
{
    global $slogan, $sitename, $banners, $mainindex, $adminindex, $cpgtpl, $site_logo, $CPG_SESS, $MAIN_CFG, $Blocks;
    if ($MAIN_CFG['global']['admingraphic'] & 4) {
        include 'includes/cssmainmenu.php';
    }
    $imgr = $imgl = '';
    // left blocks ?
    if ($Blocks->l) {
        $img = $Blocks->hideblock('600') ? 'plus.gif' : 'minus.gif';
        $imgl = '<img alt="Toggle Content" title="Toggle Content" id="pic600" src="themes/' . $CPG_SESS['theme'] . '/images/' . $img . '" onclick="blockswitch(\'600\');" style="cursor:pointer; float:left; padding:2px 0 2px 0;" />';
    }
    // right blocks ?
    if ($Blocks->r) {
        $img = $Blocks->hideblock('601') ? 'plus.gif' : 'minus.gif';
        $imgr = '<img alt="Toggle Content" title="Toggle Content" id="pic601" src="themes/' . $CPG_SESS['theme'] . '/images/' . $img . '" onclick="blockswitch(\'601\');" style="cursor:pointer; float:right; padding:2px 0 2px 0;" />';
    }
    $user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '';
    $cpgtpl->assign_vars(array('CSS_IE' => ereg('MSIE 7.0', $user_agent) ? '<link rel="stylesheet" type="text/css" href="themes/' . $CPG_SESS['theme'] . '/style/ie7.css" />' : (ereg('MSIE ([0-6].[0-9]{1,2})', $user_agent) ? '<link rel="stylesheet" type="text/css" href="themes/' . $CPG_SESS['theme'] . '/style/ie6.css" />' : ''), 'PUBLIC_HEADER' => !defined('ADMIN_PAGES'), 'B_L_VISIBLE' => $Blocks->hideblock('600') ? 'style="display: none"' : '', 'B_L_HIDDEN' => $Blocks->hideblock('600') ? '' : 'style="display: none"', 'G_LEFTIMAGE' => $imgl, 'G_RIGHTIMAGE' => $imgr, 'S_IS_ADMIN' => is_admin(), 'S_CAN_ADMIN' => can_admin(), 'S_IS_USER' => is_user(), 'S_LOGO' => $site_logo, 'S_SITENAME' => $sitename, 'S_HOME' => _HOME, 'S_DOWNLOADS' => is_active('Downloads') ? _DownloadsLANG : false, 'S_FORUMS' => _ForumsLANG, 'S_MY_ACCOUNT' => is_user() ? _Your_AccountLANG : _BREG, 'S_ADMIN' => _ADMINISTRATION, 'S_BANNER' => $banners ? viewbanner() : '', 'U_MAININDEX' => $mainindex, 'U_DOWNLOADS' => getlink('Downloads'), 'U_FORUMS' => getlink('Forums'), 'U_MY_ACCOUNT' => getlink(is_user() ? 'Your_Account' : 'Your_Account&amp;file=register'), 'U_ADMININDEX' => $adminindex, 'S_MAIN_MENU' => isset($mmcontent) ? $mmcontent : false));
    $Blocks->display('l');
}
示例#22
0
文件: theme.php 项目: cbsistem/nexos
function themeheader()
{
    global $slogan, $sitename, $mainindex, $adminindex, $cpgtpl, $site_logo, $userinfo, $CPG_SESS, $MAIN_CFG, $Blocks;
    if ($MAIN_CFG['global']['admingraphic'] & 4) {
        include 'includes/cssmainmenu.php';
    }
    $imgr = $imgl = '';
    // left blocks ?
    if ($Blocks->l && $Blocks->showblocks & 1) {
        $img = $Blocks->hideblock('600') ? 'plus.png' : 'minus.png';
        $imgl = '<img style="float:left; cursor:pointer;" alt="' . _TOGGLE . '" title="' . _TOGGLE . '" id="pic600" src="themes/' . $CPG_SESS['theme'] . '/images/' . $img . '" onclick="blockswitch(\'600\');" />';
    }
    // right blocks ?
    if ($Blocks->r && $Blocks->showblocks & 2) {
        $img = $Blocks->hideblock('601') ? 'plus.png' : 'minus.png';
        $imgr = '<img style="float:right; cursor:pointer;" alt="' . _TOGGLE . '" title="' . _TOGGLE . '" id="pic601" src="themes/' . $CPG_SESS['theme'] . '/images/' . $img . '" onclick="blockswitch(\'601\');" />';
    }
    $user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '';
    $css_ie = false !== strpos($user_agent, 'MSIE 7.0') ? 'ie7' : (preg_match('#MSIE ([0-6].[0-9]{1,2})#', $user_agent) ? 'ie6' : (isset($_SESSION['SECURITY']['UA']) && $_SESSION['SECURITY']['UA'] == 'Safari' ? 'safari' : (isset($_SESSION['SECURITY']['UA']) && $_SESSION['SECURITY']['UA'] == 'Opera' ? 'opera' : '')));
    $cpgtpl->assign_vars(array('CSS_IE' => $css_ie ? '<link rel="stylesheet" type="text/css" href="themes/' . $CPG_SESS['theme'] . '/style/' . $css_ie . '.css" />' : '', 'PUBLIC_HEADER' => !defined('ADMIN_PAGES'), 'B_L_VISIBLE' => $Blocks->hideblock('600') ? 'style="display: none"' : '', 'G_LEFTIMAGE' => $imgl, 'G_RIGHTIMAGE' => $imgr, 'S_IS_ADMIN' => is_admin(), 'S_IS_USER' => is_user(), 'S_USER_INFO' => _BWEL . ' ' . (is_user() ? $userinfo['username'] : _ANONYMOUS), 'S_LOGO' => $site_logo, 'S_SITENAME' => $sitename, 'S_HOME' => _HOME, 'S_DOWNLOADS' => is_active('Downloads') ? _DownloadsLANG : false, 'S_FORUMS' => _ForumsLANG, 'S_MY_ACCOUNT' => is_user() ? _Your_AccountLANG : _BREG, 'S_ADMIN' => _ADMINISTRATION, 'U_MAININDEX' => $mainindex, 'U_DOWNLOADS' => URL::index('Downloads'), 'U_FORUMS' => URL::index('Forums'), 'U_MY_ACCOUNT' => URL::index(is_user() ? 'Your_Account' : 'Your_Account&amp;file=register'), 'U_ADMININDEX' => $adminindex, 'S_MAIN_MENU' => isset($mmcontent) ? $mmcontent : false));
    $Blocks->display('l');
}
示例#23
0
文件: theme.php 项目: cbsistem/nexos
function themeheader()
{
    global $user, $sitename, $slogan, $nukeuser, $prefix, $mainindex;
    echo "<body bgcolor=\"#000000\" text=\"#FFFFFF\" onLoad=\"doblocks('themes/MP3Tunes/images/');\">";
    if (!is_user($user)) {
        $theuser = "******"{$mainindex}?name=Your_Account&amp;op=new_user\">Create an account</a>";
    } else {
        $theuser = "******";
    }
    $public_msg = public_message();
    $thefile = implode("", file("themes/MP3Tunes/header.html"));
    $thefile = addslashes($thefile);
    $thefile = '$r_file="' . $thefile . '";';
    eval($thefile);
    print $r_file;
    blocks('left');
    $thefile = implode("", file("themes/MP3Tunes/left_center.html"));
    $thefile = addslashes($thefile);
    $thefile = '$r_file="' . $thefile . '";';
    eval($thefile);
    print $r_file;
}
示例#24
0
 private function edit_profile()
 {
     global $bp, $ci, $page;
     $page->title = 'Edit Your Profile at ' . $ci->blog->name;
     $html = '';
     if (!($edit = is_user())) {
         return $html;
     }
     $form = $page->plugin('Form', 'name', 'edit_profile');
     $form->values($ci->auth->info($edit));
     $form->validate('email', 'Email', '', 'Your email address for signing into the site.');
     $form->validate('name', 'Name', 'required', 'Please enter your name.');
     $form->validate('password', 'Password', 'nowhitespace|minlength[6]', 'Please enter your desired password.');
     $form->validate('confirm', 'Confirm', 'matches[password]', 'Please confirm the password entered above.');
     if ($form->submitted() && empty($form->errors)) {
         $update = array();
         if (!empty($form->vars['password'])) {
             $form->message('success', 'Thank you. The password has been updated.');
             $update['password'] = $form->vars['password'];
         }
         if (!empty($form->vars['name'])) {
             $update['name'] = $form->vars['name'];
         }
         if (!empty($update)) {
             $ci->auth->update($edit, $update);
         }
         $page->eject($form->eject);
     }
     $html .= $form->header();
     $html .= $form->field('email', '<p class="help-block">' . $form->values('email') . '</p>') . $form->field('email', 'hidden');
     $html .= $form->field('name', 'text');
     $html .= $form->field('password', 'password');
     $html .= $form->field('confirm', 'password');
     $html .= $form->submit('Edit Profile');
     $html .= $form->close();
     unset($form);
     return $this->box('default', array('head with-border' => $bp->icon('user') . ' Edit Your Profile', 'body' => $html));
 }
示例#25
0
文件: theme.php 项目: cbsistem/nexos
function themeheader()
{
    global $slogan, $sitename, $banners, $mainindex, $adminindex, $index, $cpgtpl, $ownpagetitle;
    $imgr = $imgl = '';
    // left blocks ?
    if (blocks_visible('l')) {
        $topblockl = '<td width="194"><img src="themes/PH2/images/left_block_top.jpg" height="12" alt="" /></td>';
        $img = hideblock('600') ? 'plus.gif' : 'minus.gif';
        $imgl = '<img align="left" alt="Toggle Content" title="Toggle Content" id="pic600" src="themes/PH2/images/' . $img . '" onclick="blockswitch(\'600\');" style="cursor:pointer" />';
    } else {
        $topblockl = '<td width="194" class="mtop_block"></td>';
    }
    // right blocks ?
    if (blocks_visible('r')) {
        $topblock = '<td width="194"><img src="themes/PH2/images/right_block_top.jpg" height="12" alt="" /></td>';
        $img = hideblock('601') ? 'plus.gif' : 'minus.gif';
        $imgr = '<img align="right" alt="Toggle Content" title="Toggle Content" id="pic601" src="themes/PH2/images/' . $img . '" onclick="blockswitch(\'601\');" style="cursor:pointer" />';
    } else {
        $topblock = '<td width="194" class="mtop_block"></td>';
    }
    $cpgtpl->assign_vars(array('PUBLIC_HEADER' => !defined('ADMIN_PAGES'), 'B_L_VISIBLE' => hideblock('600') ? 'style="display: none"' : '', 'G_LEFTIMAGE' => $imgl, 'G_RIGHTIMAGE' => $imgr, 'S_IS_ADMIN' => is_admin(), 'S_CAN_ADMIN' => can_admin(), 'S_IS_USER' => is_user(), 'S_SITENAME' => $sitename, 'S_HOME' => _HOME, 'S_DOWNLOADS' => _DownloadsLANG, 'S_FORUMS' => _ForumsLANG, 'S_MY_ACCOUNT' => _Your_AccountLANG, 'S_ADMIN' => _ADMINISTRATION, 'S_BANNER' => $banners ? viewbanner() : '', 'U_MAININDEX' => $mainindex, 'U_DOWNLOADS' => getlink('Downloads'), 'U_FORUMS' => getlink('Forums'), 'U_MY_ACCOUNT' => getlink('Your_Account'), 'U_ADMININDEX' => $adminindex, 'U_PRIVATE_M' => getlink('Private_Messages'), 'U_GALLERY' => getlink('coppermine'), 'U_SEARCH' => getlink('Search'), 'G_LBLOCK_TOP' => $topblockl, 'G_RBLOCK_TOP' => $topblock));
    blocks('left');
}
示例#26
0
function config_form()
{
    global $phpc_script, $phpc_user_tz, $phpc_user_lang, $phpc_token, $phpcdb, $phpc_user;
    $tz_input = create_multi_select('timezone', get_timezone_list(), $phpc_user_tz);
    $languages = array("" => __("Default"));
    foreach (get_languages() as $lang) {
        $languages[$lang] = $lang;
    }
    $lang_input = create_select('language', $languages, $phpc_user_lang);
    $calendars = array("" => __("None"));
    foreach ($phpcdb->get_calendars() as $calendar) {
        $calendars[$calendar->get_cid()] = $calendar->get_title();
    }
    $default_input = create_select('default_cid', $calendars, $phpc_user->get_default_cid());
    $table = tag('table', attrs('class="phpc-form"'));
    if (is_user()) {
        $table->add(tag('tr', tag('th', __('Default Calendar')), tag('td', $default_input)));
    }
    $table->add(tag('tr', tag('th', __('Timezone')), tag('td', $tz_input)));
    $table->add(tag('tr', tag('th', __('Language')), tag('td', $lang_input)));
    $form = tag('form', attributes("action=\"{$phpc_script}\"", 'method="post"'), tag('div', attrs('class="phpc-sub-title"'), __('Settings')), $table, create_hidden('phpc_token', $phpc_token), create_hidden('action', 'user_settings_submit'), create_submit(__('Submit')));
    return tag('div', attrs('id="phpc-config"'), $form);
}
示例#27
0
function RecommendSite($mess = "0")
{
    global $user, $cookie, $prefix, $db, $user_prefix, $module_name, $gfx_chk;
    include "header.php";
    title("" . _RECOMMEND . "");
    OpenTable();
    $mess = intval($mess);
    if ($mess == 1) {
        $mess = "<center>" . _SECURITYCODEERROR . "</center><br><br>";
    } else {
        $mess = "";
    }
    echo "<center><font class=\"content\"><b>" . _RECOMMEND . "</b></font></center><br><br>{$mess}" . "<table align=\"left\" border=\"0\" cellpadding=\"5\" cellspacing=\"5\"><tr><td>" . "<form action=\"modules.php?name={$module_name}\" method=\"post\">" . "<input type=\"hidden\" name=\"op\" value=\"SendSite\">";
    if (is_user($user)) {
        $row = $db->sql_fetchrow($db->sql_query("SELECT username, user_email from " . $user_prefix . "_users where user_id = '" . intval($cookie[0]) . "'"));
        $yn = filter($row['username'], "nohtml");
        $ye = filter($row['user_email'], "nohtml");
    } else {
        $yn = "";
        $ye = "";
    }
    echo "<b>" . _FYOURNAME . " </b></td><td><input type=\"text\" name=\"yname\" value=\"{$yn}\"></td></tr>\n" . "<tr><td><b>" . _FYOUREMAIL . " </b></td><td><input type=\"text\" name=\"ymail\" value=\"{$ye}\"></td></tr>\n" . "<tr><td><b>" . _FFRIENDNAME . " </b></td><td><input type=\"text\" name=\"fname\"></td></tr>\n" . "<tr><td><b>" . _FFRIENDEMAIL . " </b></td><td><input type=\"text\" name=\"fmail\"></td></tr>\n";
    mt_srand((double) microtime() * 1000000);
    $maxran = 1000000;
    $random_num = mt_rand(0, $maxran);
    if (extension_loaded("gd") and $gfx_chk != 0) {
        echo "<tr><td><b>" . _SECURITYCODE . ":</b></td><td><img src='?gfx=gfx_little&random_num={$random_num}' border='1' alt='" . _SECURITYCODE . "' title='" . _SECURITYCODE . "'></td></tr>\n";
        echo "<tr><td><b>" . _TYPESECCODE . ":</b></td><td><input type=\"text\" NAME=\"gfx_check\" SIZE=\"3\" MAXLENGTH=\"3\"></td></tr>\n";
        echo "<input type=\"hidden\" name=\"random_num\" value=\"{$random_num}\">\n";
    } else {
        echo "<input type=\"hidden\" name=\"random_num\" value=\"{$random_num}\">\n";
    }
    echo "<tr><td>&nbsp;</td><td><input type=submit value=" . _SEND . "></form></td></tr></table>\n";
    CloseTable();
    include 'footer.php';
}
示例#28
0
#             WAP-Site  :  http://visavi.net          #
#                  ICQ  :  36-44-66                   #
#  Вы не имеете право вносить изменения в код скрипта #
#        для его дальнейшего распространения          #
#-----------------------------------------------------#
require_once "../includes/start.php";
require_once "../includes/functions.php";
require_once "../includes/header.php";
include_once "../themes/" . $config['themes'] . "/index.php";
if (isset($_GET['action'])) {
    $action = check($_GET['action']);
} else {
    $action = "";
}
echo '<img src="../images/img/partners.gif" alt="image" /> <b>Выносливость</b><br /><br />';
if (is_user()) {
    if ($udata[55] == 1) {
        if (empty($udata[59])) {
            $udata[59] = 50;
        }
        ############################################################################################
        ##                                    Главная страница                                    ##
        ############################################################################################
        if ($action == "") {
            echo 'В наличии: ' . moneys($udata[41]) . '<br />';
            echo 'Уровень выносливости: <b>' . (int) $udata[57] . '</b>%<br />';
            echo 'Максимальный уровень выносливости: <b>' . (int) $udata[59] . '</b>%<br />';
            echo '<img src="../gallery/grafic.php?rat=' . (int) $udata[57] . '&amp;imgs=2&amp;limit=' . (int) $udata[59] . '" alt="image" /><br /><br />';
            echo 'Вы можете увеличить уровень выносливости разными способами<br /><br />';
            echo '<img src="../images/img/plus.gif" alt="image" /> <b><a href="stamina.php?action=operacia&amp;pred=0&amp;' . SID . '">Тренироваться</a></b> (Бесплатно)<br />';
            echo '(Увеличивает вашу выносливость всего на 3%)<br /><br />';
示例#29
0
文件: index.php 项目: cbsistem/nexos
function ratedownload()
{
    global $userinfo;
    $lid = intval($_REQUEST['lid']);
    include "header.php";
    downl_menu_tpl(1);
    echo '<br />';
    OpenTable();
    $displaytitle = ereg_replace("_", " ", $ttitle);
    $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()) {
        echo "<li>" . _YOUAREREGGED . "<li>" . _FEELFREE2ADD;
        $auth_name = $userinfo['username'];
    } else {
        echo "<li>" . _YOUARENOTREGGED . "<li>" . _IFYOUWEREREG;
        $auth_name = $anonymous;
    }
    echo "</ul>" . "<form method=\"post\" action=\"" . getlink() . "\">" . "<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 />";
    if (is_user()) {
        echo "<b>" . _SCOMMENTS . ":</b><br /><textarea wrap=\"virtual\" cols=\"50\" rows=\"10\" name=\"ratingcomments\"></textarea><br /><br /><br /></font>";
    } else {
        echo "<input type=\"hidden\" name=\"ratingcomments\" value=\"\" />";
    }
    echo "</td></tr></table></form>";
    echo "<center>";
    downloadfooterchild($lid);
    echo "</center>";
    CloseTable();
    include "footer.php";
}
示例#30
0
#---------------------------------------------#
#      ********* RotorCMS *********           #
#           Author  :  Vantuz                 #
#            Email  :  visavi.net@mail.ru     #
#             Site  :  http://visavi.net      #
#              ICQ  :  36-44-66               #
#            Skype  :  vantuzilla             #
#---------------------------------------------#
require_once '../includes/start.php';
require_once '../includes/functions.php';
require_once '../includes/header.php';
include_once '../themes/header.php';
$act = isset($_GET['act']) ? check($_GET['act']) : 'index';
show_title('Регистрация');
if ($config['openreg'] == 1) {
    if (!is_user()) {
        if (empty($_SESSION['reguser'])) {
            switch ($act) {
                ############################################################################################
                ##                                    Главная страница                                    ##
                ############################################################################################
                case 'index':
                    echo 'Регистрация на сайте означает что вы ознакомлены и согласны с <b><a href="rules.php">правилами</a></b> нашего сайта<br />';
                    echo 'Длина логина или пароля должна быть от 3 до 20 символов<br />';
                    echo 'В полях логин и пароль разрешено использовать только знаки латинского алфавита и цифры, а также знак дефис!<br />';
                    if ($config['regkeys'] == 1 && !empty($config['regmail'])) {
                        echo '<img src="/images/img/warning.gif" alt="image" /> <span style="color:#ff0000"><b>Включено подтверждение регистрации!</b> Вам на почтовый ящик будет выслан мастер-ключ, который необходим для подтверждения регистрации!</span><br />';
                    }
                    if ($config['regkeys'] == 2) {
                        echo '<img src="/images/img/warning.gif" alt="image" /> <span style="color:#ff0000"><b>Включена модерация регистрации!</b> Ваш аккаунт будет активирован только после проверки администрацией!</span><br />';
                    }