Example #1
0
			<td colspan="2"><input type="text" name="web_url" maxlength="120" size="64"></td>
		</tr>
		<tr><td colspan="3">
		<input type="hidden" name="action" value="write">
		<input type="submit" value="Save Ad"></td></tr>
	</table>
</form>

<p>** if any links are over 128 characters: use <a href="http://www.bit.ly" target=_new>bit.ly</a> to shorten the url
<?php 
    } else {
        $start_date = $_POST['start_date'];
        $end_date = $_POST['end_date'];
        $name = $_POST['name'];
        $pic_url = $_POST['pic_url'];
        $web_url = $_POST['web_url'];
        if (!$start_date || !$end_date || !$name || !$pic_url || !$web_url) {
            echo 'Error - missing value(s)';
            exit;
        }
        add_ad($name, $start_date, $end_date, $pic_url, $web_url);
    }
    //end else
    ?>
</div>
<div style="clear:both;"></div>
<a href="cp.php"> << Back to Control Panel</a>
</div>
<?php 
}
require "ext/footer.php";
Example #2
0
        require "partials/_ads_form.php";
        ?>
    </form>
    <div class="footnote">** if any links are over 128 characters: use <a href="http://www.bit.ly" target=_new>bit.ly</a> to shorten the url</div>
  <?php 
    } else {
        $start_date = $_POST['start_date'];
        $end_date = $_POST['end_date'];
        $name = $_POST['name'];
        $pic_url = $_POST['pic_url'];
        $web_url = $_POST['web_url'];
        $priority = $_POST['priority'];
        if (!$start_date || !$end_date || !$name || !$pic_url || !$web_url || !$priority) {
            echo '<div class="top-spacer_20 center error">Error - missing requried value(s)</div>';
        } else {
            add_ad($name, $start_date, $end_date, $pic_url, $web_url, $priority);
        }
    }
    ?>
    <div class="top-spacer_20">
      <?php 
    if ($action == 'insert') {
        echo "<a href=\"" . $page_file . "\">Add another Ad</a>\n<p>";
    }
    ?>
      <a href="cp.php">Control Panel</a>
    </div>
  </div>
</div> <!-- end of row div -->
<?php 
}