Results 1 to 10 of 23
-
6th Nov 2009, 03:45 PM #1OPMemberWebsite's:
litewarez.net litewarez.com triniwarez.comWCDDL V1 (Site Editor MOD)
Heya, i just coded this for some dood as a favour and thought it would be rude not to share so here it is
Just add all this code bofore the ?> at the end of the funcs.php file
PHP Code:function admin_edit_sites(){
global $pg,$limit,$page,$go,$q,$id;
$mode = $_GET['mode'];
switch($mode){
case '':
default:
//For Showing all sites
$query = "SELECT * FROM wcddl_sites LIMIT ".$pg.",".$limit;
$query = mysql_query($query);
$fetched = mysql_num_rows($query); // pagination
$out = '<table width="100%">';
$out .= "<tr><td>Sitename</td><td>Email</td><td>Rating</td></tr>";
while($row = mysql_fetch_assoc($query)){
$out .= "<tr>
<td>
<a href=\"?go=".$go."&mode=edit&id=".(int)$row['id']."\">".$row['name']."</a></td>
<td><a href=\"mailto:".$row['email']."\">".$row['email']."</a></td>
</tr>";
}
$out .= "</table>";
//Just some fast pagination for you :D
$out .= '<div>';
if($page > 1){$out .= '<a href="?go='.$go.'&page='.($page-1).'">« Prev</a> ';}
$out .= '<strong>('.$page.')</strong>'; // current page
if($fetched >= $limit){ $out .= '<a href="?go='.$go.'&page='.($page+1).'">Next »</a> ';}
$out .= '</div>';
echo $out;
break;
case 'edit':
//Edit Mode
if(isset($id)){
$query = "SELECT * FROM wcddl_sites WHERE id = ".mysql_real_escape_string($id);
$site_data = mysql_fetch_assoc(mysql_query($query)); // single row
if($site_data !== false){ // Make sure we have download
$template = '<table width="100%">';
$template .= '<form method="post" action="?go='.$go.'&mode=save&id='.$id.'">';
//Indepth form items
$template .= '<input type="hidden" name="update" value="true" />';
$template .= "<tr><td>Site name</td><td><input type=\"text\" name=\"name\"
value=\"".$site_data['name']."\" /></td></tr>";
$template .= "<tr><td>Site url</td><td><input type=\"text\" name=\"url\"
value=\"".$site_data['url']."\" /></td></tr>";
$template .= "<tr><td>Site email</td><td><input type=\"text\" name=\"email\"
value=\"".$site_data['email']."\" /></td></tr>";
$template .= '<tr><td colspan="2"><input type="submit" value="Update" /></td></tr>';
$template .= "</form>";
$template .= "</table>";
echo $template;
}else{
echo "Hmmmm, Download (".$id.") does not exists!";
}
}else{
echo "Unable to get id from url!";
}
break;
case 'save':
if($id > 0 && isset($_POST)){
$query = "UPDATE wcddl_sites SET name = '%s', url = '%s', email = '%s', WHERE id = %d";
$query = sprintf($query,mysql_real_escape_string($_POST['name']),mysql_real_escape_string($_POST['url'])
,mysql_real_escape_string($_POST['email']),(int)$id);
$check = @mysql_query($query);
if($check === false){
echo 'For some reason we was unable to update the database! no changes were made';
}else{
echo '('.$_POST["name"].') Updated!, <a href="?go='.$go.'">Go back to editor!</a>';
}
}else{
echo 'There was an error, please make sure you came here for the edit form';
}
break;
}
echo '<div style="clear:both;font-waight:bold;text-align:center">Site editor by Litewarez</div>';
}
Code:<a href="index.php?go=edit_sites">Edit Sites</a> |
litewarez Reviewed by litewarez on . WCDDL V1 (Site Editor MOD) Heya, i just coded this for some dood as a favour and thought it would be rude not to share so here it is Just add all this code bofore the ?> at the end of the funcs.php file function admin_edit_sites(){ global $pg,$limit,$page,$go,$q,$id; $mode = $_GET; switch($mode){ case '': default: Rating: 5Join Litewarez.net today and become apart of the community.
Unique | Clean | Advanced (All with you in mind)
Downloads | Webmasters
Notifications,Forum,Chat,Community all at Litewarez Webmasters
-
6th Nov 2009, 03:47 PM #2Member
Top Work Litewarez (Y)
Thanks for doing this for meIt's amazing, being in a community can cause hate. Competitors or not - DDOS isn't cool :)
-
6th Nov 2009, 03:50 PM #3OPMemberWebsite's:
litewarez.net litewarez.com triniwarez.comNo problem dood
Join Litewarez.net today and become apart of the community.
Unique | Clean | Advanced (All with you in mind)
Downloads | Webmasters
Notifications,Forum,Chat,Community all at Litewarez Webmasters
-
6th Nov 2009, 03:50 PM #4BannedWebsite's:
nodesales.com quickrls.com directdownloadlinks.netNice modification!
-
6th Nov 2009, 03:56 PM #5MemberWebsite's:
zomgbbqpizza.com evilddl.com scenemarket.org
-
6th Nov 2009, 03:58 PM #6OPMemberWebsite's:
litewarez.net litewarez.com triniwarez.comDunno, just was the sys he was running, no point in letting it go waste and some people are established with v1 and too much trouble to upgrade!
Join Litewarez.net today and become apart of the community.
Unique | Clean | Advanced (All with you in mind)
Downloads | Webmasters
Notifications,Forum,Chat,Community all at Litewarez Webmasters
-
6th Nov 2009, 03:58 PM #7Too busy :|Website's:
L337Fx.com BeastieBay.netYea ! WCDDL rocks
Nice Modification corneto
-
6th Nov 2009, 04:02 PM #8OPMemberWebsite's:
litewarez.net litewarez.com triniwarez.comthanks, this is the forst time ive touched Wcddl for a looooooooooooooooooooong time lmao
Join Litewarez.net today and become apart of the community.
Unique | Clean | Advanced (All with you in mind)
Downloads | Webmasters
Notifications,Forum,Chat,Community all at Litewarez Webmasters
-
6th Nov 2009, 04:04 PM #9MemberWebsite's:
zomgbbqpizza.com evilddl.com scenemarket.org
-
6th Nov 2009, 04:08 PM #10Member
Well some people say they find it easier to use v1 than 2.
They got accustomed to v1's coding or wateva and say its easier to make themes for etc.This is the staff, you have been banned
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Any php editor(text editor) with internal preview
By torrfriend in forum Webmaster DiscussionReplies: 5Last Post: 18th May 2012, 11:17 PM -
HELP: Best html/css/php editor? (code editor)
By tractor3231 in forum Webmaster DiscussionReplies: 30Last Post: 5th Jan 2012, 10:55 AM -
[Buying] Wcddl site
By systems in forum Completed TransactionsReplies: 2Last Post: 24th Dec 2011, 05:14 AM -
Help for wcddl site
By lawina in forum Technical Help Desk SupportReplies: 7Last Post: 20th Jul 2011, 03:08 PM -
Flash Site Editor
By vBcustomz in forum Webmasters, Money MakingReplies: 1Last Post: 26th Aug 2009, 12:34 PM
themaCreator - create posts from...
Version 3.25 released. Open older version (or...