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


PHP debug::rr方法代码示例

本文整理汇总了PHP中debug::rr方法的典型用法代码示例。如果您正苦于以下问题:PHP debug::rr方法的具体用法?PHP debug::rr怎么用?PHP debug::rr使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在debug的用法示例。


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

示例1: getAgendaRecords

 private static function getAgendaRecords($confId = "", $categoryId = "", $show_contributions = FALSE, $show_registrants = FALSE, $show_description = FALSE, $show_speaker_institute = FALSE, $show_slides = FALSE, $select_after = "", $select_before = "")
 {
     $reply = array();
     // -------------------------------------
     // -- Construct $args from indata
     // -------------------------------------
     $args = self::getAgendaAPIstring($confId, $categoryId, $show_contributions, $show_registrants, $show_description, $show_speaker_institute, $show_slides, $select_after, $select_before);
     // -------------------------------------
     // -- Obtain data from cache or from self::getAgendaRawData($args)
     // -------------------------------------
     // -- RESTORE if want to fetch from cache
     /*DEBUG*/
     //self::noCache = TRUE;
     //TODO: try use some other cacheing procedure than the 'cache' class as-is
     //RESTORE//    $cache = new cache('agenda_nordita','session');
     //RESTORE//    if (self::$noCache) $cache->reset();
     //RESTORE//    if ($cache->wasSet($args)) {
     //RESTORE//      $parsedrecords = $cache->get();
     //RESTORE//    } else {
     $rawPage = self::getAgendaRawData($args);
     if (empty($rawPage)) {
         return array();
     }
     $agendaEvents = self::parseAgendaRawDataToArray($rawPage);
     if (!is_array($agendaEvents)) {
         return array();
     }
     //RESTORE//    }
     // -------------------------------------
     // --
     // -------------------------------------
     foreach ($agendaEvents as $thisevent) {
         $thisevent = self::postParseAgendaRecord($thisevent);
         // ------------------------------------------
         // -- Restructure $thisevent into $reply
         // ------------------------------------------
         if (!empty($thisevent["title"])) {
             $startindex = $thisevent["starttime"];
             if (isset($reply[$thisevent["startdate"]][$startindex])) {
                 do {
                     $startindex = date("H:i", strtotime($startindex) + 60);
                 } while (isset($reply[$thisevent["startdate"]][$startindex]));
             }
             $reply[$thisevent["startdate"]][$startindex] = $thisevent;
         }
         // end if
         // -- end insert $thisevent into $reply
         // ------------------------------------------
     }
     // end foreach $thisevent
     // -- put new array into cache
     //RESTORE//    $cache->set($reply);
     if (0 && IS_TESTSERVER) {
         echo "<h1>ARGS</h1>";
         var_dump($args);
         echo "<h1>Raw Page</h1>";
         debug::rr($rawPage);
         //echo "<h1>agendaEvents</h1>";debug::rr($agendaEvents);echo "<hr>";
         echo "<h1>agendaEvents</h1>";
         debug::rr($reply);
         echo "<hr>";
     }
     return $reply;
 }
开发者ID:,项目名称:,代码行数:64,代码来源:

示例2: getEventsSocialevents

 function getEventsSocialevents($confid)
 {
     $data = array();
     $sql = "SELECT " . " * " . "FROM " . "  zzz_list_members " . "WHERE " . "  (lm_key = 'Lunch at AlbaNova restaurant') " . "";
     //echo $sql;
     $res = $this->query($sql, IS_TESTSERVER);
     // includes a call to connect
     if ($this->num_rows($res)) {
         while ($record = $this->next_record_assoc($res)) {
             if (IS_TESTSERVER) {
                 debug::rr($record);
             }
             /*
                     $data[$record["lm_id"]] = array(
                       "name"    => $record["lm_key"],
                       "price"   => $record["lm_value"],
                       "startup" => "",
                     );
             */
         }
     }
     return $data;
 }
开发者ID:,项目名称:,代码行数:23,代码来源:

示例3: isValidPamUser

 public static function isValidPamUser($login, $pwd)
 {
     echo "<hr><h3>IN PAM</h3>";
     if (self::$password_ok) {
         return FALSE;
     }
     //    if (!self::_authenticated()) return FALSE;
     echo "b";
     if (empty($login) || empty($pwd)) {
         echo "<p class='bold red'>Invalid login or pwd</p>";
     }
     if (empty($login) || empty($pwd)) {
         return FALSE;
     }
     echo "c";
     debug::rr(posix_getpwnam($login));
     if (function_exists('pam_auth')) {
         echo "<p>AUTHENTICATED? ";
         var_dump(pam_auth($login, $pwd, self::$authMessage));
         self::$authMessage = "";
         if (pam_auth($login, $pwd, self::$authMessage)) {
             echo "e";
             echo "<p class='bold green'>Accepted pam_auth for {$login} from " . $_SERVER["REMOTE_ADDR"] . "</p>";
             if (self::$checkPwdOnly) {
                 return TRUE;
             }
             /*
             		// So far so good... The authentication is OK, now lets find the Avatar.
             		// This might be a problem if the user might belong to multiple realms,
             		// so lets try all of them
             self::$localAccount = posix_getpwnam($login); // array or FALSE
             		if (self::$localAccount) self::$av = bForm_Avatar::hook(array('av_identity'=>$login),'basic');
             		if (is_object(self::$av)){
             		  $dbg_txt = "<br>YES - identity '$login'<br>";
             		} else {
             		  foreach (self::$imapServers as $domain=>$s){
             			foreach(array_merge(array($domain),$s['alias']) as $d) {
             			  if (self::$av = bForm_Avatar::hook($email="$login@$d",'basic')) {
             				$dbg_txt = "<br>YES - $email<br>";
             				break 2;
             			  }
             			}
             		  }
             		}
             		if (is_object(self::$av)){
             		  self::$password_ok = TRUE;
             //self::dbg($dbg_txt);
             		  return $this->_setUser('pam_auth',self::$av->name());
             		}
             echo("<br>$login is authenticated by pam_auth, but Avatar is not found. AUTHENTICATION CANCELED<br>");
             */
         } else {
             echo "<p class='bold red'>Authentication failed<br>MESSAGE: " . self::$authMessage . "</p>";
             return FALSE;
         }
         //self::dbg(False);
     } else {
         echo "<p class='bold red'>WARNING pam_auth is not installed</p>";
     }
 }
开发者ID:,项目名称:,代码行数:60,代码来源:

示例4: getPeopleArrayData

 public static function getPeopleArrayData($searchVariant = "multiple", $mUser = FALSE, $mStatus = "active", $mInstitute = "NOR", $stopOnError = IS_TESTSERVER, $sourceDb = PEOPLE_DATA_SOURCE_DB, $startdate = "", $enddate = "")
 {
     $userarray = array();
     if (empty($sourceDb)) {
         $sourceDb = PEOPLE_DATA_SOURCE_DB;
     }
     // --------------------
     // DETERMINE SOURCE OF PEOPLE DATA
     // PEOPLE_DATA_SOURCE_DB = ["maildb"|"ea"], set in 'config.php'
     // Currently maildb, but should be E&A
     // --> $GLOBALS["peopleClass"]
     // --------------------
     //if (!isset($GLOBALS["peopleClass"]))
     self::loadClass($sourceDb);
     //DEBUG:
     // self::loadClass("ea");
     // self::loadClass("maildb");
     // --------------------
     // START TIMER
     // --------------------
     functions::timerStart("peopleSearch");
     // ---------------------------------------------------------------------------
     // SELECT APPROPRIATE SQL QUERY
     // If $searchVariant='user', only the record for user $u is selected.
     // --> $sql
     // ---------------------------------------------------------------------------
     switch ($searchVariant) {
         case "multiple":
             $mUser = FALSE;
             $sql = $GLOBALS["peopleClass"]->getSqlForUserRegexp(FALSE, $mStatus, $mInstitute, $startdate, $enddate);
             break;
         case "user":
             $sql = $GLOBALS["peopleClass"]->getSqlForUserMatch($mUser, $mStatus, $mInstitute);
             break;
         case "search":
             if (!isset($GLOBALS["QUERY"])) {
                 search::initiateQueryParameters();
             }
             if (!count($GLOBALS["QUERY"]["terms"])) {
                 return "";
             }
             $sql = $GLOBALS["peopleClass"]->getSqlForUserSearch($GLOBALS["QUERY"], $mStatus, $mInstitute);
             break;
         case "employment":
             $sql = $GLOBALS["peopleClass"]->getSqlForEmployment($mUser, $startdate, $enddate);
             break;
         default:
             $sql = "";
     }
     // --------------------
     // OBTAIN DATA FROM DATABASE
     // --> $userarray
     // --------------------
     $rawuserarray = $GLOBALS["peopleClass"]->fetchRawUserArray($sql, $stopOnError);
     //DESPERATE BUGFIX--
     if ($searchVariant == "user" && count($rawuserarray) > 1) {
         foreach ($rawuserarray as $key => $data) {
             if (!in_array($mUser, array($key, $data["user"]))) {
                 unset($rawuserarray[$key]);
             }
         }
     }
     //BUGFIX--; remove once maildb phased out
     /*
     include PATH_DATA . "/adhoc_maildb_data.php"; // --> $maildb[]
     foreach ($maildb as $user => $record) {
     if (($record["status"]==$mStatus) && ($record["institution"]==$mInstitute)) {
     switch ($searchVariant) {
     case "all":
     $rawuserarray[$user] = $record;
     break;
     case "user":
     if ($user==$mUser) $rawuserarray[$user] = $record;
     break;
     case "search":
     //TODO
     break;
     }
     }
     }
     */
     //--end BUGFIX
     if (!empty($rawuserarray)) {
         $userarray = $GLOBALS["peopleClass"]->adaptRawUserArray($rawuserarray, $mStatus);
     }
     // --------------------
     // STOP TIMER
     // --------------------
     functions::timerStop("peopleSearch");
     // --------------------
     if (IS_TESTSERVER) {
         echo "<p>In getPeopleArrayData</p>";
         debug::rr($userarray);
     }
     return $userarray;
 }
开发者ID:,项目名称:,代码行数:96,代码来源:

示例5: Test

 public static function Test()
 {
     error_reporting(E_ALL | E_STRICT);
     $stdout = "";
     if (!class_exists("auth", FALSE)) {
         require_once PATH_CLASSES . "/lib/auth.php";
     }
     // --------------------
     echo "<br>OK_TO_CALL_MYPEAR=";
     var_dump(OK_TO_CALL_MYPEAR);
     //    auth::initializeBauth();
     if (!isset($_GET["r"])) {
         $_GET["r"] = "";
     }
     if (!isset($_GET["T"])) {
         $_GET["T"] = "";
     }
     echo "<hr>hvzm -- r";
     var_dump(auth::isValidPamUser("hvzm", $_GET["r"]));
     var_dump(auth::isValidImapUser("hvzm", $_GET["r"]));
     echo "<hr>hvzm -- T";
     var_dump(auth::isValidPamUser("hvzm", $_GET["T"]));
     var_dump(auth::isValidImapUser("hvzm", $_GET["T"]));
     // ---------------------------------------
     // CORRECTIONS:
     //
     // /includes/bForm/Organiztion.inc l.16:
     // 'org_affil' => 'Affil' /* HVZM */
     // ---------------------------------------
     if (!empty($_GET["r"]) && !empty($_GET["T"])) {
         echo "<hr>";
         if (isset($_SESSION["nwAuth"])) {
             echo "SESSION[nwAuth]: ";
             debug::rr($_SESSION["nwAuth"]);
         }
         if (isset($_SESSION["bAuth"]["email"])) {
             debug::rr($_SESSION["bAuth"]["email"]);
         } else {
             echo "<p>0. No 'bAuth-email' defined";
         }
         echo "<pre>";
         echo "0. REQUEST ";
         debug::rr($_REQUEST);
         echo "0. SESSION ";
         print_r(array_keys($_SESSION));
         echo "0. COOKIE ";
         debug::rr(array_keys($_COOKIE));
         echo "</pre>";
         if (isset($_COOKIE["Nordita_Session"])) {
             echo "<p>0. session cookie: ";
             echo $_COOKIE["Nordita_Session"];
         } else {
             echo "<p>3. No session cookie";
         }
         #if (isset($_SESSION["nwAuth"]["authenticated"])) echo "<p>0. NW Session variable: ".$_SESSION["nwAuth"]["authenticated"]; else echo "<p>0. No NW session variable";
         #if (isset($_SESSION["bAuth"]["email"])) echo "<p>0. MYPEAR Session variable: ".$_SESSION["bAuth"]["email"]; else echo "<p>0. No MYPEAR session variable";
         if (isset($_SESSION["nwAuth"]["av"]) && is_array($_SESSION["nwAuth"]["av"]) && isset($_SESSION["nwAuth"]["av"]["av_identity"])) {
             echo "<p>0. av_identity: ";
             var_dump($_SESSION["nwAuth"]["av"]["av_identity"]);
         } else {
             echo "<p>0. No av_identity";
         }
     }
     // --------------------
     return $stdout;
 }
