topical media & game development
mashup-delicious-13-rally2007-save-popup.php / php
<?php
//configure del.icio.us username and password
define('DELICIOUS_USERNAME','USERNAME');
define('DELICIOUS_PASSWORD','PASSWORD');
//bring in the Snoopy and configure
require('lib/Snoopy.class.php');
//bring in del.icio.us mashups lib
require('lib/delicious_mashups.inc.php');
//the default tag meant to identify all posts to the rally project
define('DEFAULT_TAG',"rally2007");
if (isset(response = ''; //will contain the success/error message from posting
//assemble API method arguments
_POST['url'] != "")
_POST['url']);
else
die("Sorry - URL is required!");
//description
if (arguments .= "&description=".urlencode(arguments .= "&extended=".urlencode(arguments .= "&tags=".urlencode(DEFAULT_TAG." ".arguments);
//set
if (api_return['status'] != 200)
api_return['status'];
else
response)) {
?>
<table width="100%">
<tbody>
<form method="post" accept-charset="utf-8">
<tr>
<td style="text-align: right">
URL:
</td>
<td>
<input type="text" name="url" size="60"
value="<?php if (isset(_GET['location']; }?>" />
</td>
</tr>
<tr>
<td style="text-align: right">
Title:
</td>
<td>
<input type="text" name="description" size="60"
value="<?php if (isset(_GET['title']; }?>" />
</td>
</tr>
<tr>
<td style="text-align: right">
Notes:
</td>
<td>
<textarea name="extended" cols="50" rows="5"></textarea>
</td>
</tr>
<tr>
<td style="text-align: right">
Category:
</td>
<td>
<select name="category">
<option>Vendors</option>
<option>Restaurants</option>
<option>Hotels</option>
<option>Services</option>
<option>Sponsor</option>
<option>Other</option>
</select>
</td>
</tr>
<tr>
<td style="text-align: right" colspan="2">
<input type="button" value="Cancel" onclick="window.close()" />
<input type="submit" name="Save" value="Save" />
</td>
</tr>
</form>
</tbody>
</table>
<?php
} else {
?>
<div><?php echo
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.