}
    if (!checkdate($_GET["m2"], $_GET["d2"], $_GET["y2"])) {
        $date_is_valid = 0;
    }
    $start_ts = mktime(0, 0, 0, $_GET["m"], $_GET["d"], $_GET["y"]);
    $end_ts = mktime(23, 59, 59, $_GET["m2"], $_GET["d2"], $_GET["y2"]);
    $end_ts_db = $end_ts;
} else {
    $today_noon = mktime(12, 0, 0, date("m"), date("d"), date("Y"));
    $x_days_ago = $today_noon - 86400 * $X_DAYS;
    $x_days_ago_start = mktime(0, 0, 1, date("m", $x_days_ago), date("d", $x_days_ago), date("Y", $x_days_ago)) - 1;
    $start_ts = $x_days_ago_start;
    $end_ts = time();
    $end_ts_db = "now()::abstime::int4";
}
$res = pg_safe_exec("select channellog.ts as ts, channels.name as name, channellog.message as message from channellog,channels where channellog.ts>=" . $start_ts . " AND channellog.ts<=" . $end_ts . " AND channellog.event=11 and channellog.channelid=channels.id and channels.registered_ts>0 order by channellog.ts desc");
$count = pg_numrows($res);
echo "<TABLE border=1 WIDTH=100% cellspacing=0 cellpadding=2 BGCOLOR=#" . $cTheme->table_bgcolor . ">";
echo "<tr><td colspan=4><H2>Idled Channels Report (" . BOT_NAME . " parts) ";
if ($_GET["ok"] == 1) {
    echo "(custom)</h2> <a href=\"idledchannels.php\">View last " . $X_DAYS . " days</a>";
} else {
    echo "(last " . $X_DAYS . " days)</h2>";
}
echo "<br>";
echo "<form name=evtdate method=get>\n";
echo "Showing between ";
echo "<b><select name=m>";
for ($x = 1; $x <= 12; $x++) {
    echo "<option ";
    if (date("m", $start_ts) == $x) {
Esempio n. 2
0
 echo "Found <b>{$count}</b> record{$c_addy} matching your query :";
 echo "<br><br>\n";
 echo "<table border=1 cellspacing=0 cellpadding=2 bgcolor=#" . $cTheme->table_bgcolor . ">\n";
 echo "<tr bgcolor=#" . $cTheme->table_headcolor . ">\n";
 if ($admin >= $min_lvl || $nrw_lvl > 0) {
     echo "<td></td>";
 }
 echo "<td><font color=#" . $cTheme->table_headtextcolor . ">user_name</font></td><td><font color=#" . $cTheme->table_headtextcolor . ">email-in-record</font></td><td><font color=#" . $cTheme->table_headtextcolor . ">created_ts</font></td><td><font color=#" . $cTheme->table_headtextcolor . ">set_by</font></td><td><font color=#" . $cTheme->table_headtextcolor . ">reason</font></td><td><font color=#" . $cTheme->table_headtextcolor . ">id</font></td>\n";
 echo "</tr>\n";
 $zetypes[0] = "<font color=#" . $cTheme->main_warnmsg . ">N/A</font>";
 $zetypes[1] = "Non-support";
 $zetypes[2] = "Abuse";
 $zetypes[3] = "Elective";
 $zetypes[4] = "Username Fraud";
 $current_time = time();
 $res1 = pg_safe_exec($q_res);
 for ($x = 0; $x < $count; $x++) {
     $tmp_res = pg_fetch_object($res1, $x);
     echo "<tr>\n";
     if ($admin >= $min_lvl || $nrw_lvl > 0) {
         echo "<td><a href=\"remove_f.php?id=" . $tmp_res->id . "\">Delete</a></td>";
     }
     if ($tmp_res->user_name != "") {
         echo "<td>" . $tmp_res->user_name . "</td>";
     } else {
         echo "<td><font color=#" . $cTheme->main_warnmsg . ">N/A</font></td>";
     }
     if ($tmp_res->email != "") {
         echo "<td>" . $tmp_res->email . "</td>";
     } else {
         echo "<td><font color=#" . $cTheme->main_warnmsg . ">N/A</font></td>";
$cTheme = get_theme_info();
/* $Id: confirm_mgrchange.php,v 1.6 2003/01/17 05:47:16 nighty Exp $ */
if ($ID != "" && strlen($ID) <= 128) {
    std_connect();
    pg_safe_exec("delete from pending_mgrchange where expiration<now()::abstime::int4 AND confirmed='0'");
    $res = pg_safe_exec("select * from pending_mgrchange where crc='{$ID}' AND expiration>=now()::abstime::int4 AND confirmed='0'");
    if (pg_numrows($res) == 0) {
        std_theme_styles(1);
        std_theme_body("../");
        echo "<h1>Error</h1> The URL entered is not valid.  Please check it ";
        echo "and make sure it is correct</h1><a href=\"confirm_mgrchange.php\">Try again.</a>";
        echo "</body></html>";
        exit;
    }
    pg_safe_exec("UPDATE pending_mgrchange SET confirmed='1' WHERE crc='{$ID}'");
    $toto = pg_safe_exec("SELECT channel_id FROM pending_mgrchange WHERE crc='{$ID}'");
    $tutu = pg_fetch_object($toto, 0);
    //	log_channel($tutu->channel_id,12,"Manager Change Request");
    echo "<html><head><title>Successful Confirmation</title>";
    std_theme_styles();
    echo "</head>";
    std_theme_body("../");
    echo "<h1>Successfull Confirmation!</h1>";
    echo "You have confirmed your 'Manager Change Request' for channel<br>\n";
    echo "<center><table><tr><td><h1>" . $nmail . "</h1></td></tr></table></center>";
    echo "Your request will be reviewed by CService Admins, Please allow 3-5 days for your request to be processed.<br><br>";
    echo "You may now proceed to the <a href=\"../index.php\" target=_top>Main page</a>.<br>";
    echo "</body></html>";
    exit;
} else {
    echo "<html><head><title>Manager Change Confirmation</title>";
Esempio n. 4
0
             } else {
                 echo "<br><br><b>For some strange reason, we couldn't resolve this ticket, please contact a Site Administrator.</b><br><br>";
                 echo "<a href=\"admin.php\">Back to Complaint Admin</a><br><br>\n";
             }
             break;
         case 'delete':
             $q = "UPDATE complaints SET status=99,created_crc='',crc_expiration=(now()::abstime::int4+(86400*15)) WHERE id='" . (int) $da_id . "' AND ticket_number='" . $_GET["ID"] . "'";
             $q2 = "INSERT INTO complaints_threads (complaint_ref,reply_by,reply_ts,reply_text,actions_text,in_reply_to) VALUES ('" . (int) $da_id . "'," . (int) $user_id . ",now()::abstime::int4,'** TICKET REMOVED/DELETED **','',0)";
             $q3 = "DELETE FROM complaints_reference WHERE complaints_ref='" . (int) $da_id . "'";
             $r = pg_safe_exec($q);
             $updated = 0;
             if ($r) {
                 $r2 = pg_safe_exec($q2);
                 if ($r2) {
                     $updated = 1;
                     pg_safe_exec($q3);
                     if ($daobj->from_id > 0) {
                         log_user($daobj->from_id, 12, "Ticket-number: " . $_GET["ID"] . " (removed by admin)");
                     }
                 }
             }
             if ($updated) {
                 echo "<br><br><b>This complaint ticket has been removed. The user is NOT being notified of this fact.</b><br><br>";
                 echo "<a href=\"admin.php\">Back to Complaint Admin</a><br><br>\n";
             } else {
                 echo "<br><br><b>For some strange reason, we couldn't remove this ticket, please contact a Site Administrator.</b><br><br>";
                 echo "<a href=\"admin.php\">Back to Complaint Admin</a><br><br>\n";
             }
             break;
     }
 } else {
Esempio n. 5
0
if ($user_id > 0) {
    $admin = std_admin();
} else {
    $admin = 0;
}
$cTheme = get_theme_info();
std_theme_styles(1);
std_theme_body();
pg_safe_exec("DELETE FROM complaints WHERE status=0 AND crc_expiration<now()::abstime::int4");
$r = @pg_safe_exec("SELECT id,from_email FROM complaints WHERE created_crc='" . $_GET["ID"] . "' AND status=0 AND crc_expiration>=now()::abstime::int4");
if (!$r) {
    echo "<h2>Invalid ID</h2>";
} else {
    if ($o = pg_fetch_object($r)) {
        $ticket_number = strtoupper($o->id . "-" . substr(md5($o->id . CRC_SALT_0007 . "ticket"), 0, 10));
        pg_safe_exec("UPDATE complaints SET status=1,nicelevel=1,ticket_number='" . $ticket_number . "' WHERE id='" . (int) $o->id . "'");
        echo "<h2>That's it !</h2><br><h3><br>";
        echo "Your complaint has been placed in the work queue and will be processed as soon as possible.<br><br>\n";
        echo "Please allow 3-5 days for processing, You will be re-contacted by e-mail.<br></h3><br><h4><br>\n";
        echo "Your ticket number is <b>" . $ticket_number . "</b>, you can see the status of your complaint by going to :<br>\n";
        $status_url = gen_server_url() . substr($REQUEST_URI, 0, strrpos($REQUEST_URI, "/")) . "/status.php";
        $added_url_s = "?ID=" . $ticket_number;
        echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"status.php" . $added_url_s . "\">" . $status_url . $added_url_s . "</a><br><br>\n";
        echo "You can ABANDON / CLOSE your complaint by going to :<br>\n";
        $close_url = gen_server_url() . substr($REQUEST_URI, 0, strrpos($REQUEST_URI, "/")) . "/ticket.php";
        $added_url_c = "?A=close&ID=" . $ticket_number . "&C=" . md5(CRC_SALT_0005 . $ticket_number . "close");
        echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"ticket.php" . $added_url_c . "\">" . $close_url . $added_url_c . "</a><br><br>\n";
        echo "The " . NETWORK_NAME . " Channel Service Complaint Department Team.<br><br></h4>\n";
        echo "<br><br>";
        $mmsg = "Your complaint has been recorded in our system under the ticket number :\n\n";
        $mmsg .= "\t\t\t" . $ticket_number . "\n\n";
Esempio n. 6
0
 if (count($clistok) > 1) {
     echo "s";
 }
 echo " :<br></h3><h2>\n";
 // display channel list and count in their supporters number of current' app supporters
 for ($c = 0; $c < count($clistok); $c++) {
     unset($res);
     unset($row);
     $csupcount = 0;
     $res = pg_safe_exec("SELECT channels.name,pending.created_ts FROM channels,pending WHERE channels.id='{$clistok[$c]}' AND channels.id=pending.channel_id");
     $row = pg_fetch_object($res, 0);
     $cname = $row->name;
     $ccts = $row->created_ts;
     unset($res);
     unset($row);
     $res = pg_safe_exec("SELECT * FROM supporters WHERE channel_id='{$clistok[$c]}'");
     if (isset($tmpsuplist)) {
         unset($tmpsuplist);
     }
     for ($w = 0; $w < pg_numrows($res); $w++) {
         $row = pg_fetch_object($res, $w);
         $tmpsuplist[] = $row->user_id;
     }
     for ($y = 0; $y < count($tmpsuplist); $y++) {
         for ($v = 0; $v < count($uidlist); $v++) {
             if ($uidlist[$v] == $tmpsuplist[$y]) {
                 $csupcount++;
             }
         }
     }
     echo "<a href=\"view_app.php?id=" . $ccts . "-" . $clistok[$c] . "\" target=admintrack><b>{$cname}</b></a>&nbsp;&nbsp;<b>(</b>{$csupcount}<b>)</b><br>\n";
Esempio n. 7
0
if (!newregs_off()) {
    echo "<html><head><title>MODIFYING NUMBER OF REQUIRED SUPPORTERS</title>";
    std_theme_styles();
    echo "</head>\n";
    std_theme_body("../");
    echo "<b>MODIFYING NUMBER OF REQUIRED SUPPORTERS</b><br><br>\n";
    echo "Sorry, you must <b>LOCK</b> the new registrations BEFORE applying any change here.<br><br>";
    die("<a href=\"javascript:history.go(-1);\">Go back</a>");
}
if ($crc == md5(CRC_SALT_0019 . $ts . $HTTP_USER_AGENT) && $mode == "set" || $crc == md5(CRC_SALT_0020 . $ts . $HTTP_USER_AGENT) && $mode == "reset") {
    // update asked...
    $nbsup = $nbsup + 0;
    if ($mode == "reset") {
        $nbsup = DEFAULT_REQUIRED_SUPPORTERS;
    }
    pg_safe_exec("UPDATE variables SET contents='" . $nbsup . "',last_updated=now()::abstime::int4 WHERE var_name='REQUIRED_SUPPORTERS'");
    header("Location: index.php\n\n");
    die;
}
echo "<html><head><title>MODIFYING NUMBER OF REQUIRED SUPPORTERS</title>";
std_theme_styles();
echo "</head>\n";
std_theme_body("../");
echo "<b>MODIFYING NUMBER OF REQUIRED SUPPORTERS</b><br><br>\n";
if (REQUIRED_SUPPORTERS > 0) {
    echo "Global DB value : <font size=+1><b>" . REQUIRED_SUPPORTERS . "</b></font>.<br>";
} else {
    echo "Global DB value : <font size=+1><b>0</b> (Instant Registration)</font>.<br>";
}
if (DEFAULT_REQUIRED_SUPPORTERS > 0) {
    echo "Default local <b>config.inc</b>'s value : <font size=+1><b>" . DEFAULT_REQUIRED_SUPPORTERS . "</b></font>.<br><br>";
Esempio n. 8
0
';
		return(false);
	} else {
		return(true);
	}
}
<?php 
}
?>
//-->
</script>
<br>
<?php 
$ratio = 0.0;
$ratio = round($tot_noregs * 100.0 / $tot_users, 2) * 1.0;
$ssr = @pg_safe_exec("SELECT COUNT(flags) AS count FROM users WHERE (flags::int4 & 1)=1");
if (!$ssr) {
    // PgSQL version doesnt support bitwise comparison (not showing count) - Update to 7.2.3
    $nosuspcount = 1;
} else {
    $nosuspcount = 0;
    $sso = pg_fetch_object($ssr);
    $tot_susps = $sso->count;
    $ratio_s = round($tot_susps * 100.0 / $tot_users, 2) * 1.0;
}
?>
<font color=#<?php 
echo $cTheme->main_textlight;
?>
><b><?php 
echo $tot_noregs;
Esempio n. 9
0
                }
                $bla = pg_safe_exec("SELECT * FROM noreg WHERE lower(user_name)='" . strtolower(${$supname_t}) . "'");
                if (${$supname_t} != "" && pg_numrows($bla) == 0) {
                    $preq = "SELECT flags,id FROM users WHERE lower(user_name)='" . strtolower(${$supname_t}) . "'";
                    $pres = pg_safe_exec($preq);
                    $prow = pg_fetch_object($pres, 0);
                    $p_uid = $prow->id;
                    $p_flags = $prow->flags;
                    if ($NR_type == 4) {
                        $p_flags = $p_flags | 0x8;
                        // Fraud TAG
                    }
                    $queryb = "UPDATE users SET last_updated=now()::abstime::int4,last_updated_by='*** TAGGED AS FRAUD ***',flags='" . $p_flags . "' WHERE id='" . $p_uid . "'";
                    $query = "INSERT INTO NOREG (user_name,email,channel_name,type,never_reg,for_review,expire_time,created_ts,set_by,reason) VALUES ";
                    $query .= "('" . ${$supname_t} . "','{$supporter_email}','',{$NR_type},{$NR_neverreg},0,{$expire_at},now()::abstime::int4,'{$set_by}','{$reason}')";
                    pg_safe_exec($query);
                    pg_safe_exec($queryb);
                }
            }
        }
    }
    echo "<font color=#" . $cTheme->main_warnmsg . "><b>CHANNEL HAS BEEN REJECTED SUCCESSFULLY</b></font>\n";
    if ($ret == "") {
        $ret = "../list_app.php";
    }
    echo "<script language=\"JavaScript1.2\">\n<!--\n\tsetTimeout(location.href='" . str_replace("'", "\\'", urldecode($ret)) . "',1500);\n//-->\n</script>\n";
}
?>
</body>
</html>
Esempio n. 10
0
        mail($purge_at_email, "Purge Request via WEB", $mmsg, "From: " . $_POST["email"] . "\nReply-To: " . $_POST["email"] . "\nX-Mailer: " . NETWORK_NAME . " Channel Service");
    } else {
        echo "<h3>Testnet : dumping mail</h3>\n";
        echo str_replace("\n", "<br>", $mmsg);
    }
    /* make the user can re-port in 10 days. */
    pg_safe_exec("UPDATE users SET post_forms=(now()::abstime::int4+86400*10) WHERE id=" . $user_id);
    echo "<h2>";
    echo "Please allow 3-5 days for your request to be processed.\n";
    echo "</h2>\n";
    echo "</body></html>\n\n";
    die;
}
$res = pg_safe_exec("SELECT * FROM users WHERE id=" . $user_id);
$user = pg_fetch_object($res, 0);
$res2 = pg_safe_exec("SELECT channels.name FROM channels,levels WHERE levels.channel_id=channels.id and levels.user_id=" . $user_id . " and levels.access=500 and channels.id>1 and channels.registered_ts>0");
if (pg_numrows($res2) == 0) {
    echo "I'm sorry, you don't appear to have any channels registered";
    exit;
}
$channel = pg_fetch_object($res2, 0);
$c_count = pg_numrows($res2);
?>
<form method=POST>
<ol>
 <li>Your username: <b><?php 
