Need help removing image from supporters module?

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Need help removing image from supporters module?
xtrax1
CZ Active Member
 Codezwiz Site Donator
xtrax1 has been a member for over 19 year's 19 Year Member
Gender: Male
Status: Offline
Joined: Feb 18, 2005
0.01 posts per day
Posts: 107
Points: 3,824
   
I been using this supporters module for a long time and cant figure out how to remove the image so it dont show buttons but just the url....I got it showing the url of the site but it still calls the button in submit or admin.php and wont let you submit it without it..

here are the files if someone could help me remove the image / button function I'd appreciate it.. icon_biggrin.gif


Submit.php file
<?php

/********************************************************/
/* NSN Supporters for NSN-Nuke                          */
/* By: NukeScripts Network (webmaster@nukescripts.net)  */
/* http://www.nukescripts.net                           */
/* Copyright © 2003 by NukeScripts Network              */
/********************************************************/

$module_name = basename(dirname(__FILE__));
if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
    Header("Location: ../../index.php");
    die();
}
require_once("mainfile.php");
get_lang($module_name);
$supportersub = $db->sql_fetchrow($db->sql_query("SELECT * from ".$prefix."_supporters_config"));

if ($supportersub['require_user'] == 0 || is_user($user)) {
switch ($op) {

    default:
    $pagetitle = _ADDSUPPORTER;
    $comefrom = $_SERVER['HTTP_REFERER'];
    $sip = $_SERVER['REMOTE_ADDR'];
    if(!is_array($user)) {
        $member = base64_decode($user);
        $member = explode(":", $member);
        $memname = "$member[1]";
    } else {
        $memname = "$user[1]";
    }
    list($suid, $sname, $semail, $surl) = $db->sql_fetchrow($db->sql_query("select user_id, username, user_email, user_website from ".$user_prefix."_users where username='$memname'"));
    include("header.php");
    title(_ADDSUPPORTER);
    OpenTable();
    echo "<center><b>"._ADDSUPPORTER."</b><br>"._ALLREQ."<br>\n";
    if (is_admin($admin)) {
        echo "<center>[ <a href='modules.php?name=$module_name&amp;file=admin'>"._GOTOADMIN."</a> ]\n";
    }
    echo "<table border='0'>\n";
    if ($supportersub['image_type']==0) { $enctype = ""; } else { $enctype = " enctype='multipart/form-data'"; }
    echo "<form action='modules.php?name=$module_name' method='post'$enctype>\n";
    echo "<input type='hidden' name='file' value='submit'>\n";
    echo "<input type='hidden' name='op' value='add_save'>\n";
    echo "<input type='hidden' name='user_id' value='$suid'>\n";
    echo "<tr><td><b>"._SITENAME.":</b></td><td><input type='text' name='site_name' size='50'></td></tr>\n";
    echo "<tr><td><b>"._SITEURL.":</b></td><td><input type='text' name='site_url' size='50' value='$surl'></td></tr>\n";
    if ($supportersub['image_type']==0) { $type = "type='input'"; } else { $type = "type='file'"; }
    echo "<tr><td valign='top'><b>"._SITEIMAGE.":</b></td><td><input $type name='site_image' size='50'><br>";
    echo ""._MUSTBE."</td></tr>\n";
    echo "<tr><td valign='top'><b>"._SITEDESCRIPTION.":</b></td><td><textarea rows='5' cols='50' name='site_scripts'></textarea></td></tr>\n";
    echo "<tr><td><b>"._SUPPORTERNAME.":</b></td><td><input type='test' name='user_name' value='$sname' size='40'></td></tr>\n";
    echo "<tr><td><b>"._SUPPORTEREMAIL.":</b></td><td><input type='text' name='user_email' value='$semail' size='40'></td></tr>\n";
    echo "<tr><td><b>"._SUPPORTERIP.":</b></td><td>$sip</td></tr>\n";
    echo "<input type='hidden' name='user_ip' value='$sip'>\n";
    echo "<input type='hidden' name='comefrom' value='$comefrom'>\n";
    echo "<tr><td align='center' colspan='2'><input type='submit' value='"._SADDSITE."'></td></tr>\n";
    echo "</form></table></center>\n";
    CloseTable();
    include("footer.php");
    break;

    case "add_save":
        if (($site_name=="")OR($site_url=="")OR($site_scripts=="")) {
            include("header.php");
            OpenTable();
            echo "<center><b>"._MISSINGDATA."</b></center><br>\n";
            echo "<center>"._GOBACK."</center>\n";
            CloseTable();
            include("footer.php");
            die();
        }
        if ($supportersub['image_type']==0) {
            $image_id = "$user_id".date("-His-Ymd");
            $image_id = str_pad($image_id, 22, "0", STR_PAD_LEFT);
            $oid = str_pad($image_id, 22, "0", STR_PAD_LEFT);
            $imgurl = $site_image;
        } else {
            $image_id = "$user_id".date("-His-Ymd");
            $image_id = str_pad($image_id, 22, "0", STR_PAD_LEFT);
            $oid = str_pad($image_id, 22, "0", STR_PAD_LEFT);
            $imageurl_name = $_FILES['site_image']['name'];
            $imageurl_temp = $_FILES['site_image']['tmp_name'];
            $ext = substr($imageurl_name, strrpos($imageurl_name,'.'), 5);
            if (move_uploaded_file($imageurl_temp, "modules/$module_name/images/supporters/$oid$ext")) {
                chmod ("modules/$module_name/images/supporters/$oid$ext", 0755);
                $imgurl = "modules/$module_name/images/supporters/$oid$ext";
            } else {
                include("header.php");
                title(_CONFBANN);
                echo "<br>\n";
                OpenTable();
                echo "<center><b>"._NOUPLOAD."</b></center><br>\n";
                echo "<center>"._GOBACK."</center>\n";
                CloseTable();
                include("footer.php");
                die();
            }
        }
        $result = $db->sql_query("INSERT INTO ".$prefix."_supporters values (NULL, '$site_name', '$site_url', '$imgurl', '0', '0', now(), '$site_scripts', '$user_id', '$user_name', '$user_email', '$user_ip', '$image_id')");
        if (!$result) {
            echo "ERROR: Database error";
            die();
        } else {
            $msg = "$sitename "._SUPPORTERDATE."\n\n";
            $msg .= _SITENAME.": $site_name\n";
            $msg .= _SITEURL.": $site_url\n";
            $msg .= _SITEIMAGE.": $imgurl\n";
            $msg .= _SITEDESCRIPTION.": $site_scripts\n";
            $msg .= _SUPPORTERNAME.": $user_name\n";
            $msg .= _SUPPORTEREMAIL.": $user_email\n";
            $msg .= _SUPPORTERIP.": $user_ip\n";
            $to = $adminmail;
            $subject = "$sitename - "._SUPPORTERDATE;
            $mailheaders = "From: $adminmail <$adminmail> \n";
            $mailheaders .= "Reply-To: $adminmail\n\n";
            mail($to, $subject, $msg, $mailheaders);
        }
        Header("Location: $comefrom");
    break;

}
} else {
    Header("Location: index.php");
}

