/** * Muestra un mensaje de informacion del sistema */ function infoMessage($title, $message) { //include getTemplate('fheader.php'); print_title($title, '98%'); echo '<p align="center">' . $message . '</p>'; exit; }
function choose() { while (list($k, $v) = each($GLOBALS)) { global ${$k}; } $collectorid = getcollectorid("advalvas"); $query = "DELETE FROM station " . "WHERE collectorid='" . addslashes($collectorid) . "'"; $sql->query($query); $query = "DELETE FROM program"; $sql->query($query); print_header_open(); print_title("Choose Stations for " . $this->MODULE_NAME); print_header_close(); print "\n <FORM ACTION=\"" . page_name() . "\" METHOD=POST>\n <INPUT TYPE=HIDDEN NAME=\"module\" VALUE=\"" . prepare($module) . "\">\n <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2>\n <TR BGCOLOR=\"#ccccff\">\n <TD><B>Original Name</B></TD>\n <TD><B>xawtv Name</B></TD>\n <TD><B>Channel</B></TD>\n </TR>\n "; while (list($name, $value) = each($HTTP_POST_VARS)) { if ($value == 1) { $suburl = "?NL&" . $name; $channel_name = preg_replace("/_/", " ", $name); $channel_name = preg_replace("/\\|/", "+", $channel_name); $query = $sql->insert_query("station", array("sname" => $this->transformName($channel_name), "collectorid" => $collectorid, "suburl" => $suburl, "rname" => $this->transformName($channel_name), "channel" => "0")); $result = $sql->query($query); $sid = $sql->last_record($result); print "\n\t\t\t\t<TR>\n\t\t\t\t\t\t<TD>" . prepare($channel_name) . "</TD>\n\t\t\t\t\t\t<TD>\n\t\t\t\t\t\t\t\t<INPUT TYPE=TEXT NAME=\"T" . htmlentities($sid) . "\"\n\t\t\t\t\t\t\t\tVALUE=\"" . prepare($channel_name) . "\">\n\t\t\t\t\t\t</TD>\n\t\t\t\t\t\t<TD>" . html_form::text_widget("C" . htmlentities($sid)) . "</TD>\n\t\t\t\t</TR>\n\t\t\t\t"; } } print "</TABLE>\n"; print "<P><INPUT TYPE=SUBMIT NAME=SUBMIT VALUE=\"Update\"></P>\n"; print "</FORM>\n"; print_page_close(); exit; }
function view() { foreach ($GLOBALS as $k => $v) { global ${$k}; } $fd = fopen("http://www.sp.uconn.edu/~wwwnews/huskyvision", "r"); if ($fd) { print_header_open(); print_title("HuskyVision"); print_header_close(); print "Deleting station and program settings.<br>\n"; $collectorid = getcollectorid("huskyvision"); $query = "DELETE FROM station WHERE collectorid='" . addslashes($collectorid) . "'"; $sql->query($query); $query = "DELETE FROM program"; $sql->query($query); echo "<p>Scanning HuskyVision...<br>\n"; echo "Stations found: <br>\n"; print "\n\t\t\t\t<FORM ACTION=\"" . $this->page_name . "\" METHOD=POST>\n\t\t\t\t<INPUT TYPE=HIDDEN NAME=\"module\" VALUE=\"" . prepare($module) . "\">\n\t\t\t\t<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2>\n\t\t\t\t\t<TR BGCOLOR=\"#ccccff\">\n\t\t\t\t\t\t<TD><B>Name</B></TD>\n\t\t\t\t\t\t<TD><B>Add</B></TD>\n\t\t\t\t\t</TR>\n\t\t\t"; $i = 0; while (!feof($fd)) { $lijn = fgets($fd, 1024); list($channel_id, $channel_name) = explode(",", $lijn); if (!empty($channel_name)) { $query = $sql->insert_query("station", array("sid" => NULL, "sname" => $channel_name, "collectorid" => "2", "rname" => $channel_name, "channel" => $channel_id)); $result = $sql->query($query); $sid = $sql->last_record($result); print "\n\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t<TD>" . prepare($channel_name) . "</TD>\n\t\t\t\t\t\t\t<TD>\n\t\t\t\t\t\t\t\t<INPUT TYPE=CHECKBOX NAME=\"T" . htmlentities($sid) . "\" VALUE=\"1\" CHECKED>\n\t\t\t\t\t\t\t\t<INPUT TYPE=HIDDEN NAME=\"N" . htmlentities($sid) . "\" VALUE=\"" . prepare($channel_name) . "\">\n\t\t\t\t\t\t\t\t<INPUT TYPE=HIDDEN NAME=\"C" . htmlentities($sid) . "\" VALUE=\"" . prepare($channel_id) . "\">\n\t\t\t\t\t\t\t</TD>\n\t\t\t\t\t\t</TR>\n\t\t\t\t\t"; $i++; } // end checking for valid name } // end while fclose($fd); print "</table>\n"; print "<p><INPUT TYPE=SUBMIT NAME=SUBMIT VALUE=\"Choose\"></p>\n"; print "</form>\n"; print_page_close(); } // end if fd }
function choose() { while (list($k, $v) = each($GLOBALS)) { global ${$k}; } $collectorid = getcollectorid("advalvas"); $query = "DELETE FROM station " . "WHERE collectorid='" . addslashes($collectorid) . "'"; $sql->query($query); $query = "DELETE FROM program"; $sql->query($query); print_header_open(); print_title("Choose Stations for " . $this->MODULE_NAME); print_header_close(); print "\n\t\t\t<FORM ACTION=\"" . page_name() . "\" METHOD=POST>\n\t\t\t<INPUT TYPE=HIDDEN NAME=\"module\" VALUE=\"" . prepare($module) . "\">\n\t\t\t<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2>\n\t\t\t<TR BGCOLOR=\"#ccccff\">\n\t\t\t\t<TD><B>Original Name</B></TD>\n\t\t\t\t<TD><B>xawtv Name</B></TD>\n\t\t\t\t<TD><B>Channel</B></TD>\n\t\t\t</TR>\n\t\t"; while (list($name, $value) = each($HTTP_POST_VARS)) { if (preg_match("/^T/", $name)) { // derive sid from this... $sid = preg_replace("/^T/", "", $name); // grab all sid-related variables $channel_name = ${"N" . $sid}; $channel_number = ${"C" . $sid}; // create actual insert query $query = $sql->insert_query("station", array("sname" => $this->transformName($channel_name), "collectorid" => "1", "suburl" => $this->transformURL($channel_name), "rname" => $this->transformName($channel_name), "channel" => $channel_number)); $result = $sql->query($query); $old_sid = $sid; $sid = $sql->last_record($result); ${"C" . $sid} = ${"C" . $old_sid}; global ${"C" . $sid}; print "\n\t\t\t\t<TR>\n\t\t\t\t\t<TD>" . prepare($channel_name) . "</TD>\n\t\t\t\t\t<TD>\n\t\t\t\t\t\t<INPUT TYPE=TEXT NAME=\"T" . htmlentities($sid) . "\"\n\t\t\t\t\t\t VALUE=\"" . prepare($channel_name) . "\">\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD>" . html_form::text_widget("C" . htmlentities($sid)) . "</TD>\n\t\t\t\t</TR>\n\t\t\t\t"; } // end if value = 1 } print "</TABLE>\n"; print "<P><INPUT TYPE=SUBMIT NAME=SUBMIT VALUE=\"Update\"></P>\n"; print "</FORM>\n"; print_page_close(); exit; }
function access_denied($p_url = null) { if (null === $p_url) { global $g_logout; $p_url = $g_logout; } print_html_top(); print_head_top(); print_title(config_get('window_title')); print_css(config_get('css_inc_file')); print_head_bottom(); print_body_top(); print_header(config_get('page_title')); print_top_page(config_get('top_page_inc')); echo '<div class="warning">'; echo '<div align="center">Access Denied<br /><br />'; print_bracket_link($p_url, lang_get('proceed')); print '</div></div>'; print_bottom_page(config_get('bottom_page_inc')); print_footer(__FILE__); print_body_bottom(); print_html_bottom(); exit; }
<?php // Include Files include "includes.inc.php"; // Session Identification session_identification(); print_header(); print_title("Scoring board"); $cmd = input_check("show", "!tbl", "ofs", "uid", 0); if ($cmd == "show") { if ($uid == "") { $uid = user_ourself(); } show_score($tbl, $ofs, $uid); score_showuser($uid); } print_footer(); exit; // ============================================================================================ // // // Description: // // // Parameters: // // // Returns: // // function show_score($table, $offset, $user_id)
<?php // Include Files include "includes.inc.php"; // Session Identification session_identification(); print_header(); print_title("Surface"); $cmd = input_check("show", "aid", 0); if ($cmd == "show") { if ($aid == "") { $aid = user_get_home_planet(user_ourself()); } show_surface($aid); } create_submenu(array("View Planet Info" => "anomaly.php?cmd=" . encrypt_get_vars("show") . "&aid=" . encrypt_get_vars($aid), "View Surface Info" => "surface.php?cmd=" . encrypt_get_vars("show") . "&aid=" . encrypt_get_vars($aid))); print_footer(); exit; // ============================================================================================ // // // Description: // // // Parameters: // // // Returns: // // function show_surface($planet_id)
# phpWebNotes - a php based note addition system # Copyright (C) 2000-2002 Webnotes Team - webnotes-devel@sourceforge.net # This program is distributed under the terms and conditions of the GPL # See the files README and LICENSE for details # -------------------------------------------------------- # $Id: login_page.php,v 1.22 2002/09/22 04:17:38 vboctor Exp $ # -------------------------------------------------------- require_once 'core' . DIRECTORY_SEPARATOR . 'api.php'; ### Check to see if already logged in if (isset($g_string_cookie_val) && !empty($g_string_cookie_val)) { login_cookie_check($g_admin_page); } $f_msg = gpc_get_string('f_msg', ''); print_html_top(); print_head_top(); print_title($g_window_title); print_css($g_css_inc_file); print_meta_inc($g_meta_inc_file); print_head_bottom(); print_body_top(); print_header($g_page_title); print_top_page($g_top_page_inc); if ($f_msg === 'error') { echo <<<EOT \t\t<div class="error" align="center"> \t\t\t<strong>ERROR:</strong> Unauthorised access for supplied user name and password. \t\t</div> EOT; } # Warning, if plain passwords are selected if (config_get('auth_type') == AUTH_PLAIN) {
function newai_export($fields, $mode = 'table') { global $common_html, $html_etc; global $return_sql_line, $db; global $columns; //print_R($_GET); global $showlistfieldlist, $group_filter; $tablename = $fields['table']['name']; $SQL = $fields['sql']['SQL']; $init = explode('_', $_GET['action']); $mark = $init[1]; global $tablewidth; $tablewidth = $tablewidth != "" ? $tablewidth : 450; if ($group_filter != "") { $group_filter_Array = explode(':', $group_filter); $TableFieldIndex = $group_filter_Array[0]; $KeyName = $columns[$TableFieldIndex]; $ChildTableName = $group_filter_Array[1]; $ChildTableFieldValueIndex = $group_filter_Array[2]; $ChildTableFieldNameIndex = $group_filter_Array[3]; $ChildColumns = returntablecolumn($ChildTableName); $ChildTableFieldValue = $ChildColumns[$ChildTableFieldValueIndex]; $ChildTableFieldName = $ChildColumns[$ChildTableFieldNameIndex]; $Childhtml_etc = returnsystemlang($ChildTableName, $SYTEM_CONFIG_TABLE); //print_R($Childhtml_etc); $ChildTableFieldHTMLValue = $Childhtml_etc[$ChildTableName][$ChildTableFieldValue]; $ChildTableFieldHTMLName = $Childhtml_etc[$ChildTableName][$ChildTableFieldName]; } else { $KeyName = "说明"; } print "<script>\n\t//CSV\n\tfunction selectid_str_init_CSV(mark)\n\t{\n\tselectid_str = \"\";\n\tfor(i=0;i<document.all(\"selectid\").length-1;i++)\n\t\t{\n\n\t\tel = document.all(\"selectid\").item(i);\n\t\tif(el.checked)\n\t\t{\tval = el.value;\n\t\t\tif(val !=\"\")\t{\n\t\t\t\tselectid_str += val + \",\";\n\t\t\t}\n\t\t}\n\t}\n\n\tell = document.all(\"selectid\").item(document.all(\"selectid\").length-1);\n\tif(ell.checked)\n\t{\tval = ell.value;\n\t\tif(val !=\"\")\t{\n\t\t\tselectid_str += val ;\n\t\t}\n\t}\n\n\ttablename_\t\t=\tdocument.form1.tablename.value;\n\tsearchfield_\t=\tdocument.form1.searchfield.value;\n\tsearchvalue_\t=\tdocument.form1.searchvalue.value;\n\tAdvanceSearch_\t=\tdocument.form1.AdvanceSearch.value;\n\texportfield= selectid_str;\n\n\n\t"; if ($_GET['actionadv'] == "exportadv_default") { //不用显示或得到SELECTID的值 print "\turl=\"?action=export_\"+mark+\"_data&method=CSV&actionadv=exportadv_default&exportfield=\"+exportfield+\"&tablename=\"+tablename_+\"&searchfield=\"+searchfield_+\"&searchvalue=\"+searchvalue_+AdvanceSearch_"; } else { print "\tvar " . $KeyName . "SelectValue = document.form1." . $KeyName . ".options[document.form1." . $KeyName . ".selectedIndex].value;\n\t\t"; print "\turl=\"?action=export_\"+mark+\"_data&method=CSV&exportfield=\"+exportfield+\"&tablename=\"+tablename_+\"&searchfield=\"+searchfield_+\"&searchvalue=\"+searchvalue_+\"&" . $KeyName . "=\"+" . $KeyName . "SelectValue+AdvanceSearch_"; } print "\n\t//alert(url);\n\tlocation=url;\n\t}\n\t//XLS\n\tfunction selectid_str_init_XLS(mark)\n\t{\n\tselectid_str = \"\";\n\tfor(i=0;i<document.all(\"selectid\").length-1;i++)\n\t\t{\n\n\t\tel = document.all(\"selectid\").item(i);\n\t\tif(el.checked)\n\t\t{\tval = el.value;\n\t\t\tif(val !=\"\")\t{\n\t\t\t\tselectid_str += val + \",\";\n\t\t\t}\n\t\t}\n\t}\n\n\tell = document.all(\"selectid\").item(document.all(\"selectid\").length-1);\n\tif(ell.checked)\n\t{\tval = ell.value;\n\t\tif(val !=\"\")\t{\n\t\t\tselectid_str += val ;\n\t\t}\n\t}\n\n\ttablename_\t\t=\tdocument.form1.tablename.value;\n\tsearchfield_\t=\tdocument.form1.searchfield.value;\n\tsearchvalue_\t=\tdocument.form1.searchvalue.value;\n\tAdvanceSearch_\t=\tdocument.form1.AdvanceSearch.value;\n\texportfield= selectid_str;\n\t"; if ($_GET['actionadv'] == "exportadv_default") { //不用显示或得到SELECTID的值 print "\turl=\"?action=export_\"+mark+\"_data&actionadv=exportadv_default&exportfield=\"+exportfield+\"&tablename=\"+tablename_+\"&searchfield=\"+searchfield_+\"&searchvalue=\"+searchvalue_+AdvanceSearch_"; } else { print "\tvar " . $KeyName . "SelectValue = document.form1." . $KeyName . ".options[document.form1." . $KeyName . ".selectedIndex].value;\n\t\t"; print "\turl=\"?action=export_\"+mark+\"_data&exportfield=\"+exportfield+\"&tablename=\"+tablename_+\"&searchfield=\"+searchfield_+\"&searchvalue=\"+searchvalue_+\"&" . $KeyName . "=\"+" . $KeyName . "SelectValue+AdvanceSearch_"; } print "\n\t//url\n\t//alert(url);\n\tlocation=url;\n\t}\n\t</script>"; form_begin("form1"); table_begin($tablewidth); switch ($mode) { case 'table': print_title($common_html['common_html']['tableexport'], 3); print "<TR class=TableData>\n"; print "<TD noWrap align=middle>选择</TD>\n"; print "<TD width=200>字段描述</TD>\n"; print "<TD width=200>字段名称</TD>\n"; print "</TR>\n"; for ($i = 0; $i < sizeof($columns); $i++) { $list = $columns[$i]; print "<TR class=TableData>\n"; print "<TD noWrap align=middle width=20><input type=\"checkbox\" checked name=\"selectfield\" value=\"{$list}\"></TD>\n"; print "<TD>" . $html_etc[$tablename][$list] . "</TD>\n"; print "<TD>{$list}</TD>\n"; print "</TR>\n"; $temp_function = 'selectfield_str'; } break; case 'content': print_title($common_html['common_html']['contentexport'], 3); print "<TR class=TableData>\n"; print "<TD noWrap align=center width=30>选择</TD>\n"; print "<TD width=100>字段描述</TD>\n"; print "<TD width=150>字段名称</TD>\n"; print "</TR>\n"; //附加组数据导出--开始 //print_R($group_filter_Array); if ($group_filter != "" && $_GET['actionadv'] != "exportadv_default") { //如果强制GET变量已经进行过预定义,那么沿用预定义内容进行 2010-9-2 $TableFieldIndex = $group_filter_Array[0]; $KeyName = $columns[$TableFieldIndex]; $PHP_SELF_ARRAY = explode('/', $_SERVER['PHP_SELF']); $FILE_SELF_NAME = array_pop($PHP_SELF_ARRAY); $FileDirName = array_pop($PHP_SELF_ARRAY); //用于PGSQL下面不进行数据较验 //print $_SESSION['LOGIN_USER_ID']; //如果强制GET变量已经进行过预定义,那么沿用预定义内容进行 2010-9-2 //&&$FileDirName=="Teacher" 只有在Teacher目录下面使用 2010-9-25 正常使用 if ($_GET[$KeyName] != "") { //$ChildTableName = $group_filter_Array[1]; //$ChildTableFieldValueIndex = $group_filter_Array[2]; //$ChildTableFieldNameIndex = $group_filter_Array[3]; //print $KeyName; $附加判断条件Array = explode(',', $_GET[$KeyName]); $附加判断条件 = "'" . join("','", $附加判断条件Array) . "'"; $sql = "\n\t\t\t\t\tselect {$ChildTableFieldValue},{$ChildTableFieldName}\n\t\t\t\t\tfrom {$ChildTableName}\n\t\t\t\t\twhere ( {$ChildTableFieldValue} in ({$附加判断条件})\n\t\t\t\t\t\t\tor\n\t\t\t\t\t\t\t{$ChildTableFieldName} in ({$附加判断条件})\n\t\t\t\t\t\t\t)\n\t\t\t\t\torder by {$ChildTableFieldName}"; // } else { $sql = "select {$ChildTableFieldValue},{$ChildTableFieldName} from {$ChildTableName} order by {$ChildTableFieldName}"; } //print $sql; //print $index_name;print_R($_GET); $rs = $db->CacheExecute(150, $sql); $rs_a = $rs->GetArray(); if ($Childhtml_etc[$ChildTableName][$ChildTableFieldName] != "") { $ShowText = "按" . $html_etc[$tablename][$KeyName] . "过滤"; //$ShowText = "按".$Childhtml_etc[$ChildTableName][$ChildTableFieldName]."过滤"; } else { $ShowText = "按" . $html_etc[$tablename][$KeyName] . "过滤"; } print "<TR class=TableData>\n"; print "<TD noWrap align=middle><input type=\"checkbox\" checked name=\"selectidtemp\" disabled value=\"{$index}\"></TD>\n"; print "<TD width=120 nowrap>" . $ShowText . "</TD>\n"; print "<TD width=150 nowrap>"; //print_R($_GET); //print $KeyName; //如果隐藏的话就显示为只读 if ($group_filter_Array[4] == "hidden") { //如果隐藏的话就显示为只读 $显示名称 = returntablefield($ChildTableName, $ChildTableFieldValue, $_GET[$KeyName], $ChildTableFieldName); print "<select class=\"SmallSelect\" name=\"" . $KeyName . "\">\n"; print "<option value=\"" . $_GET[$KeyName] . "\" >" . $显示名称 . "[" . $_GET[$KeyName] . "]</option>\n"; print "</select>\n"; } else { //显示成为列表 print "<select class=\"SmallSelect\" name=\"" . $KeyName . "\" >\n"; //print "<option value=\"\" >".$common_html['common_html']['allrecords']."</option>\n"; print "<option value=\"\" >" . $html_etc[$tablename][$list['index_name']] . "[" . $common_html['common_html']['allrecords'] . "]</option>\n"; //2009-12-24加入对列表组的过滤 for ($i = 0; $i < sizeof($rs_a); $i++) { if ($_GET[$KeyName] == $rs_a[$i][$ChildTableFieldValue]) { $CheckedX = "selected"; } else { $CheckedX = ""; } print "<option value=\"" . $rs_a[$i][$ChildTableFieldValue] . "\" {$CheckedX} >" . $rs_a[$i][$ChildTableFieldName] . "[" . $rs_a[$i][$ChildTableFieldValue] . "]</option>\n"; } print "</select>\n"; } //2009-12-24加入对搜索属性的支持 print "<input type=hidden name='searchfield' value='" . $_GET['searchfield'] . "'>\n"; print "<input type=hidden name='searchvalue' value='" . $_GET['searchvalue'] . "'>\n"; print "<input type=hidden name='tablename' value='{$tablename}'>\n"; print "<input type=hidden name='AdvanceSearch' value='{$ADD_SEARCH_VALUE}'>\n"; print "</TD></TR>\n"; } else { //高级搜索时出现的隐藏变量 if ($_GET['actionadv'] == "exportadv_default") { print "<TR class=TableData>\n"; print "<TD noWrap align=middle><input type=\"checkbox\" checked name=\"selectidtemp\" disabled value=\"{$index}\"></TD>\n"; print "<TD width=90% colspan=2>高级搜索:\n"; //print "<select class=\"SmallSelect\" name=\"".$KeyName."\" disabled>\n"; //print "<option value=\"\" >".$common_html['common_html']['allrecords']."</option>\n"; //print "<option value=\"\" >".$html_etc[$tablename][$list['index_name']]."[".$common_html['common_html']['allrecords']."]</option>\n"; //print "</select>\n"; $showlistfieldlist_array = explode(',', $showlistfieldlist); //print_R($showlistfieldlist_array); for ($i = 0; $i < sizeof($showlistfieldlist_array); $i++) { $index = $showlistfieldlist_array[$i]; $list = $columns[$index]; if ($_GET[$list] != "") { $ADD_SEARCH_VALUE .= "&{$list}=" . $_GET[$list]; $ADD_SEARCH_TEXT .= " {$list}:" . $_GET[$list]; } else { if ($_GET[$list . "_最小值"] != "" && $_GET[$list . "_最大值"] != "") { $ADD_SEARCH_VALUE .= "&" . $list . "_最小值=" . $_GET[$list . "_最小值"] . "&" . $list . "_最大值=" . $_GET[$list . "_最大值"] . ""; $ADD_SEARCH_TEXT .= " " . $list . "最小值:" . $_GET[$list . "_最小值"] . " " . $list . "最大值:" . $_GET[$list . "_最大值"] . ""; } else { if ($_GET[$list . "_开始时间"] != "" && $_GET[$list . "_结束时间"] != "") { $ADD_SEARCH_VALUE .= "&" . $list . "_开始时间=" . $_GET[$list . "_开始时间"] . "&" . $list . "_结束时间=" . $_GET[$list . "_结束时间"] . ""; $ADD_SEARCH_TEXT .= " " . $list . "开始时间:" . $_GET[$list . "_开始时间"] . " " . $list . "结束时间:" . $_GET[$list . "_结束时间"] . ""; } } } } print $ADD_SEARCH_TEXT; //print $ADD_SEARCH_VALUE; print "<input type=hidden name='{$KeyName}' value='" . $_GET['searchfield'] . "'>\n"; print "<input type=hidden name='searchfield' value='" . $_GET['searchfield'] . "'>\n"; print "<input type=hidden name='searchvalue' value='" . $_GET['searchvalue'] . "'>\n"; print "<input type=hidden name='tablename' value='{$tablename}'>\n"; print "<input type=hidden name='AdvanceSearch' value='{$ADD_SEARCH_VALUE}'>\n"; print "</TD></TR>\n"; } else { print "<TR class=TableData>\n"; print "<TD noWrap align=middle><input type=\"checkbox\" checked name=\"selectidtemp\" disabled value=\"{$index}\"></TD>\n"; print "<TD width=120 disabled>数据过滤</TD>\n"; print "<TD width=150 nowrap>"; print "<select class=\"SmallSelect\" name=\"" . $KeyName . "\" disabled>\n"; //print "<option value=\"\" >".$common_html['common_html']['allrecords']."</option>\n"; print "<option value=\"\" >" . $html_etc[$tablename][$list['index_name']] . "[" . $common_html['common_html']['allrecords'] . "]</option>\n"; print "</select>\n"; print "<input type=hidden name='searchfield' value='" . $_GET['searchfield'] . "'>\n"; print "<input type=hidden name='searchvalue' value='" . $_GET['searchvalue'] . "'>\n"; print "<input type=hidden name='tablename' value='{$tablename}'>\n"; print "<input type=hidden name='AdvanceSearch' value='{$ADD_SEARCH_VALUE}'>\n"; print "</TD></TR>\n"; } } //附加组数据导出--结束 $showlistfieldlist_array = explode(',', $showlistfieldlist); //print_R($showlistfieldlist_array); for ($i = 0; $i < sizeof($showlistfieldlist_array); $i++) { $index = $showlistfieldlist_array[$i]; $list = $columns[$index]; print "<TR class=TableData>\n"; print "<TD noWrap align=middle><input type=\"checkbox\" checked name=\"selectid\" value=\"{$index}\"></TD>\n"; print "<TD >" . $html_etc[$tablename][$list] . "</TD>\n"; print "<TD >{$list}</TD>\n"; print "</TR>\n"; $temp_function = 'selectid_str_init'; } break; } global $returnmodel; $returnmodelArray = explode(',', $returnmodel); if ($returnmodelArray[1] != "") { $returnmodelURL = $returnmodelArray[1]; } else { $returnmodelURL = "?"; } print "<tr align=\"center\" class=\"TableControl\">\n<td colspan=\"3\" nowrap>\n<div align=\"center\">\n\n\t<input type=\"button\" value=\"" . $common_html['common_html']['export'] . "CSV\" accesskey='v' title=\"" . $common_html['common_html']['accesskey'] . ":ALT+V\" class=\"SmallButton\" onClick=\"selectid_str_init_CSV('{$mark}');\">\n\t<input type=\"button\" value=\" " . $common_html['common_html']['export'] . "EXCEL \" accesskey='x' title=\"" . $common_html['common_html']['accesskey'] . ":ALT+X\" class=\"SmallButton\" onClick=\"selectid_str_init_XLS('{$mark}');\">\n\t<input type=\"button\" accesskey='c' title=\"" . $common_html['common_html']['accesskey'] . ":ALT+C\" value=\"" . $common_html['common_html']['cancel'] . "\" class=\"SmallButton\" onClick=\"location='{$returnmodelURL}'\"></div>\n</td></tr>\n"; table_end(); form_end(); print "<BR>"; }
<?php // Include Files include "includes.inc.php"; // Session Identification session_identification(); print_header(); print_title("Sector view", "Here you will find all discovered sectors and planets on one single page. It will also let you claim sectors if appropriate."); $cmd = input_check("show", "sid", "uid", 0, "claim", "!frmid", "!sid", "!ne_name", 0); if ($uid == "") { $uid = user_ourself(); } if ($cmd == "show") { if ($sid == "") { sector_show_all_sectors($uid); } else { sector_show_sector($sid, $uid); } } if ($cmd == "claim") { $ok = ""; $errors['PARAMS'] = "Incorrect parameters specified..\n"; $errors['NAME'] = "The sector name already exists.\n"; $data['sector_id'] = $sid; $data['name'] = convert_crlf_to_px_tag($ne_name); comm_send_to_server("SECTOR", $data, $ok, $errors); } print_footer(); exit; // ============================================================================================ //
<?php // Include Files include "includes.inc.php"; // Session Identification session_identification(); // Extra headers for TD.. $extra_headers = "<STYLE TYPE=\"text/css\" > " . " TH.red { background-color: red } " . " TH.orange { background-color: orange } " . " TH.white { background-color: white; color: black} " . "</STYLE>"; print_header($extra_headers); print_title("User information"); $cmd = input_check("show", "uid", 0, "showdetail", "uid", 0, "relation", "!frmid", "!uid", "!wid", 0); if ($cmd == "show") { if ($uid == "") { $uid = user_ourself(); } show_users($uid); } if ($cmd == "showdetail") { if ($uid == "") { $uid = user_ourself(); } user_showinfo($uid, USER_SHOWINFO_NORMAL); } if ($cmd == "relation") { set_relation(user_ourself(), $uid, $wid); show_users(user_ourself()); } print_footer(); exit; // ============================================================================================ //
<?php // Include Files include "includes.inc.php"; // Session Identification session_identification(); print_header(); print_title("Convoy move"); show_owned_convoys($_USER['id']); print_footer(); exit; // ============================================================================================ // // // Description: // // // Parameters: // // // Returns: // // function show_owned_convoys($user_id) { assert(is_numeric($user_id)); echo "<table border=1 align=center>"; echo " <tr>"; echo " <th>Convoy Name</th>"; echo " <th>Flag Ship</th>"; echo " <th>Ships</th>";
<?php // Include Files include "../includes.inc.php"; // Session Identification session_identification("admin"); print_header(); print_title("Create a new user"); echo "<strong>Use this in the px_server option:</strong>"; echo "<li>USER : username\n"; echo "<li>PASS : password\n"; echo "<li>SECTOR : sector name\n"; echo "<li>SPECIES : specie name\n"; echo "<li>CMD : NEWPLAYER\n"; print_footer(); exit;
<?php // Include Files include "includes.inc.php"; // Session Identification session_identification(); // Extra headers for TD.. $extra_headers = "<STYLE TYPE=\"text/css\" > " . " TH.red { background-color: red } " . " TH.orange { background-color: orange } " . " TH.white { background-color: white; color: black} " . "</STYLE>"; print_header($extra_headers); print_title("Statistics for " . $_USER['name']); $cmd = input_check("show", "uid", 0); if ($cmd == "show") { if ($uid == "") { $uid = user_ourself(); } user_showinfo($uid, USER_SHOWINFO_EXTENDED); score_showuser($uid); } print_footer(); exit;
$hidden_field = $file_ini[$action]['hidden_field']; $passwordcheck = $file_ini[$action]['passwordcheck']; $delete_attribute = $file_ini[$action]['delete_attribute']; $showlistfieldfilter = $file_ini['init_default']['showlistfieldfilter']; $showlistfieldlist = $file_ini['init_default']['showlistfieldlist']; $columns = returntablecolumn($tablename); $html_etc = returnsystemlang($tablename, $SYTEM_CONFIG_TABLE); $primarykey_index = $columns[$primarykey]; //print $passwordcheck; if ($passwordcheck == "1" && $_GET['actionAdvDelete'] != "AdvDelete" && $_GET['actionAdvDelete'] != "InforCheck") { page_css("密码二次验证"); print "<body onload=\"document.form1.PASSWORD.focus();\">\n"; //Array ( [action] => delete_array [returnmodel] => init_default [selectid] => 412, [pageid] => 1 print "<form name=form1 action=\"?XX=XX&actionAdvDelete=InforCheck&action=delete_array&returnmodel=init_default&selectid=" . $_GET['selectid'] . "\" method=post encType=multipart/form-data>"; table_begin("500"); print_title("请输入您的用户密码,属于关键性操作,需要进行二次密码验证"); print "<tr class=TableData><td width=25%> 您的密码:</td><td>\n\t\t\t\t\t\t<input type=password name='PASSWORD' class=SmallInput >\n\t\t\t\t\t\t(您当前的登录密码)</td></tr>"; print_submit("提交"); table_end(); form_end(); //print_R($_GET); exit; } else { if ($passwordcheck == "1" && $_GET['actionAdvDelete'] == "InforCheck") { page_css("密码二次验证"); global $db; //print_R($_SESSION); $LOGIN_USER_ID = $_SESSION['LOGIN_USER_ID']; $返回当前用户的密码 = returntablefield("user", "USER_ID", $LOGIN_USER_ID, "PASSWORD"); //$PASSWORD = md5(TRIM($_POST['PASSWORD'])); //$sql = "select USER_ID from user where USER_ID='$LOGIN_USER_ID' and PASSWORD='******'";
} --> </style> <? page_css("作业查询"); if($_GET['action']=="") { print "<form name=form1 action='?action=OpenZuoYe' method=post enctype=multipart/form-data>"; table_begin(680); print_title("<font color=green>当前角色:普通教师 查询所带班级对应课程的作业成绩信息</font>"); $datetime = date("Y-m-d"); //选择班级 print "<TR>"; print "<TD class=TableData noWrap colspan=>选择班级课程信息:</TD>\n"; print "<TD class=TableData colspan=\"\">\n"; print "<p>\n"; print "<label>\n"; $sql = "select 班级,课程 from edu_zuoye where 教师='".$_SESSION['LOGIN_USER_NAME']."' and 学期名称='$CurXueQi' group by 课程,班级 "; //echo $sql;exit; $rs = $db->CacheExecute(150,$sql); $rs_a = $rs->GetArray(); //print_r($rs_a); if (sizeof($rs_a) == 0)
<?php // Include Files include "../includes.inc.php"; // Session Identification session_identification("admin"); print_header(); print_title("Create a new sector"); echo "<strong>Use this in the px_server option:</strong>"; echo "<li>tmp : tmp\n"; echo "<li>CMD : NEWSECTOR\n"; print_footer(); exit;
<a href="<?php print_link($item); ?> "> <div class="row"> <!-- image --> <div class="col-sm-6"> <figure style="background-image:url(<?php echo $img; ?> )"></figure> </div> <!-- content --> <div class="col-sm-6"> <h1><?php print_title($item); ?> </h1> <p><?php print_blog_content($item, false); ?> </p> </div> </div> </a> </article> <?php } ?> </div> </div>
function newaiCharts() { global $html_etc, $tablename, $common_html, $custom_type; global $db, $return_sql_line, $columns; global $_POST, $_GET, $returnmodel, $primarykey_index; global $action_submit, $merge, $form_attribute; global $tabletitle; global $showlistfieldlist, $showlistfieldfilter, $showlistfieldtype; $showlistfieldlistArray = explode(',', $showlistfieldlist); $showlistfieldfilterArray = explode(',', $showlistfieldfilter); $showlistfieldtypeArray = explode(',', $showlistfieldtype); //获取系统显示的色彩信息 $ColorArray = returnColorArray(); //获取系统求和字段信息 global $sum_index, $UserUnitFunctionIndex; if ($sum_index != "") { $sum_sql_index = " ,sum({$sum_index}) as sum "; } else { $sum_sql_index = ""; } //报表统计主体部分开始 for ($k = 0; $k < sizeof($showlistfieldlistArray); $k++) { $fieldIndex = $showlistfieldlistArray[$k]; $fieldName = $columns[$fieldIndex]; $fieldText = $html_etc[$tablename][$fieldName]; $mode = $showlistfieldfilterArray[$k]; $modeArray = explode(':', $mode); //print_R($modeArray); $modeIndex = $modeArray[0]; $Mode = ""; switch ($modeIndex) { case '': break; case 'tablefilter': case 'tablefiltercolor': case 'radiofilter': case 'radiofiltercolor': if ($modeArray[1] == "month" && $modeArray[2] == "") { $Mode = "Month"; $SQL = "select Date_Format({$fieldName},'%c') AS {$fieldName},Sum({$sum_index}) as sum,Count({$fieldName}) as num from {$tablename} group by {$fieldName}"; } else { if ($modeArray[1] == "year" && $modeArray[2] == "") { $Mode = "Year"; $SQL = "select Date_Format({$fieldName},'%Y') AS {$fieldName},Sum({$sum_index}) as sum,Count({$fieldName}) as num from {$tablename} group by {$fieldName}"; } else { $Mode = ""; $SQL = "select {$fieldName},Count({$fieldName}) as num {$sum_sql_index} from {$tablename} group by {$fieldName}"; } } $rs = $db->CacheExecute(150, $SQL); $rs_array = $rs->GetArray(); //print_R($rs_array); //父表结构部分 $tablenameIndex = $modeArray[1]; $ColumnsIndex = returntablecolumn($tablenameIndex); $html_etcIndex = returnsystemlang($tablenameIndex, $tablenameIndex); $WhatIndex = $ColumnsIndex[(string) $modeArray[2]]; $ReturnIndex = $ColumnsIndex[(string) $modeArray[3]]; //本表操作部分--数据处理部分 --形成FLASH要处理的数据类型 $TotalNumberIndex = 0; $TotalSumIndex = 0; $Array = array(); for ($i = 0; $i < sizeof($rs_array); $i++) { $ResultNumber = $rs_array[$i]['num']; $ResultSum = $rs_array[$i]['sum']; $ResultFieldCode = $rs_array[$i][$fieldName]; switch ($Mode) { case 'Month': $ResultFieldName = $ResultFieldCode . "" . $common_html['common_html']['month']; break; case 'Year': $ResultFieldName = $ResultFieldCode . "" . $common_html['common_html']['year']; break; default: $ResultFieldName = returntablefield($tablenameIndex, $WhatIndex, $ResultFieldCode, $ReturnIndex); if ($ResultFieldName == "") { $ResultFieldName = $ResultFieldCode; } break; } $TotalNumberIndex += $ResultNumber; $TotalSumIndex += $ResultSum; $Array_Statistic_Value = $sum_index != "" ? $ResultSum : $ResultNumber; $Array['XData'][$i]['Name'] = $ResultFieldName; $Array['XData'][$i]['Value'] = $Array_Statistic_Value; $Array['XData'][$i]['Dir'] = $ResultFieldName; $Array['XData'][$i]['AltText'] = $ResultFieldName; //$Array['XData'][$i]['Url'] = "?action=init_customer&$fieldName=$ResultFieldCode"; $ColorArray[$i] == "" ? $ColorArray[$i] = "0xCC0000" : ''; $Array['XData'][$i]['Color'] = $ColorArray[$i]; $Array['Dir'][$i]['Name'] = $ResultFieldName; $Array['Dir'][$i]['Color'] = $ColorArray[$i]; $Array['YData']['AltText'] = "移动查看详细信息"; $Array['YData']['Value'] < $Array_Statistic_Value ? $Array['YData']['Value'] = $Array_Statistic_Value : ''; } $Array['title'] = $html_etc[$tablename][$tabletitle] . "[" . $html_etc[$tablename][$fieldName] . "]"; $array_graphInfo = $Array['title'] . "[" . date("Y-m-d H:i:s") . "] " . $common_html['common_html']['totalrecords'] . ": " . $TotalNumberIndex; if ($sum_index != "") { $array_graphInfo .= " " . $common_html['common_html']['allnumbers'] . ": " . $TotalSumIndex . " " . $UserUnitFunctionIndex . "\n"; } $Array['graphInfo'] = $array_graphInfo; //print_R($FlashFileName); //本表操作部分--FALSH图表显示部分--显示FLASH图表的结果 table_begin("650"); $ChartMode = $showlistfieldtypeArray[$k]; //采用的图表类型选择 //print $tablename; switch ($ChartMode) { case 'vBarF': $FlashFileName = WriteXmlFilevBarF($Array, $tablename, $k); //Flash XML 数据写入文件区 $create_chart = create_chart("vBarF", $FlashFileName); //FLASH 图表读入XML数据处理以后的显示区 break; case 'hBarF': $FlashFileName = WriteXmlFilehBarF($Array, $tablename, $k); //Flash XML 数据写入文件区 $create_chart = create_chart("hBarF", $FlashFileName); //FLASH 图表读入XML数据处理以后的显示区 break; case 'pieF': $FlashFileName = WriteXmlFilePieF($Array, $tablename, $k); //Flash XML 数据写入文件区 $create_chart = create_chart("pieF", $FlashFileName); //FLASH 图表读入XML数据处理以后的显示区 break; default: $FlashFileName = WriteXmlFilevBarF($Array, $tablename, $k); //Flash XML 数据写入文件区 $create_chart = create_chart("vBarF", $FlashFileName); //FLASH 图表读入XML数据处理以后的显示区 break; } //HTML文体显示部分 print "<TR class=TableData>"; print "<TD noWrap width=100% align=center colspan=40>"; print "{$create_chart} </TD>"; print "</TR>"; //本文信息显示部分 //print_title($html_etc[$tablename][$tabletitle]."<font color=green>[".$html_etc[$tablename][$fieldName]."]</font>",40); print_title($html_etc[$tablename][$tabletitle] . "[" . $html_etc[$tablename][$fieldName] . "]", 6); for ($i = 0; $i < sizeof($rs_array); $i++) { $ResultNumber = $rs_array[$i][num]; $ResultSum = $rs_array[$i][sum]; $ResultFieldCode = $rs_array[$i][$fieldName]; $ResultFieldName = returntablefield($tablenameIndex, $WhatIndex, $ResultFieldCode, $ReturnIndex); if ($ResultFieldName == "") { $ResultFieldName = $ResultFieldCode; } print "<TR class=TableData>"; print "<TD noWrap width=15%>统计类别名称 </TD>"; print "<TD width=35%>" . $ResultFieldName . " </TD>"; if ($sum_index != "") { print "<TD noWrap width=15%>统计额度 </TD>"; print "<TD noWrap width=10%><font color=red>" . $ResultSum . " " . $UserUnitFunctionIndex . "</font></TD>"; } else { //print "<TD noWrap width=15%>统计类别代码 </TD>"; //print "<TD noWrap width=10%>".$ResultFieldCode." </TD>"; } print "<TD width=15%>统计记录数 </TD>"; print "<TD noWrap width=10%><font color=red>" . $ResultNumber . " 条</font></TD>"; print "</TR>"; } print "<TR class=TableData>"; print "<TD noWrap colspan = 40>\n"; print $common_html['common_html']['totalrecords'] . ": <font color=red>{$TotalNumberIndex} 条</font>\n"; if ($sum_index != "") { print $common_html['common_html']['allnumbers'] . ": <font color=red>{$TotalSumIndex} " . $UserUnitFunctionIndex . "</font>\n"; } print "</TD>"; print "</TR>"; table_end(); print "<BR>"; break; } } }
function perihelion_die($title, $line) { global $_CONFIG; print_header(); print_title($title); print_line($line); print_line("<img src=" . $_CONFIG['IMAGE_URL'] . "/backgrounds/perihelion-small.jpg>"); print_footer(); exit; }
<?php // Include Files include "includes.inc.php"; // Session Identification session_identification(); // Extra headers for TD.. print_header(); print_title("Attack", "Blahdieblahdieblah"); // Simulate attack $data['attack_id'] = "V0"; $data['defense_id'] = "V1"; $data['battlecount'] = 25; comm_init_server(); comm_s2s("SIMATTACK", $data); $pkg = comm_recv_from_server(); comm_fini_server(); $wins = $pkg['wins']; $draws = $pkg['draws']; $losses = $pkg['losses']; $avg_a_defense = $pkg['avg_a_defense']; $avg_a_strength = $pkg['avg_a_strength']; $avg_d_defense = $pkg['avg_d_defense']; $avg_d_strength = $pkg['avg_d_strength']; $recommendation = $pkg['recommendation']; // Show table echo "<table align=center width=75%>\n"; echo "<tr><td><center><img src=\"" . $_CONFIG['URL'] . $_GALAXY['image_dir'] . "/vessels/1.jpg\" width=150 height=150></center></td><td>\n"; echo " <table align=center>\n"; echo " <tr class=bl><th colspan=3>Strategic statistics for<br>Vessel Orion Battle 1 vs Planet Orion Prime</th></tr>\n"; echo " <tr class=bl><td align=right>" . $wins . "</td><th width=40%>Wins</th><td>" . $losses . "</td></tr>\n";
function _query($sql, $inputarr) { global $ADODB_COUNTRECS; // Move to the next recordset, or return false if there is none. In a stored proc // call, mysqli_next_result returns true for the last "recordset", but mysqli_store_result // returns false. I think this is because the last "recordset" is actually just the // return value of the stored proc (ie the number of rows affected). // Commented out for reasons of performance. You should retrieve every recordset yourself. // if (!mysqli_next_result($this->connection->_connectionID)) return false; if (is_array($sql)) { // Prepare() not supported because mysqli_stmt_execute does not return a recordset, but // returns as bound variables. $stmt = $sql[1]; $a = ''; foreach ($inputarr as $k => $v) { if (is_string($v)) { $a .= 's'; } else { if (is_integer($v)) { $a .= 'i'; } else { $a .= 'd'; } } } $fnarr = array_merge(array($stmt, $a), $inputarr); $ret = call_user_func_array('mysqli_stmt_bind_param', $fnarr); $ret = mysqli_stmt_execute($stmt); return $ret; } /* if (!$mysql_res = mysqli_query($this->_connectionID, $sql, ($ADODB_COUNTRECS) ? MYSQLI_STORE_RESULT : MYSQLI_USE_RESULT)) { if ($this->debug) ADOConnection::outp("Query: " . $sql . " failed. " . $this->ErrorMsg()); return false; } return $mysql_res; */ if ($this->multiQuery) { $rs = mysqli_multi_query($this->_connectionID, $sql . ';'); if ($rs) { $rs = $ADODB_COUNTRECS ? @mysqli_store_result($this->_connectionID) : @mysqli_use_result($this->_connectionID); return $rs ? $rs : true; // mysqli_more_results( $this->_connectionID ) } } else { $rs = mysqli_query($this->_connectionID, $sql, $ADODB_COUNTRECS ? MYSQLI_STORE_RESULT : MYSQLI_USE_RESULT); if ($rs) { return $rs; } else { $sql = trim($sql); //print_R($rs); global $SYSTEM_DEBUG_SQL; if (strlen($sql) > 6 && $SYSTEM_DEBUG_SQL == 1 && !$rs) { page_css("向软件开发商报告错误"); table_begin("600"); print_title("警告:发生SQL语句错误信息!"); print "<TR>\n\t\t\t\t\t\t\t<TD class=TableContent align=left colSpan=1 width=30%> 报告时间</TD>\n\t\t\t\t\t\t\t<TD class=TableData align=left colSpan=2> " . date("Y-m-d H:i:s") . "</TD>\n\t\t\t\t\t\t\t</TR>"; print "<TR>\n\t\t\t\t\t\t\t<TD class=TableContent align=left colSpan=1 width=30%> 错误类型</TD>\n\t\t\t\t\t\t\t<TD class=TableData align=left colSpan=2> SQL语句出现错误</TD>\n\t\t\t\t\t\t\t</TR>"; print "<TR>\n\t\t\t\t\t\t\t<TD class=TableContent align=left colSpan=1 width=30%> 文件地址</TD>\n\t\t\t\t\t\t\t<TD class=TableData align=left colSpan=2> " . $_SERVER['PHP_SELF'] . "</TD>\n\t\t\t\t\t\t\t</TR>"; print "<TR>\n\t\t\t\t\t\t\t<TD class=TableContent align=left colSpan=1 width=30%> SQL语句</TD>\n\t\t\t\t\t\t\t<TD class=TableData align=left colSpan=2> " . $sql . "</TD>\n\t\t\t\t\t\t\t</TR>"; print "<TR>\n\t\t\t\t\t\t\t<TD class=TableContent align=left colSpan=1 width=30%> 错误信息</TD>\n\t\t\t\t\t\t\t<TD class=TableData align=left colSpan=2> " . $this->ErrorMsg() . "</TD>\n\t\t\t\t\t\t\t</TR>"; //$sqlTEXT2010 = ereg_replace("'","____",$sqlTEXT2010); $sqlTEXT2010 = ereg_replace("=", "+", $sqlTEXT2010); $sqlTEXT2010 = ereg_replace("=", "+", $sqlTEXT2010); //$mysql_error = ereg_replace("'","____",$mysql_error); $mysql_error = ereg_replace("=", "+", $mysql_error); $mysql_error = ereg_replace("=", "+", $mysql_error); $FILE_PATH = $_SERVER['REQUEST_URI']; $FILE_PATH = ereg_replace("=", "+", $FILE_PATH); $FILE_PATH = ereg_replace("=", "+", $FILE_PATH); table_end(); //print_R($_SERVER); exit; } } } if ($this->debug) { ADOConnection::outp("Query: " . $sql . " failed. " . $this->ErrorMsg()); } return false; }
<?php // Include Files include "includes.inc.php"; // Session Identification session_identification(); print_header(); print_title("Vessel Flight presets", "Flight presets are automated distance/angle coordinates which you can use in your vessel movements. Secret hiding places or alliance locations can be stored safely."); $cmd = input_check("show", "uid", 0, "delete", "uid", "!pid", 0, "create", "uid", "!ne_name", "!ne_distance", "!ne_angle", 0); if ($cmd == "delete") { $ok = ""; $errors['PARAMS'] = "Incorrect parameters specified..\n"; $data['action'] = "delete"; $data['pid'] = $pid; $data['distance'] = 0; $data['angle'] = 0; $data['name'] = 0; $data['uid'] = 0; comm_send_to_server("PRESET", $data, $ok, $errors); } if ($cmd == "create") { $distance = substr($ne_distance, 0, 5); $angle = substr($ne_angle, 0, 6); if (!preg_match("/^\\d+\$/", $distance)) { print_line("<li><font color=red>You should enter a distance in the format ######.</font>\n"); } elseif (!preg_match("/^\\d{1,6}\$/", $angle)) { print_line("<li><font color=red>You should enter an angle in the format ######.</font>\n"); } else { if ($distance < $_GALAXY['galaxy_core']) { print_line("<li><font color=red>You cannot fly that far into the galaxy core. Try a higher distance (minimum is " . $_GALAXY['galaxy_core'] . ").</font>\n"); } elseif ($distance > $_GALAXY['galaxy_size']) {
function newai_import($fields, $mode = 'table') { global $common_html, $html_etc; global $return_sql_line, $db; global $columns; //print_R($columns); global $showlistfieldlist, $showlistfieldlist_key; global $foreignkey, $uniquekey, $primarykey; $tablename = $fields['table']['name']; $SQL = $fields['sql']['SQL']; $init = explode('_', $_GET['action']); $mark = $init[1]; if ($uniquekey == '') { $uniquekey = $primarykey; } //print $uniquekey; print "<FORM name=form1 action=\"?action=import_" . $mark . "_data\" method=post encType=multipart/form-data>\n"; print "<input type=hidden name=hidden_str value=''>\n"; print "<script >"; print "\nfunction temp_function()\n{\n\n\tvar selectid_str=\"\";\n\t/*\n\tfor(i=0;i<document.all(\"selectid\").length;i++)\n\t\t{\n\n\t\tel=document.all(\"selectid\").item(i);\n\t\tif(el.checked)\n\t\t{ val=el.value;\n selectid_str+=val + \",\";\n\t\t}\n\t}*/\n\tform1.hidden_str.value=selectid_str;\n\tform1.submit();\n\tvar sbtn=document.getElementsByName('submitbtn');\n\tfor(i=0;i<sbtn.length;i++)\n\t{\n\t\tsbtn[i].value='提交中';\n\t\tsbtn[i].disabled=true;\n\t}\n}\n"; print "</script>"; global $tablewidth, $primarykey, $primarykey_index; $tablewidth = $tablewidth != "" ? $tablewidth : 450; table_begin($tablewidth); print_title("数据导入操作,唯一索引限制,多个表示不能同时重复", 3); //print_R($common_html['common_html']['contentimport']); if ($foreignkey != "") { $foreignkey_array = explode(':', $foreignkey); $columns_parent = returntablecolumn($foreignkey_array[1]); print_R($columns_parent); print_select('选择考试名称', $columns[(string) $foreignkey_array[3]], $value, $foreignkey_array[1], $columns_parent[(string) $foreignkey_array[3]], $columns_parent[(string) $foreignkey_array[2]], $colspan = 3, $columns_parent[(string) $foreignkey_array[4]]); print_hidden($columns[(string) $foreignkey_array[3]], 'foreignkey'); } print "<TR class=TableData>\n"; print "<TD noWrap align=middle width=50>唯一索引:</TD>\n"; print "<TD colspan=2>"; $uniquekey_array = explode(',', $uniquekey); $FieldList = array(); for ($i = 0; $i < sizeof($uniquekey_array); $i++) { $uniquekey_KEY = $uniquekey_array[$i]; if ($uniquekey_KEY != "") { $uniquekey_KEY_ADD = explode(':', $uniquekey_KEY); if ($uniquekey_KEY_ADD[1] == "userid") { $FieldList[] = $columns["" . $uniquekey_KEY_ADD[0] . ""] . "(自动生成)"; } else { if ($uniquekey_KEY_ADD[1] == "username") { $FieldList[] = $columns["" . $uniquekey_KEY_ADD[0] . ""] . "(自动生成)"; } else { if ($uniquekey_KEY_ADD[1] == "datetime") { $FieldList[] = $columns["" . $uniquekey_KEY_ADD[0] . ""] . "(自动生成)"; } else { $tablenamelang = returnsystemlang($tablename); $FieldList[] = $tablenamelang[$tablename][$columns["" . $uniquekey_KEY_ADD[0] . ""]]; } } } } } //print_R($uniquekey_array); //输出不较验主键时的选择列表 $唯一字段显示文本 = join(',', $FieldList); print $唯一字段显示文本; print "</TD>\n"; print "</TR>\n"; global $importgroup; if ($importgroup != "") { //print $importgroup; print_title('选择要导入的组', 3); $importgroupArray = explode(':', $importgroup); $showfieldIndex = $importgroupArray[0]; $showFieldName = $columns[$showfieldIndex]; $showfieldTableName = $importgroupArray[1]; $showfieldColumns = returntablecolumn($showfieldTableName); $showfieldIndexValue = $importgroupArray[2]; $showfieldIndexName = $importgroupArray[3]; $showfieldIndexValue = $showfieldColumns[$showfieldIndexName]; $showfieldIndexName = $showfieldColumns[$showfieldIndexName]; print_select('选择要导入的组:', $showFieldName, $value = '', $showfieldTableName, $showfieldIndexValue, $showfieldIndexName, $colspan = 2, $setfieldname = '', $setfieldvalue = '', $setfieldboolean = ''); } /* if($tablename == 'customer'){ print_title('请您先<a style="color:red;" href="xls_template/客户信息模板.xls">下载模板</a>,编辑完成再进行导入。',3); }elseif($tablename == 'supply'){ print_title('请您先<a style="color:red;" href="xls_template/供应商信息模板.xls">下载模板</a>,编辑完成再进行导入。',3); }elseif($tablename == 'product'){ print_title('请您先<a style="color:red;" href="xls_template/商品信息模板.xls">下载模板</a>,编辑完成再进行导入。',3); }else{ print_title('导入EXCEL格式数据文件,请您直接从导出功能模块下载导入模板',3); } */ print_title('导入EXCEL格式数据文件,请您直接从导出功能模块下载导入模板', 3); print "<TR class=TableData height=50>\n"; print "<TD noWrap align=middle >EXCEL格式文件</TD>\n"; print "<TD colspan=2><input name='uploadfileXLS' type=file size=25 class=SmallInput></TD>\n"; print "</TR>\n"; //print_title('导入CSV格式数据文件',3); //print "<TR class=TableData height=50>\n"; //print "<TD noWrap align=middle >MS CSV文件</TD>\n"; //print "<TD colspan=2><input name='uploadfile' type=file size=25 class=SmallInput></TD>\n"; //print "</TR>\n"; print "<tr align=\"center\" class=\"TableControl\">\n<td colspan=\"3\">\n<div align=\"center\"><input type=\"button\" name='submitbtn' value=\"" . $common_html['common_html']['import'] . "\" class=\"SmallButton\" onClick=\"temp_function();\"> <input type=\"button\" value=\"" . $common_html['common_html']['return'] . "\" class=\"SmallButton\" onClick=\"history.back();\"></div>\n</td></tr>\n"; table_end(); form_end(); print "<BR>"; table_begin($tablewidth); print_title("EXCEL格式数据正确但导入失败时,请按以下方法进行:"); print "<TR class=TableData height=50>\n"; print "<TD colspan=3><font color=green>\n\t如何过滤EXCEL里面的格式,转化为纯净的EXCEL数据格式文件:<BR>\n\n\t 1 准备好原始格式数据文件<BR>\n\t 2 新建一个EXCEL文件,即空白文件<BR>\n\t 3 工具栏选择数据->导入外部数据->导入数据,弹出的对话框里面,选择第一步准备好的原始文件<BR>\n\t 4 其它不要动,一切按默认的方法进行操作<BR>\n\t 5 即可得到纯净的EXCEL数据格式文件,把这个文件进行导入即可<BR>\n\t 注意:这种方法只用于解决,数据列数及列名正确,但软件无法识别的情况<BR>\n\t</font>\n\t\n"; print "</TD></TR>\n"; table_end(); form_end(); }
<!doctype html> <head> <meta charset="utf-8"> <title><?php print_title(); ?> </title> <!-- Sets initial viewport load and disables zooming --> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- SEO --> <meta name="keywords" content=""> <meta name="description" content="<?php bloginfo('description'); ?> "> <!-- Compatibility --> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta http-equiv="cleartype" content="on"> <!-- Favicon - generated with http://www.favicomatic.com/ --> <link rel="apple-touch-icon-precomposed" sizes="57x57" href="<?php echo THEMEPATH; ?> favicon/apple-touch-icon-57x57.png" /> <link rel="apple-touch-icon-precomposed" sizes="114x114" href="<?php echo THEMEPATH; ?> favicon/apple-touch-icon-114x114.png" /> <link rel="apple-touch-icon-precomposed" sizes="72x72" href="<?php echo THEMEPATH; ?> favicon/apple-touch-icon-72x72.png" />
/** * Prints out the reservation table * @param none */ function print_res() { global $conf; $is_private = $conf['app']['privacyMode'] && !$this->adminMode; $day_has_passed = !$this->check_startdate(); if (!$this->adminMode && !$this->is_blackout && $day_has_passed) { $this->type = RES_TYPE_VIEW; } if (Auth::getCurrentID() != $this->user->get_id() && !$this->adminMode) { $this->type = RES_TYPE_VIEW; } $rs = $this->resource->properties; if ($this->type == RES_TYPE_ADD && $rs['approval'] == 1 && !Auth::IsAdmin()) { $this->is_pending = true; // On the initial add, make sure that the is_pending flag is correct } $is_owner = ($this->user->get_id() == Auth::getCurrentID() || $this->adminMode) && $this->type != RES_TYPE_VIEW; print_title($rs['name']); begin_reserve_form($this->type == RES_TYPE_ADD, $this->is_blackout); begin_container(); if (empty($this->start)) { $this->start = $this->sched['daystart']; $this->end = $this->start + $this->sched['timespan']; } print_basic_panel($this, $rs, $is_private && !$is_owner); // Contains resource/user info, time select, summary, repeat boxes if ($this->is_blackout || $is_private) { print_users_panel($this, array(), null, '', false, false); // No advanced for either case } else { $this->user->get_id(); $all_users = $is_owner ? $this->db->get_non_participating_users($this->id, Auth::getCurrentID()) : array(); print_users_panel($this, $all_users, $is_owner, $rs['max_participants'], true, $day_has_passed); } if ($this->is_blackout) { print_additional_tab($this, array(), false, false); } else { $all_resources = $is_owner ? $this->db->get_non_participating_resources($this->id) : array(); print_additional_tab($this, $all_resources, $is_owner, true); } end_container(); print_buttons_and_hidden($this); end_reserve_form(); print_jscalendar_setup($this, $rs); if ((bool) $this->allow_anon_participation || (bool) $this->allow_participation) { print_join_form_tags(); } }
} } print "</table>\n"; print "<p><INPUT TYPE=SUBMIT NAME=SUBMIT VALUE=\"Update\"></p>\n"; print "</form>\n"; $collectorid = getcollectorid("eurotv"); $query = "DELETE FROM station WHERE collectorid='" . addslashes($collectorid) . "'"; $sql->query($query); print_page_close(); exit; } // end if action is Choose $fd = fopen("http://www.eurotv.com/scripts/eutvprog.cfm", "r"); if ($fd) { print_header_open(); print_title("Eurotv"); print_header_close(); print "Deleting station and program settings.<br>\n"; $collectorid = getcollectorid("eurotv"); $query = "DELETE FROM station WHERE collectorid='" . addslashes($collectorid) . "'"; $sql->query($query); $query = "DELETE FROM program"; $sql->query($query); echo "<p>Scanning eurotv...<br>\n"; echo "Stations found: <br>\n"; print "\n\t\t<FORM ACTION=\"" . $PHP_SELF . "\" METHOD=POST>\n\t\t<TABLE BORDER=0 CELLSPACING=0>\n\t\t\t<tr BGCOLOR=\"#ccccff\">\n\t\t\t\t<td><B>Name</B></td>\n\t\t\t\t<td><B>Add</B></td>\n\t\t\t</tr>\n\t"; $i = 0; while (!feof($fd)) { $lijn = fgets($fd, 1024); if (preg_match("/A HREF=\"\\/sl.*\\/a/", $lijn)) { $lijn = preg_replace("/\r/", " ", $lijn);
<?php // $Id: generate_vcrrc.php,v 1.1 2002/02/09 17:45:18 waldb Exp $ // $Author: waldb $ include "lib/functions.php"; print_header_open(); print_title("Generate .vcrrc"); print_header_close(); $dotfile = new vcrrc("/var/www"); if ($dotfile->generate()) { print "~/.vcrrc successfully generated.<P>\n"; } else { print "~/.vcrrc generation failed.<P>\n"; } print_page_close();
ini_set('display_errors', 1); ini_set('error_reporting', E_ALL); error_reporting(E_WARNING | E_ERROR); require_once 'lib.inc.php'; $GLOBAL_SESSION = returnsession(); page_css("MYSQL 性能监控"); //自动清除七天以前的历史记录 $sql = "delete from system_logall where datediff(now(),当前时间)>=7"; $db->Execute($sql); $sql = "select DATE_FORMAT(当前时间,'%Y-%m-%d') AS 当前时间\n\t\tfrom system_logall\n\t\tgroup by DATE_FORMAT(当前时间,'%Y-%m-%d')\n\t\torder by 当前时间 desc\n\t\t"; $rs = $db->CacheExecute(5, $sql); $rs_a = $rs->GetArray(); for ($i = 0; $i < sizeof($rs_a); $i++) { $当前时间TEXT .= "<a href='?" . base64_encode("XX=XX&&当前时间=" . $rs_a[$i]['当前时间'] . "&&XX=XX") . "'>" . $rs_a[$i]['当前时间'] . "</a> "; } if ($_GET['当前时间'] != '') { $统计时间 = $_GET['当前时间']; } else { $统计时间 = $rs_a[0]['当前时间']; } table_begin("100%"); print "<tr class=TableData ><td>MYSQL 运行情况监控 时间:" . $统计时间 . " {$当前时间TEXT}\n\t<input type=\"button\" class=\"SmallButton\" value=\"返回\" onclick=\"location='database_setting.php'\">\n\t<input type=\"button\" class=\"SmallButton\" value=\"明细\" onclick=\"location='system_logall_newai.php'\">\n\t</td></tr>"; table_end(); print "<BR>"; table_begin("780"); print_title("MYSQL 线程运行情况监控[以小时为单位统计] <a href=\"system_logall_mysqlthreads.php?" . base64_encode("XX=XX&&统计时间=" . $统计时间 . "&统计单位=秒&XX=XX") . "\" target=_blank>查看以秒为单位的统计图</a>"); print "<tr class=TableData ><td><img src='system_logall_mysqlthreads.php?" . base64_encode("XX=XX&&统计时间=" . $统计时间 . "&&XX=XX") . "' width=100% border=0></td></tr>"; print_title("MYSQL 查询缓存运行情况监控[以小时为单位统计] <a href=\"system_logall_querycache.php?" . base64_encode("XX=XX&&统计时间=" . $统计时间 . "&统计单位=秒&XX=XX") . "\" target=_blank>查看以秒为单位的统计图</a>"); print "<tr class=TableData ><td><img src='system_logall_querycache.php?" . base64_encode("XX=XX&&统计时间=" . $统计时间 . "&&XX=XX") . "' width=100% border=0></td></tr>"; table_end();
$pid = $sql->last_record($result); $sql->query("update program set start=INTERVAL 1 DAY + start,stop=INTERVAL 1 DAY + stop where pid={$pid}"); } if ($flag == 2) { $pid = $sql->last_record($result); $sql->query("update program set stop=INTERVAL 1 DAY + stop where pid={$pid}"); } } $count++; } // end while } // end function printit if ($WEB) { print_header_open(); print_title("Collecting ..."); print_header_close(); } while (list($zender, $url) = each($urls)) { $uur = array(); $programma = array(); $inhoud = array(); if ($WEB) { print "Slurping {$zender}...<br>\n"; } $inhoud = connecttohttpd($url, $host); list($programma, $uur, $film) = parsecontent($inhoud, $programma, $uur, $film); printit($programma, $uur, $film, $zender); } if ($WEB) { print "done<br>";