Beispiel #1
0
        display_ad_form(1, $mode, '');
    } else {
        $ad_id = insert_ad_data();
        // save ad_id with the temp order...
        $sql = "UPDATE temp_orders SET ad_id='{$ad_id}' where session_id='" . addslashes(session_id()) . "' ";
        //echo $sql;
        $result = mysql_query($sql) or die(mysql_error());
        $prams = load_ad_values($ad_id);
        //print_r($prams);
        ?>
		<center><div class='ok_msg_label'><input type="button"  class='big_button' value="<?php 
        echo $label['write_ad_saved'] . " " . $label['write_ad_continue_button'];
        ?>
" onclick="window.location='confirm_order.php'"></div></center>
		<p>&nbsp;</p>
		<?php 
        display_ad_form(1, "edit", $prams);
    }
} else {
    // get the ad_id form the temp_orders table..
    $sql = "SELECT ad_id FROM temp_orders WHERE session_id='" . addslashes(session_id()) . "' ";
    $result = mysql_query($sql) or die(mysql_error());
    $row = mysql_fetch_array($result);
    $ad_id = $row['ad_id'];
    //echo "adid is: ".$ad_id;
    $prams = load_ad_values($ad_id);
    // user is not logged in
    //print_r($prams);
    display_ad_form(1, 'edit', $prams);
}
require "footer.php";
Beispiel #2
0
<table>

<tr>
	<td valign="top">
	<?php 
build_sort_fields(1, 1);
build_sort_fields(1, 2);
build_sort_fields(1, 3);
if ($_REQUEST['action'] == 'move_up') {
    move_field_up(1, $_REQUEST['field_id']);
}
if ($_REQUEST['action'] == 'move_down') {
    move_field_down(1, $_REQUEST['field_id']);
}
if ($NEW_FIELD == 'NO') {
    display_ad_form(1, $_REQUEST['mode'], '');
}
?>


	</td>
	<td valign="top">

	<?php 
if ($_REQUEST['mode'] == 'EDIT' && $_REQUEST['field_id'] != '' || $NEW_FIELD == 'YES') {
    field_form($NEW_FIELD, $prams, 1);
}
?>

	</td>