?>


Then the admin.php file
<?php

/********************************************************/
/* NSN Supporters for NSN-Nuke                          */
/* By: NukeScripts Network (webmaster@nukescripts.net)  */
/* http://www.nukescripts.net                           */
/* Copyright © 2003 by NukeScripts Network              */
/********************************************************/

$module_name = basename(dirname(__FILE__));
if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
    Header("Location: ../../index.php");
    die();
}
require_once("mainfile.php");
get_lang($module_name);
$supporter_config = $db->sql_fetchrow($db->sql_query("SELECT * from ".$prefix."_supporters_config"));
if (is_admin($admin)) {

switch ($op) {

    default:
        $pagetitle = _ADMINMAIN;
        include("header.php");
        title(_ADMINMAIN);
        OpenTable();
        title(_ADDSUPPORTER);
        echo "<center>[ <a href='modules.php?name=$module_name&amp;file=admin&amp;op=SupportersConfig'>"._CONFIGMAIN."</a> ]\n";
        echo "<center><br>"._ALLREQ."<br>\n";
        echo "<table border='0'>\n";
        if ($supporter_config['image_type']==0) { $enctype = ""; } else { $enctype = "enctype='multipart/form-data'"; }
        echo "<form action='modules.php?name=$module_name&file=admin' method='post'$enctype>\n";
        echo "<input type='hidden' name='file' value='admin'>\n";
        echo "<input type='hidden' name='op' value='add_save'>\n";
        echo "<input type='hidden' name='user_id' value='$suid'>\n";
        echo "<tr><td><b>"._SITENAME.":</b></td><td><input type='text' name='site_name' size='50'></td></tr>\n";
        echo "<tr><td><b>"._SITEURL.":</b></td><td><input type='text' name='site_url' size='50' value='$surl'></td></tr>\n";
        if ($supporter_config['image_type']==0) { $type = "type='input'"; } else { $type = "type='file'"; }
        echo "<tr><td valign='top'><b>"._SITEIMAGE.":</b></td><td><input $type name='site_image' size='50'><br>";
        echo ""._MUSTBE."</td></tr>\n";
        echo "<tr><td valign='top'><b>"._SITEDESCRIPTION.":</b></td><td><textarea rows='5' cols='80' name='site_scripts'></textarea></td></tr>\n";
        echo "<tr><td><b>"._SUPPORTERIP.":</b></td><td>0.0.0.0</td></tr>\n";
        echo "<input type='hidden' name='user_ip' value='0.0.0.0'>\n";
        echo "<tr><td align='center' colspan='2'><input type='submit' value='"._SADDSITE."'></td></tr>\n";
        echo "</form></table></center>\n";
        CloseTable();
        echo"<br>";
        OpenTable();
        $a = 0;
        $result = $db->sql_query("SELECT site_id, site_name, site_url, site_image, site_date, site_scripts, site_hits FROM ".$prefix."_supporters WHERE site_status='0' ORDER BY site_name");
        $numrows = $db->sql_numrows($result);
        if ($numrows > 0) {
            title(_SUBMITTEDSITES);
            echo "<table border='0' cellpadding='2' cellspacing='5' width='100%'>";
            while (list($site_id, $site_name, $site_url, $site_image, $site_date, $site_scripts, $site_hits) = $db->sql_fetchrow($result)) {
                if ($a == 0) { echo "<tr>"; }
                echo "<td width='50%' valign='top'>";
                OpenTable();
                echo "<table border='0' width='100%'>";
                echo "<tr><td width='25%' align='center' valign='top' rowspan='3'>";
                echo "<a href='modules.php?name=$module_name&op=go&site_id=$site_id' target='_blank'><img src='$site_image' border='0' alt='$site_name' title='$site_name' height='31' width='88'></a>";
                if (is_admin($admin)) {
                    echo " <a href='modules.php?name=$module_name&amp;file=admin&amp;op=appv&amp;site_id=$site_id'><img src='modules/$module_name/images/approve.gif' border='0' alt='"._APPROVE."' title='"._APPROVE."'></a>";
                    echo " <a href='modules.php?name=$module_name&amp;file=admin&amp;op=edit&amp;site_id=$site_id'><img src='modules/$module_name/images/edit.gif' border='0' alt='"._EDIT."' title='"._EDIT."'></a>";
                    echo " <a href='modules.php?name=$module_name&amp;file=admin&amp;op=delete&amp;site_id=$site_id'><img src='modules/$module_name/images/delete.gif' border='0' alt='"._DELETE."' title='"._DELETE."'></a>";
                }
                echo "</td>\n<td width='75%' valign='top'><b>"._SUPPORTERDATE.":</b> $site_date</td></tr>";
                echo "<tr><td valign='top'><b>"._SITEDESCRIPTION."</b>: $site_scripts</td></tr>";
                echo "<tr><td valign='top'><b>"._SITEHITS."</b>: $site_hits</td></tr>";
                echo "</table>";
                CloseTable();
                echo "</td>";
                $a++;
                if ($a == 2) { echo "</tr>"; $a = 0; }
            }
            if ($a ==1) { echo "<td width='50%'>&nbsp;</td></tr></table>"; } else { echo "</tr></table>"; }
        } else {
            title(_NOSUBMITTEDSITES);
        }
        CloseTable();
        echo "<br>\n";
        OpenTable();
        $a = 0;
        $result = $db->sql_query("SELECT site_id, site_name, site_url, site_image, site_date, site_scripts, site_hits FROM ".$prefix."_supporters WHERE site_status='-1' ORDER BY site_name");
        $numrows = $db->sql_numrows($result);
        if ($numrows > 0) {
            title(_INACTIVESITES);
            echo "<table border='0' cellpadding='2' cellspacing='5' width='100%'>";
            while (list($site_id, $site_name, $site_url, $site_image, $site_date, $site_scripts, $site_hits) = $db->sql_fetchrow($result)) {
                if ($a == 0) { echo "<tr>"; }
                echo "<td width='50%' valign='top'>";
                OpenTable();
                echo "<table border='0' width='100%'>";
                echo "<tr><td width='25%' align='center' valign='top' rowspan='3'>";
                echo "<a href='modules.php?name=$module_name&op=go&site_id=$site_id' target='_blank'><img src='$site_image' border='0' alt='$site_name' title='$site_name' height='31' width='88'></a>";
                if (is_admin($admin)) {
                    echo " <a href='modules.php?name=$module_name&amp;file=admin&amp;op=activate&amp;site_id=$site_id'><img src='modules/$module_name/images/activate.gif' border='0' alt='"._ACTIVATE."' title='"._ACTIVATE."'></a>";
                    echo " <a href='modules.php?name=$module_name&amp;file=admin&amp;op=edit&amp;site_id=$site_id'><img src='modules/$module_name/images/edit.gif' border='0' alt='"._EDIT."' title='"._EDIT."'></a>";
                    echo " <a href='modules.php?name=$module_name&amp;file=admin&amp;op=delete&amp;site_id=$site_id'><img src='modules/$module_name/images/delete.gif' border='0' alt='"._DELETE."' title='"._DELETE."'></a>";
                }
                echo "</td>\n<td width='75%' valign='top'><b>"._SUPPORTERDATE.":</b> $site_date</td></tr>";
                echo "<tr><td valign='top'><b>"._SITEDESCRIPTION."</b>: $site_scripts</td></tr>";
                echo "<tr><td valign='top'><b>"._SITEHITS."</b>: $site_hits</td></tr>";
                echo "</table>";
                CloseTable();
                echo "</td>";
                $a++;
                if ($a == 2) { echo "</tr>"; $a = 0; }
            }
            if ($a ==1) { echo "<td width='50%'>&nbsp;</td></tr></table>"; } else { echo "</tr></table>"; }
        } else {
            title(_NOINACTIVESITES);
        }
        CloseTable();
        include("footer.php");
    break;

    case "appv":
        $pagetitle = _ADMINMAIN." - "._ADMINAPV;
        $result = $db->sql_query("select site_name, site_url, site_image, site_date, site_scripts, user_id, user_name, user_email, user_ip, image_id from ".$prefix."_supporters where site_id='$site_id'");
        list($site_name, $site_url, $site_image, $site_date, $site_scripts, $user_id, $user_name, $user_email, $user_ip, $image_id) = $db->sql_fetchrow($result);
        include("header.php");
        title(_ADMINAPV);
        OpenTable();
        echo "<center><table border='0'>";
        echo "<form action='modules.php?name=$module_name' method='post' enctype='multipart/form-data'>";
        echo "<input type='hidden' name='file' value='admin'>";
        echo "<input type='hidden' name='op' value='appv_save'>";
        echo "<input type='hidden' name='site_id' value='$site_id'>";
        echo "<input type='hidden' name='old_image' value='$site_image'>";
        echo "<input type='hidden' name='user_id' value='$user_id'>";
        echo "<input type='hidden' name='image_id' value='$image_id'>";
        echo "<tr><td><b>"._SITENAME.":</b></td><td><input type='text' name='site_name' size='30' value='$site_name'></tr></td>";
        echo "<tr><td><b>"._SITEURL.":</b></td><td><input type='text' name='site_url' size='60' value='$site_url'></tr></td>";
        echo "<tr><td valign='top'><b>"._SITEIMAGE.":</b></td><td><input type='file' name='new_image' size='30'><br>$site_image</tr></td>";
        echo "<tr><td><b>"._SUPPORTERDATE.":</b></td><td><input type='text' name='site_date' size='30' value='$site_date'></tr></td>";
        echo "<tr><td valign='top'><b>"._SITEDESCRIPTION.":</b></td><td><textarea rows='5' cols='50' name='site_scripts'>$site_scripts</textarea></tr></td>";
        echo "<tr><td><b>"._USERNAME.":</b></td><td>$user_name ($user_id)</tr></td>";
        echo "<tr><td><b>"._USEREMAIL.":</b></td><td>$user_email</tr></td>";
        echo "<tr><td><b>"._USERIP."</b></td><td>$user_ip</tr></td>";
        echo "<tr><td align='center' colspan='2'><input type='submit' value='"._APPROVE."'></td></tr>";
        echo "</form></table></center>";
        CloseTable();
        include("footer.php");
    break;
   
    case "appv_save":
        $image_id = "$user_id".date("-His-Ymd");
        $oid = str_pad($image_id, 22, "0", STR_PAD_LEFT);
        $newimage_name = $_FILES['new_image']['name'];
        $newimage_temp = $_FILES['new_image']['tmp_name'];
        if ($newimage_name != "") {
            $ext = substr($newimage_name, strrpos($newimage_name,'.'), 5);
            if (move_uploaded_file($newimage_temp, "modules/$module_name/images/supporters/$oid$ext")) {
                chmod ("modules/$module_name/images/supporters/$oid$ext", 0755);
                $imgurl = "modules/$module_name/images/supporters/$oid$ext";
            } else {
                echo _NOUPLOAD."<br>\n";
                echo _GOBACK;
                die();
            }
        } else {
            $imgurl = $old_image;
        }
        $result = $db->sql_query("UPDATE ".$prefix."_supporters SET site_name='$site_name', site_url='$site_url', site_image='$imgurl', site_status='1', site_hits='$site_hits', site_date='$site_date', site_scripts='$site_scripts' where site_id='$site_id'");
        $ingroup = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_users_groups_users WHERE gid=2 AND uid='$user_id'"));
        if ($ingroup == 0) {
            list($mname, $email) = $db->sql_fetchrow($db->sql_query("select user_name, user_email from ".$prefix."_supporters WHERE user_id='$user_id'"));
            $db->sql_query("insert into ".$prefix."_users_groups_users values ('2', '$user_id', '$mname', '$email')");
        }
        Header("Location: modules.php?name=$module_name&file=admin");
    break;

    case "delete":
        $pagetitle = _ADMINMAIN." - "._ADMINDEL;
        global $prefix, $db, $admin, $module_name, $sitename, $comefrom;
        $comefrom = $_SERVER['HTTP_REFERER'];
        $result = $db->sql_query("select site_name, site_url from ".$prefix."_supporters where site_id='$site_id'");
        list($site_name, $site_url) = $db->sql_fetchrow($result);
        include("header.php");
        title(_ADMINDEL);
        OpenTable();
        echo "<center>"._YOUDELETE." <a href='$site_url' target='blank'><b>$site_name</b></a><br><br>";
        echo ""._SURE2DEL."<br><br></center>";
        echo "<center><table><tr>\n";
        echo "<form action='modules.php?name=$module_name&amp;file=admin' method='post'>\n";
        echo "<input type='hidden' name='op' value='delete_confirm'>\n";
        echo "<input type='hidden' name='site_id' value='$site_id'>\n";
        echo "<input type='hidden' name='comefrom' value='$comefrom'>\n";
        echo "<td align='center'><input type='submit' value=' "._YES." '><br>\n";
        echo ""._GOBACK."</td>\n";
        echo "</form>\n";
        echo "</tr></table></center>\n";
        CloseTable();
        include("footer.php");
    break;

    case "delete_confirm":
        global $prefix, $db, $admin, $module_name, $sitename;
        $db->sql_query("DELETE FROM ".$prefix."_supporters WHERE site_id='$site_id'");
        $db->sql_query("OPTIMIZE TABLE ".$prefix."_supporters");
        Header("Location: $comefrom");
    break;

    case "edit":
        $pagetitle = _ADMINMAIN." - "._ADMINEDT;
        $comefrom = $_SERVER['HTTP_REFERER'];
        $result = $db->sql_query("select site_name, site_url, site_image, site_date, site_scripts, user_id, user_name, user_email, user_ip, image_id from ".$prefix."_supporters where site_id='$site_id'");
        list($site_name, $site_url, $site_image, $site_date, $site_scripts, $user_id, $user_name, $user_email, $user_ip, $image_id) = $db->sql_fetchrow($result);
        include("header.php");
        title(_ADMINEDT);
        OpenTable();
        echo "<center><table border='0'>";
        echo "<form action='modules.php?name=$module_name' method='post' enctype='multipart/form-data'>";
        echo "<input type='hidden' name='file' value='admin'>";
        echo "<input type='hidden' name='op' value='edit_save'>";
        echo "<input type='hidden' name='site_id' value='$site_id'>";
        echo "<input type='hidden' name='old_image' value='$site_image'>";
        echo "<input type='hidden' name='user_id' value='$user_id'>";
        echo "<input type='hidden' name='image_id' value='$image_id'>";
        echo "<tr><td><b>"._SITENAME.":</b></td><td><input type='text' name='site_name' size='30' value='$site_name'></tr></td>";
        echo "<tr><td><b>"._SITEURL.":</b></td><td><input type='text' name='site_url' size='60' value='$site_url'></tr></td>";
        echo "<tr><td valign='top'><b>"._SITEIMAGE.":</b></td><td><input type='file' name='new_image' size='30'><br>$site_image</tr></td>";
        echo "<tr><td><b>"._SUPPORTERDATE.":</b></td><td><input type='text' name='site_date' size='30' value='$site_date'></tr></td>";
        echo "<tr><td valign='top'><b>"._SITEDESCRIPTION.":</b></td><td><textarea rows='5' cols='50' name='site_scripts'>$site_scripts</textarea></tr></td>";
        echo "<tr><td><b>"._USERNAME.":</b></td><td><input type='text' name='user_name' size='30' value='$user_name '></tr></td>";
        echo "<tr><td><b>"._USEREMAIL.":</b></td><td><input type='text' name='user_email' size='30' value='$user_email'></tr></td>";
        echo "<tr><td><b>"._USERIP."</b></td><td>$user_ip</tr></td>";
        echo "<input type='hidden' name='comefrom' value='$comefrom'>\n";
        echo "<tr><td align='center' colspan='2'><input type='submit' value='"._EDIT."'></td></tr>";
        echo "</form></table></center>";
        CloseTable();
        include("footer.php");
    break;
   
    case "edit_save":
        $oid = str_pad($image_id, 22, "0", STR_PAD_LEFT);
        $newimage_name = $_FILES['new_image']['name'];
        $newimage_temp = $_FILES['new_image']['tmp_name'];
        if ($newimage_name != "") {
            $ext = substr($newimage_name, strrpos($newimage_name,'.'), 5);
            if (move_uploaded_file($newimage_temp, "modules/$module_name/images/supporters/$oid$ext")) {
                chmod ("modules/$module_name/images/supporters/$oid$ext", 0755);
                $imgurl = "modules/$module_name/images/supporters/$oid$ext";
            } else {
                echo _NOUPLOAD."<br>\n";
                echo _GOBACK;
                die();
            }
        } else {
            $imgurl = $old_image;
        }
        $result = $db->sql_query("UPDATE ".$prefix."_supporters SET site_name='$site_name', site_url='$site_url', site_image='$imgurl', site_date='$site_date', site_scripts='$site_scripts', user_name='$user_name', user_email='$user_email' where site_id='$site_id'");
        Header("Location: $comefrom");
    break;

    case "activate":
        $comefrom = $_SERVER['HTTP_REFERER'];
        $db->sql_query("UPDATE ".$prefix."_supporters SET site_status='1' where site_id='$site_id'");
        $db->sql_query("OPTIMIZE TABLE ".$prefix."_supporters");
        Header("Location: $comefrom");
    break;

    case "deactivate":
        $comefrom = $_SERVER['HTTP_REFERER'];
        $db->sql_query("UPDATE ".$prefix."_supporters SET site_status='-1' where site_id='$site_id'");
        $db->sql_query("OPTIMIZE TABLE ".$prefix."_supporters");
        Header("Location: $comefrom");
    break;

    case "add_save":
        if (($site_name=="")OR($site_url=="")OR($site_scripts=="")) {
            include("header.php");
            OpenTable();
            echo "<center><b>"._MISSINGDATA."</b></center><br>\n";
            echo "<center>"._GOBACK."</center>\n";
            CloseTable();
            include("footer.php");
            die();
        }
        if ($supporter_config['image_type']==0) {
            $image_id = "$user_id".date("-His-Ymd");
            $image_id = str_pad($image_id, 22, "0", STR_PAD_LEFT);
            $oid = str_pad($image_id, 22, "0", STR_PAD_LEFT);
            $imgurl = $site_image;
        } else {
            $image_id = "$user_id".date("-His-Ymd");
            $image_id = str_pad($image_id, 22, "0", STR_PAD_LEFT);
            $oid = str_pad($image_id, 22, "0", STR_PAD_LEFT);
            $imageurl_name = $_FILES['site_image']['name'];
            $imageurl_temp = $_FILES['site_image']['tmp_name'];
            $ext = substr($imageurl_name, strrpos($imageurl_name,'.'), 5);
            if (move_uploaded_file($imageurl_temp, "modules/$module_name/images/supporters/$oid$ext")) {
                chmod ("modules/$module_name/images/supporters/$oid$ext", 0755);
                $imgurl = "modules/$module_name/images/supporters/$oid$ext";
            } else {
                include("header.php");
                title(_CONFBANN);
                echo "<br>\n";
                OpenTable();
                echo _NOUPLOAD."<br>\n";
                echo _GOBACK;
                CloseTable();
                include("footer.php");
                die();
            }
        }
        $result = $db->sql_query("INSERT INTO ".$prefix."_supporters values (NULL, '$site_name', '$site_url', '$imgurl', '1', '0', now(), '$site_scripts', '$user_id', '$user_name', '$user_email', '$user_ip', '$image_id')");
        $db->sql_query("UPDATE ".$prefix."_supporters SET site_status='1' where site_id='$site_id'");
        if (!$result) {
            echo "ERROR: Database error";
            die();
        }
        Header("Location: modules.php?name=$module_name&file=admin");
    break;

    case "SupportersConfig":
    $pagetitle = ": "._CONFIGMAIN;
    include("header.php");
    title(_CONFIGMAIN);
    OpenTable();
    echo "<center><table border=\"0\">";
    echo "<form action=\"modules.php?name=$module_name\" method=\"post\">\n";
    echo "<tr><td align=\"right\">"._REQUIREUSER."</td><td>";
    $chk1 = $chk2 = $chk3 = $chk4 ="";
    if ($supporter_config['require_user']==0) { $chk1 = " checked"; } else { $chk2 = " checked"; }
    echo "<input type=\"radio\" name=\"xrequire_user\" value=\"0\"$chk1>"._NO." &nbsp;";
    echo "<input type=\"radio\" name=\"xrequire_user\" value=\"1\"$chk2>"._YES."</td></tr>";
    echo "<tr><td align=\"right\">"._IMAGETYPE."</td><td>";
    if ($supporter_config['image_type']==0) {  $chk3 = " checked"; } else { $chk4 = " checked"; }
    echo "<input type=\"radio\" name=\"ximage_type\" value=\"0\"$chk3>"._LINKED." &nbsp;";
    echo "<input type=\"radio\" name=\"ximage_type\" value=\"1\"$chk4>"._UPLOAD."</td></tr>";
    echo "<tr><td align=\"center\" colspan=\"2\"><input type=\"hidden\" name=\"file\" value=\"admin\">";
    echo "<input type=\"hidden\" name=\"op\" value=\"SupportersConfigSave\">";
    echo "<input type=\"submit\" value=\""._SAVECHANGES."\"></td></tr>";
    echo "</form></table></center>";
    CloseTable();
    include("footer.php");
    break;

    case "SupportersConfigSave":
    $db->sql_query("UPDATE ".$prefix."_supporters_config SET require_user='$xrequire_user', image_type='$ximage_type'");
    Header("Refresh: 0;url=modules.php?name=$module_name&file=admin");
    break;

}
} else {
echo "Access Denined to non admins";
}