echo $user->user_name;
?>
</b><input type=hidden name=username value=<?php 
echo $user->user_name;
?>
Esempio n. 11
0
echo $lang_name;
?>
'</b><br></h2>
<a href="index.php">&lt;&lt;&nbsp;Back</a>
<?php 
if (acl(XHELP_CAN_ADD)) {
    echo "<form name=addcmd action=add_cmd.php method=get>\n";
    echo "<input type=hidden name=langid value={$lang_id}>\n";
    echo "<li>&nbsp;Add COMMAND named <input type=text name=cmdname size=20 maxlength=20>&nbsp;&nbsp;<input type=submit value=Go!>\n";
    echo "</form>\n";
}
echo "<table width=100% border=0 cellspacing=1 cellpadding=3>";
echo "<tr bgcolor=#" . $cTheme->table_headcolor . ">\n";
echo "<td width=20%><font color=#" . $cTheme->table_headtextcolor . "><b>COMMAND Name</b></font></td>";
echo "<td width=80%><font color=#" . $cTheme->table_headtextcolor . "><b>HELP Output</b></font></td></tr>\n\n";
$ras = pg_safe_exec("SELECT * FROM help WHERE language_id='{$lang_id}' ORDER BY topic");
if (pg_numrows($ras) == 0) {
    echo "<td colspan=2 bgcolor=#" . $cTheme->table_headtextcolor . "><b>NO COMMANDS IN DB ?!</b>";
    if ($admin > 900) {
        echo "&nbsp;&nbsp;&nbsp;<b>901+ option</b> : <a href=\"init_lang.php?lid={$lang_id}\">Initialize Commands for this language</a>";
    }
    echo "</td>\n";
} else {
    for ($x = 0; $x < pg_numrows($ras); $x++) {
        $roo = pg_fetch_object($ras, $x);
        echo "<tr bgcolor=#" . $cTheme->table_bgcolor . ">\n";
        echo "<td valign=top width=20%><a href=\"edit_cmd.php?langid={$lang_id}&cmdname={$roo->topic}\">" . $roo->topic . "</a></td>\n";
        if (trim($roo->contents) == "") {
            echo "<td valign=top width=80%><font color=#" . $cTheme->main_no . "><i>no help text available</i></font></td>\n";
        } else {
            echo "<td valign=top width=80%><pre>" . htmlspecialchars(trim($roo->contents)) . "</pre></td>\n";
Esempio n. 12
0
$query = "SELECT * FROM webcookies WHERE is_admin>0 AND expire>=now()::abstime::int4 ORDER BY expire DESC";
//echo "<b>SQL Query:</b><br>" . $query . ";<br><br>";
$res = pg_safe_exec($query);
$bm_count = 0;
echo "<form><table border=1 bgcolor=#" . $cTheme->table_bgcolor . " cellspacing=2 cellpadding=2 width=600>\n";
if ($admin >= 800) {
    $last_col = "<td><b>&nbsp;</b></td>";
} else {
    $last_col = "";
}
echo "<tr bgcolor=#" . $cTheme->table_headcolor . "><td><font color=#" . $cTheme->table_headtextcolor . "><b>Username</b></font></td><td><font color=#" . $cTheme->table_headtextcolor . "><b>Level</b></font></td><td><font color=#" . $cTheme->table_headtextcolor . "><b>Last Access</b></font></td><td><font color=#" . $cTheme->table_headtextcolor . "><b>Expire</b></font></td>" . $last_col . "</tr>\n";
for ($i = 0; $i < pg_numrows($res); $i++) {
    $row = pg_fetch_object($res, $i);
    $bm_count++;
    $ENABLE_COOKIE_TABLE = 0;
    $unf = pg_safe_exec("SELECT user_name FROM users WHERE id='" . $row->user_id . "'");
    $ooo = pg_fetch_object($unf, 0);
    echo "<tr>";
    echo "<td><a href=\"../users.php?id=" . $row->user_id . "\" target=_blank>" . $ooo->user_name . "</a></td>";
    $ENABLE_COOKIE_TABLE = 1;
    echo "<td>" . $row->is_admin . "</td>";
    echo "<td>" . cs_time($row->expire - COOKIE_EXPIRE) . "</td>";
    echo "<td>in " . drake_duration($row->expire - time()) . "</td>";
    echo "<td>";
    if (($admin > $row->is_admin || $admin == 1000) && $row->user_id != $user_id) {
        echo "<input type=button value=\"Force deauth\" onclick=\"if (confirm('This will LOGOUT user \\'" . $ooo->user_name . "\\'')) { location.href='fdeauth.php?cookie=" . $row->cookie . "&uid=" . $row->user_id . "'; }\">";
    } else {
        echo "&nbsp;";
    }
    echo "</td>";
    echo "</tr>";
Esempio n. 13
0
    } else {
        $decision2 = $decision2 . "<br>\n";
    }
    $decision2 = $decision2 . $decision;
    //	echo "$decision";die;
    $quer2 = "UPDATE pending SET status=3,last_updated=now()::abstime::int4,decision_ts=now()::abstime::int4,decision='{$decision2}' WHERE channel_id='{$c}'";
    pg_safe_exec($quer2);
    $res = pg_safe_exec("SELECT manager_id FROM pending WHERE channel_id='{$c}'");
    $row = pg_fetch_object($res, 0);
    $m_id = $row->manager_id;
    pg_safe_exec("UPDATE channels SET registered_ts=now()::abstime::int4,last_updated=now()::abstime::int4,comment='' WHERE id='{$c}'");
    pg_safe_exec("INSERT INTO levels (channel_id,user_id,access,added,added_by,last_modif,last_modif_by,last_updated) VALUES ({$c},{$m_id},500,now()::abstime::int4,'*** REGPROC ***',now()::abstime::int4,'*** REGPROC ***',now()::abstime::int4)");
    pg_safe_exec("UPDATE users_lastseen SET last_updated=now()::abstime::int4,last_seen=now()::abstime::int4 WHERE user_id='{$m_id}'");
    $qqq = "UPDATE pending SET reviewed='Y',reviewed_by_id='{$user_id}' WHERE channel_id='{$c}'";
    pg_safe_exec($qqq);
    $bla = pg_safe_exec("SELECT user_name FROM users WHERE id='{$m_id}'");
    $blo = pg_fetch_object($bla, 0);
    $mgr_name = $blo->user_name;
    log_channel($c, 7, "to {$mgr_name}");
    review_count_add($user_id);
    /*
    	$quer3 = "INSERT INTO mailq (user_id,channel_id,created_ts,template,var1,var2,var3,var4,var5) VALUES ($m_id,$c,now()::abstime::int4,3,'','','','','')";
    	pg_safe_exec($quer3);
    */
    echo "<font color=#" . $cTheme->main_warnmsg . "><b>CHANNEL HAS BEEN ACCEPTED/REGISTERED SUCCESSFULLY</b></font>\n";
    if ($ret == "") {
        $ret = "../list_app.php";
    }
    echo "<script language=\"JavaScript1.2\">\n<!--\n\tsetTimeout(location.href='" . urldecode($ret) . "',3000);\n//-->\n</script>\n";
}
?>
Esempio n. 14
0
<input type=hidden name=user_age value=1>
<table border=0 cellspacing=0 cellpadding=0>
<tr>
<td><b>Username&nbsp;&nbsp;</b></td><td align=right><input type=text name=username size=30 value="<?php 
echo $username;
?>
" maxlength=12></td></tr>
<tr>
<td><b>Email Address&nbsp;&nbsp;</b></td><td align=right><input type=text size=30 name=email value="<?php 
echo $email;
?>
" maxlength=128></td></tr>
<tr>
<td><b>Language&nbsp;&nbsp;</b></td><td align=right><select name="language"><?php 
// language selector...
$res = pg_safe_exec("select * from languages ORDER by name");
for ($i = 0; $i < pg_numrows($res); $i++) {
    $lang = pg_fetch_object($res, $i);
    echo "<option ";
    if ($lang->id == 1) {
        echo "selected ";
    }
    echo "value=\"" . $lang->id . "\">" . $lang->name . "</option>\n";
}
?>
</select></td></tr>
<tr>
<td><b>Verif. Question&nbsp;&nbsp;</b></td><td align=right><select name=question_id><option selected value=0>--- click here ---</option><?php 
for ($x = 1; $x <= $max_question_id; $x++) {
    echo "<option value={$x}";
    if ($x == $question_id) {
Esempio n. 15
0
<?php

$min_lvl = 800;
/* $Id: newusers.php,v 1.2 2003/08/31 19:52:16 nighty Exp $ */
require "../../../php_includes/cmaster.inc";
std_connect();
$user_id = std_security_chk($auth);
$admin = std_admin();
if (!acl(XWEBCTL)) {
    echo "<b>Go away</b>!!!";
    die;
}
if ($switch == "ON" && newusers_off()) {
    echo "Already LOCKED";
    die;
}
if ($switch == "OFF" && !newusers_off()) {
    echo "Already UNLOCKED";
    die;
}
if ($switch == "ON") {
    pg_safe_exec("INSERT INTO locks VALUES (3,now()::abstime::int4," . $user_id . ")");
}
if ($switch == "OFF") {
    pg_safe_exec("DELETE FROM locks WHERE section='3'");
    pg_safe_exec("DELETE FROM counts WHERE count_type='1'");
}
header("Location: redir.php?RET=index.php");
die;
Esempio n. 16
0
            echo "s";
        }
        echo ")";
    } else {
        echo "&nbsp;(<b>Instant Registration</b>)";
    }
}
?>
 - Complaints : <?php 
if (complaints_off()) {
    echo "<font color=#" . $cTheme->main_no . "><b>LOCKED</b></font>";
} else {
    echo "<font color=#" . $cTheme->main_yes . "><b>OPEN</b></font>";
}
echo "<br>";
$blabla = pg_safe_exec("SELECT count_count FROM counts WHERE count_type='1'");
if (pg_numrows($blabla) == 0) {
    $c_nu = 0;
} else {
    $bloblo = pg_fetch_object($blabla, 0);
    $c_nu = $bloblo->count_count;
}
echo "Newusers Current Count : <b>" . $c_nu . "</b> out of " . $MAX_ALLOWED_USERS;
?>
<hr>
<h4>
<?php 
if ($admin >= 800) {
    ?>
<a href="view_adminlog.php">Admin Log</a> (800+)<br>
<?php 
/* $Id: registration_acknowledge.php,v 1.3 2002/05/20 23:58:04 nighty Exp $ */
require "../../../php_includes/cmaster.inc";
std_connect();
$user_id = std_security_chk($auth);
$admin = std_admin();
$cTheme = get_theme_info();
if ($admin == 0) {
    check_file("../regproc.3");
}
$check1 = pg_safe_exec("SELECT * FROM pending WHERE manager_id='{$user_id}' AND channel_id='{$c}' AND status=3 AND reg_acknowledged='N'");
if (pg_numrows($check1) == 0) {
    header("Location: ../right.php\n\n");
    die;
}
std_theme_styles(1);
std_theme_body("../");
echo "<b>CHANNEL SERVICE APPLICATIONS</b> - ACKNOWLEDGE REGISTRATION<br><hr size=2 noshade><br>\n";
$c_ts = $id;
$c_id = $c;
$res = pg_safe_exec("SELECT name FROM channels WHERE id='{$c_id}'");
$row = pg_fetch_object($res, 0);
$c_name = $row->name;
pg_safe_exec("UPDATE pending SET reg_acknowledged='Y',last_updated=now()::abstime::int4 WHERE status=3 AND channel_id='{$c_id}'");
echo "You <b>ACKNOWLEDGED</b> registration for <b>{$c_name}</b><br>\n";
echo "<br><br>\n";
echo "<a href=\"../right.php\">Back to main</a>\n";
?>
</body>
</html>
Esempio n. 18
0
$da_id = $da_t[0];
$daq = pg_safe_exec("SELECT * FROM complaints WHERE id='" . (int) $da_id . "' AND status<4 AND ticket_number='" . $_GET["ID"] . "'");
if ($dao = pg_fetch_object($daq)) {
    echo "<br>";
    echo "<pre><font size=+0>";
    echo "ticket-number:\t\t\t" . $_GET["ID"] . "\n";
    echo "status:\t\t\t\t";
    echo ucfirst(strtolower($cmp_status[$dao->status])) . "\n";
    $la_type = -1;
    // 0: last action is user action,  1: last action is admin action
    echo "last-action:\t\t\t";
    if ($dao->reviewed_ts == 0) {
        echo "Never";
        $la_type = 0;
    } else {
        $xr = pg_safe_exec("SELECT * FROM complaints_threads WHERE reply_text!='' AND complaint_ref='" . (int) $dao->id . "' ORDER BY reply_ts DESC LIMIT 1");
        // select last reply with a public reply into it
        if ($xo = pg_fetch_object($xr)) {
            $dats = $xo->reply_ts;
            $la_type = 1;
            // assume last action is admin
            if ($xo->reply_by == 0) {
                $la_type = 0;
            }
            // if the last reply_by is 0, (user), .. last action is user
        } else {
            $dats = $dao->reviewed_ts;
            $la_type = 0;
        }
        echo cs_time($dats);
    }
Esempio n. 19
0
<?php

/* <!-- $Id: unlock_ip.php,v 1.3 2002/05/20 23:58:04 nighty Exp $ //--> */
$min_lvl = 800;
require "../../../php_includes/cmaster.inc";
std_init();
$cTheme = get_theme_info();
if ($admin < 900) {
    std_theme_styles(1);
    std_theme_body("../");
    echo "Oi! What are you doing here eh?";
    echo "</body></html>\n";
    exit;
}
if ($o < 1 || $o > 2 || !preg_match("/^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\$/", $IPNUM)) {
    std_theme_styles(1);
    std_theme_body("../");
    echo "Wrong params. Go back.";
    echo "</body></html>\n";
    die;
}
$ENABLE_COOKIE_TABLE = 1;
pg_safe_exec("DELETE FROM newu_ipcheck WHERE ip='" . $IPNUM . "'");
$ENABLE_COOKIE_TABLE = 0;
header("Location: view_newu_ips.php?o=" . $o);
die;
Esempio n. 20
0
$query .= "users,users_lastseen,levels,channels ";
$query .= "WHERE ";
$query .= "users.id=levels.user_id AND ";
$query .= "levels.channel_id=channels.id AND ";
$query .= "users.id=users_lastseen.user_id AND ";
$query .= "(";
$query .= "users_lastseen.last_seen>(now()::abstime::int4-25*24*60*60) ";
$query .= "OR ";
$query .= "lower(users.user_name)='nopurge') ";
$query .= "AND ";
$query .= "channels.registered_ts>0 AND ";
$query .= "levels.access=500";
$query .= " ) ";
$query .= " ORDER BY users_lastseen.last_seen";
//echo "<b>SQL Query:</b><br>" . $query . ";<br><br>";
$res = pg_safe_exec($query);
$bm_count = 0;
echo "<table border=1 width=600 cellspacing=0 cellpadding=3 bgcolor=#" . $cTheme->table_bgcolor . ">\n";
echo "<tr bgcolor=#" . $cTheme->table_headcolor . "><td><font color=#" . $cTheme->table_headtextcolor . "><b>User Name</b></font></td><td><font color=#" . $cTheme->table_headtextcolor . "><b>Channel</b></font></td><td><font color=#" . $cTheme->table_headtextcolor . "><b>&nbsp;</b></font></td><td><font color=#" . $cTheme->table_headtextcolor . "><b>Since</b></font></td></tr>\n";
for ($i = 0; $i < pg_numrows($res); $i++) {
    $row = pg_fetch_object($res, $i);
    if (!((int) $row->flags & 1) && !((int) $row->flags & 2)) {
        // pgsql '&' operator fixed display (!)
        $bm_count++;
        $ts = time();
        $ls = $row->last_seen;
        $t_val = $ts - $ls;
        $t_dur = abs($t_val);
        $the_duration = drake_duration($t_dur);
        echo "<tr><td><a href=\"../users.php?id=" . $row->user_id . "\" target=users>" . $row->user_name . "</a></td>" . "<td><a href=\"../channels.php?id=" . $row->channel_id . "\" target=channels>" . $row->channel_name . "</a></td>";
        if (($row->flags & MIA_TAG_FLAG) == MIA_TAG_FLAG) {
Esempio n. 21
0
<?php

/* $Id: gfx_code.php,v 1.2 2003/02/09 13:01:05 nighty Exp $ */
require "../../php_includes/blackhole.inc";
require "../../php_includes/cmaster.inc";
if (SHOW_GFXUSRCHK && NEWUSERS_GFXCHECK) {
    if (!extension_loaded("gd")) {
        die("GD Library not present !");
    }
    $ENABLE_COOKIE_TABLE = 1;
    $fontList = get_font_face_list();
    unset($dFID);
    $dFID = rand(0, count($fontList) - 1);
    // random available font face
    pg_safe_exec("DELETE FROM gfxcodes WHERE expire<now()::abstime::int4");
    $r = pg_safe_exec("SELECT code FROM gfxcodes WHERE crc='" . $_GET["crc"] . "'");
    if ($o = pg_fetch_object($r)) {
        $code_gen = $o->code;
        // generate the picture
        if (GFX_SECURE_MODE == 1) {
            img_label($code_gen, SPECIFIC_FONT);
        } else {
            img_label2($code_gen, SPECIFIC_FONT2);
        }
    } else {
        img_label("INVALID CRC !!!", SPECIFIC_FONT, 24, "#ff1111", "#ffffff");
    }
} else {
    die("Page is disabled.");
}
Esempio n. 22
0
    header("Location: right.php\n\n");
    die;
}
$sret = urldecode($retret);
$tmp = explode("-", $id);
$created_ts = $tmp[0];
$channel_id = $tmp[1];
$res = pg_safe_exec("SELECT * FROM pending WHERE channel_id='{$channel_id}' AND created_ts='{$created_ts}' AND reviewed='Y'");
if (pg_numrows($res) == 0) {
    // that id is already reviewed or non existing
    echo "That application is either non existant or not reviewed.";
    die;
} else {
    $o = pg_fetch_object($res, 0);
    $status = $o->status;
    if ($admin >= 800 || $status == 2 || $status == 3 || $status == 8) {
        $do_it = 1;
    } else {
        $do_it = 0;
    }
}
if ($do_it == 0) {
    echo "You can't clear applications' reviews from that 'status' (" . ($status + 0) . ").";
    die;
}
$q = "UPDATE pending SET reviewed='N',reviewed_by_id=1,last_updated=now()::abstime::int4 WHERE channel_id='{$channel_id}' AND created_ts='{$created_ts}'";
pg_safe_exec($q);
review_count_rem($user_id);
log_channel($channel_id, 18, "Cleared Application Review");
header("Location: view_app.php?id={$id}&special_ret=" . urlencode($sret) . "\n\n");
die;
Esempio n. 23
0
            }
            $mmsg .= "\tUser Name : " . $username[$x];
            if (strlen($username[$x]) < 4) {
                $mmsg .= "\t";
            }
            if (strlen($username[$x]) <= 10) {
                $mmsg .= "\t";
            }
            $mmsg .= "\tSignup IP : " . $ols->signup_ip;
            if (strlen($ols->signup_ip) < 12) {
                $mmsg .= "\t";
            }
            if ($ols->signup_ip == "") {
                $mmsg .= "\t";
            }
            $res0 = pg_safe_exec("SELECT COUNT(levels.access) AS count FROM channels,levels WHERE levels.user_id='" . $id[$x] . "' AND levels.channel_id=channels.id AND channels.registered_ts>0");
            $row0 = pg_fetch_object($res0);
            @pg_freeresult($res0);
            $mmsg .= "\t# axs : " . $row0->count;
            $mmsg .= "\tVerif.Answer : " . $ols->verificationdata;
            if (strlen($ols->verificationdata) < 9) {
                $mmsg .= "\t";
            }
            if ($ols->verificationdata == "") {
                $mmsg .= "\t";
            }
            $mmsg .= "\tEMail : " . $email[$x] . "\n";
            $mail_lines++;
        }
    }
}
Esempio n. 24
0
            echo "This new e-mail address is already used by another CService username.<br>\n";
        }
        echo "<a href=\"javascript:history.go(-1);\">Try Again</a><br>\n";
        echo "</h2>\n";
        echo "</body>\n</html>\n\n";
        die;
    }
    $cookieval = md5(CRC_SALT_0020 . uniqid("", 1) . time() . $da_newmail);
    pg_safe_exec("INSERT INTO pending_emailchanges (cookie,user_id,old_email,new_email,expiration) VALUES ('{$cookieval}',{$user_id},'{$da_emailaddy}','{$da_newmail}',now()::abstime::int4+21600)");
    $confirm_url = gen_server_url() . substr($REQUEST_URI, 0, strrpos($REQUEST_URI, "/")) . "/confirm_emailchange.php?ID={$cookieval}";
    $the_msg = "If you would like to confirm that the new email-in-record for '{$da_username}' should be '{$da_newmail}',\n";
    $the_msg .= "then click on the link below within 6 hours :\n\n";
    $the_msg .= "\t{$confirm_url}\n\n\nThank you\n" . NETWORK_NAME . " Channel Service\n\n\nPS- Please do *NOT* reply to this mail.";
    mail($da_emailaddy, "E-Mail change request", $the_msg, "From: " . NETWORK_NAME . " E-Mail Change Request <" . OBJECT_EMAIL . ">\nReply-To: no.reply@thank.you\nX-Mailer: " . NETWORK_NAME . " Channel Service");
    /* make the user can re-port in 10 days. */
    pg_safe_exec("UPDATE users SET post_forms=(now()::abstime::int4+86400*10) WHERE id=" . $user_id);
    echo "<h2>";
    echo "Please check your e-mail at '{$da_emailaddy}',<br>then click on the URL to confirm the email change.<br><br>\n";
    echo "Note: *nothing* will be changed if you don't click that URL.\n";
    echo "</h2>\n";
    echo "</body></html>\n\n";
    die;
}
?>
<form method=POST>
<ol>
 <li>Your username: <b><?php 