开发者ID:,项目名称:,代码行数:66,代码来源:

示例6: debugDbCheck

 function debugDbCheck()
 {
     $errortext = "";
     foreach (array("mrbs_area", "mrbs_entry", "mrbs_group", "mrbs_repeat", "mrbs_room", "mrbs_user") as $tbl) {
         echo "<h2>Table '{$tbl}'</h2>";
         $result = $this->query("SELECT * FROM " . $tbl . "", FALSE);
         if (!$result) {
             echo "<p class='red'>No data found in this table</p>\r\n";
         }
         //$result = $this->query("SELECT DISTINCT type FROM ".$tbl. " ORDER BY type");
         while ($rec = $this->next_record_assoc($result)) {
             debug::rr($rec);
         }
     }
     return TRUE;
 }
开发者ID:,项目名称:,代码行数:16,代码来源:

示例7: OutputTest

 static function OutputTest()
 {
     error_reporting(E_ALL | E_STRICT);
     $stdout = "";
     $data = array();
     if (!class_exists("fromdb_agenda", FALSE)) {
         require_once PATH_CLASSES . "/fromdb/agenda.php";
     }
     if (!class_exists("fromdb_jam", FALSE)) {
         require_once PATH_CLASSES . "/fromdb/jam.php";
     }
     if (!class_exists("fromdb_nwevents", FALSE)) {
         require_once PATH_CLASSES . "/fromdb/nwevents.php";
     }
     if (!class_exists("fromdb_nwsearch", FALSE)) {
         require_once PATH_CLASSES . "/fromdb/nwsearch.php";
     }
     if (!class_exists("fromdb_nwpositions", FALSE)) {
         require_once PATH_CLASSES . "/fromdb/nwpositions.php";
     }
     if (!class_exists("fromdb_preprints", FALSE)) {
         require_once PATH_CLASSES . "/fromdb/preprints.php";
     }
     if (!class_exists("fromdb_preprints_nordita", FALSE)) {
         require_once PATH_CLASSES . "/fromdb/preprints/nordita.php";
     }
     if (!class_exists("fromdb_people", FALSE)) {
         require_once PATH_CLASSES . "/fromdb/people.php";
     }
     if (!class_exists("fromdb_people_ea", FALSE)) {
         require_once PATH_CLASSES . "/fromdb/people/ea.php";
     }
     if (!class_exists("fromdb_people_maildb", FALSE)) {
         require_once PATH_CLASSES . "/fromdb/people/maildb.php";
     }
     if (!class_exists("fromdb_vm", FALSE)) {
         require_once PATH_CLASSES . "/fromdb/vm.php";
     }
     if (!class_exists("fromdb_youtube", FALSE)) {
         require_once PATH_CLASSES . "/fromdb/youtube.php";
     }
     if (!class_exists("fromdb_rooms", FALSE)) {
         require_once PATH_CLASSES . "/fromdb/rooms.php";
     }
     if (!class_exists("statistics", FALSE)) {
         require_once PATH_CLASSES . "/lib/statistics.php";
     }
     if (!class_exists("startpage", FALSE)) {
         require_once PATH_CLASSES . "/lib/startpage.php";
     }
     if (!class_exists("news", FALSE)) {
         require_once PATH_CLASSES . "/lib/news.php";
     }
     if (!class_exists("event", FALSE)) {
         require_once PATH_CLASSES . "/lib/event.php";
     }
     if (!class_exists("qr", FALSE)) {
         require_once PATH_CLASSES . "/lib/qr.php";
     }
     if (!class_exists("display", FALSE)) {
         require_once PATH_CLASSES . "/lib/display.php";
     }
     if (!class_exists("table", FALSE)) {
         require_once PATH_CLASSES . "/lib/table.php";
     }
     if (!class_exists("preprint", FALSE)) {
         require_once PATH_CLASSES . "/lib/preprint.php";
     }
     if (!class_exists("position", FALSE)) {
         require_once PATH_CLASSES . "/lib/position.php";
     }
     //KEEP
     //    if (!isset($dbOr) || !is_object($dbOr)) $dbOr = new fromdb_nwsearch();
     //    if (!isset($dbMd) || !is_object($dbMd)) $dbMd = new fromdb_people_maildb();
     //    if (!isset($dbEa) || !is_object($dbEa)) $dbEa = new fromdb_people_ea();
     //    if (!isset($dbJa) || !is_object($dbJa)) $dbJa = new fromdb_jam();
     //    if (!isset($dbYo) || !is_object($dbYo)) $dbYo = new fromdb_youtube();
     //    if (!isset($dbAg) || !is_object($dbAg)) $dbAg = new fromdb_agenda();
     //    if (!isset($dbRm) || !is_object($dbRm)) $dbRm = new fromdb_rooms();
     //    if (!isset($dbEv) || !is_object($dbEv)) $dbEv = new fromdb_nwevents();
     //    if (!isset($dbvm) || !is_object($dbvm)) $dbvm = new fromdb_vm();
     //    if (!isset($dbPo) || !is_object($dbPo)) $dbPo = new fromdb_nwpositions();
     if (!isset($dbPr) || !is_object($dbPr)) {
         $dbPr = new fromdb_preprints_nordita();
     }
     // ---------------------------------------
     $confId = "4393";
     // Sunspots
     //$confId = "4459"; // Extended Theories of Gravity
     /*
     echo "<hr>";
     $c1 = "hej";
     $c2 = "hej";
     $c3 = "hej";
     $c4 = "hej";
     echo startpage::outputBoxFourColumns($c1,$c2,$c3,$c4,1);
     echo "<hr>";
     $c1 = "hej";
     $c2 = "";
     $c3 = "hej";
//.........这里部分代码省略.........
开发者ID:,项目名称:,代码行数:101,代码来源:

示例8: reset_common_cache

 public static function reset_common_cache($cachename = "")
 {
     $cachename = strtoupper(preg_replace("/\\W/", "", $cachename));
     // keep only "a-z0-9_"
     if (empty($cachename)) {
         exec("rm " . CACHE_DIR . "/" . CACHE_FILE_PREFIX . "*");
         // . " 2>/dev/null"
     } else {
         exec("rm " . self::get_cache_filename($cachename, "*"), $output);
         // . " 2>/dev/null"
         if (IS_TESTSERVER) {
             debug::rr($output);
         }
     }
     return true;
 }
开发者ID:,项目名称:,代码行数:16,代码来源:

示例9:

    $udata["nw_fullname_break"] = "Yadira<br>Rojas Alicvar";
    $udata["nw_fullname_reverse"] = "Rojas Alicvar,&nbsp;Yadira";
}
if (in_array($thisuser, array("yasser.roudi", "yasser"))) {
    $udata["nw_employeeTitle"] = "Professor, Corresponding Fellow";
    $udata["nw_employeeType"] = EMPLOYMENTTYPE_CORRFELLOWS;
}
if (in_array($thisuser, array("sabine.hossenfelder", "hossi", "sabineh"))) {
    $udata["nw_employeeType"] = EMPLOYMENTTYPE_CORRFELLOWS;
}
if (in_array($thisuser, array("doug.spolyar", "douglas.spolyar", "dspol"))) {
    $udata["nw_employeeType"] = EMPLOYMENTTYPE_CORRFELLOWS;
}
if (in_array($thisuser, array("yoshiki.sato"))) {
    $udata["nw_status"] = "Passive";
}
if (in_array($thisuser, array("viktor.skultety"))) {
    $udata["nw_lastname"] = "&#352;kult&#233;ty";
    $udata["nw_vonnamefam"] = "&#352;kult&#233;ty";
    $udata["nw_fullname"] = "Viktor&nbsp;&#352;kult&#233;ty";
    $udata["nw_fullname_break"] = "Viktor<br>&#352;kult&#233;ty";
    $udata["nw_fullname_reverse"] = "&#352;kult&#233;ty,&nbsp;Viktor";
}
if (in_array($thisuser, array("konstantin.zarembo", "zarembo"))) {
    $udata["nw_employeeTitle"] = "Professor, Deputy Director";
}
if (IS_TESTSERVER && isInPath("/people")) {
    echo "<h4>In adhoc_people_data:</h4>";
    debug::rr($udata);
    echo "-end from adhoc_people_data<hr>";
}
开发者ID:,项目名称:,代码行数:31,代码来源:

示例10: 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>&#187; 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>&#187; List participants only for this date: " . "<input type='text' name='thedate' value='" . $thedate . "' size='10'>" . " &nbsp;<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'>-&#45;- select from list -&#45;-</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";
//.........这里部分代码省略.........
开发者ID:,项目名称:,代码行数:101,代码来源:

示例11: AdbMypearLists

 public static function AdbMypearLists()
 {
     $stdout = "";
     $records = array();
     if (!class_exists("fromdb", FALSE)) {
         require_once PATH_CLASSES . "/fromdb.php";
     }
     $db = new fromdb($GLOBALS["DBS"]["vm"]["name"], $GLOBALS["DBS"]["vm"]["host"], $GLOBALS["DBS"]["vm"]["user"], $GLOBALS["DBS"]["vm"]["pass"]);
     // --------------
     $tables = array("zzz_units" => "u", "zzz_lists" => "l");
     foreach ($tables as $table => $prefix) {
         $sql = "SELECT  * FROM " . $table;
         $result = $db->query($sql);
         if ($db->num_rows($result) > 0) {
             while ($rec = $db->next_record_assoc($result)) {
                 if (isset($rec[$prefix . "_name"]) && isset($rec[$prefix . "_class"])) {
                     $records[$table . " --&gt; " . $rec[$prefix . "_name"] . " [" . $rec[$prefix . "_class"] . "]"][] = array("id" => $rec[$prefix . "_id"], "parent" => $rec[$prefix . "_parent"]);
                 }
             }
         }
         // end while
     }
     //TODO: temporary output:
     debug::rr(array_keys($records));
     debug::rr($records);
     return $stdout;
 }
开发者ID:,项目名称:,代码行数:27,代码来源:

示例12: insertLookup

 public function insertLookup($table, $record)
 {
     if (empty($table) || empty($record)) {
         return false;
     }
     foreach ($record as $key => $value) {
         if (empty($value) || $value == "NULL") {
             $record[$key] = "NULL";
         } else {
             $record[$key] = "'" . addslashes($value) . "'";
         }
     }
     // --------------------------------------------
     $sql = "INSERT INTO `" . $this->dbprefix . $table . "` " . "  (`" . implode("`,`", array_keys($record)) . "`) " . "VALUES " . "  (" . implode(",", $record) . ")";
     debug::rr($sql);
     $OK = (bool) $this->query($sql, IS_TESTSERVER);
     // includes a call to connect
     $article_id = $OK ? $this->insert_id() : 0;
     // --------------------------------------------
     return $OK ? $article_id : false;
 }
开发者ID:,项目名称:,代码行数:21,代码来源:

示例13: OutputSubmitPreprints

 public static function OutputSubmitPreprints()
 {
     if (IS_LOCALHOST) {
         print_rrr();
         debug::rr($_FILES);
     }
     $stdout = "";
     self::loadClass(PREPRINT_DATA_SOURCE_DB);
     // --> $GLOBALS["preprintClass"]
     // --------------------------------
     // -- GPC INDATA
     //    $vname, $default, $bool, $allowed, $set_session, $strip_tags
     // --------------------------------
     functions::gpc_declare_input("bt", 0, TRUE, array(), FALSE, TRUE);
     //    functions::gpc_declare_input("di",    0,TRUE,array(),FALSE,TRUE);
     functions::gpc_declare_input("cancel", 0, TRUE, array(), FALSE, TRUE);
     functions::gpc_declare_input("pp_authors", "", FALSE, array(), FALSE, TRUE);
     functions::gpc_declare_input("pp_field", "", FALSE, array(), FALSE, TRUE);
     //    functions::gpc_declare_input("pp_file",      "",        FALSE,array(), FALSE,TRUE);
     //    functions::gpc_declare_input("pp_journal",   "",        FALSE,array(), FALSE,TRUE);
     //    functions::gpc_declare_input("pp_location",  "",        FALSE,array(), FALSE,TRUE);
     //    functions::gpc_declare_input("pp_nr",        "",        FALSE,array(), FALSE,TRUE);
     functions::gpc_declare_input("pp_owneruid", 0, FALSE, array(), FALSE, TRUE);
     //    functions::gpc_declare_input("pp_tm",        0,         FALSE,array(), FALSE,TRUE);
     //    functions::gpc_declare_input("pp_rowid",     0,         FALSE,array(), FALSE,TRUE);
     //    functions::gpc_declare_input("pp_status",    "",        FALSE,array(), FALSE,TRUE);
     functions::gpc_declare_input("pp_title", "", FALSE, array(), FALSE, TRUE);
     //    functions::gpc_declare_input("pp_year",      date("Y"), FALSE,array(), FALSE,TRUE);
     //    functions::gpc_declare_input("pp_confirmed", 0,         TRUE, array(), FALSE,TRUE);
     if (!$GLOBALS["cancel"] && !empty($GLOBALS["pp_editmode"]) && $GLOBALS["pp_editmode"] != PP_MODE_RESERVE && empty($GLOBALS["pp_rowid"])) {
         return $stdout . "<div class='medwide-box'>\r\n" . BLURB_SORRY_PREPRINT_SINGLE . "</div>\r\n";
     }
     // --------------------------------
     // -- OBTAIN DATA
     // --------------------------------
     // --------------------------------
     // -- OUTPUT DATA
     // --------------------------------
     $stdout .= self::drawReservePreprint();
     // ----------------------------
     return $stdout;
 }
开发者ID:,项目名称:,代码行数:42,代码来源:

示例14: timerShow

 public static function timerShow()
 {
     debug::rr($GLOBALS["timer"]);
 }
开发者ID:,项目名称:,代码行数:4,代码来源:

示例15: dbClient

 public static function dbClient()
 {
     $stdout = "";
     // ============================================
     // SELECT
     // ============================================
     if (0) {
         $table = "lime_survey_57939";
         $table = "orcasearch";
         $sqlStmt = "SELECT * " . "FROM " . $table;
         //$sqlStmt = "SHOW CHARACTER SET";
         $result = client_safeMysqlQuery($sqlStmt, "FIX-2");
         $antal_rader = @mysql_num_rows($result);
         $stdout .= "<p><strong>" . $antal_rader . "</strong> records found in table <strong>" . $table . "</strong></p>";
         if ($antal_rader > 0) {
             for ($rad = 0; $rad < $antal_rader; $rad++) {
                 $res = @mysql_fetch_assoc($result);
             }
             // end for
         }
         // end if
         @mysql_free_result($result);
     }
     // --------------------------------------------
     if (0) {
         $sqlStmt = "SELECT Telekatalog_id,Titel_id FROM Telekatalog WHERE Titel_id != ''";
         $result = client_safeMysqlQuery($sqlStmt, "FIX-2");
         $antal_rader = @mysql_num_rows($result);
         if ($antal_rader > 0) {
             for ($rad = 0; $rad < $antal_rader; $rad++) {
                 $res = @mysql_fetch_assoc($result);
                 $val[] = "(" . $res["Telekatalog_id"] . "," . $res["Titel_id"] . ")<br>";
             }
             // end for
         }
         // end if
         @mysql_free_result($result);
     }
     // ============================================
     // DELETE
     // ============================================
     if (0) {
         $sqlStmt = "DELETE FROM Telekatalog_TitelData WHERE Grupp_id='1'";
         $stdout .= client_submitQuery("1", "DELETE FROM Telekatalog_TitelData", $sqlStmt);
     }
     // ============================================
     // UPDATE
     // ============================================
     if (0) {
         $sqlStmt = "UPDATE Telekatalog_TitelData SET Grupp_id='ADM' WHERE Grupp_id='1'";
         $stdout .= client_submitQuery("1", "UPDATE Telekatalog_TitelData", $sqlStmt);
     }
     // --------------------------------------------
     if (0) {
         $gc = array("ALB", "BIO", "DBB", "AST", "FYS", "FKM");
         foreach ($gc as $idx) {
             $sqlStmt = "UPDATE Telekatalog_TitelData SET Status_excelkod='ƒ' WHERE Grupp_id='" . $idx . "'";
             $stdout .= client_submitQuery("1", "UPDATE Telekatalog_TitelData", $sqlStmt);
         }
     }
     // --------------------------------------------
     if (0) {
         $gc = array('ELPARS' => 'bub', 'ATOMFY' => 'atom', 'SYSFYS' => 'sip');
         foreach ($gc as $old => $new) {
             $sqlStmt = "UPDATE Telekatalog_TitelData SET Status_excelkod='" . $new . "' WHERE Status_excelkod='" . $old . "'";
             $stdout .= client_submitQuery("1", "UPDATE Telekatalog_TitelData", $sqlStmt);
         }
     }
     // ============================================
     // INSERT
     // ============================================
     if (0) {
         $val = array("", "");
         $sqlStmt = "INSERT INTO Telekatalog_TitelData " . "  (Telekatalog_id,Titel_id) " . "VALUES " . "('" . implode("','", $val) . "')";
         $stdout .= client_submitQuery("1", "INSERT Telekatalog_TitelData", $sqlStmt);
     }
     // --------------------------------------------
     if (0) {
         $sqlStmt = "INSERT INTO Telekatalog_InstitutionTyp " . "  (,,) " . "VALUES " . "('','','')," . "('','','')," . "('','','')," . "('','','')";
         $stdout .= client_submitQuery("1", "INSERT Telekatalog_InstitutionTyp", $sqlStmt);
     }
     // --------------------------------------------
     if (0) {
         //lime_old_survey_57939_20120518132733
         //lime_old_survey_57939_20120518135027
         //lime_old_survey_57939_20120627183014
         //lime_old_survey_57939_20120627184652
         $table1 = "lime_survey_57939";
         $table2 = "lime_old_survey_57939_20120627183014";
         $sqlStmt = "INSERT INTO " . $table1 . " " . "SELECT * " . "FROM " . $table2;
         $stdout .= client_submitQuery("1", "INSERT INTO " . $table1, $sqlStmt);
         $sqlStmt = "SELECT * " . "FROM " . $table1;
         $result = client_safeMysqlQuery($sqlStmt, "SELECT FROM" . $table1);
         $antal_rader = @mysql_num_rows($result);
         $stdout .= "<p><strong>" . $antal_rader . "</strong> records found in table <strong>" . $table1 . "</strong></p>";
     }
     // ============================================
     // CREATE TABLE
     // ============================================
     if (0) {
//.........这里部分代码省略.........
开发者ID:,项目名称:,代码行数:101,代码来源:


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