本文整理汇总了PHP中debug::rrr方法的典型用法代码示例。如果您正苦于以下问题:PHP debug::rrr方法的具体用法?PHP debug::rrr怎么用?PHP debug::rrr使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类debug
的用法示例。
在下文中一共展示了debug::rrr方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: OutputPositionsEditorUpdate
static function OutputPositionsEditorUpdate($table)
{
echo "<hr>REQUEST";
debug::rrr();
$stdout = $rightColumn = "";
$column["left"] = $column["right"] = "";
$showform = 0;
// must initiate to FALSE
$inset_id = NULL;
$error = $founderror = $lookup = $usedFieldValues = $record = array();
$usedTableRecords = $tableFields = $foreignFieldValues = array();
$reqFields = $existingFieldValues = $skipFields = array();
if (!in_array($table, array("position", "applicant", "hired", "method", "field", "type", "group"))) {
return "";
}
functions::gpc_declare_input("position_id", 0, false);
functions::gpc_declare_input("new", 0, true);
functions::gpc_declare_input("update", 0, true);
functions::gpc_declare_input("edit", 0, true);
functions::gpc_declare_input("delete", 0, true);
if ($GLOBALS["position_id"]) {
$showform = 1;
functions::gpc_declare_input("table", "position", false);
// functions::gpc_declare_input("hired_id",0,false);
// functions::gpc_declare_input("position","",false);
// functions::gpc_declare_input("description","",false);
// functions::gpc_declare_input("sortorder",NULL,false);
// functions::gpc_declare_input("group_id",0,false);
self::initiatePositionsClass();
// --> $GLOBALS["positionsClass"]
// -- Create $usedFieldValues
foreach ($GLOBALS["positionsClass"]->getCampaigns() as $recs) {
foreach ($recs as $fieldname => $value) {
//TODO: adapt to 'position' table
$usedFieldValues[$fieldname][] = $value;
}
}
// -- Create $usedFieldValues
$usedTableRecords = $GLOBALS["positionsClass"]->getCampaigns("", "", $GLOBALS["position_id"]);
// -- Create $tableFields
$tableFields["position"] = $GLOBALS["positionsClass"]->getFieldList("position");
$tableFields["hired"] = $GLOBALS["positionsClass"]->getFieldList("hired");
if (!empty($tableFields)) {
foreach ($tableFields as $tbl => $array) {
foreach ($array as $fieldname) {
echo "<br>*{$fieldname}";
if ($tbl != "hired") {
functions::gpc_declare_input($fieldname, "", false);
}
}
}
}
/*
// -- Create $foreignFieldValues
switch ($table) {
case "type":
$foreignFieldValues = $GLOBALS["positionsClass"]->getUniqueFieldValues("position","type_id");
break;
case "field":
$foreignFieldValues = $GLOBALS["positionsClass"]->getUniqueFieldValues("hired","field_id");
break;
case "group":
$foreignFieldValues = $GLOBALS["positionsClass"]->getUniqueFieldValues("type","group_id");
break;
} // end switch
*/
// -- Create $lookup
if (!empty($tableFields)) {
foreach ($tableFields as $tbl => $array) {
foreach ($array as $fieldname) {
$descfield = in_array($fieldname, array("position_id")) ? "title" : "description";
if (preg_match("#^(.*)_id\$#", $fieldname, $res) && $fieldname != $table . "_id" && !empty($res[1])) {
foreach ($GLOBALS["positionsClass"]->getLookupTable($res[1]) as $array) {
if (!empty($array[$descfield])) {
$lookup[$tbl][$fieldname][$array[$res[1] . "_id"]] = $array[$descfield];
}
}
}
}
}
}
// -- Create $hiddenFields
$hiddenFields = array("position_id");
// ----------------------------------------------
$tbl = "hired";
$reqFields = array("firstname", "lastname");
$existingFieldValues = $usedTableRecords[$tbl];
$skipFields = array($tbl . "_id");
$tbl = "hired";
$form["tableName"] = $tbl;
$form["allFields"] = $GLOBALS["positionsClass"]->getFieldList($tbl);
// $tableFields[$tbl];
$form["requiredFields"] = array("firstname", "lastname");
$form["skipFields"] = array($tbl . "_id");
$form["defaultValues"] = $GLOBALS["positionsClass"]->getLookupTable($tbl);
// $usedTableRecords[$tbl];
$form["type"]["select"] = array("field_id");
$form["type"]["hidden"] = array("position_id");
echo "<hr>inputFields[{$tbl}]<br>";
$inputFields[$tbl] = array();
//.........这里部分代码省略.........
示例2: outputEventDropdown
public static function outputEventDropdown($extrafields = array(), $text = "timetable", $thedate = "", $noMultiple = FALSE)
{
$stdout = "";
$selectEventsForm = $toggleMultipleEventsForm = $dateForm = "";
$selectSingleEventForm = $selectJointEventsForm = "";
$propagateConfids = $propagateMode = "";
$jointEvents = $confidArray = $standardForms = $extraFieldsForms = array();
functions::gpc_declare_input("mode", "single", false);
// "single", "joint", "multiple"
if ($noMultiple) {
$GLOBALS["mode"] = "single";
}
functions::gpc_declare_input("confid", "", false);
functions::gpc_declare_input("confid2", "", false);
// still needed?
if (isset($GLOBALS["confid"]) && is_array($GLOBALS["confid"]) && $GLOBALS["mode"] == "single") {
$_REQUEST["confid"] = $GLOBALS["confid"] = array(current($GLOBALS["confid"]));
}
if (is_array($GLOBALS["confid"])) {
$GLOBALS["confid"] = array_unique($GLOBALS["confid"]);
}
if (!empty($GLOBALS["confid"])) {
$confidArray = is_array($GLOBALS["confid"]) ? $GLOBALS["confid"] : array($GLOBALS["confid"]);
}
if (IS_TESTSERVER) {
debug::rrr();
}
if (IS_TESTSERVER) {
debug::rr($confidArray);
}
// -----------------------------
// -- Obtain data
// -----------------------------
$data = self::getEventByTime();
foreach ($confidArray as $confid) {
if ($confid) {
$arr = self::getJointEvents($confid);
if (!empty($arr)) {
$jointEvents[$confid] = $arr;
}
}
}
// -----------------------------
// -- Define common form elements
// -----------------------------
$formStart = " <form " . "action='" . $_SERVER["PHP_SELF"] . "' " . "method='POST' " . "enctype='multipart/form-data' " . "class='only_online'>\r\n";
$formEnd = " </form>\r\n";
foreach ($confidArray as $i => $confid) {
if ($confid) {
$propagateConfids .= " <input type='hidden' name='confid[" . $i . "]' value='" . $confid . "'>\r\n";
}
}
$propagateMode .= " <input type='hidden' name='mode' value='" . $GLOBALS["mode"] . "'>\r\n";
// -----------------------------
// -- Extra input fields
// -----------------------------
if (!empty($extrafields)) {
foreach ($extrafields as $extrafield) {
if (in_array($extrafield, array("abstracts", "photos"))) {
$theform = " <p>» Change to display this " . $text . "\r\n" . (isset($_REQUEST["with_abstract"]) ? " <input type='submit' name='null' " . "value='without " . $extrafield . "'>\r\n" : " <input type='submit' name='with_abstract' " . "value='with " . $extrafield . "'></p>\r\n");
// check event::getDateInterval() for 'confid2': still needed?
/*
foreach ($confidArray as $i => $confid) {
$theform .=
" <input type='hidden' name='confid2[".$i."]' value='" .
( (!$_REQUEST["confid"][$i] && isset($_REQUEST["confid2"][$i]))
? $GLOBALS["confid2"][$i]
: $GLOBALS["confid"][$i] ) .
"'>\r\n";
}
*/
$extraFieldsForms[] = $theform . $propagateConfids . $propagateMode;
}
}
}
// -----------------------------
// -- Date input field
// -----------------------------
$dateForm = "";
if ($GLOBALS["confid"] && !empty($thedate)) {
$dateForm .= " <p>» List participants only for this date: " . "<input type='text' name='thedate' value='" . $thedate . "' size='10'>" . " <input type='submit' value='Go!'></p>\r\n" . $propagateConfids . $propagateMode;
}
if (!empty($dateForm)) {
$extraFieldsForms[] = $dateForm;
}
// -----------------------------
// -- Single event selection form content
// -----------------------------
$selectSingleEventForm .= " <select name='confid[]' onchange='submit()' style='font-size:1.1em'>\r\n" . " <option value='0'>--- select from list ---</option>\r\n";
if (isset($data["current"])) {
foreach ($data["current"] as $record) {
foreach ($record as $startdate => $event) {
$selectSingleEventForm .= " <option value='" . $event["id"] . "'" . (in_array($event["id"], $confidArray) ? " selected='selected'" : "") . (strtotime($event["enddate"]) >= time() ? " class='future'>" . $event["title"] : " class='past'>[" . $event["title"] . "]") . "</option>\r\n";
}
// end foreach
}
// end foreach
}
// end if
$selectSingleEventForm .= " </select></p>\r\n";
//.........这里部分代码省略.........
示例3: drawAddComment
public static function drawAddComment()
{
$stdout = "";
$showform = 1;
$errormessage["left"] = $errormessage["right"] = "";
$founderror = array();
$confirmation = "";
if (!class_exists("openid", FALSE)) {
require_once PATH_CLASSES . "/lib/openid.php";
}
if (OPENIDDEBUG) {
echo "<h2>drawAddComment</h2>";
echo "<br>REQUEST=";
debug::rrr();
echo "<br>SESSION=";
debug::rr(array_keys($_SESSION));
echo "<br>COOKIE=";
debug::rr(array_keys($_COOKIE));
}
//,"openid_identifier","openid_return_url","openid_server_url","openid_request","openid_identifier","openid_request"
//$a=array("openid_news_validation_error","openid_news_form_html","openid_news_return_url","openid_news_request","openid_news_server_url");foreach ($a as $b) unset($_SESSION[$b]);
/*
echo "<html><head><title>OpenId transaction in progress</title></head>
<body onload='document.forms[0].submit();'>
<form accept-charset='UTF-8' enctype='application/x-www-form-urlencoded' id='openid_message' method='post' action='http://www.myopenid.com/server'>
<input type='hidden' name='openid.ns' value='http://specs.openid.net/auth/2.0' />
<input type='hidden' name='openid.ns.sreg' value='http://openid.net/extensions/sreg/1.1' />
<input type='hidden' name='openid.ns.pape' value='http://specs.openid.net/extensions/pape/1.0' />
<input type='hidden' name='openid.sreg.required' value='nickname,fullname,email' />
<input type='hidden' name='openid.sreg.optional' value='gender,dob,postcode,country,language,timezone' />
<input type='hidden' name='openid.pape.preferred_auth_policies' value='http://schemas.openid.net/pape/policies/2007/06/multi-factor-physical http://schemas.openid.net/pape/policies/2007/06/multi-factor http://schemas.openid.net/pape/policies/2007/06/phishing-resistant' />
<input type='hidden' name='openid.pape.max_auth_age' value='0' />
<input type='hidden' name='openid.realm' value='http://www.nordita.org/~hvzm/www.nordita.org/' />
<input type='hidden' name='openid.mode' value='checkid_setup' />
<input type='hidden' name='openid.return_to' value='http://www.nordita.org/~hvzm/www.nordita.org/news/nordic/index.php?articleid=25&janrain_nonce=2013-03-09T03%3A04%3A18ZMC2RJ2' />
<input type='hidden' name='openid.identity' value='http://hvzm.myopenid.com/' />
<input type='hidden' name='openid.claimed_id' value='http://hvzm.myopenid.com/' />
<input type='hidden' name='openid.assoc_handle' value='{HMAC-SHA1}{513aa6b2}{QGWDEw==}' />
<input type='submit' value='Continue' />
</form>
<script>var elements = document.forms[0].elements;for (var i = 0; i < elements.length; i++) { elements[i].style.display = 'none';}</script>
</body></html>";die();
*/
//if (OPENIDDEBUG) {echo "<br><strong>REFERRER</strong>: ";var_dump($_SERVER["HTTP_REFERER"]);}
//if (OPENIDDEBUG) {echo "<br>SESSION BEFORE ADDCMT = ";if (isset($_SESSION["addcmt"])) var_dump($_SESSION["addcmt"]);echo "<br>SESSION BEFORE: CMT_TEXT = ";if (isset($_SESSION["cmt_text"])) var_dump($_SESSION["cmt_text"]);echo "<br>SESSION BEFORE: openid_identifier = ";if (isset($_SESSION["openid_identifier"])) var_dump($_SESSION["openid_identifier"]);echo "<br>SESSION BEFORE: janrain_nonce = ";if (isset($_SESSION["janrain_nonce"])) var_dump($_SESSION["janrain_nonce"]);echo "<br>SESSION BEFORE: openid_return_url = ";if (isset($_SESSION["openid_return_url"])) var_dump($_SESSION["openid_return_url"]);}
//if (!class_exists("openid",FALSE)) require_once PATH_CLASSES . "/lib/openid.php";echo "<br><hr>";$pth = "/tmp/_php_consumer_test";echo "<h4>Content of directory $pth BEFORE:</h4>";if (is_dir($pth)) {$dir = scandir($pth);reset($dir);while ((list($k,$v)=each($dir))) echo "<br>$k $v";}$pth = "/tmp/_php_consumer_test/associations";echo "<h4>Content of directory $pth BEFORE:</h4>";if (is_dir($pth)) {$dir = scandir($pth);reset($dir);while ((list($k,$v)=each($dir))) echo "<br>$k $v";}
//CLEAN://debug::rr(openid::cleanStore());echo "<h4>Content of directory $pth AFTER:</h4>";if (is_dir($pth)) {$dir = scandir($pth);reset($dir);while ((list($k,$v)=each($dir))) echo "<br>$k $v";}debug::rr(array_keys($_SESSION));echo "<br><hr>";
/*
//TODO: perhaps simplify with glob() ?
echo "<hr>";
$pth = "/tmp/_php_consumer_test";echo "<h4>$pth</h4>";if (is_dir($pth)) {$dir = scandir($pth);reset($dir);while ((list($k,$v)=each($dir))) echo "<br>$k $v";}
$pth = "/tmp/_php_consumer_test/associations";echo "<h4>$pth</h4>";if (is_dir($pth)) {$dir = scandir($pth);reset($dir);while ((list($k,$v)=each($dir))) {echo "<br>$k $v : ";var_dump(is_dir($v));var_dump(is_file($v));var_dump(is_readable($v));var_dump(is_executable($v));var_dump(is_link($v));}}
//$pth = "/tmp/_php_consumer_test/associations";echo "<h4>$pth</h4>";if (is_dir($pth)) {$dir = scandir($pth);reset($dir);while ((list($k,$v)=each($dir))) echo "<br>$k $v";}
$pth = "/tmp/_php_consumer_test/nonces";echo "<h4>$pth</h4>";if (is_dir($pth)) {$dir = scandir($pth);reset($dir);while ((list($k,$v)=each($dir))) echo "<br>$k $v";}
$pth = "/tmp/_php_consumer_test/temp";echo "<h4>$pth</h4>";if (is_dir($pth)) {$dir = scandir($pth);reset($dir);while ((list($k,$v)=each($dir))) echo "<br>$k $v";}
echo "<hr>";
*/
//debug::rrr();
// --------------------------------
// -- GPC indata
// --------------------------------
// needed for form, in all situations
functions::gpc_declare_input("openid_identifier", "", false, array(), true);
// needed for form, in all situations
functions::gpc_declare_input("cmt_text", "", false, array(), true, false);
functions::gpc_declare_input("cmt_name", "", false, array(), true, true);
// needed on return from openid check
functions::gpc_declare_input("addcmt", 0, true, array(), true);
//functions::gpc_declare_input("janrain_nonce","",false,array(),true); // OBSOLETE?
// -------------------------
// -- If sign-out requested
if (isset($_REQUEST["relog"])) {
unset($_SESSION["openid_last_valid_identifier"]);
unset($_SESSION["openid_identifier"]);
if (isset($GLOBALS["domain"])) {
unset($GLOBALS["domain"]);
}
}
if (OPENIDDEBUG && isset($_REQUEST["relog"])) {
echo "<br>openid_last_valid_identifier <strong>after relog</strong>= ";
var_dump($_SESSION["openid_last_valid_identifier"]);
}
functions::gpc_declare_input("openid_last_valid_identifier", "", false, array(), true);
if (OPENIDDEBUG) {
echo "<br>openid_last_valid_identifier <strong>after gpc</strong> = ";
var_dump($_SESSION["openid_last_valid_identifier"]);
}
if (OPENIDDEBUG) {
echo "<br>openid_last_valid_identifier <strong>when setting domain</strong> = ";
var_dump($_SESSION["openid_last_valid_identifier"]);
}
// -- Set domain of OpenID provider
$GLOBALS["domain"] = openid::setOpDomain();
if (OPENIDDEBUG) {
echo "<br>freshly set <strong>DOMAIN</strong> = ";
var_dump($GLOBALS["domain"]);
}
//.........这里部分代码省略.........