Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Can someone tell me why this dosent work?
Old 12-10-2009, 01:32 PM Can someone tell me why this dosent work?
Novice Talker

Posts: 5
Name: Armando
Trades: 0
PHP Code:
/* To-Do-List plugin */
    
$r sed_import('r','G','ALP');
$g = array ('a');
foreach(
$g as $x) $$x $HTTP_GET_VARS[$x];

if (
$a=="addlist")

    {
    
sed_shield_protect();
    
$g = array ('nnotebook_id','nnotebook_userid''nnotebook_message');
    foreach(
$g as $x) $$x $HTTP_POST_VARS[$x];
    
$sql sed_sql_query("INSERT INTO ".$cfg['plugin']['options']['dbprefix']."_notebook (notebook_id, notebook_userid, notebook_message) VALUES ('$nnotebook_id', '".$usr['id']."', '$nnotebook_message') ");
    
header("Location: plug.php?e=options");
    }

if (
$a=="deletelist")
    {
    
$sql sed_sql_query("DELETE FROM ".$cfg['plugin']['options']['dbprefix']."_notebook WHERE notebook_userid = '".$usr['id']."' AND notebook_id = '$id' ");
        
header("Location:  plug.php?e=options");
    }

if (
$a=="updatelist")
{
    
$sql sed_sql_query("DELETE FROM ".$cfg['plugin']['options']['dbprefix']."_notebook WHERE notebook_userid = '".$usr['id']."' AND notebook_id = '$id' ");
    
$g = array ('nnotebook_id','nnotebook_userid''nnotebook_message');
    foreach(
$g as $x) $$x $HTTP_POST_VARS[$x];
    
$sql sed_sql_query("INSERT INTO ".$cfg['plugin']['options']['dbprefix']."_notebook (notebook_id, notebook_userid, notebook_message) VALUES ('$nnotebook_id', '".$usr['id']."', '$nnotebook_message') ");
    
header("Location: plug.php?e=options");
        }

$notes .= "<p> ".$L['currenttodo']." <ul>";

$querysed_sql_query("SELECT * FROM ".$cfg['plugin']['options']['dbprefix']."_notebook WHERE notebook_userid = '".$usr['id']."' ORDER by notebook_id DESC");
$notenum sed_sql_numrows($query);
if (
$notenum==0)
{
$notes .="".$L['nonotes']."";
}    
while (
$sql sed_sql_fetcharray($query))
    {
$notes .= "<li>" .sed_parse(sed_cc($sql['notebook_message']));

$notes .= " <a href=plug.php?e=options&a=deletelist&id=".$sql['notebook_id'];
$notes .= ">[".$L['xdelete']."]</a> ";
$notes .= " <a href=plug.php?e=options&r=updatelist&id=".$sql['notebook_id'];
$notes .= ">[".$L['edit']."]</a></li>";
    }

$notes .= "</ul>";

$query sed_sql_query("SELECT notebook_message FROM ".$cfg['plugin']['options']['dbprefix']."_notebook WHERE notebook_userid = '".$usr['id']."' AND notebook_id = '$id'");
$sql sed_sql_fetcharray($query);

if (
$r=="updatelist")
{
$notes .= "<p>".$L['updatetodo']."";
$notes .= "<form name=\"addentry\" action=\"plug.php?e=options&a=updatelist&id=$id\" method=\"post\">";
$notes .= "<br /><textarea name=\"nnotebook_message\" rows=\"2\" cols=\"30\">".$sql['notebook_message'];
$notes .= "</textarea><br />" .sed_build_bbcodes("addentry","nnotebook_message",$L['BBcodes']);
$notes .= " ".$cfg['separator']." <a href=\"plug.php?e=options\">Add New Note</a><br /><br /><input type=\"submit\" value=\"".$L['updatetodo']."\"></form></p>";
}

else
{
$notes .= "<p>".$L['addtodo']."";
$notes .= "<form name=\"addentry\" action=\"plug.php?e=options&a=addlist\" method=\"post\">";
$notes .= "<br /><textarea name=\"nnotebook_message\" rows=\"2\" cols=\"30\"></textarea>";
$notes .= "<br />" .sed_build_bbcodes("addentry","nnotebook_message",$L['BBcodes']);
$notes .= "<br /><br /><input type=\"submit\" value=\"".$L['addtodo']."\"></form></p>";

xjsv is offline
Reply With Quote
View Public Profile Visit xjsv's homepage!
 
 
Register now for full access!
Old 12-10-2009, 01:44 PM Re: Can someone tell me why this dosent work?
Aquarezz's Avatar
Experienced Talker

Posts: 33
Name: Aquarezz
Trades: 0
Could you explain us what it does and what it should do? That might help

- Aquarezz
Aquarezz is offline
Reply With Quote
View Public Profile
 
Old 12-10-2009, 02:07 PM Re: Can someone tell me why this dosent work?
Novice Talker

Posts: 5
Name: Armando
Trades: 0
its a simple to do list its suppose to update the db or insert or display in the page
xjsv is offline
Reply With Quote
View Public Profile Visit xjsv's homepage!
 
Old 12-10-2009, 02:13 PM Re: Can someone tell me why this dosent work?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,384
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
where does $a come from and explain doesn't work.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-10-2009, 02:18 PM Re: Can someone tell me why this dosent work?
Novice Talker

Posts: 5
Name: Armando
Trades: 0
well this is part of an engine (a plug-in of it) and when i run the code the page loads blank and when u go back nothing has changed or rather nothing was added to the db
xjsv is offline
Reply With Quote
View Public Profile Visit xjsv's homepage!
 
Old 12-10-2009, 02:27 PM Re: Can someone tell me why this dosent work?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,384
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
and the engine would be.


BTW I, for one have a very low attention span when it comes to wheedling the necessary information out of someone who expects help with their problem without actually divulging anything useful!
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-10-2009, 02:34 PM Re: Can someone tell me why this dosent work?
Novice Talker

Posts: 5
Name: Armando
Trades: 0
LDU Seditio

u can see here what ive done so far

www.illmixtapes.com
xjsv is offline
Reply With Quote
View Public Profile Visit xjsv's homepage!
 
Reply     « Reply to Can someone tell me why this dosent work?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.61614 seconds with 12 queries