A Spring Recital
12 – 12 Oct
60th Anniversary Celebration Dinner
19 – 19 Oct
The Importance of Being Earnest
1 – 9 Nov
“;
if (!isset($_POST[“showcode”]) && !isset($_POST[“postid”])) { ?>
Please enter the unique show code for the show you wish to edit.
For example, to edit A Slice of Saturday Night, enter “SLI09”.
1) && (!isset($_POST[“nicelist”]))) {
/* If the form has been posted */
?>
“.$_POST[“name$i”].”
“;
echo “
“;
echo “
“;
echo “
“;
$person = $_POST[“name$i”];
if (!empty($_POST[“role$i”])) {
$title = “role_”.$_POST[“role$i”];
$nicelist[$person.”_”.$x++] = $title; }
if (!empty($_POST[“crew$i”])) {
$title = “crew_”.$_POST[“crew$i”];
$nicelist[$person.”_”.$x++] = $title; }
if (!empty($_POST[“prod$i”])) {
$title = “prod_”.$_POST[“prod$i”];
$nicelist[$person.”_”.$x++] = $title; }
}
}
$post_id = get_post($_POST[“postid”]);
$title = $post_id->post_title;
echo “
Is this correct? If not, go back and make the corrections.
“;
//Serialize and encode the NiceList Array to make it a simple string.
$nicelist = urlencode(serialize($nicelist));
?>
0) && (isset($_POST[“nicelist”]))) {
/* Else if the list has been confirmed */
//Set up Database connection
require(‘db.inc.php’);
$db = mysql_connect($dbhost, $dbuser, $dbpass);
if (mysql_errno())
{
echo ‘Error: Could not connect to database. Please try again later.
‘;
echo mysql_error();
exit;
}
mysql_select_db($dbname);
$nicelist = unserialize(urldecode($_POST[‘nicelist’]));
$postid = mysql_real_escape_string($_POST[“postid”]);
foreach ($nicelist as $k => $v) {
$personkey = explode(“_”, $k,-1);
$person = mysql_real_escape_string($personkey[0]);
$v = mysql_real_escape_string($v);
$insertsql = “INSERT into wp_postmeta (post_id, meta_key, meta_value) VALUES (‘$postid’, ‘$v’, ‘$person’)”;
$updatedb = mysql_query($insertsql);
}
if ($updatedb && $postid>0) {
echo “
“;
} else { echo “
“; }
} else if (isset($_POST[“showcode”])) {
/* Else if just the showcode has been submitted */
$showcode = $_POST[“showcode”];
$criteria = array(
‘meta_key’ => ‘showid’,
‘meta_value’ => “$showcode”,
‘numberposts’ => 1 );
$showdata = get_posts($criteria);
foreach($showdata as $show) {
setup_postdata($show);
$showid = $show->ID; }
$post_id = get_post($showid);
$title = $post_id->post_title;
echo “
“;
?>