do_header(_("editar noticia"), "post"); do_navbar(_('editar noticia')); echo '<div id="genericform-contents">'."\n"; if (!empty($_REQUEST['id']) && is_numeric($_REQUEST['id'])) { $linkres=new Link; $linkres->id=$link_id = intval($_REQUEST['id']); $linkres->read(); if (!$linkres->is_editable() || intval($_GET['user'] != $current_user->user_id)) { echo '<div class="form-error-submit"> '._("noticia no modificable").'</div>'."\n"; return; } if ($_POST['phase'] == "1") do_save(); else do_edit(); } else { echo '<div class="form-error-submit"> '._("¿duh?").'</div>'; } echo "</div>"; do_footer(); function do_edit() { global $linkres, $dblang, $db, $current_user;
<?php $time = $_POST['time']; $other = $_POST['other']; $query = $_POST['query']; if (isset($_POST['time'])) { if ($other != "") { printf("%s <br />", $other); } $info = sprintf("OK, 明天%s点我们在深圳湾口岸集合, 不见不散!", $time); printf("%s <br />", $info); do_save($info); } else { if ($other != "") { $info = sprintf("%s", $other); printf("%s <br />", $info); do_save($info); } else { if ($query == "查询") { do_query(); } else { if (isset($_POST['other'])) { printf("你还没有回答我呢!<br />"); } } } } function connect_db(&$link) { $link = mysql_connect('localhost', 'test', '123456'); if (!$link) { die('Could not connect: ' . mysql_error());
include mnminclude . 'html1.php'; include mnminclude . 'tags.php'; force_authentication(); array_push($globals['cache-control'], 'no-cache'); do_header(_("editar noticia"), "post"); echo '<div id="singlewrap">' . "\n"; if (!empty($_REQUEST['id']) && is_numeric($_REQUEST['id'])) { $link = new Link(); $link->id = $link_id = intval($_REQUEST['id']); $link->read(); if (!$link->is_editable() || intval($_GET['user'] != $current_user->user_id)) { echo '<div class="form-error-submit"> ' . _("noticia no modificable") . '</div>' . "\n"; return; } if ($_POST['phase'] == "1") { do_save($link); fork("backend/send_pingbacks.php?id={$link->id}"); } else { do_edit($link); } } else { echo '<div class="form-error-submit"> ' . _("¿duh?") . '</div>'; } echo "</div>" . "\n"; do_footer(); function do_edit($link) { global $dblang, $db, $current_user, $globals; $link->status = $link->sub_status; $link->discarded = $link->is_discarded(); $link->status_text = $link->get_status_text();
for a in $FILES; do echo "<br/><br /><a href=$a>$a</a><br />"; #perl -e "\$a=\"${WKDB}/$a\";" -e 'local($sec,$min,$hr,$day,$mon,$yr,$wday,@dntcare) = localtime((stat("$a"))[9]); print ($yr+1900); print "-$mon-$day $hr:$min:$sec<hr />";' wikilinks ("${WKDB}/$a"); echo "<br /><br />"; } */ break; case "save": if ( $_SERVER["REQUEST_METHOD"] == "POST" ) { $TEXT=$_POST["text"]; if ( $PASS == "" ) { do_save(""); } else { if ( $_POST["pass"] == $PASS ) { do_save($TEXT); } else { echo "Invalid password"; } } } else { echo ("Oops"); show_vars(); } byebye(); break; case "edit": do_edit(); break; default: if (file_exists($WKDB."/".$PATH_INFO)) {
$previous = $_POST['config_previous']; if ($name == $previous) { if (!checkAuthorization('manageConfiguration')) { redirect(); } $_SESSION['config_profile'] = $name; $_SESSION[$name] = $_POST; if (isset($_POST['submit_preview'])) { $preview = do_preview($prefs, $name); } else { $d = substr($name, strlen('Configuration_mode_')); if ($d == 'ad') { $d = 'microsoft'; } $prefs->set('general', 'domain_integration', $d); if (do_save($prefs, $name) === True) { $_SESSION['config_profile_saved'] = true; unset($_SESSION['config_profile']); unset($_SESSION[$name]); } redirect(); } } $has_previous = $name; } $classes = get_classes_startwith_admin('Configuration_mode_'); $profiles = array(); foreach ($classes as $c) { $b = new $c(); $profiles[$c] = $b->getPrettyName(); }