/** * draw the submit button. */ function draw_buttons() { echo "<tr><td class=\"informationheader\" colspan=\"2\" align=\"center\">"; echo drawSpacer(5, 5) . "<br>"; $submitbutton = new LinkButtonInline("goon", "Login", "navelement", "submit", "document.loginform.passwd.value=hex_md5(document.loginform.passwd.value);", "loginform"); echo $submitbutton->draw(); retain("goon"); echo "<br>" . drawSpacer(5, 5); echo "</td></tr>"; }
/** * Draw HTML output */ function draw() { global $c, $sid, $lang; echo '<td colspan="3"><table width="100%" border="0" cellpadding="3" cellspacing="0"><tr>'; $widget = new Cell("clc", "", 2, $this->width, 20); $widget->draw(); echo "</tr><tr>\n"; echo '<td colspan="2"align="right"> </td>'; echo '<td align="right">'; $lbi = new Button("action", $lang->get("print", "print"), "navelement", "button", "window.open('" . $_SERVER['REQUEST_URI'] . "&print=1');"); $lbi->draw(); echo " "; $lbi = new Button("action", $lang->get("refresh", "refresh"), "navelement", "button", "document.location.href = document.location.href;"); $lbi->draw(); retain("action", ""); retain("sid", $sid); echo "</td></tr></table></td>"; return $this->cells; }
/** * Draw HTML output */ function draw() { global $c, $sid, $lang; echo '<form name="form1">'; echo '<td colspan="' . $this->cells . '"><table width="100%" border="0" cellpadding="3" cellspacing="0"><tr>'; $widget = new Cell("clc", "", 2, $this->width, 20); $widget->draw(); echo "</tr><tr>\n"; $widget = new Label("lbl", $this->headline, "stats_headline", 2); $widget->draw(); echo "</tr>\n"; echo "<tr><td colspan=\"" . $this->cells . "\" class=\"bcopy\">" . $lang->get("pta", "Select page to analyze:") . "</td></tr>"; echo "<tr>"; $this->sps->draw(); echo "<td> "; $lbi = new LinkButton("action", $lang->get("go", "Go"), "navelement", "submit"); $lbi->draw(); retain("action", ""); retain("sid", $sid); echo "</td></tr></table></td>"; echo "</form>"; return $this->cells; }
/** * Draws the HTML for this Input. */ function draw() { global $lang; echo "<td colspan=\"" . $this->colspan . "\" class=\"" . $this->css . "\">"; echo '<table width="100%" cellpadding="2" cellspacing="3" border="0">'; // Draw Selectbox with non-selected values echo '<tr><td class="bcopy">'; echo $this->headlines["head1"] . "<br>"; echo '<select name="notselvals" id="notselvals" style="width:250px;" size="8">'; // populate the list for ($i = 0; $i < count($this->outlist1); $i++) { echo '<option value="' . $this->outlist1[$i][1] . '">' . $this->outlist1[$i][0] . '</option>'; } echo '</select>'; echo '</td><td valign="middle">'; // Draw Add button... echo ' <a href="#" class="navelement" onClick="moveSelectedOptions(document.' . $this->formname . '.notselvals, document.' . $this->formname . '.selvals); return false;">' . drawImage("right.gif"). '</a><br><br>'; echo ' <a href="#" class="navelement" onClick="moveSelectedOptions(document.' . $this->formname . '.selvals, document.' . $this->formname . '.notselvals); inlistProps(document.' . $this->formname . '); saveData(document.' . $this->formname . '); return false;">' . drawImage("left.gif"). '</a>'; echo '</td>'; // Draw Selectbox with selected values echo '<td width="50%" class="bcopy" valign="top">'; echo $this->headlines["head1_selected"] . "<br>"; echo '<select name="selvals" id="selvals" style="width:250px;" size="8" onChange="inlistProps(document.' . $this->formname . ');">'; // populate the list for ($i = 0; $i < count($this->inlist1); $i++) { echo '<option value="' . $this->inlist1[$i][1] . '">' . $this->inlist1[$i][0] . '</option>'; } echo '</select>'; echo '</td></tr>'; // Draw Roles echo '<tr><td colspan="2"> </td>'; echo '<td class="bcopy"><div id="aclprop">'; echo $this->headlines["head2_selected"] . "<br>"; echo '<select name="props" id="props" style="width:250px;" size="8" multiple disabled onChange="saveProps(document.' . $this->formname . ');">'; // populate the list for ($i = 1; $i < count($this->values2); $i++) { echo '<option value="' . $this->values2[$i][1] . '">' . $this->values2[$i][0] . '</option>'; } echo '</select>'; echo '<br>' . $lang->get("selmultiple", "Hold down the CTRL-Key to select multiple items!"); echo "<br><br>"; echo buttonLink($lang->get("comb_all", "Select All"), "javascript:selectAllOptions(document." . $this->formname . ".props); javascript: saveProps(document." . $this->formname . "); javascript: saveData(document." . $this->formname . ");"); echo " "; echo buttonLink($lang->get("comb_none", "Clear All"), "javascript:unselectAllOptions(document." . $this->formname . ".props); javascript: saveProps(document." . $this->formname . "); javascript: saveData(document." . $this->formname . ");"); echo '</div>'; echo '</td></tr>'; // Draw Remove button... echo '<tr><td>'; retain("selval", ""); retain("configdata", $this->configdata); echo '</td><td class="bcopy"> </td></tr>'; echo '</table>'; echo "</td>"; echo $this->draw_javascript(); return $this->colspan; }
//list of sites in the database $query = "SELECT site_id,site_url,port,locked FROM " . PHPDIG_DB_PREFIX . "sites ORDER BY site_url"; $result_id = mysql_query($query, $id_connect); while (list($id, $url, $port, $locked) = mysql_fetch_row($result_id)) { if ($port) { $url .= " (port #{$port})"; } if ($locked) { $url = '*' . phpdigMsg('locked') . '* ' . $url; } print "\t<option value='{$id}'>{$url}</option>\n"; } ?> </select> <?php retain("sid", $sid); ?> <br/> <input type="submit" name="update" value="<?php phpdigPrnMsg('updateform'); ?> " /> <input type="submit" name="delete" value="<?php phpdigPrnMsg('deletesite'); ?> " /> </form> </div> <p class='grey'> <a href="cleanup_engine.php?sid=<?php echo $sid;
/** * Draw the header for an Iframe-Object */ function drawIFOHeader($stdstyle = "standardlight", $noform = false) { global $c, $callback, $sid, $error, $style; $error = value("error"); if ($error == "0") { $style = $stdstyle; } else { $style = "error"; } echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n"; echo "<html>\n"; echo "<head>\n"; echo " <title>IFO</title>\n"; echo "<META HTTP-EQUIV=\"Pragma\" content=\"no-cache\">\n"; echo "<META HTTP-EQUIV=\"Cache-Control\" content=\"no-cache, must-revalidate\">\n"; echo "<META HTTP-EQUIV=\"Expires\" content=\"0\">\n"; echoCSS(); echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"" . $c["docroot"] . "ext/jscalendar/cal.css\">\n"; echo "<script type=\"text/javascript\" src=\"" . $c["host"] . $c["docroot"] . "ext/jscalendar/calendar.js\"></script>\n"; echo "<script type=\"text/javascript\" src=\"" . $c["host"] . $c["docroot"] . "ext/jscalendar/lang/calendar-en.js\"></script>\n"; echo "<script type=\"text/javascript\" src=\"" . $c["host"] . $c["docroot"] . "ext/jscalendar/calendar-setup.js\"></script>\n"; echo "</head>\n"; echo "<body leftmargin=\"0\" topmargin=\"0\" marginheight=\"0\" marginwidth=\"0\" class=\"{$style}\">\n"; if (!$noform) { echo "<form name=\"ifoform\" method=\"POST\" action=\"" . doc() . "\" enctype=\"multipart/form-data\">"; $sid = value("sid", "NOSPACES"); $callback = value("callback", "NOSPACES"); retain("sid", $sid); retain("callback", $callback); echo tableStart(); } }
/** * internal. Draws the buttons of your form. */ function draw_buttons() { global $lang; echo "<tr><td valign=\"middle\" align=\"right\" colspan=\"2\">"; $value = "Update"; $resetbutton = new Button("reset", $lang->get("reset_form", "Reset Form"), "", "reset"); $resetbutton->draw(); echo " "; retain("goon"); $submitbutton = new Button("goon", $value, "", "submit", $this->submitButtonAction.$this->getWaitupScreen()); $submitbutton->draw(); echo "</td></tr>"; }
function filter_worksheet($out, $in, $options = array()) { global $unified_fields; global $unified_field_indexes; global $unified_types; global $unified_params; global $unified_titles; global $fields; global $field_indexes; global $types; global $params; global $titles; $unified_fields = ["高専番号", "学科記号", "分類", "高専名", "学科名", "実施科目名", "学年CD", "学年", "単位数", "開講期", "必修・選択", "その他の詳細", "教科書名", "教科書出版社"]; $unified_field_indexes = array_flip($unified_fields); $num_cols = count($unified_fields); $unified_types = array_fill(0, $num_cols, "text"); $unified_params = array_fill(0, $num_cols, ""); $unified_titles = $unified_fields; // 先頭行にワークシート名を出力する。 fputs($out, "# subjects\n"); // ヘッダ行を出力する。 array_unshift($unified_fields, "fields"); fputcsv($out, retain($unified_fields), ",", '"'); array_shift($unified_fields); array_unshift($unified_types, "types"); fputcsv($out, retain($unified_types), ",", '"'); array_shift($unified_types); array_unshift($unified_params, "params"); fputcsv($out, retain($unified_params), ",", '"'); array_shift($unified_params); array_unshift($unified_titles, "titles"); fputcsv($out, retain($unified_titles), ",", '"'); array_shift($unified_titles); while (($line = fgets($in)) !== false) { // "# ファイル名"はワークシートの先頭行を示す。 if (substr($line, 0, 1) != "#") { continue; } $worksheet_name = trim(substr($line, 1)); echo "processing [{$worksheet_name}]\n"; $row = 0; $state = "inside"; while (($record = fgetcsv($in, 65536, ",", '"')) !== false) { // 空行はワークシートの最終行を示す。 if ($record == array('')) { break; } $tag = array_shift($record); $num_cols = count($record); switch ($tag) { case "fields": $fields = correct_header($record); $field_indexes = array_flip($fields); break; case "types": $types = $record; break; case "params": $params = $record; break; case "titles": $titles = correct_header($record); break; case "record": if ($record[0] == "小計") { $state = "outside"; } if ($state == "inside") { $ans = array(); for ($i = 0; $i < count($unified_fields); $i++) { $field = $unified_fields[$i]; if (($n = array_search($field, $fields)) !== false) { $ans[] = $record[$n]; } else { $ans[] = ""; } } // データ行を出力する。 $empty = true; for ($i = 0; $i < count($record); $i++) { if ($ans[$i] != "") { $empty = false; break; } } if (!$empty) { $ans = correct_record($ans); $col = $unified_field_indexes["学科名"]; $item = $ans[$col]; $item = str_replace(" ", "", $item); $item = str_replace("/", ",", $item); $item = str_replace("&", ",", $item); $item = str_replace(".", ",", $item); $item = str_replace("、", ",", $item); if ($item != "専攻科" && $item != "専攻科(共通科目)") { $item = str_replace("専攻", "専攻,", $item); } $item = preg_replace("/学科([a-zA-Z]*)/u", "学科{${1}},", $item); $cources = explode(",", $item); $i = 0; while ($i < count($cources)) { $cource = $cources[$i]; if ($cource != "") { if (mb_substr($cource, 0, 1) == "・") { $cource = mb_substr($cource, 1); } $ans[$col] = $cource; array_unshift($ans, "record"); fputcsv($out, retain($ans), ",", '"'); array_shift($ans); } $i++; } } } break; default: $contents = implode(",", $record); fputs(STDERR, "Warning: unkown tag[{$tag}]. {$contents}\n"); } $row += 1; } } // 最終行に空行を出力する。 fputs($out, "\n"); return; }
$clnid = "-1"; } td($style); echo $lang->get("sel_clt"); tde(); tr(); $clts = array(); createCLTTree($clts); $sb = new Dropdown("clt", $clts, $style, $clt, $width); $sb->params = 'onChange="if (this.value != \'-1\') document.ifoform.submit();"'; $sb->draw(); tr(); td($style); echo drawSpacer(5); echo '<script language="JavaScript">'; echo ' parent.document.getElementById("' . $callback . '").value = "' . $clnid . '";'; echo '</script>'; tde(); if ($clt != "-1" && $clt != "0" && $clt != "") { $clusters = createNameValueArray("cluster_node", "NAME", "CLNID", "CLT_ID = {$clt} AND VERSION=0 AND DELETED=0"); tr(); td($style); echo $lang->get("sel_cluster", "Select Cluster") . " (" . (count($clusters) - 1) . ")"; tde(); tr(); $sb2 = new Dropdown("clnid", $clusters, $style, $clnid, $width); $sb2->params = 'onChange="' . drawIfoSave($callback, "clnid") . '"'; $sb2->draw(); } retain("width", $width + 50); drawIFOFooter();
/** * Draws the next and previous buttons. */ function draw_buttons() { global $lang; if (!$this->finished) { echo "<tr><td align=\"right\" colspan=\"2\">"; echo '<input type="hidden" name="step" value="' . $this->activeStep . '">'; retain("pdo"); echo drawSpacer(5, 5) . "<br>"; if ($this->displayStep > 1 && !$this->container[$this->activeStep]->forbidBack) { $prevbutton = new ButtonInline("pdo", $lang->get("back", "Back"), "navelement", "submit", "", $this->name); echo $prevbutton->draw(); echo " "; } if ($this->displayStep < count($this->container)) { $nextbutton = new ButtonInline("pdo", $lang->get("next", "Next"), "navelement", "submit", "", $this->name); echo $nextbutton->draw(); } echo "<br>" . drawSpacer(5, 5); echo "</td></tr>"; } }
/** * internal. Draws the buttons of your form. */ function draw_mybuttons() { global $lang; if ($this->drawPage == "editing") { echo "<tr><td class=\"informationheader\" colspan=\"2\">"; tableStart("100%", "informationheader"); echo "<tr>"; echo '<td align="right">'; br(); retain ("goon"); $resetbutton = new ButtonInline("reset", $lang->get("reset_form", "Reset Form"), "navelement", "reset", "", $this->name); echo $resetbutton->draw(); echo drawSpacer(50,1); $value = "Update"; $backbutton = new ButtonInline("back", $lang->get("back"), "navelement", "submit", "",$this->name ); echo $backbutton->draw(); retain("back", ""); echo ' '; $submitbutton = new ButtonInline("goon", $value, "navelement", "submit", $this->submitButtonAction, $this->name); echo $submitbutton->draw(); br(); br(); tde(); echo ('</tr>'); tableEnd(); echo "</td></tr>"; } }
/** * internal. Draws the buttons of your form. */ function draw_buttons() { global $lang; echo "<tr><td align=\"right\" colspan=\"2\"><br>"; $resetbutton = new ButtonInline("goon", $lang->get("cancel"), "navelement", "submit"); echo $resetbutton->draw(); echo " "; $submitbutton = new ButtonInline("goon", $lang->get("commit"), "navelement", "submit", $this->getWaitupScreen()); echo $submitbutton->draw(); retain("goon", ""); echo "</td></tr>"; }
function form_cron_limits($id_connect, $upd=0){ global $sid; if ((isset($_GET['dir'])) && ($_GET['dir'] == 'DESC')) $dir='ASC'; else $dir='DESC'; if($upd == 1) { ?><p class='grey'><?=phpdigPrnMsg('upd2')?></p><br><? } ?> <table class="borderCollapse" border="0"> <tr> <td class="blueForm"><a href="limit_update.php?sid=<?php echo $sid;?>&OB=site_id&dir=<?=$dir?>"><?=phpdigPrnMsg('id')?></a></td> <td class="blueForm"><a href="limit_update.php?sid=<?php echo $sid;?>&OB=site_url&dir=<?=$dir?>"><?=phpdigPrnMsg('url')?></a></td> <?php if(CRON_ENABLE){ ?><td class="blueForm"><a href="limit_update.php?sid=<?php echo $sid;?>&OB=days&dir=<?=$dir?>"><?=phpdigPrnMsg('days')?></a></td><?php }?> <td class="blueForm"><a href="limit_update.php?sid=<?php echo $sid;?>&OB=links&dir=<?=$dir?>"><?=phpdigPrnMsg('links')?></a></td> <td class="blueForm"><a href="limit_update.php?sid=<?php echo $sid;?>&OB=depth&dir=<?=$dir?>"><?=phpdigPrnMsg('depth')?></a></td> </tr> <form class="grey" action="limit_update.php" method="post"> <?php retain("sid", $sid); //list of sites in the database $query = "SELECT S.site_id,S.site_url,P.days,P.links,P.depth FROM ".PHPDIG_DB_PREFIX."sites AS S LEFT JOIN ".PHPDIG_DB_PREFIX."site_page AS P ON S.site_id=P.site_id "; /* stabiliamo il campo su cui ordinare i dati */ if (isset($_GET['OB'])) { switch($_GET['OB']) { case("site_id"): $query .= ' ORDER BY S.site_id'; break; case('site_url'): $query .= ' ORDER BY S.site_url'; break; case('days'): $query .= ' ORDER BY P.days'; break; case('links'): $query .= ' ORDER BY P.links'; break; case('depth'): $query .= ' ORDER BY P.depth'; break; default: $query .= ' ORDER BY S.site_url'; break; } } else { $query .= ' ORDER BY S.site_url'; } //echo $query; // ordinamento discendente if ((isset($_GET['dir'])) && ($_GET['dir'] == 'DESC')) $query .= ' DESC'; else $query .= ' ASC'; /* * Build the query */ $col = 1; $result_id = mysql_query($query,$id_connect); while (list($id,$url,$days_db,$links,$depth) = mysql_fetch_row($result_id)) { switch($col) { case 1: $class = 'greyFormDark'; $col++; break; case 2: $class = 'greyForm'; $col++; break; case 3: $class = 'greyFormLight'; $col++; break; case 4: $class = 'greyForm'; $col++; break; } if($col == 5) $col = 1;?> <tr class="<?=$class?>"> <td class="<?=$class?>"><?=$id?></td> <td class="<?=$class?>"><?=$url?></td> <?php if(CRON_ENABLE){ ?><td class="<?=$class?>"> <input class="phpdigSelect" type="text" name="days[<?=$id?>]" value="<?=$days_db?>" size="10"/> </td><?php } ?> <td class="<?=$class?>"> <input class="phpdigSelect" type="text" name="links[<?=$id?>]" value="<?=$links?>" size="10"/> </td> <td class="<?=$class?>"> <input class="phpdigSelect" type="text" name="depth[<?=$id?>]" value="<?=$depth?>" size="10"/> </td> </tr> <?php } ?> <tr><td><input type="submit" name="sent" value="<?php echo phpdigPrnMsg('go'); ?>"></td></tr> </form> </table><? }