The Arcive of vBulletin Modifications Site. |
|
|
#1
|
||||
|
||||
|
Code:
if ($submit=="true") {
if (!title) {
show_nopermission();
}
if (!code) {
show_nopermission();
}
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,pagetext,ipaddress,site,siteid) VALUES (NULL,'$gid','".addslashes(htmlspecialchars($title))."','".addslashes($bbuserinfo[username])."','$bbuserinfo[userid]','".time()."','".addslashes($code)."','$ipaddress','2','$siteid')");
header ("Location: content.php?action=code&do=display&gid=$gid");
exit;
}
|
|
#2
|
||||
|
||||
|
i'd say your variable $submit would be not "true"
where do you get this var? also title and code should be introduced with an $
|
|
#3
|
||||
|
||||
|
Code:
$siteheader $sitemiddle1 Add Codes ($gamename) $sitemiddle2 <form $enctype action="addcontent.php?action=code&subaction=main" name="vbform" method="post"> <input type="hidden" name="submit" value="true"> <input type="hidden" name="gid" value="$gid"> <center>Code Title:</center><br> <input type="text" class="bginput" name="title" value="$title" size="40" maxlength="85" tabindex="1"><br><br> <center>Code Content:</center><br> <textarea name="code" rows="7" cols="$textareacols" wrap="virtual" tabindex="2">$message</textarea> <br><br> <input type="submit" class="bginput" name="submit" value="Submit Code" accesskey="s" tabindex="3"> </form> $sitefooter And I missed the $ and didn't notice it due to lack of parse error. ![]() EDIT: Code:
if (!$submit) {
eval("dooutput(\"".gettemplate("site_v$v" . "_addcodes_main")."\");");
}
|
|
#4
|
||||
|
||||
|
ah i see your fault:
Code:
$siteheader $sitemiddle1 Add Codes ($gamename) $sitemiddle2 <form $enctype action="addcontent.php?action=code&subaction=main" name="vbform" method="post"> <input type="hidden" name="submit" value="true"> <input type="hidden" name="gid" value="$gid"> <center>Code Title:</center><br> <input type="text" class="bginput" name="title" value="$title" size="40" maxlength="85" tabindex="1"><br><br> <center>Code Content:</center><br> <textarea name="code" rows="7" cols="$textareacols" wrap="virtual" tabindex="2">$message</textarea> <br><br><input type="submit" class="bginput" name="submit" value="Submit Code" accesskey="s" tabindex="3"> </form> $sitefooter
|
|
#5
|
||||
|
||||
|
And this is exactly why I hate HTML
|
|
#6
|
||||
|
||||
|
Changed that variable to send, modified the file, BAM! It works. Thank you, Xenon!
|
|
#7
|
||||
|
||||
![]() you're welcome |
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|