[wp-cvs] wordpress/wp-admin admin-header.php, 1.22,
1.22.4.1 bookmarklet.php, 1.9, 1.9.4.1 categories.php, 1.28,
1.28.4.1 edit.php, 1.21, 1.21.4.1 options.php, 1.20,
1.20.4.1 post.php, 1.59.4.2, 1.59.4.3 wp-admin.css, 1.53, 1.53.4.1
Mike Little
mikelittle at users.sourceforge.net
Wed Oct 6 00:01:50 UTC 2004
- Previous message: [wp-cvs] wordpress/wp-includes version.php,1.15.4.2,1.15.4.3
- Next message: [wp-cvs] wordpress/wp-admin admin-functions.php, 1.45,
1.46 edit-page-form.php, 1.5, 1.6 edit-pages.php, 1.3,
1.4 options-permalink.php, 1.43, 1.44 post.php, 1.88,
1.89 upgrade-schema.php, 1.11, 1.12
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/cafelog/wordpress/wp-admin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22547/wp-admin
Modified Files:
Tag: WordPress-Ver-1_2-Branch
admin-header.php bookmarklet.php categories.php edit.php
options.php post.php wp-admin.css
Log Message:
Copied over Matts 1.2.1 changes
Index: wp-admin.css
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/wp-admin.css,v
retrieving revision 1.53
retrieving revision 1.53.4.1
diff -C2 -d -r1.53 -r1.53.4.1
*** wp-admin.css 14 May 2004 06:10:19 -0000 1.53
--- wp-admin.css 6 Oct 2004 00:01:46 -0000 1.53.4.1
***************
*** 326,350 ****
#login {
! background: url(../wp-images/wp-small.png) #fff no-repeat top center;
! border: 2px solid #333;
! color: #333;
! height: 170px;
! left: 50%;
! margin-left: -120px; /* half of width and height */
! margin-top: -85px;
! padding: 40px 5px 5px 5px;
! position: absolute;
text-align: right;
! top: 45%;
! width: 240px;
}
! #login textarea, #login input, #login select {
! background: #f0f0f0;
! border-color: #ccc;
! border-style: solid;
! border-width: 1px;
! margin: 1px;
! padding: 2px;
}
--- 326,371 ----
#login {
! background: #fff;
! border: 2px solid #a2a2a2;
! width: 25em;
! margin: 5em auto;
! padding: 1.5em;
! }
!
! #login form {
text-align: right;
! }
! #login #login_error {
! background: #c00;
! color: #fff;
! padding: .5em;
! border: 1px solid #a40000;
! text-align: center;
! font-weight: bold;
! font-size: 16px;
! }
! #login h1 {
! background: url(../wp-images/wp-small.png) no-repeat;
! margin-top: 0;
! }
! #login h1 a {
! display: block;
! text-indent: -1000px;
}
! #login ul {
! list-style: none;
! margin: 0;
! padding: 0;
!
! }
! #login ul li {
! display: inline;
! text-align: center;
! margin-left: 1.4em;
! }
!
! #login input {
! padding: 3px;
}
***************
*** 445,446 ****
--- 466,469 ----
margin: 0;
}
+
+
Index: categories.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/categories.php,v
retrieving revision 1.28
retrieving revision 1.28.4.1
diff -C2 -d -r1.28 -r1.28.4.1
*** categories.php 18 May 2004 15:24:23 -0000 1.28
--- categories.php 6 Oct 2004 00:01:45 -0000 1.28.4.1
***************
*** 1,199 ****
! <?php
! require_once('../wp-includes/wp-l10n.php');
!
! $title = __('Categories');
!
! function add_magic_quotes($array) {
! foreach ($array as $k => $v) {
! if (is_array($v)) {
! $array[$k] = add_magic_quotes($v);
! } else {
! $array[$k] = addslashes($v);
! }
! }
! return $array;
! }
!
! if (!get_magic_quotes_gpc()) {
! $_GET = add_magic_quotes($_GET);
! $_POST = add_magic_quotes($_POST);
! $_COOKIE = add_magic_quotes($_COOKIE);
! }
!
! $wpvarstoreset = array('action','standalone','cat');
! for ($i=0; $i<count($wpvarstoreset); $i += 1) {
! $wpvar = $wpvarstoreset[$i];
! if (!isset($$wpvar)) {
! if (empty($_POST["$wpvar"])) {
! if (empty($_GET["$wpvar"])) {
! $$wpvar = '';
! } else {
! $$wpvar = $_GET["$wpvar"];
! }
! } else {
! $$wpvar = $_POST["$wpvar"];
! }
! }
! }
!
! switch($action) {
!
! case 'addcat':
!
! $standalone = 1;
! require_once('admin-header.php');
!
! if ($user_level < 3)
! die (__('Cheatin’ uh?'));
!
! $cat_name= addslashes(stripslashes(stripslashes($_POST['cat_name'])));
! $category_nicename = sanitize_title($cat_name);
! $category_description = addslashes(stripslashes(stripslashes($_POST['category_description'])));
! $cat = intval($_POST['cat']);
!
! $wpdb->query("INSERT INTO $tablecategories (cat_ID, cat_name, category_nicename, category_description, category_parent) VALUES ('0', '$cat_name', '$category_nicename', '$category_description', '$cat')");
!
! header('Location: categories.php?message=1#addcat');
!
! break;
!
! case 'Delete':
!
! $standalone = 1;
! require_once('admin-header.php');
!
! check_admin_referer();
!
! $cat_ID = intval($_GET["cat_ID"]);
! $cat_name = get_catname($cat_ID);
! $cat_name = addslashes($cat_name);
! $category = $wpdb->get_row("SELECT * FROM $tablecategories WHERE cat_ID = '$cat_ID'");
! $cat_parent = $category->category_parent;
!
! if (1 == $cat_ID)
! die(sprintf(__("Can't delete the <strong>%s</strong> category: this is the default one"), $cat_name));
!
! if ($user_level < 3)
! die (__('Cheatin’ uh?'));
!
! $wpdb->query("DELETE FROM $tablecategories WHERE cat_ID = '$cat_ID'");
! $wpdb->query("UPDATE $tablecategories SET category_parent = '$cat_parent' WHERE category_parent = '$cat_ID'");
! $wpdb->query("UPDATE $tablepost2cat SET category_id='1' WHERE category_id='$cat_ID'");
!
! header('Location: categories.php?message=2');
!
! break;
!
! case 'edit':
!
! require_once ('admin-header.php');
! $cat_ID = intval($_GET['cat_ID']);
! $category = $wpdb->get_row("SELECT * FROM $tablecategories WHERE cat_ID = '$cat_ID'");
! $cat_name = stripslashes($category->cat_name);
! ?>
!
! <div class="wrap">
! <h2><?php _e('Edit Category') ?></h2>
! <form name="editcat" action="categories.php" method="post">
! <input type="hidden" name="action" value="editedcat" />
! <input type="hidden" name="cat_ID" value="<?php echo $_GET['cat_ID'] ?>" />
! <p><?php _e('Category name:') ?><br />
! <input type="text" name="cat_name" value="<?php echo $cat_name; ?>" /></p>
! <p><?php _e('Category parent:') ?><br />
! <select name='cat' class='postform'>
! <option value='0'<?php if (!$category->category_parent) echo " selected='selected'"; ?>>None</option>
! <?php wp_dropdown_cats($category->cat_ID, $category->category_parent); ?></p>
! </select>
! </p>
!
! <p><?php _e('Description:') ?><br />
! <textarea name="category_description" rows="5" cols="50" style="width: 97%;"><?php echo htmlspecialchars($category->category_description, ENT_NOQUOTES); ?></textarea></p>
! <p class="submit"><input type="submit" name="submit" value="<?php _e('Edit category »') ?>" /></p>
! </form>
! </div>
!
! <?php
!
! break;
!
! case 'editedcat':
!
! $standalone = 1;
! require_once('admin-header.php');
!
! if ($user_level < 3)
! die (__('Cheatin’ uh?'));
!
! $cat_name = $wpdb->escape(stripslashes($_POST['cat_name']));
! $cat_ID = (int) $_POST['cat_ID'];
! $category_nicename = sanitize_title($cat_name);
! $category_description = $wpdb->escape(stripslashes($_POST['category_description']));
!
! $wpdb->query("UPDATE $tablecategories SET cat_name = '$cat_name', category_nicename = '$category_nicename', category_description = '$category_description', category_parent = '$cat' WHERE cat_ID = '$cat_ID'");
!
! header('Location: categories.php?message=3');
!
! break;
!
! default:
!
! $standalone = 0;
! require_once ('admin-header.php');
! if ($user_level < 3) {
! die(sprintf(__("You have no right to edit the categories for this blog.<br />Ask for a promotion to your <a href='mailto:%s'>blog admin</a>. :)"), get_settings('admin_email')));
! }
! $messages[1] = __('Category added.');
! $messages[2] = __('Category deleted.');
! $messages[3] = __('Category updated.');
! ?>
! <?php if (isset($_GET['message'])) : ?>
! <div class="updated"><p><?php echo $messages[$_GET['message']]; ?></p></div>
! <?php endif; ?>
!
! <div class="wrap">
! <h2><?php printf(__('Current Categories (<a href="%s">add new</a>)'), '#addcat') ?> </h2>
! <table width="100%" cellpadding="3" cellspacing="3">
! <tr>
! <th scope="col"><?php _e('ID') ?></th>
! <th scope="col"><?php _e('Name') ?></th>
! <th scope="col"><?php _e('Description') ?></th>
! <th scope="col"><?php _e('# Posts') ?></th>
! <th colspan="2"><?php _e('Action') ?></th>
! </tr>
! <?php
! cat_rows();
! ?>
! </table>
!
! </div>
!
! <div class="wrap">
! <p><?php printf(__('<strong>Note:</strong><br />
! Deleting a category does not delete posts from that category, it will just
! set them back to the default category <strong>%s</strong>.'), get_catname(1)) ?>
! </p>
! </div>
!
! <div class="wrap">
! <h2><?php _e('Add New Category') ?></h2>
! <form name="addcat" id="addcat" action="categories.php" method="post">
!
! <p><?php _e('Name:') ?><br />
! <input type="text" name="cat_name" value="" /></p>
! <p><?php _e('Category parent:') ?><br />
! <select name='cat' class='postform'>
! <option value='0'><?php _e('None') ?></option>
! <?php wp_dropdown_cats(); ?></p>
! </select>
! <p><?php _e('Description: (optional)') ?> <br />
! <textarea name="category_description" rows="5" cols="50" style="width: 97%;"></textarea></p>
! <p class="submit"><input type="hidden" name="action" value="addcat" /><input type="submit" name="submit" value="<?php _e('Add Category »') ?>" /></p>
! </form>
! </div>
!
! <?php
! break;
! }
!
! include('admin-footer.php');
?>
\ No newline at end of file
--- 1,199 ----
! <?php
! require_once('../wp-includes/wp-l10n.php');
!
! $title = __('Categories');
!
! function add_magic_quotes($array) {
! foreach ($array as $k => $v) {
! if (is_array($v)) {
! $array[$k] = add_magic_quotes($v);
! } else {
! $array[$k] = addslashes($v);
! }
! }
! return $array;
! }
!
! if (!get_magic_quotes_gpc()) {
! $_GET = add_magic_quotes($_GET);
! $_POST = add_magic_quotes($_POST);
! $_COOKIE = add_magic_quotes($_COOKIE);
! }
!
! $wpvarstoreset = array('action','standalone','cat');
! for ($i=0; $i<count($wpvarstoreset); $i += 1) {
! $wpvar = $wpvarstoreset[$i];
! if (!isset($$wpvar)) {
! if (empty($_POST["$wpvar"])) {
! if (empty($_GET["$wpvar"])) {
! $$wpvar = '';
! } else {
! $$wpvar = $_GET["$wpvar"];
! }
! } else {
! $$wpvar = $_POST["$wpvar"];
! }
! }
! }
!
! switch($action) {
!
! case 'addcat':
!
! $standalone = 1;
! require_once('admin-header.php');
!
! if ($user_level < 3)
! die (__('Cheatin’ uh?'));
!
! $cat_name= addslashes(stripslashes(stripslashes($_POST['cat_name'])));
! $category_nicename = sanitize_title($cat_name);
! $category_description = addslashes(stripslashes(stripslashes($_POST['category_description'])));
! $cat = intval($_POST['cat']);
!
! $wpdb->query("INSERT INTO $tablecategories (cat_ID, cat_name, category_nicename, category_description, category_parent) VALUES ('0', '$cat_name', '$category_nicename', '$category_description', '$cat')");
!
! header('Location: categories.php?message=1#addcat');
!
! break;
!
! case 'Delete':
!
! $standalone = 1;
! require_once('admin-header.php');
!
! check_admin_referer();
!
! $cat_ID = intval($_GET["cat_ID"]);
! $cat_name = get_catname($cat_ID);
! $cat_name = addslashes($cat_name);
! $category = $wpdb->get_row("SELECT * FROM $tablecategories WHERE cat_ID = '$cat_ID'");
! $cat_parent = $category->category_parent;
!
! if (1 == $cat_ID)
! die(sprintf(__("Can't delete the <strong>%s</strong> category: this is the default one"), $cat_name));
!
! if ($user_level < 3)
! die (__('Cheatin’ uh?'));
!
! $wpdb->query("DELETE FROM $tablecategories WHERE cat_ID = '$cat_ID'");
! $wpdb->query("UPDATE $tablecategories SET category_parent = '$cat_parent' WHERE category_parent = '$cat_ID'");
! $wpdb->query("UPDATE $tablepost2cat SET category_id='1' WHERE category_id='$cat_ID'");
!
! header('Location: categories.php?message=2');
!
! break;
!
! case 'edit':
!
! require_once ('admin-header.php');
! $cat_ID = intval($_GET['cat_ID']);
! $category = $wpdb->get_row("SELECT * FROM $tablecategories WHERE cat_ID = '$cat_ID'");
! $cat_name = stripslashes($category->cat_name);
! ?>
!
! <div class="wrap">
! <h2><?php _e('Edit Category') ?></h2>
! <form name="editcat" action="categories.php" method="post">
! <input type="hidden" name="action" value="editedcat" />
! <input type="hidden" name="cat_ID" value="<?php echo $cat_ID ?>" />
! <p><?php _e('Category name:') ?><br />
! <input type="text" name="cat_name" value="<?php echo $cat_name; ?>" /></p>
! <p><?php _e('Category parent:') ?><br />
! <select name='cat' class='postform'>
! <option value='0'<?php if (!$category->category_parent) echo " selected='selected'"; ?>>None</option>
! <?php wp_dropdown_cats($category->cat_ID, $category->category_parent); ?></p>
! </select>
! </p>
!
! <p><?php _e('Description:') ?><br />
! <textarea name="category_description" rows="5" cols="50" style="width: 97%;"><?php echo htmlspecialchars($category->category_description, ENT_NOQUOTES); ?></textarea></p>
! <p class="submit"><input type="submit" name="submit" value="<?php _e('Edit category »') ?>" /></p>
! </form>
! </div>
!
! <?php
!
! break;
!
! case 'editedcat':
!
! $standalone = 1;
! require_once('admin-header.php');
!
! if ($user_level < 3)
! die (__('Cheatin’ uh?'));
!
! $cat_name = $wpdb->escape(stripslashes($_POST['cat_name']));
! $cat_ID = (int) $_POST['cat_ID'];
! $category_nicename = sanitize_title($cat_name);
! $category_description = $wpdb->escape(stripslashes($_POST['category_description']));
!
! $wpdb->query("UPDATE $tablecategories SET cat_name = '$cat_name', category_nicename = '$category_nicename', category_description = '$category_description', category_parent = '$cat' WHERE cat_ID = '$cat_ID'");
!
! header('Location: categories.php?message=3');
!
! break;
!
! default:
!
! $standalone = 0;
! require_once ('admin-header.php');
! if ($user_level < 3) {
! die(sprintf(__("You have no right to edit the categories for this blog.<br />Ask for a promotion to your <a href='mailto:%s'>blog admin</a>. :)"), get_settings('admin_email')));
! }
! $messages[1] = __('Category added.');
! $messages[2] = __('Category deleted.');
! $messages[3] = __('Category updated.');
! ?>
! <?php if (isset($_GET['message'])) : ?>
! <div class="updated"><p><?php echo $messages[$_GET['message']]; ?></p></div>
! <?php endif; ?>
!
! <div class="wrap">
! <h2><?php printf(__('Current Categories (<a href="%s">add new</a>)'), '#addcat') ?> </h2>
! <table width="100%" cellpadding="3" cellspacing="3">
! <tr>
! <th scope="col"><?php _e('ID') ?></th>
! <th scope="col"><?php _e('Name') ?></th>
! <th scope="col"><?php _e('Description') ?></th>
! <th scope="col"><?php _e('# Posts') ?></th>
! <th colspan="2"><?php _e('Action') ?></th>
! </tr>
! <?php
! cat_rows();
! ?>
! </table>
!
! </div>
!
! <div class="wrap">
! <p><?php printf(__('<strong>Note:</strong><br />
! Deleting a category does not delete posts from that category, it will just
! set them back to the default category <strong>%s</strong>.'), get_catname(1)) ?>
! </p>
! </div>
!
! <div class="wrap">
! <h2><?php _e('Add New Category') ?></h2>
! <form name="addcat" id="addcat" action="categories.php" method="post">
!
! <p><?php _e('Name:') ?><br />
! <input type="text" name="cat_name" value="" /></p>
! <p><?php _e('Category parent:') ?><br />
! <select name='cat' class='postform'>
! <option value='0'><?php _e('None') ?></option>
! <?php wp_dropdown_cats(); ?></p>
! </select>
! <p><?php _e('Description: (optional)') ?> <br />
! <textarea name="category_description" rows="5" cols="50" style="width: 97%;"></textarea></p>
! <p class="submit"><input type="hidden" name="action" value="addcat" /><input type="submit" name="submit" value="<?php _e('Add Category »') ?>" /></p>
! </form>
! </div>
!
! <?php
! break;
! }
!
! include('admin-footer.php');
?>
\ No newline at end of file
Index: options.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/options.php,v
retrieving revision 1.20
retrieving revision 1.20.4.1
diff -C2 -d -r1.20 -r1.20.4.1
*** options.php 14 May 2004 08:38:34 -0000 1.20
--- options.php 6 Oct 2004 00:01:45 -0000 1.20.4.1
***************
*** 1,197 ****
! <?php
! $title = 'Options';
! $this_file = 'options.php';
! $parent_file = 'options-general.php';
!
! function add_magic_quotes($array) {
! foreach ($array as $k => $v) {
! if (is_array($v)) {
! $array[$k] = add_magic_quotes($v);
! } else {
! $array[$k] = addslashes($v);
! }
! }
! return $array;
! }
!
! if (!get_magic_quotes_gpc()) {
! $_GET = add_magic_quotes($_GET);
! $_POST = add_magic_quotes($_POST);
! $_COOKIE = add_magic_quotes($_COOKIE);
! }
!
! $wpvarstoreset = array('action','standalone', 'option_group_id');
! for ($i=0; $i<count($wpvarstoreset); $i += 1) {
! $wpvar = $wpvarstoreset[$i];
! if (!isset($$wpvar)) {
! if (empty($_POST["$wpvar"])) {
! if (empty($_GET["$wpvar"])) {
! $$wpvar = '';
! } else {
! $$wpvar = $_GET["$wpvar"];
! }
! } else {
! $$wpvar = $_POST["$wpvar"];
! }
! }
! }
! if (isset($_GET['option_group_id'])) $option_group_id = (int) $_GET['option_group_id'];
! require_once('./optionhandler.php');
! $non_was_selected = 0;
! if ('' == $_GET['option_group_id']) {
! $option_group_id = 1;
! $non_was_selected = 1;
! }
!
! switch($action) {
!
! case 'update':
! $standalone = 1;
! include_once('./admin-header.php');
! $any_changed = 0;
!
! // iterate through the list of options in this group
! // pull the vars from the post
! // validate ranges etc.
! // update the values
! if (!$_POST['page_options']) {
! foreach ($_POST as $key => $value) {
! $option_names[] = "'$key'";
! }
! $option_names = implode(',', $option_names);
! } else {
! $option_names = stripslashes($_POST['page_options']);
! }
!
! $options = $wpdb->get_results("SELECT $tableoptions.option_id, option_name, option_type, option_value, option_admin_level FROM $tableoptions WHERE option_name IN ($option_names)");
! // die(var_dump($options));
!
! // HACK
! // Options that if not there have 0 value but need to be something like "closed"
! $nonbools = array('default_ping_status', 'default_comment_status');
! if ($options) {
! foreach ($options as $option) {
! // should we even bother checking?
! if ($user_level >= $option->option_admin_level) {
! $old_val = stripslashes($option->option_value);
! $new_val = $_POST[$option->option_name];
! if (!$new_val) {
! if (3 == $option->option_type)
! $new_val = '';
! else
! $new_val = 0;
! }
! if( in_array($option->option_name, $nonbools) && $new_val == 0 ) $new_value = 'closed';
! if ($new_val !== $old_val) {
! $query = "UPDATE $tableoptions SET option_value = '$new_val' WHERE option_name = '$option->option_name'";
! $result = $wpdb->query($query);
! //if( in_array($option->option_name, $nonbools)) die('boo'.$query);
! if (!$result) {
! $db_errors .= sprintf(__(" SQL error while saving %s. "), $this_name);
! } else {
! ++$any_changed;
! }
! }
! }
! } // end foreach
! unset($cache_settings); // so they will be re-read
! get_settings('siteurl'); // make it happen now
! } // end if options
!
! if ($any_changed) {
! $message = sprintf(__('%d setting(s) saved... '), $any_changed);
! }
!
! if (($dB_errors != '') || ($validation_message != '')) {
! if ($message != '') {
! $message .= '<br />';
! }
! $message .= $dB_errors . '<br />' . $validation_message;
! }
!
! $referred = str_replace(array('&updated=true', '?updated=true') , '', $_SERVER['HTTP_REFERER']);
! if (strstr($referred, '?')) $goback = $referred . '&updated=true';
! else $goback = str_replace('?updated=true', '', $_SERVER['HTTP_REFERER']) . '?updated=true';
! header('Location: ' . $goback);
! break;
!
! default:
! $standalone = 0;
! include_once("./admin-header.php");
! if ($user_level <= 6) {
! die(__("You have do not have sufficient permissions to edit the options for this blog."));
! }
! ?>
!
! <?php
! if ($non_was_selected) { // no group pre-selected, display opening page
! ?>
! <div class="wrap">
! <dl>
! <?php
! //iterate through the available option groups. output them as a definition list.
! $option_groups = $wpdb->get_results("SELECT group_id, group_name, group_desc, group_longdesc FROM $tableoptiongroups ORDER BY group_id");
! foreach ($option_groups as $option_group) {
! echo(" <dt><a href=\"$this_file?option_group_id={$option_group->group_id}\" title=\"{$option_group->group_desc}\">{$option_group->group_name}</a></dt>\n");
! $current_long_desc = $option_group->group_longdesc;
! if ($current_long_desc == '') {
! $current_long_desc = __('No help for this group of options.');
! }
! echo(" <dd>{$option_group->group_desc}: $current_long_desc</dd>\n");
! } // end for each group
! ?>
! <dt><a href="options-permalink.php"><?php _e('Permalinks') ?></a></dt>
! <dd><?php _e('Permanent link configuration') ?></dd>
! </dl>
! </div>
! <?php
!
! } else { //there was a group selected.
! include('options-head.php');
! ?>
!
! <div class="wrap">
! <h2><?php echo $current_desc; ?></h2>
! <form name="form" action="<?php echo $this_file; ?>" method="post">
! <input type="hidden" name="action" value="update" />
! <input type="hidden" name="option_group_id" value="<?php echo $option_group_id; ?>" />
! <table width="90%" cellpadding="2" cellspacing="2" border="0">
! <?php
! //Now display all the options for the selected group.
! if ('all' == $_GET['option_group_id']) :
! $options = $wpdb->get_results("SELECT * FROM $tableoptions LEFT JOIN $tableoptiongroup_options ON $tableoptions.option_id = $tableoptiongroup_options.option_id ORDER BY option_name");
! else :
! $options = $wpdb->get_results("
! SELECT
! $tableoptions.option_id, option_name, option_type, option_value, option_width, option_height, option_description, option_admin_level
! FROM $tableoptions LEFT JOIN $tableoptiongroup_options ON $tableoptions.option_id = $tableoptiongroup_options.option_id
! WHERE group_id = $option_group_id
! ORDER BY seq
! ");
! endif;
!
! foreach ($options as $option) :
! if ('all' == $_GET['option_group_id']) $option->option_type = 3;
! echo "\t<tr><td width='10%' valign='top'>" . get_option_widget($option, ($user_level >= $option->option_admin_level), '</td><td width="15%" valign="top" style="border: 1px solid #ccc">');
! echo "\t</td><td valign='top' class='helptext'>$option->option_description</td></tr>\n";
! endforeach;
! ?>
! </table>
! <p class="submit"><input type="submit" name="Update" value="<?php _e('Update Settings »') ?>" /></p>
! </form>
! </div>
!
! <div class="wrap">
! <?php
! if ($current_long_desc != '') {
! echo $current_long_desc;
! }
! ?>
! </div>
! <?php
! } // end else a group was selected
! break;
! } // end switch
!
! include('admin-footer.php');
! ?>
--- 1,198 ----
! <?php
! $title = 'Options';
! $this_file = 'options.php';
! $parent_file = 'options-general.php';
!
! function add_magic_quotes($array) {
! foreach ($array as $k => $v) {
! if (is_array($v)) {
! $array[$k] = add_magic_quotes($v);
! } else {
! $array[$k] = addslashes($v);
! }
! }
! return $array;
! }
!
! if (!get_magic_quotes_gpc()) {
! $_GET = add_magic_quotes($_GET);
! $_POST = add_magic_quotes($_POST);
! $_COOKIE = add_magic_quotes($_COOKIE);
! }
!
! $wpvarstoreset = array('action','standalone', 'option_group_id');
! for ($i=0; $i<count($wpvarstoreset); $i += 1) {
! $wpvar = $wpvarstoreset[$i];
! if (!isset($$wpvar)) {
! if (empty($_POST["$wpvar"])) {
! if (empty($_GET["$wpvar"])) {
! $$wpvar = '';
! } else {
! $$wpvar = $_GET["$wpvar"];
! }
! } else {
! $$wpvar = $_POST["$wpvar"];
! }
! }
! }
! if (isset($_GET['option_group_id'])) $option_group_id = (int) $_GET['option_group_id'];
! require_once('./optionhandler.php');
! $non_was_selected = 0;
! if ('' == $_GET['option_group_id']) {
! $option_group_id = 1;
! $non_was_selected = 1;
! }
!
! switch($action) {
!
! case 'update':
! $standalone = 1;
! include_once('./admin-header.php');
! $any_changed = 0;
!
! // iterate through the list of options in this group
! // pull the vars from the post
! // validate ranges etc.
! // update the values
! if (!$_POST['page_options']) {
! foreach ($_POST as $key => $value) {
! $option_names[] = "'$key'";
! }
! $option_names = implode(',', $option_names);
! } else {
! $option_names = stripslashes($_POST['page_options']);
! }
!
! $options = $wpdb->get_results("SELECT $tableoptions.option_id, option_name, option_type, option_value, option_admin_level FROM $tableoptions WHERE option_name IN ($option_names)");
! // die(var_dump($options));
!
! // HACK
! // Options that if not there have 0 value but need to be something like "closed"
! $nonbools = array('default_ping_status', 'default_comment_status');
! if ($options) {
! foreach ($options as $option) {
! // should we even bother checking?
! if ($user_level >= $option->option_admin_level) {
! $old_val = stripslashes($option->option_value);
! $new_val = $_POST[$option->option_name];
! if (!$new_val) {
! if (3 == $option->option_type)
! $new_val = '';
! else
! $new_val = 0;
! }
! if( in_array($option->option_name, $nonbools) && $new_val == 0 ) $new_value = 'closed';
! if ($new_val !== $old_val) {
! $query = "UPDATE $tableoptions SET option_value = '$new_val' WHERE option_name = '$option->option_name'";
! $result = $wpdb->query($query);
! //if( in_array($option->option_name, $nonbools)) die('boo'.$query);
! if (!$result) {
! $db_errors .= sprintf(__(" SQL error while saving %s. "), $this_name);
! } else {
! ++$any_changed;
! }
! }
! }
! } // end foreach
! unset($cache_settings); // so they will be re-read
! get_settings('siteurl'); // make it happen now
! } // end if options
!
! if ($any_changed) {
! $message = sprintf(__('%d setting(s) saved... '), $any_changed);
! }
!
! if (($dB_errors != '') || ($validation_message != '')) {
! if ($message != '') {
! $message .= '<br />';
! }
! $message .= $dB_errors . '<br />' . $validation_message;
! }
!
! $referred = str_replace(array('&updated=true', '?updated=true') , '', $_SERVER['HTTP_REFERER']);
! if (strstr($referred, '?')) $goback = $referred . '&updated=true';
! else $goback = str_replace('?updated=true', '', $_SERVER['HTTP_REFERER']) . '?updated=true';
! $goback = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $goback);
! header('Location: ' . $goback);
! break;
!
! default:
! $standalone = 0;
! include_once("./admin-header.php");
! if ($user_level <= 6) {
! die(__("You have do not have sufficient permissions to edit the options for this blog."));
! }
! ?>
!
! <?php
! if ($non_was_selected) { // no group pre-selected, display opening page
! ?>
! <div class="wrap">
! <dl>
! <?php
! //iterate through the available option groups. output them as a definition list.
! $option_groups = $wpdb->get_results("SELECT group_id, group_name, group_desc, group_longdesc FROM $tableoptiongroups ORDER BY group_id");
! foreach ($option_groups as $option_group) {
! echo(" <dt><a href=\"$this_file?option_group_id={$option_group->group_id}\" title=\"{$option_group->group_desc}\">{$option_group->group_name}</a></dt>\n");
! $current_long_desc = $option_group->group_longdesc;
! if ($current_long_desc == '') {
! $current_long_desc = __('No help for this group of options.');
! }
! echo(" <dd>{$option_group->group_desc}: $current_long_desc</dd>\n");
! } // end for each group
! ?>
! <dt><a href="options-permalink.php"><?php _e('Permalinks') ?></a></dt>
! <dd><?php _e('Permanent link configuration') ?></dd>
! </dl>
! </div>
! <?php
!
! } else { //there was a group selected.
! include('options-head.php');
! ?>
!
! <div class="wrap">
! <h2><?php echo $current_desc; ?></h2>
! <form name="form" action="<?php echo $this_file; ?>" method="post">
! <input type="hidden" name="action" value="update" />
! <input type="hidden" name="option_group_id" value="<?php echo $option_group_id; ?>" />
! <table width="90%" cellpadding="2" cellspacing="2" border="0">
! <?php
! //Now display all the options for the selected group.
! if ('all' == $_GET['option_group_id']) :
! $options = $wpdb->get_results("SELECT * FROM $tableoptions LEFT JOIN $tableoptiongroup_options ON $tableoptions.option_id = $tableoptiongroup_options.option_id ORDER BY option_name");
! else :
! $options = $wpdb->get_results("
! SELECT
! $tableoptions.option_id, option_name, option_type, option_value, option_width, option_height, option_description, option_admin_level
! FROM $tableoptions LEFT JOIN $tableoptiongroup_options ON $tableoptions.option_id = $tableoptiongroup_options.option_id
! WHERE group_id = $option_group_id
! ORDER BY seq
! ");
! endif;
!
! foreach ($options as $option) :
! if ('all' == $_GET['option_group_id']) $option->option_type = 3;
! echo "\t<tr><td width='10%' valign='top'>" . get_option_widget($option, ($user_level >= $option->option_admin_level), '</td><td width="15%" valign="top" style="border: 1px solid #ccc">');
! echo "\t</td><td valign='top' class='helptext'>$option->option_description</td></tr>\n";
! endforeach;
! ?>
! </table>
! <p class="submit"><input type="submit" name="Update" value="<?php _e('Update Settings »') ?>" /></p>
! </form>
! </div>
!
! <div class="wrap">
! <?php
! if ($current_long_desc != '') {
! echo $current_long_desc;
! }
! ?>
! </div>
! <?php
! } // end else a group was selected
! break;
! } // end switch
!
! include('admin-footer.php');
! ?>
Index: edit.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/edit.php,v
retrieving revision 1.21
retrieving revision 1.21.4.1
diff -C2 -d -r1.21 -r1.21.4.1
*** edit.php 14 May 2004 06:19:46 -0000 1.21
--- edit.php 6 Oct 2004 00:01:45 -0000 1.21.4.1
***************
*** 1,179 ****
! <?php
! require_once('../wp-includes/wp-l10n.php');
!
! $title = __('Posts');
! require_once('admin-header.php');
!
! ?>
! <ul id="adminmenu2">
! <li><a href="edit.php" class="current"><?php _e('Posts') ?></a></li>
! <li><a href="edit-comments.php"><?php _e('Comments') ?></a></li>
! <li class="last"><a href="moderation.php"><?php _e('Awaiting Moderation') ?></a></li>
! </ul>
! <?php
! get_currentuserinfo();
! $drafts = $wpdb->get_results("SELECT ID, post_title FROM $tableposts WHERE post_status = 'draft' AND post_author = $user_ID");
! if ($drafts) {
! ?>
! <div class="wrap">
! <p><strong><?php _e('Your Drafts:') ?></strong>
! <?php
! $i = 0;
! foreach ($drafts as $draft) {
! if (0 != $i)
! echo ', ';
! $draft->post_title = stripslashes($draft->post_title);
! if ($draft->post_title == '')
! $draft->post_title = sprintf(__('Post #%s'), $draft->ID);
! echo "<a href='post.php?action=edit&post=$draft->ID' title='" . __('Edit this draft') . "'>$draft->post_title</a>";
! ++$i;
! }
! ?>
! .</p>
! </div>
! <?php
! }
! ?>
! <div class="wrap">
! <?php
! if( isset( $_GET['m'] ) )
! {
! echo '<h2>' . $month[substr( $_GET['m'], 4, 2 )]." ".substr( $_GET['m'], 0, 4 )."</h2>";
! }
! ?>
!
! <form name="viewarc" action="" method="get" style="float: left; width: 20em;">
! <fieldset>
! <legend><?php _e('Show Posts From Month of...') ?></legend>
! <select name='m'>
! <?php
! $arc_result=$wpdb->get_results("SELECT DISTINCT YEAR(post_date) AS yyear, MONTH(post_date) AS mmonth FROM $tableposts ORDER BY post_date DESC");
! foreach ($arc_result as $arc_row) {
! $arc_year = $arc_row->yyear;
! $arc_month = $arc_row->mmonth;
!
! if( isset($_GET['m']) && $arc_year . zeroise($arc_month, 2) == $_GET['m'] )
! $default = 'selected="selected"';
! else
! $default = null;
!
! echo "<option $default value=\"" . $arc_year.zeroise($arc_month, 2) . '">';
! echo $month[zeroise($arc_month, 2)] . " $arc_year";
! echo "</option>\n";
! }
! ?>
! </select>
! <input type="submit" name="submit" value="<?php _e('Show Month') ?>" />
! </fieldset>
! </form>
! <form name="searchform" action="" method="get" style="float: left; width: 20em; margin-left: 3em;">
! <fieldset>
! <legend><?php _e('Show Posts That Contain...') ?></legend>
! <input type="text" name="s" value="<?php if (isset($s)) echo $s; ?>" size="17" />
! <input type="submit" name="submit" value="<?php _e('Search') ?>" />
! </fieldset>
! </form>
!
! <br style="clear:both;" />
!
! <table width="100%" cellpadding="3" cellspacing="3">
! <tr>
! <th scope="col"><?php _e('ID') ?></th>
! <th scope="col"><?php _e('When') ?></th>
! <th scope="col"><?php _e('Title') ?></th>
! <th scope="col"><?php _e('Categories') ?></th>
! <th scope="col"><?php _e('Comments') ?></th>
! <th scope="col"><?php _e('Author') ?></th>
! <th scope="col"><?php _e('Edit') ?></th>
! <th scope="col"><?php _e('Delete') ?></th>
! </tr>
! <?php
! if (empty($m)) $showposts = 15;
! include(ABSPATH.'wp-blog-header.php');
!
! if ($posts) {
! $bgcolor = '';
! foreach ($posts as $post) { start_wp();
! $bgcolor = ('#eee' == $bgcolor) ? 'none' : '#eee';
! ?>
! <tr style='background-color: <?php echo $bgcolor; ?>'>
! <th scope="row"><?php echo $id ?></th>
! <td><?php the_time('Y-m-d \<\b\r \/\> g:i:s a'); ?></td>
! <td><a href="<?php the_permalink(); ?>" rel="permalink">
! <?php the_title() ?>
! </a>
! <?php if ('private' == $post->post_status) _e(' - <strong>Private</strong>'); ?></td>
! <td><?php the_category(','); ?></td>
! <td><a href="edit.php?p=<?php echo $id ?>&c=1">
! <?php comments_number(__('no comments'), __('1 comment'), __("% comments")) ?>
! </a></td>
! <td><?php the_author() ?></td>
! <td><?php if (($user_level > $authordata->user_level) or ($user_login == $authordata->user_login)) { echo "<a href='post.php?action=edit&post=$id' class='edit'>" . __('Edit') . "</a>"; } ?></td>
! <td><?php if (($user_level > $authordata->user_level) or ($user_login == $authordata->user_login)) { echo "<a href='post.php?action=delete&post=$id' class='delete' onclick=\"return confirm('" . sprintf(__("You are about to delete this post \'%s\'\\n \'OK\' to delete, \'Cancel\' to stop."), the_title('','',0)) . "')\">" . __('Delete') . "</a>"; } ?></td>
! </tr>
! <?php
! }
! } else {
! ?>
! <tr style='background-color: <?php echo $bgcolor; ?>'>
! <td colspan="8"><?php _e('No posts found.') ?></td>
! </tr>
! <?php
! } // end if ($posts)
! ?>
! </table>
! <?php
! if ( 1 == count($posts) ) {
!
! $comments = $wpdb->get_results("SELECT * FROM $tablecomments WHERE comment_post_ID = $id ORDER BY comment_date");
! if ($comments) {
! ?>
! <h3><?php _e('Comments') ?></h3>
! <ol id="comments">
! <?php
! foreach ($comments as $comment) {
! $comment_status = wp_get_comment_status($comment->comment_ID);
! ?>
!
! <li <?php if ("unapproved" == $comment_status) echo "class='unapproved'"; ?> >
! <?php comment_date('Y-n-j') ?>
! @
! <?php comment_time('g:m:s a') ?>
! <?php
! if (($user_level > $authordata->user_level) or ($user_login == $authordata->user_login)) {
! echo "[ <a href=\"post.php?action=editcomment&comment=".$comment->comment_ID."\">" . __('Edit') . "</a>";
! echo " - <a href=\"post.php?action=deletecomment&p=".$post->ID."&comment=".$comment->comment_ID."\" onclick=\"return confirm('" . sprintf(__("You are about to delete this comment by \'%s\'\\n \'OK\' to delete, \'Cancel\' to stop."), $comment->comment_author) . "')\">" . __('Delete') . "</a> ";
! if ( ('none' != $comment_status) && ($user_level >= 3) ) {
! if ('approved' == wp_get_comment_status($comment->comment_ID)) {
! echo " - <a href=\"post.php?action=unapprovecomment&p=".$post->ID."&comment=".$comment->comment_ID."\">" . __('Unapprove') . "</a> ";
! } else {
! echo " - <a href=\"post.php?action=approvecomment&p=".$post->ID."&comment=".$comment->comment_ID."\">" . __('Approve') . "</a> ";
! }
! }
! echo "]";
! } // end if any comments to show
! ?>
! <br />
! <strong>
! <?php comment_author() ?>
! (
! <?php comment_author_email_link() ?>
! /
! <?php comment_author_url_link() ?>
! )</strong> (IP:
! <?php comment_author_IP() ?>
! )
! <?php comment_text() ?>
!
! </li>
! <!-- /comment -->
! <?php //end of the loop, don't delete
! } // end foreach
! echo '</ol>';
! }//end if comments
! ?>
! <?php } ?>
! </div>
! <?php
! include('admin-footer.php');
! ?>
--- 1,179 ----
! <?php
! require_once('../wp-includes/wp-l10n.php');
!
! $title = __('Posts');
! require_once('admin-header.php');
!
! ?>
! <ul id="adminmenu2">
! <li><a href="edit.php" class="current"><?php _e('Posts') ?></a></li>
! <li><a href="edit-comments.php"><?php _e('Comments') ?></a></li>
! <li class="last"><a href="moderation.php"><?php _e('Awaiting Moderation') ?></a></li>
! </ul>
! <?php
! get_currentuserinfo();
! $drafts = $wpdb->get_results("SELECT ID, post_title FROM $tableposts WHERE post_status = 'draft' AND post_author = $user_ID");
! if ($drafts) {
! ?>
! <div class="wrap">
! <p><strong><?php _e('Your Drafts:') ?></strong>
! <?php
! $i = 0;
! foreach ($drafts as $draft) {
! if (0 != $i)
! echo ', ';
! $draft->post_title = stripslashes($draft->post_title);
! if ($draft->post_title == '')
! $draft->post_title = sprintf(__('Post #%s'), $draft->ID);
! echo "<a href='post.php?action=edit&post=$draft->ID' title='" . __('Edit this draft') . "'>$draft->post_title</a>";
! ++$i;
! }
! ?>
! .</p>
! </div>
! <?php
! }
! ?>
! <div class="wrap">
! <?php
! if( isset( $_GET['m'] ) )
! {
! echo '<h2>' . $month[substr( $_GET['m'], 4, 2 )]." ".substr( $_GET['m'], 0, 4 )."</h2>";
! }
! ?>
!
! <form name="viewarc" action="" method="get" style="float: left; width: 20em;">
! <fieldset>
! <legend><?php _e('Show Posts From Month of...') ?></legend>
! <select name='m'>
! <?php
! $arc_result=$wpdb->get_results("SELECT DISTINCT YEAR(post_date) AS yyear, MONTH(post_date) AS mmonth FROM $tableposts ORDER BY post_date DESC");
! foreach ($arc_result as $arc_row) {
! $arc_year = $arc_row->yyear;
! $arc_month = $arc_row->mmonth;
!
! if( isset($_GET['m']) && $arc_year . zeroise($arc_month, 2) == $_GET['m'] )
! $default = 'selected="selected"';
! else
! $default = null;
!
! echo "<option $default value=\"" . $arc_year.zeroise($arc_month, 2) . '">';
! echo $month[zeroise($arc_month, 2)] . " $arc_year";
! echo "</option>\n";
! }
! ?>
! </select>
! <input type="submit" name="submit" value="<?php _e('Show Month') ?>" />
! </fieldset>
! </form>
! <form name="searchform" action="" method="get" style="float: left; width: 20em; margin-left: 3em;">
! <fieldset>
! <legend><?php _e('Show Posts That Contain...') ?></legend>
! <input type="text" name="s" value="<?php if (isset($s)) echo htmlspecialchars($s); ?>" size="17" />
! <input type="submit" name="submit" value="<?php _e('Search') ?>" />
! </fieldset>
! </form>
!
! <br style="clear:both;" />
!
! <table width="100%" cellpadding="3" cellspacing="3">
! <tr>
! <th scope="col"><?php _e('ID') ?></th>
! <th scope="col"><?php _e('When') ?></th>
! <th scope="col"><?php _e('Title') ?></th>
! <th scope="col"><?php _e('Categories') ?></th>
! <th scope="col"><?php _e('Comments') ?></th>
! <th scope="col"><?php _e('Author') ?></th>
! <th scope="col"><?php _e('Edit') ?></th>
! <th scope="col"><?php _e('Delete') ?></th>
! </tr>
! <?php
! if (empty($m)) $showposts = 15;
! include(ABSPATH.'wp-blog-header.php');
!
! if ($posts) {
! $bgcolor = '';
! foreach ($posts as $post) { start_wp();
! $bgcolor = ('#eee' == $bgcolor) ? 'none' : '#eee';
! ?>
! <tr style='background-color: <?php echo $bgcolor; ?>'>
! <th scope="row"><?php echo $id ?></th>
! <td><?php the_time('Y-m-d \<\b\r \/\> g:i:s a'); ?></td>
! <td><a href="<?php the_permalink(); ?>" rel="permalink">
! <?php the_title() ?>
! </a>
! <?php if ('private' == $post->post_status) _e(' - <strong>Private</strong>'); ?></td>
! <td><?php the_category(','); ?></td>
! <td><a href="edit.php?p=<?php echo $id ?>&c=1">
! <?php comments_number(__('no comments'), __('1 comment'), __("% comments")) ?>
! </a></td>
! <td><?php the_author() ?></td>
! <td><?php if (($user_level > $authordata->user_level) or ($user_login == $authordata->user_login)) { echo "<a href='post.php?action=edit&post=$id' class='edit'>" . __('Edit') . "</a>"; } ?></td>
! <td><?php if (($user_level > $authordata->user_level) or ($user_login == $authordata->user_login)) { echo "<a href='post.php?action=delete&post=$id' class='delete' onclick=\"return confirm('" . sprintf(__("You are about to delete this post \'%s\'\\n \'OK\' to delete, \'Cancel\' to stop."), the_title('','',0)) . "')\">" . __('Delete') . "</a>"; } ?></td>
! </tr>
! <?php
! }
! } else {
! ?>
! <tr style='background-color: <?php echo $bgcolor; ?>'>
! <td colspan="8"><?php _e('No posts found.') ?></td>
! </tr>
! <?php
! } // end if ($posts)
! ?>
! </table>
! <?php
! if ( 1 == count($posts) ) {
!
! $comments = $wpdb->get_results("SELECT * FROM $tablecomments WHERE comment_post_ID = $id ORDER BY comment_date");
! if ($comments) {
! ?>
! <h3><?php _e('Comments') ?></h3>
! <ol id="comments">
! <?php
! foreach ($comments as $comment) {
! $comment_status = wp_get_comment_status($comment->comment_ID);
! ?>
!
! <li <?php if ("unapproved" == $comment_status) echo "class='unapproved'"; ?> >
! <?php comment_date('Y-n-j') ?>
! @
! <?php comment_time('g:m:s a') ?>
! <?php
! if (($user_level > $authordata->user_level) or ($user_login == $authordata->user_login)) {
! echo "[ <a href=\"post.php?action=editcomment&comment=".$comment->comment_ID."\">" . __('Edit') . "</a>";
! echo " - <a href=\"post.php?action=deletecomment&p=".$post->ID."&comment=".$comment->comment_ID."\" onclick=\"return confirm('" . sprintf(__("You are about to delete this comment by \'%s\'\\n \'OK\' to delete, \'Cancel\' to stop."), $comment->comment_author) . "')\">" . __('Delete') . "</a> ";
! if ( ('none' != $comment_status) && ($user_level >= 3) ) {
! if ('approved' == wp_get_comment_status($comment->comment_ID)) {
! echo " - <a href=\"post.php?action=unapprovecomment&p=".$post->ID."&comment=".$comment->comment_ID."\">" . __('Unapprove') . "</a> ";
! } else {
! echo " - <a href=\"post.php?action=approvecomment&p=".$post->ID."&comment=".$comment->comment_ID."\">" . __('Approve') . "</a> ";
! }
! }
! echo "]";
! } // end if any comments to show
! ?>
! <br />
! <strong>
! <?php comment_author() ?>
! (
! <?php comment_author_email_link() ?>
! /
! <?php comment_author_url_link() ?>
! )</strong> (IP:
! <?php comment_author_IP() ?>
! )
! <?php comment_text() ?>
!
! </li>
! <!-- /comment -->
! <?php //end of the loop, don't delete
! } // end foreach
! echo '</ol>';
! }//end if comments
! ?>
! <?php } ?>
! </div>
! <?php
! include('admin-footer.php');
! ?>
Index: admin-header.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/admin-header.php,v
retrieving revision 1.22
retrieving revision 1.22.4.1
diff -C2 -d -r1.22 -r1.22.4.1
*** admin-header.php 22 May 2004 08:45:36 -0000 1.22
--- admin-header.php 6 Oct 2004 00:01:45 -0000 1.22.4.1
***************
*** 1,143 ****
! <?php
!
! require_once('../wp-config.php');
! require_once(ABSPATH.'/wp-admin/auth.php');
! require(ABSPATH.'/wp-admin/admin-functions.php');
!
! function gethelp_link($this_file, $helptag) {
! $url = 'http://wordpress.org/docs/reference/links/#'.$helptag;
! $s = ' <a href="'.$url.'" title="' . __('Click here for help') .'">?</a>';
! return $s;
! }
!
! if (!isset($blogID)) $blog_ID=1;
! if (!isset($debug)) $debug=0;
! timer_start();
!
! $dogs = $wpdb->get_results("SELECT * FROM $tablecategories WHERE 1=1");
! foreach ($dogs as $catt) {
! $cache_categories[$catt->cat_ID] = $catt;
! }
!
! get_currentuserinfo();
!
! $posts_per_page = get_settings('posts_per_page');
! $what_to_show = get_settings('what_to_show');
! $archive_mode = get_settings('archive_mode');
! $date_format = stripslashes(get_settings('date_format'));
! $time_format = stripslashes(get_settings('time_format'));
!
! // let's deactivate quicktags on IE Mac and Lynx, because they don't work there.
! if (($is_macIE) || ($is_lynx))
! $use_quicktags = 0;
!
! $wpvarstoreset = array('profile','standalone','redirect','redirect_url','a','popuptitle','popupurl','text', 'trackback', 'pingback');
! for ($i=0; $i<count($wpvarstoreset); $i += 1) {
! $wpvar = $wpvarstoreset[$i];
! if (!isset($$wpvar)) {
! if (empty($_POST["$wpvar"])) {
! if (empty($_GET["$wpvar"])) {
! $$wpvar = '';
! } else {
! $$wpvar = $_GET["$wpvar"];
! }
! } else {
! $$wpvar = $_POST["$wpvar"];
! }
! }
! }
!
! if ($standalone == 0) :
!
! ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
! <html xmlns="http://www.w3.org/1999/xhtml">
! <head>
! <title>WordPress › <?php bloginfo('name') ?> › <?php echo $title; ?></title>
! <link rel="stylesheet" href="wp-admin.css" type="text/css" />
! <link rel="shortcut icon" href="../wp-images/wp-favicon.png" />
! <meta http-equiv="Content-Type" content="text/html; charset=<?php echo get_settings('blog_charset'); ?>" />
! <?php
! if ($redirect==1) {
! ?>
! <script language="javascript" type="text/javascript">
! <!--
! function redirect() {
! window.location = "<?php echo $redirect_url; ?>";
! }
! setTimeout("redirect();", 600);
! //-->
! </script>
! <?php
! } // redirect
! ?>
!
! <?php if (isset($xfn)) : ?>
! <script language="javascript" type="text/javascript">
! //<![CDATA[
!
! function GetElementsWithClassName(elementName, className) {
! var allElements = document.getElementsByTagName(elementName);
! var elemColl = new Array();
! for (i = 0; i < allElements.length; i++) {
! if (allElements[i].className == className) {
! elemColl[elemColl.length] = allElements[i];
! }
! }
! return elemColl;
! }
!
! function blurry() {
! if (!document.getElementById) return;
!
! var aInputs = document.getElementsByTagName('input');
!
! for (var i = 0; i < aInputs.length; i++) {
! aInputs[i].onclick = function() {
! var inputColl = GetElementsWithClassName('input','valinp');
! var rel = document.getElementById('rel');
! var inputs = '';
! for (i = 0; i < inputColl.length; i++) {
! if (inputColl[i].checked) {
! if (inputColl[i].value != '') inputs += inputColl[i].value + ' ';
! }
! }
! inputs = inputs.substr(0,inputs.length - 1);
! if (rel != null) {
! rel.value = inputs;
! }
! }
!
! aInputs[i].onkeyup = function() {
! var inputColl = GetElementsWithClassName('input','valinp');
! var rel = document.getElementById('rel');
! var inputs = '';
! for (i = 0; i < inputColl.length; i++) {
! if (inputColl[i].checked) {
! inputs += inputColl[i].value + ' ';
! }
! }
! inputs = inputs.substr(0,inputs.length - 1);
! if (rel != null) {
! rel.value = inputs;
! }
! }
!
! }
! }
!
! window.onload = blurry;
! //]]>
! </script>
! <?php endif; ?>
!
! <?php do_action('admin_head', ''); ?>
! </head>
! <body>
! <div id="wphead">
! <h1><a href="http://wordpress.org" rel="external" title="<?php _e('Visit WordPress.org') ?>"><?php _e('WordPress') ?></a></h1>
! </div>
!
! <?php
! require('./menu.php');
! endif;
?>
\ No newline at end of file
--- 1,129 ----
! <?php
!
! require_once('../wp-config.php');
! require_once(ABSPATH.'/wp-admin/auth.php');
! require(ABSPATH.'/wp-admin/admin-functions.php');
!
! function gethelp_link($this_file, $helptag) {
! $url = 'http://wordpress.org/docs/reference/links/#'.$helptag;
! $s = ' <a href="'.$url.'" title="' . __('Click here for help') .'">?</a>';
! return $s;
! }
!
! if (!isset($blogID)) $blog_ID=1;
! if (!isset($debug)) $debug=0;
! timer_start();
!
! $dogs = $wpdb->get_results("SELECT * FROM $tablecategories WHERE 1=1");
! foreach ($dogs as $catt) {
! $cache_categories[$catt->cat_ID] = $catt;
! }
!
! get_currentuserinfo();
!
! $posts_per_page = get_settings('posts_per_page');
! $what_to_show = get_settings('what_to_show');
! $archive_mode = get_settings('archive_mode');
! $date_format = stripslashes(get_settings('date_format'));
! $time_format = stripslashes(get_settings('time_format'));
!
! // let's deactivate quicktags on IE Mac and Lynx, because they don't work there.
! if (($is_macIE) || ($is_lynx))
! $use_quicktags = 0;
!
! $wpvarstoreset = array('profile','standalone','redirect','redirect_url','a','popuptitle','popupurl','text', 'trackback', 'pingback');
! for ($i=0; $i<count($wpvarstoreset); $i += 1) {
! $wpvar = $wpvarstoreset[$i];
! if (!isset($$wpvar)) {
! if (empty($_POST["$wpvar"])) {
! if (empty($_GET["$wpvar"])) {
! $$wpvar = '';
! } else {
! $$wpvar = $_GET["$wpvar"];
! }
! } else {
! $$wpvar = $_POST["$wpvar"];
! }
! }
! }
!
! if ($standalone == 0) :
!
! ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
! <html xmlns="http://www.w3.org/1999/xhtml">
! <head>
! <title>WordPress › <?php bloginfo('name') ?> › <?php echo $title; ?></title>
! <link rel="stylesheet" href="wp-admin.css" type="text/css" />
! <link rel="shortcut icon" href="../wp-images/wp-favicon.png" />
! <meta http-equiv="Content-Type" content="text/html; charset=<?php echo get_settings('blog_charset'); ?>" />
!
! <?php if (isset($xfn)) : ?>
! <script language="javascript" type="text/javascript">
! //<![CDATA[
!
! function GetElementsWithClassName(elementName, className) {
! var allElements = document.getElementsByTagName(elementName);
! var elemColl = new Array();
! for (i = 0; i < allElements.length; i++) {
! if (allElements[i].className == className) {
! elemColl[elemColl.length] = allElements[i];
! }
! }
! return elemColl;
! }
!
! function blurry() {
! if (!document.getElementById) return;
!
! var aInputs = document.getElementsByTagName('input');
!
! for (var i = 0; i < aInputs.length; i++) {
! aInputs[i].onclick = function() {
! var inputColl = GetElementsWithClassName('input','valinp');
! var rel = document.getElementById('rel');
! var inputs = '';
! for (i = 0; i < inputColl.length; i++) {
! if (inputColl[i].checked) {
! if (inputColl[i].value != '') inputs += inputColl[i].value + ' ';
! }
! }
! inputs = inputs.substr(0,inputs.length - 1);
! if (rel != null) {
! rel.value = inputs;
! }
! }
!
! aInputs[i].onkeyup = function() {
! var inputColl = GetElementsWithClassName('input','valinp');
! var rel = document.getElementById('rel');
! var inputs = '';
! for (i = 0; i < inputColl.length; i++) {
! if (inputColl[i].checked) {
! inputs += inputColl[i].value + ' ';
! }
! }
! inputs = inputs.substr(0,inputs.length - 1);
! if (rel != null) {
! rel.value = inputs;
! }
! }
!
! }
! }
!
! window.onload = blurry;
! //]]>
! </script>
! <?php endif; ?>
!
! <?php do_action('admin_head', ''); ?>
! </head>
! <body>
! <div id="wphead">
! <h1><a href="http://wordpress.org" rel="external" title="<?php _e('Visit WordPress.org') ?>"><?php _e('WordPress') ?></a></h1>
! </div>
!
! <?php
! require('./menu.php');
! endif;
?>
\ No newline at end of file
Index: post.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/post.php,v
retrieving revision 1.59.4.2
retrieving revision 1.59.4.3
diff -C2 -d -r1.59.4.2 -r1.59.4.3
*** post.php 5 Oct 2004 22:39:06 -0000 1.59.4.2
--- post.php 6 Oct 2004 00:01:46 -0000 1.59.4.3
***************
*** 1,809 ****
! <?php
! /* <Edit> */
!
! require_once('../wp-includes/wp-l10n.php');
!
! function add_magic_quotes($array) {
! foreach ($array as $k => $v) {
! if (is_array($v)) {
! $array[$k] = add_magic_quotes($v);
! } else {
[...1592 lines suppressed...]
! </div>
! <?php
! } else {
!
!
! ?>
! <div class="wrap">
! <?php printf(__('<p>Since you’re a newcomer, you’ll have to wait for an admin to raise your level to 1, in order to be authorized to post blog items.<br />
! You can also <a href="mailto:%s?subject=Blog posting permission">e-mail the admin</a> to ask for a promotion.<br />
! When you’re promoted, just reload this page and you’ll be able to blog. :)</p>'), get_settings('admin_email')); ?>
! </div>
! <?php
!
! }
!
! break;
! } // end switch
! /* </Edit> */
! include('admin-footer.php');
! ?>
Index: bookmarklet.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/bookmarklet.php,v
retrieving revision 1.9
retrieving revision 1.9.4.1
diff -C2 -d -r1.9 -r1.9.4.1
*** bookmarklet.php 1 Mar 2004 06:13:32 -0000 1.9
--- bookmarklet.php 6 Oct 2004 00:01:45 -0000 1.9.4.1
***************
*** 1,131 ****
! <?php
! /* <Bookmarklet> */
!
! // accepts 'post_title' and 'content' as vars passed in. Add-on from Alex King
!
! $mode = 'bookmarklet';
!
! $standalone = 1;
! require_once('admin-header.php');
!
! if ($user_level == 0)
! die ("Cheatin' uh?");
!
! if ('b' == $a) {
!
! ?><html>
! <head>
! <script language="javascript" type="text/javascript">
! <!--
! window.close()
! -->
! </script>
! </head>
! <body></body>
! </html><?php
!
! } else {
!
! $popuptitle = stripslashes($popuptitle);
! $text = stripslashes($text);
!
! /* big funky fixes for browsers' javascript bugs */
!
! if (($is_macIE) && (!isset($IEMac_bookmarklet_fix))) {
! $popuptitle = preg_replace($wp_macIE_correction["in"],$wp_macIE_correction["out"],$popuptitle);
! $text = preg_replace($wp_macIE_correction["in"],$wp_macIE_correction["out"],$text);
! }
!
! if (($is_winIE) && (!isset($IEWin_bookmarklet_fix))) {
! $popuptitle = preg_replace("/\%u([0-9A-F]{4,4})/e", "'&#'.base_convert('\\1',16,10).';'", $popuptitle);
! $text = preg_replace("/\%u([0-9A-F]{4,4})/e", "'&#'.base_convert('\\1',16,10).';'", $text);
! }
!
! if (($is_gecko) && (!isset($Gecko_bookmarklet_fix))) {
! $popuptitle = preg_replace($wp_gecko_correction["in"],$wp_gecko_correction["out"],$popuptitle);
! $text = preg_replace($wp_gecko_correction["in"],$wp_gecko_correction["out"],$text);
! }
!
! $post_title = $_REQUEST['post_title'];
! if (!empty($post_title)) {
! $post_title = stripslashes($post_title);
! } else {
! $post_title = $popuptitle;
! }
! // I'm not sure why we're using $edited_post_title in the edit-form.php, but we are
! // and that is what is being included below. For this reason, I am just duplicating
! // the var instead of changing the assignment on the lines above.
! // -- Alex King 2004-01-07
! $edited_post_title = $post_title;
!
! $content = $_REQUEST['content'];
! if (!empty($content)) {
! $content = stripslashes($content);
! } else {
! $content = '<a href="'.$popupurl.'">'.$popuptitle.'</a>'."\n$text";
! }
!
! /* /big funky fixes */
!
! ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
! <html xmlns="http://www.w3.org/1999/xhtml">
! <head>
! <title>WordPress > Bookmarklet</title>
! <meta http-equiv="Content-Type" content="text/html; charset=<?php echo get_settings('blog_charset'); ?>" />
! <link rel="stylesheet" href="wp-admin.css" type="text/css" />
! <link rel="shortcut icon" href="../wp-images/wp-favicon.png" />
! <script type="text/javascript" language="javascript">
! <!--
! function launchupload() {
! window.open ("upload.php", "wpupload", "width=380,height=360,location=0,menubar=0,resizable=1,scrollbars=yes,status=1,toolbar=0");
! }
!
! //-->
! </script>
! <style type="text/css">
! <!--
!
! #wpbookmarklet textarea,input,select {
! border-width: 1px;
! border-color: #cccccc;
! border-style: solid;
! padding: 2px;
! margin: 1px;
! }
!
! #wpbookmarklet .checkbox {
! background-color: #ffffff;
! border-width: 0px;
! padding: 0px;
! margin: 0px;
! }
!
! #wpbookmarklet textarea {
! font-family: Verdana, Geneva, Arial, Helvetica;
! font-size: 0.9em;
! }
!
! #wpbookmarklet .wrap {
! border: 0px;
! }
!
! #wpbookmarklet #postdiv {
! margin-bottom: 0.5em;
! }
!
! #wpbookmarklet #titlediv {
! margin-bottom: 1em;
! }
!
! -->
! </style>
! </head>
! <body id="wpbookmarklet">
! <h1 id="wphead"><a href="http://wordpress.org" rel="external">WordPress</a></h1>
!
! <?php require('edit-form.php'); ?>
!
! </body>
! </html><?php
! }
! ?>
--- 1,131 ----
! <?php
! /* <Bookmarklet> */
!
! // accepts 'post_title' and 'content' as vars passed in. Add-on from Alex King
!
! $mode = 'bookmarklet';
!
! $standalone = 1;
! require_once('admin-header.php');
!
! if ($user_level == 0)
! die ("Cheatin' uh?");
!
! if ('b' == $a) {
!
! ?><html>
! <head>
! <script language="javascript" type="text/javascript">
! <!--
! window.close()
! -->
! </script>
! </head>
! <body></body>
! </html><?php
!
! } else {
!
! $popuptitle = htmlspecialchars(stripslashes($popuptitle));
! $text = htmlspecialchars(stripslashes($text));
!
! /* big funky fixes for browsers' javascript bugs */
!
! if (($is_macIE) && (!isset($IEMac_bookmarklet_fix))) {
! $popuptitle = preg_replace($wp_macIE_correction["in"],$wp_macIE_correction["out"],$popuptitle);
! $text = preg_replace($wp_macIE_correction["in"],$wp_macIE_correction["out"],$text);
! }
!
! if (($is_winIE) && (!isset($IEWin_bookmarklet_fix))) {
! $popuptitle = preg_replace("/\%u([0-9A-F]{4,4})/e", "'&#'.base_convert('\\1',16,10).';'", $popuptitle);
! $text = preg_replace("/\%u([0-9A-F]{4,4})/e", "'&#'.base_convert('\\1',16,10).';'", $text);
! }
!
! if (($is_gecko) && (!isset($Gecko_bookmarklet_fix))) {
! $popuptitle = preg_replace($wp_gecko_correction["in"],$wp_gecko_correction["out"],$popuptitle);
! $text = preg_replace($wp_gecko_correction["in"],$wp_gecko_correction["out"],$text);
! }
!
! $post_title = $_REQUEST['post_title'];
! if (!empty($post_title)) {
! $post_title = stripslashes($post_title);
! } else {
! $post_title = $popuptitle;
! }
! // I'm not sure why we're using $edited_post_title in the edit-form.php, but we are
! // and that is what is being included below. For this reason, I am just duplicating
! // the var instead of changing the assignment on the lines above.
! // -- Alex King 2004-01-07
! $edited_post_title = htmlspecialchars($post_title);
!
! $content = $_REQUEST['content'];
! if (!empty($content)) {
! $content = stripslashes($content);
! } else {
! $content = '<a href="'.$popupurl.'">'.$popuptitle.'</a>'."\n$text";
! }
!
! /* /big funky fixes */
!
! ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
! <html xmlns="http://www.w3.org/1999/xhtml">
! <head>
! <title>WordPress > Bookmarklet</title>
! <meta http-equiv="Content-Type" content="text/html; charset=<?php echo get_settings('blog_charset'); ?>" />
! <link rel="stylesheet" href="wp-admin.css" type="text/css" />
! <link rel="shortcut icon" href="../wp-images/wp-favicon.png" />
! <script type="text/javascript" language="javascript">
! <!--
! function launchupload() {
! window.open ("upload.php", "wpupload", "width=380,height=360,location=0,menubar=0,resizable=1,scrollbars=yes,status=1,toolbar=0");
! }
!
! //-->
! </script>
! <style type="text/css">
! <!--
!
! #wpbookmarklet textarea,input,select {
! border-width: 1px;
! border-color: #cccccc;
! border-style: solid;
! padding: 2px;
! margin: 1px;
! }
!
! #wpbookmarklet .checkbox {
! background-color: #ffffff;
! border-width: 0px;
! padding: 0px;
! margin: 0px;
! }
!
! #wpbookmarklet textarea {
! font-family: Verdana, Geneva, Arial, Helvetica;
! font-size: 0.9em;
! }
!
! #wpbookmarklet .wrap {
! border: 0px;
! }
!
! #wpbookmarklet #postdiv {
! margin-bottom: 0.5em;
! }
!
! #wpbookmarklet #titlediv {
! margin-bottom: 1em;
! }
!
! -->
! </style>
! </head>
! <body id="wpbookmarklet">
! <h1 id="wphead"><a href="http://wordpress.org" rel="external">WordPress</a></h1>
!
! <?php require('edit-form.php'); ?>
!
! </body>
! </html><?php
! }
! ?>
- Previous message: [wp-cvs] wordpress/wp-includes version.php,1.15.4.2,1.15.4.3
- Next message: [wp-cvs] wordpress/wp-admin admin-functions.php, 1.45,
1.46 edit-page-form.php, 1.5, 1.6 edit-pages.php, 1.3,
1.4 options-permalink.php, 1.43, 1.44 post.php, 1.88,
1.89 upgrade-schema.php, 1.11, 1.12
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the cvs
mailing list