echo $user->user_name;
?>
</b><input type=hidden name=username value=<?php 
echo $user->user_name;
Esempio n. 25
0
     // take the action
     pg_safe_exec("BEGIN WORK");
     // be safe ;P
     $qFail = -1;
     for ($z = 0; $z < count($del_q); $z++) {
         $lRes = pg_safe_exec($del_q[$z]);
         if (!$lRes) {
             $qFail = $z;
         }
     }
     if ($qFail > -1) {
         $query = "<b>The query (" . $qFail . ") failed !!!</b>, nothing was done/committed (pfui (tm))...\n\nPlease report the above <b>Warning:</b> you see on this page,\n*THEN* <a href=\"javascript:history.go(-1);\">you can go back</a> :P";
         pg_safe_exec("ROLLBACK WORK");
     } else {
         $query = "";
         pg_safe_exec("COMMIT WORK");
     }
 } else {
     $query = "\t<i>";
     $query .= str_replace("VALUES", "\n\tVALUES", $nr_q) . "\n\t";
     for ($z = 0; $z < count($del_q); $z++) {
         $query .= str_replace("VALUES", "\n\tVALUES", $del_q[$z]) . "\n\t";
     }
     $query .= "</i>\n";
 }
 if ($query != "") {
     echo "<pre>" . $query . "</pre>";
 }
 if (!$debug_me) {
     @header("Location: users.php?id=" . $user_id . "\n\n");
 }