?>


Please anyone its been driving me nutz for days....

xtrax1 icon_sad.gif


Back to top Reply with quote
#2   re: Need help removing image from supporters module?
xtrax1
CZ Active Member
 Codezwiz Site Donator
xtrax1 has been a member for over 19 year's 19 Year Member
Gender: Male
Status: Offline
Joined: Feb 18, 2005
0.01 posts per day
Posts: 107
Points: 3,824
   
Can't anyone help us? We just need the image function removed from submit.php and admin.php as its a required field right now so we can submit text link supporters instead...

Anyone PLEASEEEEEE? icon_sad.gif



Back to top Reply with quote
#3   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
Well you don't wait very long for a response do you? icon_rolleyes.gif



Attached Files
xtrax1.zip (4.44 KB, Downloaded: 5233 Time(s))



_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#4   re: Need help removing image from supporters module?
xtrax1
CZ Active Member
 Codezwiz Site Donator
xtrax1 has been a member for over 19 year's 19 Year Member
Gender: Male
Status: Offline
Joined: Feb 18, 2005
0.01 posts per day
Posts: 107
Points: 3,824
   
I'm sorry telli - I didnt mean to be pushy I attemtped it but I pruned up majorly ...I will learn to be more patient next time telli ..I hope I didnt offend..



