function display_connected($Private, $Full, $NU, $String1, $String2, $DbLink, $Charset)
{
    global $L;
    $List = "";
    global $DefaultDispChatRooms, $res_init, $disp_note;
    if ($NU > 0) {
        echo $String1;
        if ($Full) {
            // Restricted rooms mod by Ciprian
            while (list($User, $Latin1, $Room, $RTime, $Status) = $DbLink->next_record()) {
                if (is_array($DefaultDispChatRooms) && in_array($Room . " [R]", $DefaultDispChatRooms)) {
                    $Room .= " [" . $res_init . "]";
                    $disp_note = 1;
                }
                if ($Latin1) {
                    $User = htmlentities($User);
                }
                $User = user_status($User, $Status);
                $RTime = strftime(L_SHORT_DATETIME, $RTime + C_TMZ_OFFSET * 60 * 60);
                if (stristr(PHP_OS, 'win') && (strstr($L, "chinese") || strstr($L, "korean") || strstr($L, "japanese"))) {
                    $RTime = str_replace(" ", "", $RTime);
                }
                $List .= "<tr><td nowrap=\"nowrap\">" . $User . "</td><td nowrap=\"nowrap\">" . $Room . "</td><td nowrap=\"nowrap\">" . L_LURKING_4 . " " . $RTime;
            }
            echo $List;
        }
    } else {
        echo $String2;
    }
    $DbLink->clean_results();
    $DbLink->close();
}
示例#2
0
 */
$detail = $this->get_user_detail();
$this->get_header();
?>
	<h1 class="title">登录基本信息</h1>
	<dl class="dl-horizontal user-info">
		<dt>基本信息</dt>
		<dd>
			<strong><?php 
echo $detail['user']['name'];
?>
</strong>[<?php 
echo $detail['user']['id'];
?>
			]<i>(<?php 
echo user_status($detail['user']['status']);
?>
				)</i>,<?php 
echo role_info($detail['role']);
?>
		</dd>
		<?php 
