topical media & game development
portal-cms-edit_audio.php
<?php
if (isset(contentid = delete_image = title = addslashes(contentdate = addslashes(sourcename = addslashes(sourceurl = addslashes(binary = addslashes(state = addslashes(description = addslashes(audioformat = addslashes(audiolength = addslashes(audiobitrate = addslashes(audiosize = addslashes(update = upload = health = politics = wildlife = energy = business = climate = pollution = technology = lifestyle = environment = region = keywords = delete_image) {
unlink(query = "UPDATE content set content_binary = 0 where content_id=result = mysql_query(result) {
die('Invalid query: ' . mysql_error());
}
}
if(target_path = "uploads/";
target_path . basename(
_FILES['uploadedfile']['tmp_name'],
file_upload_name = basename( binary = "uploads/".update){
title',
content.content_date = 'binary',
content.content_source_name = 'sourceurl',
content.content_state = 'description',
content_type_audio.audio_format='audiolength',
content_type_audio.audio_bitrate='audiosize' where content.content_id = 'query2= "UPDATE content_matrix set content_matrix.health='politics', content_matrix.wildlife='energy', content_matrix.business='climate', content_matrix.pollution='technology',
content_matrix.lifestyle='environment',
content_matrix.region='contentid'";
keywords));
contentid'";
query3);
if(!keywords as word = trim(query3 = "INSERT ignore into keywords (keyword_id, keyword_name) values ('', 'result3 = mysql_query(result) {
die('Invalid query: ' . mysql_error());
}
word'";
query3);
if(!row = mysql_fetch_array(keywordid = query3 = "INSERT into content_keywords (content_keyword_id, content_id, keyword_id) values ('',
'keywordid')";
query3);
if(!result = mysql_query(result2 = mysql_query(result) {
die('Invalid query: ' . mysql_error());
}
}
contentid'
AND content_type_audio.content_id ='result = mysql_query(result) {
die('Invalid query: ' . mysql_error());
}
contentid'";
query2);
if(!query3 = "SELECT * FROM `keywords`, `content_keywords` where content_keywords.content_id='result3 = mysql_query(result3) {
die('Invalid query: ' . mysql_error());
}
result);
result2);
row['content_binary'];
?>
<form method="post" enctype="multipart/form-data" action="">
<table>
<tr>
<td width="150">
Title:
</td>
<td>
<input type="text" name="title" size="30" value="<?php echo row['content_date']; ?>"/>
</td>
</tr>
<?php
if(row['content_binary']; ?>">
<input type="submit" value="Delete Audio">
</form>
</td>
</tr>
<?php
} else {
?>
<tr>
<td width="150">
<input type="hidden" name="upload" value="1" />
Choose a file to upload: <input name="uploadedfile" type="file" /><br />
</td>
<td>
</td>
</tr>
<?php
}
?>
<tr>
<td width="150">
Sourcename:
</td>
<td>
<input type="text" name="sourcename" size="30" value="<?php echo row['content_sourceurl']; ?>"/>
</td>
</tr>
<tr>
<td width="150">
Content state:
</td>
<td>
<input type="text" name="contentstate" size="30" value="<?php echo row['content_description'];
?>"/>
</td>
</tr>
<tr>
<td width="150">
Audio Format:
</td>
<td>
<input type="text" name="audioformat" size="30" value="<?php echo row['audio_length']; ?>"/>
</td>
</tr>
<tr>
<td width="150">
Audio Bitrate:
</td>
<td>
<input type="text" name="audiobitrate" size="30" value="<?php echo row['audio_size']; ?>"/>
</td>
</tr>
<tr>
<td>
Categories:
</td>
<td>
Health:
<input type="checkbox" name="health" value="1" <?php row2['health']; if(politics=politics == "1"){echo " CHECKED";}?>>
<br />
Wildlife
<input type="checkbox" name="wildlife" value="1" <?php row2['wildlife']; if(energy=energy == "1"){echo " CHECKED";}?>>
<br />
Business
<input type="checkbox" name="business" value="1" <?php row2['business']; if(climate=climate == "1"){echo " CHECKED";}?>>
<br />
Pollution
<input type="checkbox" name="pollution" value="1" <?php row2['pollution']; if(technology=technology == "1"){echo " CHECKED";}?>>
<br />
Lifestyle
<input type="checkbox" name="lifestyle" value="1" <?php row2['lifestyle']; if(environment=environment == "1"){echo " CHECKED";}?>>
<br />
</td>
</tr>
<tr>
<td width="150">
Region:
</td>
<td>
<input type="text" name="region" size="30" value="<?php echo row3 = mysql_fetch_array(row3['keyword_name']; echo " "; } ?> "/>
</td>
</tr>
<tr>
<td></td>
<td><input type="submit" value="Update" name="update" />
</td>
</tr>
</table>
<input type="hidden" name="contenttype" value="3">
<input type="hidden" name="contentid" value="<?php echo
(C) A. Eliëns
2/9/2007
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.