Continua aqui....
Código PHP:
<?php
if (get_option('cp_ad_edit') != "no") {
?>
<?php if ($getmyad): ?>
<?php echo $err2.$errmsg; ?>
<form name="edit_ad" id="edit_ad" action="" method="post" enctype="multipart/form-data">
<input type="hidden" name="ad_id" value="<?php echo $getmyad->ID; ?>" />
<input type="hidden" name="dashboard_url" value="<?php echo cp_dashboard_url; ?>" />
<h2><?php _e('Edit Your Ad','cp');?></h2>
<p><?$delmessages?><p>
<p><?php _e('Edit the fields below and click save to update your ad. Your changes will be updated instantly on the site.','cp');?></p>
<p><strong><?php _e('Ad ID:','cp');?></strong> <span style="background-color:#eee;padding:5px;"><?php echo $getmyad->ID; ?></span></p>
<p><label><b><?php _e('Title','cp');?></b> *<br />
<input <?php if ($hfield == '1') { echo $errcolor; } ?> type="text" name="post_title" class="mid2" id="post_title" value="<?php echo $getmyad->post_title; ?>" size="50" maxlength="100" /></label></p>
<p><label><b><?php _e('Price','cp');?></b> *<br />
<input <?php if ($hfield == '2') { echo $errcolor; } ?> type="text" name="price" class="mid2" id="price" value="<?php echo get_post_meta($getmyad->ID, "price", true); ?>" size="50" maxlength="100" /></label></p>
<p><label><b><?php _e('Location','cp');?></b> *<br />
<input <?php if ($hfield == '3') { echo $errcolor; } ?> type="text" name="location" class="mid2" id="location" value="<?php echo get_post_meta($getmyad->ID, "location", true); ?>" size="50" maxlength="100" /></label></p>
<p><label><b>Location </b> *(Options)<br />
<select name='location' id='location' class='postform' >
<option value="<?php if ($hfield == '3') { echo $errcolor; } ?>" ><?php echo get_post_meta($getmyad->ID, "location", true); ?> </option>
<option value="Option 1">Option 1</option>
<option value="Option 2">Option 2</option>
<option value="Option 3">Option 3</option>
<option value="Option 4">Option 4</option>
</select></label></p>
<p><label><b><?php _e('Name','cp');?></b> *<br />
<input <?php if ($hfield == '6') { echo $errcolor; } ?> type="text" name="name_owner" class="mid2" id="name_owner" value="<?php echo get_post_meta($getmyad->ID, "name", true); ?>" size="50" maxlength="100" /></label></p>
<p><label><b><?php _e('Email','cp');?></b> *<br />
<input <?php if ($hfield == '5') { echo $errcolor; } ?> type="text" name="email" class="mid2" id="email" value="<?php echo get_post_meta($getmyad->ID, "email", true); ?>" size="50" maxlength="100" /></label></p>
<p><label><b><?php _e('Phone','cp');?></b><br />
<input type="text" name="phone" class="mid2" id="phone" value="<?php echo get_post_meta($getmyad->ID, "phone", true); ?>" size="50" maxlength="100" /></label></p>
<p><label><b><?php _e('URL','cp');?></b><br />
<input type="text" name="cp_adURL" class="mid2" id="cp_adURL" value="<?php echo get_post_meta($getmyad->ID, "cp_adURL", true); ?>" size="50" maxlength="250" /></label></p>
<p><b><?php _e('Description','cp');?></b> *<br />
<textarea <?php if ($hfield == '7') { echo $errcolor; } ?> name="description" class="mid2" id="description" rows="15" cols="57" onkeydown="textCounter(document.edit_ad.description,document.edit_ad.remLen1,5000)"
onkeyup="textCounter(document.edit_ad.description,document.edit_ad.remLen1,5000)"><?php echo stripslashes($getmyad->post_content); ?></textarea></p>
<div class="limit">
<input readonly="readonly" type="text" name="remLen1" size="4" maxlength="4" value="5000" style="width: 50px;" /><span style="font-size:11px;"> <?php _e('characters left','cp'); ?></span>
</div>
<p><b><?php _e('Images to be deleted','cp');?><small>(<?php _e('check images to be deleted','cp'); ?>)</small></b><br />
<?
$matches = explode(",", get_post_meta($getmyad->ID, 'images', true));
foreach($matches as $key=>$var) {
if ($var != "") {
$thumb_var = str_replace(get_option('home')."/wp-content/uploads/folder-images/", "", $var);
$single_thumb_img_url = get_bloginfo('template_url')."/includes/img_resize.php?width=100&height=100&url=".$thumb_var;
echo "<input type=\"checkbox\" name=\"delimages[]\" value=\"$key\"><img src=\"$single_thumb_img_url\"/>";
//echo "<a href=\"$var\" rel=\"group\"><img src=\"$single_thumb_img_url\" class=\"size-thumbnail\" alt=\"".get_the_title()."\" title=\"".get_the_title()."\" /></a>"."\n";
} else {
if ( $matches[0] == "") {
_e('There are no images','cp');
}
}
}
?><small>(<?php _e('check images to be deleted','cp'); ?>)</small>
<p><b><?php _e('Add images','cp'); ?> <small>(<?php _e('images must be under 1 MB','cp'); ?>)</small></b>
<input type="file" name="images[]" class="wwIconified" value="<?php echo $_POST['images']; ?>"/><br /><p>
<p class="submit"><input type="submit" class="lbutton" value="<?php _e('Update Ad »','cp') ?>" name="submit" /></p>
</form>
<?php else : ?>
<h2 class="center"><?php _e('Ad Not Found','cp');?></h2>
<p class="center"><?php _e('Sorry, but you are looking for something that isn\'t here.','cp');?><br /> <?php _e('Go to','cp');?> <a href="<?php bloginfo('url')?><?php echo cp_dashboard_url; ?>"><?php _e('My Dashboard','cp');?> ››</a></p>
<?php endif; ?>
<?php } else { ?>
<h2 class="center"><?php _e('Ad Editing is Disabled','cp');?></h2>
<p class="center"><?php _e('Your site administrator has disabled ad editing. Please contact them for further instructions.','cp');?><br /> <?php _e('Go to','cp');?> <a href="<?php bloginfo('url')?><?php echo cp_dashboard_url; ?>"><?php _e('My Dashboard','cp');?> ››</a></p>
<?php } ?>
</div>
</div>
<div class="right">
<?php if (function_exists('dynamic_sidebar')&&dynamic_sidebar('Page Sidebar')):else: ?>
<li><h2><?php _e('Archives','cp'); ?></h2>
<ul>
<?php wp_get_archives('type=monthly'); ?>
</ul>
</li>
<?php wp_list_categories('show_count=1&title_li=<h2>'.__('Categories','cp').'</h2>'); ?>
<?php endif; ?>
</div>
<div class="clear"></div>
</div>
</div>
<?php get_footer(); ?>
Agradecería mucho si alguien pudiera echarme un cable.
Saludos y gracias desde ya..