switch ($detail['user']['login_type']) {
    case "admin":
        ?>
				<dt>当前IP</dt>
				<dd><?php 
        echo $detail['user']['ip'];
        ?>
</dd>
				<dt>允许IP</dt>
示例#3
0
#              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';
if (is_admin(array(101, 102, 103))) {
    show_title('Администрация сайта');
    ############################################################################################
    ##                                     Вывод администрации                                ##
    ############################################################################################
    $queryadmin = DB::run()->query("SELECT users_login, users_level FROM users WHERE users_level>=? AND users_level<=?;", array(101, 105));
    $arradmin = $queryadmin->fetchAll();
    $total = count($arradmin);
    if ($total > 0) {
        foreach ($arradmin as $value) {
            echo '<img src="/images/img/user.gif" alt="image" /> <b>' . profile($value['users_login']) . '</b>  (' . user_status($value['users_level']) . ') ' . user_online($value['users_login']) . '<br />';
            if (is_admin(array(101))) {
                echo '<img src="/images/img/edit.gif" alt="image" /> <a href="users.php?act=edit&amp;uz=' . $value['users_login'] . '">Изменить</a><br />';
            }
        }
        echo '<br />Всего в администрации: <b>' . $total . '</b><br /><br />';
    } else {
        show_error('Администрации еще нет!');
    }
    echo '<img src="/images/img/panel.gif" alt="image" /> <a href="index.php">В админку</a><br />';
} else {
    redirect('/index.php');
}
include_once '../themes/footer.php';
示例#4
0
			</thead>
			<tbody>
			<?php 
    foreach ($__list as $v) {
        ?>
				<tr>
					<td><?php 
        echo $v['a_id'];
        ?>
</td>
					<td><?php 
        echo $v['a_name'];
        ?>
</td>
					<td><?php 
        echo user_status($v['a_status']);
        ?>
</td>
					<td><?php 
        echo $v['r_name'];
        ?>
(<?php 
        echo role_status($v['r_status']);
        ?>
)</td>
					<td><?php 
        echo str_replace("|", "<br />", $v['a_ip']);
        ?>
</td>
					<td>
						<a class="btn btn-default btn-sm"
示例#5
0
 if (!empty($user)) {
     $uz = $user['users_login'];
     echo user_gender($user['users_login']) . ' <b>Профиль ' . profile($user['users_login']) . '</b> ' . user_visit($user['users_login']) . '<br /><br />';
     if ($log == $config['nickname'] || $log == $user['users_login'] || ($user['users_level'] < 101 || $user['users_level'] > 105)) {
         if ($user['users_login'] == $log) {
             echo '<b><span style="color:#ff0000">Внимание! Вы редактируете cобственный аккаунт!</span></b><br /><br />';
         }
         echo '<div class="form">';
         echo '<form method="post" action="users.php?act=upgrade&amp;uz=' . $user['users_login'] . '&amp;uid=' . $_SESSION['token'] . '">';
         if ($log == $config['nickname']) {
             $arr_access = array(101, 102, 103, 105, 107);
             echo 'Уровень доступа:<br />';
             echo '<select name="level">';
             foreach ($arr_access as $value) {
                 $selected = $user['users_level'] == $value ? ' selected="selected"' : '';
                 echo '<option value="' . $value . '"' . $selected . '>' . user_status($value) . '</option>';
             }
             echo '</select><br />';
         }
         echo 'Новый пароль: (Oставьте пустым если не надо менять)<br />';
         echo '<input type="text" name="pass" maxlength="20" /><br />';
         echo 'Страна:<br />';
         echo '<input type="text" name="country" maxlength="30" value="' . $user['users_country'] . '" /><br />';
         echo 'Откуда:<br />';
         echo '<input type="text" name="city" maxlength="50" value="' . $user['users_city'] . '" /><br />';
         echo 'E-mail:<br />';
         echo '<input type="text" name="email" maxlength="50" value="' . $user['users_email'] . '" /><br />';
         echo 'Сайт:<br />';
         echo '<input type="text" name="site" maxlength="50" value="' . $user['users_site'] . '" /><br />';
         echo 'Зарегистрирован:<br />';
         echo '<input type="text" name="joined" maxlength="10" value="' . date_fixed($user['users_joined'], "d.m.Y") . '" /><br />';
示例#6
0
 if ($users != "") {
     if (file_exists(DATADIR . "profil/{$users}.prof")) {
         $uzdata = reading_profil($users);
         echo '<img src="../images/img/user.gif" alt="image" /> <b>Профиль ' . $users . '</b> ' . user_visit($users) . '<br /><br />';
         if ($log == $config['nickname'] || $users == $log || ($uzdata[7] < 101 || $uzdata[7] > 105)) {
             if ($users == $log) {
                 echo '<b><span style="color:#ff0000">Внимание! Вы редактируете cобственный аккаунт!</span></b><br /><br />';
             }
             echo '<form method="post" action="users.php?action=upgrade&amp;users=' . $users . '&amp;uid=' . $_SESSION['token'] . '&amp;' . SID . '">';
             if ($log == $config['nickname']) {
                 $arr_access = array(101, 102, 103, 105, 107);
                 echo 'Уровень доступа:<br />';
                 echo '<select name="ud7"><option value="' . $uzdata[7] . '">' . user_status($uzdata[7]) . '</option>';
                 foreach ($arr_access as $value) {
                     if ($value != $uzdata[7]) {
                         echo '<option value="' . $value . '">' . user_status($value) . '</option>';
                     }
                 }
                 echo '</select><br />';
             }
             echo 'Новый пароль: (Oставьте пустым если не надо менять)<br />';
             echo '<input name="ud1" /><br />';
             echo 'Откуда:<br />';
             echo '<input name="ud2" value="' . $uzdata[2] . '" /><br />';
             echo 'Инфа:<br />';
             echo '<input name="ud3" value="' . $uzdata[3] . '" /><br />';
             echo 'Е-мэил:<br />';
             echo '<input name="ud4" value="' . $uzdata[4] . '" /><br />';
             echo 'Сайт:<br />';
             echo '<input name="ud5" value="' . $uzdata[5] . '" /><br />';
             echo 'Зарегистрирован:<br />';
示例#7
0
echo $_SESSION['userid'];
?>
+"&val="+escape(toPass), true);

        xmlhttp.onreadystatechange=function() {
            //remove this in the future after testing
            if (xmlhttp.readyState==4) {
                if (xmlhttp.responseText != ''){
                    //alert(xmlhttp.responseText);
                }
            }
        }
        xmlhttp.send(null);
        $('savelayout').style.display='none';
    }

/* ]]> */
</script>
<?php 
echo "<div id='footerbar'>";
echo "<form action='{$_SERVER['PHP_SELF']}'>";
echo "{$strSetYourStatus}: ";
if (isset($sit[2])) {
    echo userstatus_bardrop_down("status", user_status($sit[2])) . help_link("SetYourStatus");
}
echo "</form>\n";
echo "</div>\n";
if ($CONFIG['debug']) {
    $dbg .= "\nLang: {$_SESSION['lang']}\n";
}
include APPLICATION_INCPATH . 'htmlfooter.inc.php';
示例#8
0
            $admin_top[] = '|' . $dat_user[$k] . '|' . $dat_status[$k] . '|';
        }
        $text = implode("\r\n", $admin_top);
        write_files(DATADIR . "datatmp/adminlist.dat", "{$text}\r\n", 1, 0666);
    }
}
############################################################################################
##                                      Вывод из кэша                                     ##
############################################################################################
if (file_exists(DATADIR . "datatmp/adminlist.dat")) {
    $userfile = file(DATADIR . "datatmp/adminlist.dat");
    $total = count($userfile);
    if ($total > 0) {
        foreach ($userfile as $value) {
            $userdata = explode("|", $value);
            echo '<img src="../images/img/chel.gif" alt="image" /> <b><a href="../pages/anketa.php?uz=' . $userdata[1] . '&amp;' . SID . '">' . nickname($userdata[1]) . '</a></b>  (' . user_status($userdata[2]) . ') ' . user_online($userdata[1]) . '<br />';
        }
        echo '<br />Всего в администрации: <b>' . (int) $total . '</b><br />';
        ############################################################################################
        ##                                     Быстрая почта                                      ##
        ############################################################################################
        if (is_user()) {
            echo '<hr /><big><b>Быстрая почта</b></big><br /><br />';
            echo '<form method="post" action="privat.php?action=send&amp;uid=' . $_SESSION['token'] . '&amp;' . SID . '">';
            echo 'Выберите адресат:<br /><select name="uz">';
            foreach ($userfile as $value) {
                $userdata = explode("|", $value);
                echo '<option value="' . $userdata[1] . '"> ' . nickname($userdata[1]) . ' </option>';
            }
            echo '</select><br />';
            echo 'Сообщение:<br />';
            if (C_SPECIAL_GHOSTS != "") {
                $sghosts = "";
                $sghosts = str_replace("'", "", C_SPECIAL_GHOSTS);
                $sghosts = str_replace(" AND username != ", ",", $sghosts);
            }
            $ghost = 0;
            $superghost = 0;
            if ($sghosts != "" && ghosts_in($data[username], $sghosts, $Charset) || C_HIDE_MODERS && $data[status] == "m" || C_HIDE_ADMINS && ($data[status] == "a" || $data[status] == "t")) {
                if ($data[status] == "a" || $data[status] == "t") {
                    $superghost = 1;
                } else {
                    $ghost = 1;
                }
            }
        }
        $User = user_status($data[username], $data[status], $ghost, $superghost, $status);
        echo "<tr><td>" . $User . "</td>";
        echo "<td nowrap=\"nowrap\">" . $data[ip] . $c_flag . "</td>";
        echo "<td width=\"100%\">" . $data[browser] . "</td></tr>";
        // GeoIP Country flags initialization
        unset($User);
        unset($data[ip]);
        unset($data[country_code]);
        unset($data[country_name]);
        unset($c_flag);
    }
    // GeoIP mode for country flags
    #if(isset($gi) && $gi != "") geoip_close($gi);
    #if(isset($gi6) && $gi6 != "") geoip_close($gi6);
    ?>
</table>
示例#10
0
文件: user.php 项目: visavi/rotorcms4
 ############################################################################################
 case 'index':
     if ($data = user($uz)) {
         show_title(user_avatars($uz) . nickname($uz), user_visit($uz));
         $config['newtitle'] = 'Анкета пользователя ' . nickname($data['users_login']);
         if ($data['users_confirmreg'] == 1) {
             echo '<b><span style="color:#ff0000">Внимание, аккаунт требует подтверждение регистрации!</span></b><br />';
         }
         if ($data['users_ban'] == 1 && $data['users_timeban'] > SITETIME) {
             echo '<div class="form">';
             echo '<b><span style="color:#ff0000">Внимание, юзер находится в бане!</span></b><br />';
             echo 'До окончания бана осталось ' . formattime($data['users_timeban'] - SITETIME) . '<br />';
             echo 'Причина: ' . bb_code($data['users_reasonban']) . '</div>';
         }
         if ($data['users_level'] >= 101 && $data['users_level'] <= 105) {
             echo '<div class="info">Должность: <b>' . user_status($data['users_level']) . '</b></div>';
         }
         if (!empty($data['users_picture']) && file_exists(BASEDIR . '/upload/photos/' . $data['users_picture'])) {
             echo '<a class="pull-right" href="/upload/photos/' . $data['users_picture'] . '">';
             echo resize_image('upload/photos/', $data['users_picture'], $config['previewsize'], array('alt' => nickname($data['users_login']), 'class' => 'img-responsive img-rounded')) . '</a>';
         } else {
             echo '<img src="/images/img/photo.jpg" alt="Фото" class="pull-right img-responsive img-rounded" />';
         }
         echo 'Cтатус: <b><a href="statusfaq.php">' . user_title($data['users_login']) . '</a></b><br />';
         echo user_gender($data['users_login']) . 'Пол: ';
         echo $data['users_gender'] == 1 ? 'Мужской <br />' : 'Женский<br />';
         echo 'Логин: <b>' . $data['users_login'] . '</b><br />';
         if (!empty($data['users_nickname'])) {
             echo 'Ник: <b>' . $data['users_nickname'] . '</b><br />';
         }
         if (!empty($data['users_name'])) {
示例#11
0
#            Skype  :  vantuzilla             #
#---------------------------------------------#
require_once '../includes/start.php';
require_once '../includes/functions.php';
require_once '../includes/header.php';
include_once '../themes/header.php';
show_title('Администрация сайта');
############################################################################################
##                                     Вывод администрации                                ##
############################################################################################
$queryadmin = DB::run()->query("SELECT `users_login`, `users_level` FROM `users` WHERE `users_level`>=? AND `users_level`<=?;", array(101, 105));
$arradmin = $queryadmin->fetchAll();
$total = count($arradmin);
if ($total > 0) {
    foreach ($arradmin as $value) {
        echo user_gender($value['users_login']) . ' <b>' . profile($value['users_login']) . '</b>  (' . user_status($value['users_level']) . ') ' . user_online($value['users_login']) . '<br />';
    }
    echo '<br />Всего в администрации: <b>' . $total . '</b><br /><br />';
    ############################################################################################
    ##                                     Быстрая почта                                      ##
    ############################################################################################
    if (is_user()) {
        echo '<big><b>Быстрая почта</b></big><br /><br />';
        echo '<div class="form">';
        echo '<form method="post" action="private.php?act=send&amp;uid=' . $_SESSION['token'] . '">';
        echo 'Выберите адресат:<br /><select name="uz">';
        foreach ($arradmin as $value) {
            echo '<option value="' . $value['users_login'] . '"> ' . nickname($value['users_login']) . ' </option>';
        }
        echo '</select><br />';
        echo 'Сообщение:<br />';
示例#12
0
function saction_SetUserStatus()
{
    global $dbHolidays, $dbUsers, $CONFIG, $crlf;
    // Find users with holidays today who don't have correct status
    $success = TRUE;
    $startdate = mktime(0, 0, 0, date('m'), date('d'), date('Y'));
    $enddate = mktime(23, 59, 59, date('m'), date('d'), date('Y'));
    $sql = "SELECT * FROM `{$dbHolidays}` ";
    $sql .= "WHERE `date` >= FROM_UNIXTIME({$startdate}) AND `date` < ";
    $sql .= "FROM_UNIXTIME({$enddate}) AND (type >='" . HOL_HOLIDAY . "' AND type <= " . HOL_FREE . ") ";
    $sql .= "AND (approved=" . HOL_APPROVAL_GRANTED . " OR approved=" . HOL_APPROVAL_DENIED;
    $sql .= " OR approved=" . HOL_APPROVAL_GRANTED_ARCHIVED;
    $sql .= " OR approved=" . HOL_APPROVAL_DENIED_ARCHIVED . ")";
    $result = mysql_query($sql);
    if (mysql_error()) {
        $success = FALSE;
        trigger_error(mysql_error(), E_USER_WARNING);
    }
    while ($huser = mysql_fetch_object($result)) {
        if ($huser->length == 'day' or $huser->length == 'am' and date('H') < 12 or $huser->length == 'pm' and date('H') > 12) {
            $currentstatus = user_status($huser->userid);
            $newstatus = $currentstatus;
            // Only enabled users
            if ($currentstatus > 0) {
                if ($huser->type == HOL_HOLIDAY and $currentstatus != USERSTATUS_ON_HOLIDAY) {
                    $newstatus = USERSTATUS_ON_HOLIDAY;
                }
                if ($huser->type == HOL_SICKNESS and $currentstatus != USERSTATUS_ABSENT_SICK) {
                    $newstatus = USERSTATUS_ABSENT_SICK;
                }
                if ($huser->type == HOL_WORKING_AWAY and ($currentstatus != USERSTATUS_WORKING_FROM_HOME and $currentstatus != USERSTATUS_WORKING_AWAY)) {
                    $newstatus = USERSTATUS_WORKING_AWAY;
                }
                if ($huser->type == HOL_TRAINING and $currentstatus != USERSTATUS_ON_TRAINING_COURSE) {
                    $newstatus = USERSTATUS_ON_TRAINING_COURSE;
                }
                if ($huser->type == HOL_FREE and ($currentstatus != USERSTATUS_NOT_IN_OFFICE and $currentstatus != USERSTATUS_ABSENT_SICK)) {
                    $newstatus = USERSTATUS_ABSENT_SICK;
                }
                // Compassionate
            }
            if ($newstatus != $currentstatus) {
                $accepting = '';
                switch ($newstatus) {
                    case USERSTATUS_IN_OFFICE:
                        $accepting = 'Yes';
                        break;
                    case USERSTATUS_NOT_IN_OFFICE:
                        $accepting = 'No';
                        break;
                    case USERSTATUS_IN_MEETING:
                        // don't change
                        $accepting = '';
                        break;
                    case USERSTATUS_AT_LUNCH:
                        $accepting = '';
                        break;
                    case USERSTATUS_ON_HOLIDAY:
                        $accepting = 'No';
                        break;
                    case USERSTATUS_WORKING_FROM_HOME:
                        $accepting = 'Yes';
                        break;
                    case USERSTATUS_ON_TRAINING_COURSE:
                        $accepting = 'No';
                        break;
                    case USERSTATUS_ABSENT_SICK:
                        $accepting = ' No';
                        break;
                    case USERSTATUS_WORKING_AWAY:
                        // don't change
                        $accepting = '';
                        break;
                    default:
                        $accepting = '';
                }
                $usql = "UPDATE `{$dbUsers}` SET status='{$newstatus}'";
                if ($accepting != '') {
                    $usql .= ", accepting='{$accepting}'";
                }
                $usql .= " WHERE id='{$huser->userid}' LIMIT 1";
                if ($accepting == 'No') {
                    incident_backup_switchover($huser->userid, 'no');
                }
                if ($CONFIG['debug']) {
                    //debug_log(user_realname($huser->userid).': '.userstatus_name($currentstatus).' -> '.userstatus_name($newstatus));
                    //debug_log($usql);
                }
                mysql_query($usql);
                if (mysql_error()) {
                    $success = FALSE;
                    trigger_error(mysql_error(), E_USER_WARNING);
                }
            }
        }
    }
    // Find users who are set away but have no entry in the holiday calendar
    $sql = "SELECT * FROM `{$dbUsers}` WHERE status=" . USERSTATUS_ON_HOLIDAY . " OR ";
    $sql .= "status=" . USERSTATUS_ON_TRAINING_COURSE . " OR ";
    $sql .= "status=" . USERSTATUS_ABSENT_SICK . " OR status=" . USERSTATUS_WORKING_AWAY . " ";
    $result = mysql_query($sql);
    if (mysql_error()) {
        $success = FALSE;
        trigger_error(mysql_error(), E_USER_WARNING);
    }
    return $success;
}
function display_connected($Private, $Full, $NU, $String1, $String2, $DbLink, $Charset)
{
    global $L;
    $List = "";
    global $DefaultDispChatRooms, $res_init, $disp_note, $status;
    if ($NU > 0) {
        echo $String1;
        if ($Full) {
            // GeoIP mode for country flags
            if (C_USE_FLAGS && ($status == "a" || $status == "t" || $status == "m" || C_SHOW_FLAGS)) {
                if (!class_exists("GeoIP")) {
                    include "plugins/countryflags/geoip.inc";
                }
                if (!isset($gi)) {
                    $gi = geoip_open("plugins/countryflags/GeoIP.dat", GEOIP_STANDARD);
                }
            }
            // Restricted rooms mod by Ciprian
            while (list($User, $Latin1, $Room, $RTime, $StatusU, $IP, $COUNTRY_CODE, $COUNTRY_NAME) = $DbLink->next_record()) {
                if (is_array($DefaultDispChatRooms) && in_array($Room . " [R]", $DefaultDispChatRooms)) {
                    $Room .= " [" . $res_init . "]";
                    $disp_note = 1;
                }
                if ($Latin1) {
                    $User = htmlentities($User);
                }
                if ($status == "a" || $status == "t") {
                    $ghost = 0;
                    $superghost = 0;
                    $sghosts = str_replace("'", "", C_SPECIAL_GHOSTS);
                    $sghosts = str_replace(" AND username != ", ",", $sghosts);
                    if ($sghosts != "" && ghosts_in($User, $sghosts, $Charset) || C_HIDE_MODERS && $StatusU == "m" || C_HIDE_ADMINS && ($StatusU == "a" || $StatusU == "t")) {
                        if ($StatusU == "a" || $StatusU == "t") {
                            $superghost = 1;
                        } else {
                            $ghost = 1;
                        }
                    }
                }
                $user_not = $User;
                $User = user_status($User, $StatusU, $ghost, $superghost, $status);
                $RTime = strftime(L_SHORT_DATETIME, $RTime + C_TMZ_OFFSET * 60 * 60);
                if (stristr(PHP_OS, 'win') && (strstr($L, "chinese") || strstr($L, "korean") || strstr($L, "japanese"))) {
                    $RTime = str_replace(" ", "", $RTime);
                }
                // GeoIP mode for country flags
                $show_ip = "";
                if (C_USE_FLAGS && ($status == "a" || $status == "t" || $status == "m" || C_SHOW_FLAGS) && $user_not != C_BOT_NAME) {
                    if (!isset($COUNTRY_CODE) || $COUNTRY_CODE == "") {
                        $COUNTRY_CODE = geoip_country_code_by_addr($gi, ltrim($IP, "p"));
                        // GeoIP mode for country flags
                        if (empty($COUNTRY_CODE)) {
                            $COUNTRY_CODE = "LAN";
                            $COUNTRY_NAME = "Other/LAN";
                        }
                        if ($COUNTRY_CODE != "LAN") {
                            $COUNTRY_NAME = $gi->GEOIP_COUNTRY_NAMES[$gi->GEOIP_COUNTRY_CODE_TO_NUMBER[$COUNTRY_CODE]];
                        }
                        if ($PROXY || substr($IP, 0, 1) == "p") {
                            $COUNTRY_NAME .= " (Proxy Server)";
                        }
                    }
                    $c_flag = "&nbsp;<img src=\"./plugins/countryflags/flags/" . strtolower($COUNTRY_CODE) . ".gif\" alt=\"" . $COUNTRY_NAME . "\" title=\"" . $COUNTRY_NAME . "\" border=\"0\">&nbsp;(" . $COUNTRY_CODE . ")";
                    if ($status == "a" || $status == "t") {
                        $show_ip = "</td><td nowrap=\"nowrap\">" . $IP . $c_flag;
                    } elseif (C_SHOW_FLAGS || $status == "m") {
                        $show_ip = "</td><td nowrap=\"nowrap\">" . $c_flag;
                    }
                }
                $List .= "<tr><td nowrap=\"nowrap\">" . $User . "</td><td nowrap=\"nowrap\">" . $Room . "</td><td nowrap=\"nowrap\">" . L_LURKING_4 . " " . $RTime . $show_ip;
                // GeoIP Country flags initialization
                unset($User);
                unset($Room);
                unset($RTime);
                unset($IP);
                unset($COUNTRY_CODE);
                unset($COUNTRY_NAME);
                unset($c_flag);
            }
            echo $List;
            // GeoIP mode for country flags
            #			if(isset($gi) && $gi != "") geoip_close($gi);
            #			if(isset($gi6) && $gi6 != "") geoip_close($gi6);
        }
    } else {
        echo $String2;
    }
    $DbLink->clean_results();
    $DbLink->close();
}
示例#14
0
         $backupname = user_realname($backupid, TRUE);
         $reason = urlencode(trim("{$strPreviousIncidentOwner} ({$username}) {$userstatus}  {$usermessage}"));
         $rhtml .= "<td>";
         if ($backupid >= 1) {
             $rhtml .= "<a href=\"javascript:wt_winpopup('incident_reassign.php?id={$assign->id}&amp;reason={$reason}&amp;backupid={$backupid}&amp;asktemp=temporary&amp;popup=yes','mini');\" title='{$strReassignTo} {$backupname}'>{$strAssignToBackup}</a> | ";
         }
         $rhtml .= "<a href=\"javascript:wt_winpopup('incident_reassign.php?id={$assign->id}&amp;reason={$reason}&amp;asktemp=temporary&amp;popup=yes','mini');\" title='{$strReassign}'>{$strAssignToOther}</a> | <a href='set_user_status.php?mode=deleteassign&amp;incidentid={$assign->incidentid}&amp;originalowner={$assign->originalowner}' title='{$strIgnoreThisAndDelete}'>{$strIgnore}</a></td>";
         $rhtml .= "</tr>\n";
     } elseif ($assign->owner != $assign->originalowner and $useraccepting == 'yes') {
         $show = TRUE;
         // display a row to assign the incident back to the original owner
         $rhtml .= "<tr class='shade2'>";
         $rhtml .= "<td>" . ldate($CONFIG['dateformat_datetime'], $assign->lastupdated) . "</td>";
         $rhtml .= "<td>" . user_realname($assign->owner, TRUE) . "</td>";
         $rhtml .= "<td>[<a href=\"javascript:wt_winpopup('incident_details.php?id={$assign->id}&amp;popup=yes', 'mini')\">{$assign->id}</a>] {$assign->title}</td>";
         $userstatus = user_status($assign->originalowner);
         $userstatusname = userstatus_name($userstatus);
         $origstatus = userstatus_name($assign->userstatus);
         $usermessage = user_message($assign->originalowner);
         $username = user_realname($assign->owner, TRUE);
         $rhtml .= "<td>" . sprintf($strOwnerXAcctingAgain, $userstatusname) . "<br />{$usermessage}</td>";
         $originalname = user_realname($assign->originalowner, TRUE);
         $reason = urlencode(trim("{$originalname} is now accepting incidents again. Previous status {$origstatus} and not accepting."));
         // FIXME i18n
         $rhtml .= "<td>";
         $rhtml .= "<a href=\"javascript:wt_winpopup('incident_reassign.php?id={$assign->id}&amp;reason={$reason}&amp;originalid={$assign->originalowner}&amp;popup=yes','mini');\" title='{$strReassignTo} {$originalname}'>{$strReturnToOriginalOwner}</a> | ";
         $rhtml .= "<a href=\"javascript:wt_winpopup('incident_reassign.php?id={$assign->id}&amp;reason={$reason}&amp;asktemp=temporary&amp;popup=yes','mini');\" title='{$strAssignToOther}'>{$strAssignToOther}</a> | <a href='set_user_status.php?mode=deleteassign&amp;incidentid={$assign->incidentid}&amp;originalowner={$assign->originalowner}' title='{$strIgnoreThisAndDelete}'>{$strIgnore}</a></td>";
         $rhtml .= "</tr>\n";
     }
 }
 $rhtml .= "</table>\n";
示例#15
0
         echo '--------------------------<br />';
         echo '<img src="../images/img/act.gif" alt="image" /> <a href="setting.php?' . SID . '">Настройки системы</a><br />';
         echo '<img src="../images/img/act.gif" alt="image" /> <a href="backup.php?' . SID . '">Backup-панель</a><br />';
         echo '<img src="../images/img/act.gif" alt="image" /> <a href="delusers.php?' . SID . '">Чистка юзеров</a><br />';
         echo '<img src="../images/img/act.gif" alt="image" /> <a href="subscribe.php?' . SID . '">Управление подписчиками</a><br />';
         echo '<img src="../images/img/act.gif" alt="image" /> <a href="systems.php?' . SID . '">Проверить систему</a><br />';
         echo '<img src="../images/img/act.gif" alt="image" /> <a href="checker.php?' . SID . '">Сканировать систему</a> (' . stats_checker() . ')<br />';
         if ($log == $config['nickname']) {
             echo '<img src="../images/img/act.gif" alt="image" /> <a href="files.php?' . SID . '">Редактирование файлов</a><br />';
         }
     }
     //----------------------------------------------------------------------//
     if (file_exists(DATADIR . 'profil/' . $config['nickname'] . '.prof')) {
         $adminprofil = reading_profil($config['nickname']);
         if ($adminprofil[7] != 101) {
             echo '<br /><div class="b"><b><span style="color:#ff0000">Внимание!!! Профиль суперадмина не имеет достаточных прав</span></b><br />Логин который вписан в config.dat имеет уровень доступа <b>' . (int) $adminprofil[7] . ' - ' . user_status($adminprofil[7]) . '</b></div>';
         }
     } else {
         echo '<br /><div class="b"><b><span style="color:#ff0000">Внимание!!! Отсутствует профиль суперадмина</span></b><br />Логин который вписан в config.dat <b>' . check($config['nickname']) . '</b> не задействован на сайте</div>';
     }
     if (file_exists(BASEDIR . "INSTALL.php") && $config['nickname'] != "") {
         echo '<br /><div class="b"><b><span style="color:#ff0000">Внимание!!! Необходимо удалить файл INSTALL.php</span></b><br />';
         echo 'Удалите этот файл прямо <u><a href="index.php?action=delinstall&amp;' . SID . '">сейчас</a></u></div>';
     }
 }
 ############################################################################################
 ##                                     Удаление INSTALL                                   ##
 ############################################################################################
 if ($action == "delinstall") {
     if (file_exists(BASEDIR . "INSTALL.php")) {
         if (unlink(BASEDIR . "INSTALL.php")) {
示例#16
0
function display_connected($Private, $Full, $String1, $String2, $Charset, $gi)
{
    $List = "";
    global $ordquery, $DbLink, $DefaultDispChatRooms, $res_init, $disp_note, $L;
    if ($Private) {
        $query = "SELECT DISTINCT u.username, u.latin1, u.room, u.r_time, u.ip, u.status, u.country_code, u.country_name FROM " . C_USR_TBL . " u ORDER BY {$ordquery}";
    } else {
        $query = "SELECT DISTINCT u.username, u.latin1, u.room, u.r_time, u.ip, u.status, u.country_code, u.country_name FROM " . C_USR_TBL . " u, " . C_MSG_TBL . " m WHERE u.room = m.room AND m.type = 1 ORDER BY {$ordquery}";
    }
    $DbLink->query($query);
    $NbUsers = $DbLink->num_rows();
    // Ghost Control mod by Ciprian
    if ($Full && $NbUsers >= 1) {
        $sghosts = "";
        $sghosts = str_replace("'", "", C_SPECIAL_GHOSTS);
        $sghosts = str_replace(" AND username != ", ",", $sghosts);
        if ($NbUsers == 1) {
            echo $String1 . "<br />";
        } else {
            echo $NbUsers . " " . NB_USERS_IN . "<br />";
        }
        while (list($UserU, $Latin1U, $RoomU, $RTime, $IP, $StatusU, $COUNTRY_CODE, $COUNTRY_NAME) = $DbLink->next_record()) {
            if (is_array($DefaultDispChatRooms) && in_array($RoomU . " [R]", $DefaultDispChatRooms)) {
                $RoomU .= " [" . $res_init . "]";
                $disp_note = 1;
            }
            if ($Latin1U) {
                $UserU = htmlentities($UserU);
            }
            $ghost = 0;
            $superghost = 0;
            if ($sghosts != "" && ghosts_in($UserU, $sghosts, $Charset) || C_HIDE_MODERS && $StatusU == "m" || C_HIDE_ADMINS && ($StatusU == "a" || $StatusU == "t")) {
                if ($StatusU == "a" || $StatusU == "t") {
                    $superghost = 1;
                } else {
                    $ghost = 1;
                }
            }
            $user_not = $UserU;
            $UserU = user_status($UserU, $StatusU, $ghost, $superghost);
            $RTime = strftime(L_SHORT_DATETIME, $RTime + C_TMZ_OFFSET * 60 * 60);
            if (stristr(PHP_OS, 'win') && (strstr($L, "chinese") || strstr($L, "korean") || strstr($L, "japanese"))) {
                $RTime = str_replace(" ", "", $RTime);
            }
            // GeoIP mode for country flags
            if (C_USE_FLAGS) {
                if ((!isset($COUNTRY_CODE) || $COUNTRY_CODE == "") && $user_not != C_BOT_NAME && $user_not != C_QUOTE_NAME) {
                    $COUNTRY_CODE = geoip_country_code_by_addr($gi, ltrim($IP, "p"));
                    if (empty($COUNTRY_CODE)) {
                        $COUNTRY_CODE = "LAN";
                        $COUNTRY_NAME = "Other/LAN";
                    }
                    if ($COUNTRY_CODE != "LAN") {
                        $COUNTRY_NAME = $gi->GEOIP_COUNTRY_NAMES[$gi->GEOIP_COUNTRY_CODE_TO_NUMBER[$COUNTRY_CODE]];
                    }
                    if ($PROXY || substr($IP, 0, 1) == "p") {
                        $COUNTRY_NAME .= " (Proxy Server)";
                    }
                }
                $c_flag = "&nbsp;<img src=\"./plugins/countryflags/flags/" . strtolower($COUNTRY_CODE) . ".gif\" alt=\"" . $COUNTRY_NAME . "\" title=\"" . $COUNTRY_NAME . "\" border=\"0\">&nbsp;(" . $COUNTRY_CODE . ")";
            }
            $List .= "<tr><td>" . $UserU . "</td><td>" . $RoomU . "</td><td>" . L_LURKING_4 . " " . $RTime . ($user_not != C_BOT_NAME && $user_not != C_QUOTE_NAME ? "</td><td>" . $IP . (isset($c_flag) ? $c_flag : "") : "");
            // GeoIP Country flags initialization
            unset($IP);
            unset($COUNTRY_CODE);
            unset($COUNTRY_NAME);
            unset($c_flag);
        }
        echo $List;
        unset($List);
    } elseif (!$Full) {
        echo $NbUsers . " " . $String1;
    } else {
        echo $String2;
    }
    $DbLink->clean_results();
}
@mysql_close();
?>
<hr /><table border=1 cellspacing=1 cellpadding=1 class=table><tr>
	<td><?php 
echo L_CUR_5;
?>
</td>
	<td align="center" style="vertical-align:middle">
	<font size="4" color="#6666ff"><b>&nbsp <?php 
echo $online_users;
?>
 &nbsp</font></b></td>
</tr></table>
<?php 
if ($online_users && ($status == "a" || $status == "t")) {
    ?>
<table border=1 width=98% cellspacing=0 cellpadding=1 class="table">
<?php 
    while ($data = @mysql_fetch_array($result)) {
        if ($data[username] == "Guest") {
            $data[username] = L_LURKING_5;
        }
        $User = user_status($data[username], $data[status]);
        echo "<tr><td>" . $User . "</td>";
        echo "<td>" . $data[ip] . "</td>";
        echo "<td>" . $data[browser] . "</td></tr>";
    }
    ?>
</table>
<?php 
}
示例#18
0
        echo "Logged in as {$first_name}.</p>";
    } else {
        global $not_logged_in;
        echo $not_logged_in;
    }
}
?>
<script src="/js/lib/bootstrap-dropdown.js"></script>
<script src="/js/common/navbar.js"></script>
<div class="navbar navbar-inverse navbar-fixed-top">
  <div class="navbar-inner">
    <div class="container">
      <button class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="brand" href="/index.php">Easy Ride</a>
      <div class="nav-collapse collapse">
        <ul class="nav">
          <?php 
render_nav_bar();
?>
        </ul>
         <?php 
user_status();
?>
      </div>
    </div>
  </div>
</div>
示例#19
0
文件: index.php 项目: Qbuer/pt-wechat
            $operation = SEARCH;
        }
        break;
}
if (bind_check()) {
    if ($operation == BIND) {
        $text = ALREADY_BINDED;
    } else {
        if ($operation == HOT) {
            $text = search(NULL, HOT);
        } else {
            if ($operation == NEWLY) {
                $text = search(NULL, NEWLY);
            } else {
                if ($operation == STATUS) {
                    $text = user_status();
                } else {
                    if ($operation == SEARCH) {
                        $text = search($keyword, NULL);
                    } else {
                        $text = HELP;
                    }
                }
            }
        }
    }
} else {
    $text = user_bind();
}
//echo $text;
$weObj->text($text);
示例#20
0
    }
    ?>

	<?php 
    if ($admin = user($config['nickname'])) {
        ?>
		<?php 
        if ($admin['users_level'] != 101) {
            ?>

			<br /><div class="b"><b><span style="color:#ff0000">Внимание!!! Cуперадминистратор не имеет достаточных прав!</span></b><br />
			Профилю назначен уровень доступа <b><?php 
            echo $admin['users_level'];
            ?>
 - <?php 
            echo user_status($admin['users_level']);
            ?>
</b></div>

		<?php 
        }
        ?>

	<?php 
    } else {
        ?>

		<br /><div class="b"><b><span style="color:#ff0000">Внимание!!! Отсутствует профиль суперадмина</span></b><br />
		Профиль администратора <b><?php 
        echo $config['nickname'];
        ?>
示例#21
0
 function datatable()
 {
     $this->datatables->select('id,email,active,first_name,last_name,phone')->unset_column('id')->add_column('actions', get_buttons('$1', 'user'), 'id')->add_column('status', user_status('$1', '$1'), 'id, active')->add_column('groups', '$1', 'id')->from('users');
     echo $this->datatables->generate();
 }
示例#22
0
function display_connected($Private, $Full, $String1, $String2, $Charset)
{
    $List = "";
    global $ordquery, $DbLink, $DefaultDispChatRooms, $res_init, $disp_note, $L;
    if ($Private) {
        $query = "SELECT DISTINCT u.username, u.latin1, u.room, u.r_time, u.ip, u.status FROM " . C_USR_TBL . " u ORDER BY {$ordquery}";
    } else {
        $query = "SELECT DISTINCT u.username, u.latin1, u.room, u.r_time, u.ip, u.status FROM " . C_USR_TBL . " u, " . C_MSG_TBL . " m WHERE u.room = m.room AND m.type = 1 ORDER BY {$ordquery}";
    }
    $DbLink->query($query);
    $NbUsers = $DbLink->num_rows();
    // Ghost Control mod by Ciprian
    if ($NbUsers == 1) {
        if ($Full) {
            $sghosts = "";
            $sghosts = str_replace("'", "", C_SPECIAL_GHOSTS);
            $sghosts = str_replace(" AND username != ", ",", $sghosts);
            echo $String1 . "<br />";
            while (list($UserU, $Latin1U, $RoomU, $RTime, $IP, $Status) = $DbLink->next_record()) {
                if (is_array($DefaultDispChatRooms) && in_array($RoomU . " [R]", $DefaultDispChatRooms)) {
                    $RoomU .= " [" . $res_init . "]";
                    $disp_note = 1;
                }
                if ($Latin1) {
                    $UserU = htmlentities($UserU);
                }
                $ghost = 0;
                $superghost = 0;
                if ($sghosts != "" && ghosts_in($UserU, $sghosts, $Charset) || C_HIDE_MODERS && $Status == "m" || C_HIDE_ADMINS && ($Status == "a" || $Status == "t")) {
                    if ($Status == "a" || $Status == "t") {
                        $superghost = 1;
                    } else {
                        $ghost = 1;
                    }
                }
                $UserU = user_status($UserU, $Status, $ghost, $superghost);
                $RTime = strftime(L_SHORT_DATETIME, $RTime + C_TMZ_OFFSET * 60 * 60);
                if (stristr(PHP_OS, 'win') && (strstr($L, "chinese") || strstr($L, "korean") || strstr($L, "japanese"))) {
                    $RTime = str_replace(" ", "", $RTime);
                }
                $List .= "<tr><td>" . $UserU . "</td><td>" . $RoomU . "</td><td>" . L_LURKING_4 . " " . $RTime . "</td><td>" . $IP;
            }
            echo $List;
        } else {
            echo $NbUsers . " " . $String1;
        }
    } elseif ($NbUsers > 1) {
        if ($Full) {
            $sghosts = "";
            $sghosts = str_replace("'", "", C_SPECIAL_GHOSTS);
            $sghosts = str_replace(" AND username != ", ",", $sghosts);
            echo $NbUsers . " " . NB_USERS_IN . "<br />";
            while (list($UserU, $Latin1U, $RoomU, $RTime, $IP, $Status) = $DbLink->next_record()) {
                if (is_array($DefaultDispChatRooms) && in_array($RoomU . " [R]", $DefaultDispChatRooms)) {
                    $RoomU .= " [" . $res_init . "]";
                    $disp_note = 1;
                }
                if ($Latin1U) {
                    $UserU = htmlentities($UserU);
                }
                $ghost = 0;
                $superghost = 0;
                if ($sghosts != "" && ghosts_in($UserU, $sghosts, $Charset) || C_HIDE_MODERS && $Status == "m" || C_HIDE_ADMINS && ($Status == "a" || $Status == "t")) {
                    if ($Status == "a" || $Status == "t") {
                        $superghost = 1;
                    } else {
                        $ghost = 1;
                    }
                }
                $UserU = user_status($UserU, $Status, $ghost, $superghost);
                $RTime = date("d-M, H:i:s", $RTime + C_TMZ_OFFSET * 60 * 60);
                $List .= "<tr><td>" . $UserU . "</td><td>" . $RoomU . "</td><td>" . L_LURKING_4 . " " . $RTime . "</td><td>" . $IP . "";
            }
            echo $List;
        } else {
            echo $NbUsers . " " . $String1;
        }
        unset($List);
    } else {
        echo $String2;
    }
    $DbLink->clean_results();
}