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


PHP pg_safe_exec函数代码示例

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


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

示例1: mktime

    }
    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) {
开发者ID:Shadowss,项目名称:gnuworld-website,代码行数:31,代码来源:idledchannels.php

示例2: time

 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>";
开发者ID:Shadowss,项目名称:gnuworld-website,代码行数:31,代码来源:list_f.php

示例3: get_theme_info

$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>";
开发者ID:Shadowss,项目名称:gnuworld-website,代码行数:31,代码来源:confirm_mgrchange.php

示例4: complaints_threads

             } 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 {
开发者ID:Shadowss,项目名称:gnuworld-website,代码行数:31,代码来源:ticket.php

示例5: std_admin

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";
开发者ID:Shadowss,项目名称:gnuworld-website,代码行数:31,代码来源:confirm.php

示例6: unset

 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";
开发者ID:Shadowss,项目名称:gnuworld-website,代码行数:31,代码来源:app_tracker.php

示例7: std_theme_styles

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>";
开发者ID:Shadowss,项目名称:gnuworld-website,代码行数:31,代码来源:nbsupmod.php

示例8: round

';
		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;
开发者ID:Shadowss,项目名称:gnuworld-website,代码行数:31,代码来源:index.php

示例9: pg_safe_exec

                }
                $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>
开发者ID:Shadowss,项目名称:gnuworld-website,代码行数:30,代码来源:admin_reject.php

示例10: mail

        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;
?>
开发者ID:Shadowss,项目名称:gnuworld-website,代码行数:31,代码来源:purge.php

示例11: pg_safe_exec

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";
开发者ID:Shadowss,项目名称:gnuworld-website,代码行数:31,代码来源:edit.php

示例12: pg_safe_exec

$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>";
开发者ID:Shadowss,项目名称:gnuworld-website,代码行数:31,代码来源:view_admins.php

示例13: pg_safe_exec

    } 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";
}
?>
开发者ID:Shadowss,项目名称:gnuworld-website,代码行数:31,代码来源:admin_complete.php

示例14: pg_safe_exec

<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) {
开发者ID:Shadowss,项目名称:gnuworld-website,代码行数:31,代码来源:cr_newuser.php

示例15: std_connect

<?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;
开发者ID:Shadowss,项目名称:gnuworld-website,代码行数:29,代码来源:newusers.php


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