Esempio n. 26
0
<?php

/* $Id: r_lastseen.php,v 1.1 2005/03/07 04:48:03 nighty Exp $ */
$min_lvl = 800;
require "../../php_includes/cmaster.inc";
std_init();
if ($admin < 800) {
    die("Oi! What are you doing here ?");
}
$cTheme = get_theme_info();
if ($_GET["crc"] == md5(CRC_SALT_0013 . $_GET["id"] . $_GET["ts"])) {
    $r = pg_safe_exec("SELECT * FROM users_lastseen WHERE user_id=" . (int) $_GET["id"]);
    if ($o = pg_fetch_object($r)) {
        // do nothing, the record IS here ( heh ?! )
    } else {
        // insert a new record
        pg_safe_exec("INSERT INTO users_lastseen (user_id, last_seen, last_updated, last_hostmask) VALUES ( " . (int) $_GET["id"] . ", now()::abstime::int4, now()::abstime::int4, '')");
    }
    header("Location: users.php?id=" . $_GET["id"] . "\n\n");
    die;
} else {
    die("Err!");
}
Esempio n. 27
0
        if ($HTTP_REFERER == "") {
            $ref = "./index.php";
        } else {
            $ref = urlencode($HTTP_REFERER);
        }
        echo "<form name=confirmdelete action=remove_va.php method=get>\n";
        echo "<input type=hidden name=ts value={$ts}>\n";
        echo "<input type=hidden name=crc value={$crc}>\n";
        echo "<input type=hidden name=id value={$id}>\n";
        echo "<input type=hidden name=ref value=\"{$ref}\">\n";
        echo "<input type=submit value=\" OK \">&nbsp;&nbsp;&nbsp;&nbsp;<input type=button value=\" CANCEL \" onclick=\"history.go(-1);\"><br><br>\n";
        echo "<i>click <b>CANCEL</b> to go back to the list.</i><br><br>\n";
    } else {
        $res = pg_safe_exec("select * from noreg where id='" . $id . "' and type='6'");
        if ($row = pg_fetch_object($res, 0)) {
            $query = "delete from noreg where id='{$id}' and type=6";
            pg_safe_exec($query);
        }
        //local_seclog("Removed LOCKED VA '" . $dava . "' (case sensitive : " . $csens . ").");
        echo "<script language=\"JavaScript1.2\">\n";
        echo "<!--\n";
        echo "\tlocation.href='" . urldecode($ref) . "';\n";
        echo "//-->\n";
        echo "</script>\n";
    }
}
echo "For CService Admins use <b>ONLY</b>.";
?>
</body>
</html>
Esempio n. 28
0
                // otherwise, go to user's details.
                header("Location: ../users.php?id=" . $user_id . "\n\n");
            }
        } else {
            die("Internal Error !@#");
        }
    }
    die;
}
echo "<html><head><title>Reply to a Note</title>";
std_theme_styles();
echo "</head>\n";
std_theme_body("../");
echo "<h2>Reply to a Note</h2><br>\n";
echo "<a href=\"../users.php?id=" . $user_id . "\">Back to your details</a>";
$notesr = pg_safe_exec("SELECT message_id FROM notes WHERE user_id='" . $user_id . "'");
if (pg_numrows($notesr) > 0) {
    echo "&nbsp;&nbsp;<a href=\"index.php\">Back to notes list (" . pg_numrows($notesr) . ")</a>";
}
echo "<form name=reply method=post onsubmit=\"return check(this);\">\n";
echo "<br>";
echo "<table border=1 cellspacing=0 cellpadding=3 bgcolor=#" . $cTheme->table_bgcolor . ">\n";
echo "<tr>";
echo "<td valign=top align=right bgcolor=#" . $cTheme->table_headcolor . "><font color=#" . $cTheme->table_headtextcolor . "><b>To&nbsp;:&nbsp;</b></font></td>\n";
echo "<td valign=top>&nbsp;" . $the_rcpt_name . "<input type=hidden name=rcpt value=\"" . $the_rcpt_id . "\">\n";
echo "</tr>\n";
echo "<tr>";
echo "<td valign=top align=right bgcolor=#" . $cTheme->table_headcolor . "><font color=#" . $cTheme->table_headtextcolor . "><b>Original Message&nbsp;:&nbsp;</b></font></td>\n";
echo "<td valign=top>";
echo str_replace("\n", "<br>\n", htmlspecialchars($the_orig_msg));
echo "</td>\n";
Esempio n. 29
0
            }
            echo "<td>" . $type[$sta] . "</td>\n";
            echo "<td><a href=\"users.php?id=" . $rowT->manager_id . "\">" . $row2->user_name . "</a></td>\n";
            echo "</tr>\n";
        }
    }
    // of else
    echo "</TABLE>";
    /* end proc */
}
if ($admin > 0 || acl(XLOGGING_VIEW)) {
    $type = $user_events;
    echo "<br>\n";
    $query = "SELECT user_id,ts,event,message FROM userlog WHERE event!=5 AND user_id={$id} ORDER BY ts DESC";
    //	echo "Q: $query<br>";
    $logs = pg_safe_exec($query);
    echo "<TABLE border=1 WIDTH=100% cellspacing=0 cellpadding=2 BGCOLOR=#" . $cTheme->table_bgcolor . ">";
    echo "<tr><td colspan=3><H2>Log messages (last 5)</H2><a href=\"viewlogs.php?uid=" . $id . "\">View All</a></td></tr>";
    echo "<tr bgcolor=#" . $cTheme->table_headcolor . "><td><font color=#" . $cTheme->table_headtextcolor . ">Time</font></td><td><font color=#" . $cTheme->table_headtextcolor . ">Event</font></td><td><font color=#" . $cTheme->table_headtextcolor . ">Message</font></td></tr>";
    if (pg_numrows($logs) != 0) {
        if (pg_numrows($logs) >= 5) {
            $max = 5;
        } else {
            $max = pg_numrows($logs);
        }
        for ($row = 0; $row < $max; $row++) {
            $log = pg_fetch_object($logs, $row);
            echo "<tr><td>";
            echo cs_time($log->ts) . " [" . $log->ts . "]</td><td>";
            if ($log->event > count($user_events) || $log->event == 0) {
                echo "(old)</td><td>";
     echo "<h1>Success!</h1>";
     echo "Your account has a new email-in-record :<br>\n";
     echo "<center><table><tr><td><h1>" . $nmail . "</h1></td></tr></table></center>";
     echo "You may now proceed to the <a href=\"../index.php\" target=_top>Main page</a>.<br>";
     echo "</body></html>";
     exit;
 } else {
     // First check to see if somebody got there first.
     $res = pg_safe_exec("select id from users where id!={$userid} AND lower(email)='" . strtolower($email->new_email) . "'");
     if (pg_numrows($res) > 0) {
         std_theme_styles(1);
         std_theme_body("../");
         echo "<h1>Error</h1>";
         echo "An account with that e-mail is already known.  Please choose another.";
         echo "</body></html>";
         pg_safe_exec("delete from pending_emailchanges where cookie='{$ID}'");
         exit;
     } else {
         echo "<html><head><title>An Error Occured</title>";
         std_theme_styles();
         echo "</head>";
         std_theme_body("../");
         echo "<h1>An Error has occured.</h1>";
         echo "An Error has occured, it's beyond me whats going on.  Maybe ask someone in ";
         echo SERVICE_CHANNEL . "?  They probably don't know either, but it'll make you feel better.";
         echo "</body></html>";
         exit;
     }
 }
 exit;
 // Shouldn't get here.