Back to top Reply with quote
#5   re: Need help removing image from supporters module?
xtrax1
CZ Active Member
 Codezwiz Site Donator
xtrax1 has been a member for over 19 year's 19 Year Member
Gender: Male
Status: Offline
Joined: Feb 18, 2005
0.01 posts per day
Posts: 107
Points: 3,824
   
Hello Telli! icon_smile.gif

I'm back same problem as before.. I still get this "ERROR: Database error"..

I entire the site name url and discription and when I submit I get this..error..it still looking maybe for the image..?

here is the sql see the line were it says require(user, image could that be the problem?

Here is the sql!
DROP TABLE IF EXISTS nuke_supporters;
CREATE TABLE nuke_supporters (
  site_id int(11) NOT NULL auto_increment,
  site_name varchar(60) NOT NULL default '',
  site_url varchar(255) NOT NULL default '',
  site_image varchar(255) NOT NULL default '',
  site_status int(1) NOT NULL default '0',
  site_hits int(10) NOT NULL default '0',
  site_date date NOT NULL default '0000-00-00',
  site_scripts text NOT NULL,
  user_id int(11) NOT NULL default '0',
  user_name varchar(60) NOT NULL default '',
  user_email varchar(60) NOT NULL default '',
  user_ip varchar(20) NOT NULL default '',
  image_id varchar(60) NOT NULL default '',
  PRIMARY KEY  (site_id),
  KEY site_id (site_id)
) TYPE=MyISAM;

DROP TABLE IF EXISTS nuke_supporters_config;
CREATE TABLE nuke_supporters_config (
  require_user int(1) NOT NULL default '1',
  image_type int(1) NOT NULL default '0',
  PRIMARY KEY  (require_user),
  KEY require_user (require_user)
) TYPE=MyISAM;

INSERT INTO nuke_supporters_config (require_user, image_type) VALUES ('1', '0');

And I'm using the submit.php and admin.php that you did for me ...

Anymore help would be appreciated..

xtrax! icon_biggrin.gif


Back to top Reply with quote
#6   re: Need help removing image from supporters module?
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
Try these files. Run the new sql file in there also.




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#7   re: Need help removing image from supporters module?
xtrax1
CZ Active Member
 Codezwiz Site Donator
xtrax1 has been a member for over 19 year's 19 Year Member
Gender: Male
Status: Offline
Joined: Feb 18, 2005
0.01 posts per day
Posts: 107
Points: 3,824
   
Hey Telli!

Still no go, I uploaded the submit.php and admin.php and inserted the new sql file, and now I get this error..

Fatal error: Call to undefined function: now() in /home/.sites/101/site23/web/modules/Supporters/submit.php on line 62

Must be driving you nutz by now as It is me...lol

xtrax1



Back to top Reply with quote
#8   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
This should do it...



Attached Files
xtrax1.zip (4.82 KB, Downloaded: 5235 Time(s))



_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#9   re: Need help removing image from supporters module?
xtrax1
CZ Active Member
 Codezwiz Site Donator
xtrax1 has been a member for over 19 year's 19 Year Member
Gender: Male
Status: Offline
Joined: Feb 18, 2005
0.01 posts per day
Posts: 107
Points: 3,824
   
Hey Telli!

It work beautifully sorry I took so long went away this weekend, however I also noticed a strange behavior with this module, before you click submit if you have any commas or hyphens like so

‘ or “ it says error!

Is there anyway to make this module work correctly so we can use proper english and grammar?

It’s a real pain trying to avoid quotes or hyphens for members and users, any suggestions telli..?

Xtrax1



Back to top Reply with quote
#10   re: Need help removing image from supporters module?
xtrax1
CZ Active Member
 Codezwiz Site Donator
xtrax1 has been a member for over 19 year's 19 Year Member
Gender: Male
Status: Offline
Joined: Feb 18, 2005
0.01 posts per day
Posts: 107
Points: 3,824
   
Sorry Telli for this post I forgot to ask this!

I was wondering is there away to make it so when a user clicks submit they get a message telling them they must register or login? Plus the comma and hyphen " ' thing..

xtrax



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum