Shop Function not Enabled or Error in Cost!

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Shop Function not Enabled or Error in Cost!
0utk4s7
CZ Newbie
0utk4s7 has been a member for over 19 year's 19 Year Member
Gender: Male
Status: Offline
Joined: Feb 06, 2005
0.00 posts per day
Posts: 9
Points: 616
   
Hi there i install the shop_mod 2.6.0 in phpnuke 7.6 and bbnuke 2.13 and cash mod

When i go to the speciall efects and buy for exemple the shadow glow and click in buy i got this error

Shop Function not Enabled or Error in Cost!



Back to top Reply with quote
#2   re: Shop Function not Enabled or Error in Cost!
Taut
PayPal Donation
CZ Revered Member
 Codezwiz Site Donator
Taut has been a member for over 20 year's 20 Year Member
usa.gif california.gif
Occupation: Entrepreneur
Gender: Female
Fav. Sports Team: SF Giants
Status: Offline
Joined: May 27, 2003
0.72 posts per day
Posts: 5530
Points: 481,695
   
Have you enabled your shop? Have you added the amount/cost for each effect? If so, can you post the shop_effects file here plz.



Back to top Reply with quote
#3   re: Shop Function not Enabled or Error in Cost!
0utk4s7
CZ Newbie
0utk4s7 has been a member for over 19 year's 19 Year Member
Gender: Male
Status: Offline
Joined: Feb 06, 2005
0.00 posts per day
Posts: 9
Points: 616
   
Yes i enable th shop and put the price
the shop_effects.php

<?php
/***************************************************************************
*                             shop_effects.php
*                            -------------------
*   Version              : 2.6.0
*   released             : Sunday, December 15th, 2002
*   last updated         : Saturday, July 12th, 2003
*   email                : [ Register or login to view links on this board. ]
*
***************************************************************************/

/***************************************************************************
*
*   copyright (C) 2002/2003  IcE-RaiN/Zarath
*
*   This program is free software; you can redistribute it and/or
*   modify it under the terms of the GNU General Public License
*   as published by the Free Software Foundation; either version 2
*   of the License, or (at your option) any later version.
*
*   This program is distributed in the hope that it will be useful,
*   but WITHOUT ANY WARRANTY; without even the implied warranty of
*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*   GNU General Public License for more details.
*
*   http://www.gnu.org/copyleft/gpl.html
*
***************************************************************************/

if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
    die ("You can't access this file directly...");
}


define('IN_PHPBB', true);
$phpbb_root_path = 'modules/Forums/';
include($phpbb_root_path.'extension.inc');
include($phpbb_root_path.'common.'.$phpEx);
require("modules/Forums/nukebb.php");

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX, $nukeuser);
init_userprefs($userdata);
//
// End session management
//
//
// Start page Variables
//
$colordropdown = '<td class="row2"><select name="color"><option value="000000">Black</option><option value="333399">Blue, Dark</option><option value="3366FF">Blue, Light</option><option value="99FFFF">Cyan</option><option value="A4A467">Gold</option><option value="339933">Green, Dark</option><option value="66FF33">Green, Light</option><option value="999999">Grey, Dark</option><option value="CCCCCC">Grey, Light</option><option value="FF9900">Orange</option><option value="FF33FF">Pink</option><option value="CC33FF">Purple</option><option value="993333">Red, Dark</option><option value="FF3366">Red, Light</option><option value="FFFFFF">White</option><option value="FFFF00">Yellow</option></select>';
//
// End page variables
//

//start of special shop display
if (($_REQUEST['action'] == "specialshop") || (empty($_REQUEST['action'])))
{
   $template->set_filenames(array(
      'body' => 'shop_body.tpl')
   );
   if ( !$userdata['session_logged_in'] )
   {
      $redirect = "shop.$phpEx&action=specialshop";
      $redirect .= ( isset($user_id) ) ? '&user_id=' . $user_id : '';
      header('Location: ' . append_sid("login.$phpEx?redirect=$redirect", true));
   }

   $shoparray = explode("ß", $board_config['specialshop']);
   $shoparraycount = count ($shoparray);
   $shopstatarray = array();
   for ($x = 0; $x < $shoparraycount; $x++)
   {
      $temparray = explode("Þ", $shoparray[$x]);
      $shopstatarray[] = $temparray[0];
      $shopstatarray[] = $temparray[1];
   }

   //start checks for first visit
   if (strlen($userdata['user_privs']) < 2) {
      $sql = "update " . USERS_TABLE . " set user_effects='ßnoÞ0ßnoÞ0ßnoÞ0', user_privs='ßnoÞ0ßnoÞ0ßnoÞ0' where username='{$userdata['username']}'";
      if ( !($db->sql_query($sql)) ) { message_die(GENERAL_MESSAGE, 'Fatal Error Fixing User!'); }
      if (strlen($userdata['user_custitle']) < 2) {
         $sql = "update " . USERS_TABLE . " set user_custitle='ßoffÞ0ßoffÞ0ßoffÞ0ßoffÞ0ßoffÞ0' where username='{$userdata['username']}'";
         if ( !($db->sql_query($sql)) ) { message_die(GENERAL_MESSAGE, 'Fatal Error Fixing User!'); }
      }
      header("Location: shop_effects.php");
   }
   //end first visit checks

   $usereffects = explode("ß", $userdata['user_effects']);
   $userprivs = explode("ß", $userdata['user_privs']);
   $userctitle = explode("ß", $userdata['user_custitle']);
   $userbs = array();
   $usercount = count($userprivs);
   for ($x = 0; $x < $usercount; $x++) { $temppriv = explode("Þ", $userprivs[$x]); $userbs[] = $temppriv[0]; $userbs[] = $temppriv[1]; }
   $usercount = count($usereffects);
   for ($x = 0; $x < $usercount; $x++) { $temppriv = explode("Þ", $usereffects[$x]); $userbs[] = $temppriv[0]; $userbs[] = $temppriv[1]; }
   $usercount = count($userctitle);
   for ($x = 0; $x < $usercount; $x++) { $temppriv = explode("Þ", $userctitle[$x]); $userbs[] = $temppriv[0]; $userbs[] = $temppriv[1]; }

   //check enabled
   if ($shopstatarray[3] != "enabled") { message_die(GENERAL_MESSAGE, 'Effects store is not Enabled!'); }

   if (($shopstatarray[6] == on) || ($shopstatarray[8] == on) || ($shopstatarray[10] == on))
   {
      if (($userbs[2] == no) || ($userbs[2] == off)) { $avatarbs = "Buy"; } else { $avatarbs = "Remove"; $avatarowned = "Yes"; }
      if (($userbs[4] == no) || ($userbs[4] == off)) { $sigbs = "Buy"; } else { $sigbs = "Remove"; $sigowned = "Yes"; }
      if (($userbs[6] == no) || ($userbs[6] == off)) { $titlebs = "Buy"; } else { $titlebs = "Remove"; $titleowned = "Yes"; }
      $shopinfo .= '<tr><td class="row2" colspan="5"><span class="gen"><b>Privileges</b></span></td></tr>';
      $shopinfo .= '<tr><td class="row2"><span class="gensmall">Privileges</span></td><td class="row2"><span class="gensmall">Cost</span></td><td class="row2"><br></td><td class="row2"><br></td><td class="row2"><span class="gensmall">Owned</span></td></tr>';
      if ($shopstatarray[6] == on)
      {
         $shopinfo .= '<form method="post" action="'.append_sid("shop_effects.".$phpEx."?action=bsspecial&type=avatar&bs=".$avatarbs).'"><tr><td class="row2"><span class="gensmall">Buy Avatar Privilege</span></td><td class="row2"><span class="gensmall">'.$shopstatarray[7].'</span></td><td class="row2"><br></td><td class="row2"><span class="gensmall"><input type="submit" value="'.$avatarbs.' Avatar\"></span></td><td class="row2"><span class="gensmall">'.$avatarowned.'</span></td></tr></form>';
      }
      if ($shopstatarray[8] == on)
      {
         $shopinfo .= '<form method="post" action="'.append_sid("shop_effects.".$phpEx."?action=bsspecial&type=sig&bs=".$sigbs).'"><tr><td class="row2"><span class="gensmall">Buy Signature Privilege</span></td><td class="row2"><span class="gensmall">'.$shopstatarray[9].'</span></td><td class="row2"><br></td><td class="row2"><span class="gensmall"><input type="submit" value="'.$sigbs.' Signature"></span></td><td class="row2"><span class="gensmall">'.$sigowned.'</span></td></tr></form>';
      }
      if ($shopstatarray[10] == on)
      {
         $shopinfo .= '<form method="post" action="'.append_sid("shop_effects.".$phpEx."?action=bsspecial&type=title&bs=".$titlebs).'"><tr><td class="row2"><span class="gensmall">Buy Title Privilege</span></td><td class="row2"><span class="gensmall">'.$shopstatarray[11].'</span></td><td class="row2"><br></td><td class="row2"><span class="gensmall"><input type="submit" value="'.$titlebs.' Title"></span></td><td class="row2"><span class="gensmall">'.$titleowned.'</span></td></tr></form>';
      }
   }
   if (($shopstatarray[12] == on) || ($shopstatarray[14] == on) || ($shopstatarray[16] == on))
   {
      $shopinfo .= '<tr><td class="row2" colspan="5"><span class="gen"><b>Name Effects</b></span></td></tr>';
      $shopinfo .= '<tr><td class="row2"><span class="gensmall">Effects</span></td><td class="row2"><span class="gensmall">Cost</span></td><td class="row2"><span class="gensmall">Colors</span></td><td class="row2"><br></td><td class="row2"><span class="gensmall">Owned</span></td></tr>';
      if (($userbs[10] == no) || ($userbs[10] == off)) { $colorbs = "Buy"; } else { $colorbs = "Remove"; $colorowned = "<font color=\"".$userbs[11]."\">Yes"; }
      if (($userbs[12] == no) || ($userbs[12] == off)) { $shadowbs = "Buy"; } else { $shadowbs = "Remove"; $shadowowned = "<font color=\"".$userbs[13]."\">Yes"; }
      if (($userbs[14] == no) || ($userbs[14] == off)) { $glowbs = "Buy"; } else { $glowbs = "Remove"; $glowowned = "<font color=\"".$userbs[15]."\">Yes"; }
      if ($shopstatarray[12] == on)
      {
         $shopinfo .= '<form method="post" action="'.append_sid("shop_effects.".$phpEx."?action=bsspecial&type=color&bs=".$colorbs).'"><tr><td class="row2"><span class="gensmall">Buy Color</span></td><td class="row2"><span class="gensmall">'.$shopstatarray[13].'</span></td>'.$colordropdown.'
         <td class="row2"><span class="gensmall"><input type="submit" value="'.$colorbs.' Color"></span></td><td class="row2"><span class="gensmall">'.$colorowned.'</span></td></tr></form>';
      }
      if ($shopstatarray[14] == on)
      {
         $shopinfo .= '<form method="post" action="'.append_sid("shop_effects.".$phpEx."?action=bsspecial&type=glow&bs=".$glowbs).'"><tr><td class="row2"><span class="gensmall">Buy Glow</span></td><td class="row2"><span class="gensmall">'.$shopstatarray[15].'</span></td>'.$colordropdown.'
         <td class="row2"><span class="gensmall"><input type="submit" value="'.$glowbs.' Glow"></span></td><td class="row2"><span class="gensmall">'.$glowowned.'</span></td></tr></form>';
      }
      if ($shopstatarray[16] == on)
      {
         $shopinfo .= '<form method="post" action="'.append_sid("shop_effects.".$phpEx."?action=bsspecial&type=shadow&bs=".$shadowbs).'"><tr><td class="row2"><span class="gensmall">Buy Shadow</span></td><td class="row2"><span class="gensmall">'.$shopstatarray[17].'</span></td>'.$colordropdown.'
         <td class="row2"><span class="gensmall"><input type="submit" value="'.$shadowbs.' Shadow"></span></td><td class="row2"><span class="gensmall">'.$shadowowned.'</span></td></tr></form>';
      }
   }
   if (($shopstatarray[18] == on) || ($shopstatarray[20] == on) || ($shopstatarray[22] == on))
   {
      $shopinfo .= "<tr><td class=\"row2\" colspan=\"5\"><span class=\"gen\"><b>Title Effects</b></span></td></tr>";
      $shopinfo .= "<tr><td class=\"row2\"><span class=\"gensmall\">Effects</span></td><td class=\"row2\"><span class=\"gensmall\">Cost</span></td><td class=\"row2\"><span class=\"gensmall\">Colors</span></td><td class=\"row2\"><br></td><td class=\"row2\"><span class=\"gensmall\">Owned</span></td></tr>";
      if (($userbs[18] == no) || ($userbs[18] == off)) { $tcolorbs = "Buy"; } else { $tcolorbs = "Remove"; $tcolorowned = "<font color=\"".$userbs[19]."\">Yes"; }
      if (($userbs[20] == no) || ($userbs[20] == off)) { $tglowbs = "Buy"; } else { $tglowbs = "Remove"; $tglowowned = "<font color=\"".$userbs[21]."\">Yes"; }
      if (($userbs[22] == no) || ($userbs[22] == off)) { $tshadowbs = "Buy"; } else { $tshadowbs = "Remove"; $tshadowowned = "<font color=\"".$userbs[23]."\">Yes"; }
      if ($shopstatarray[18] == on)
      {
         $shopinfo .= '<form method="post" action="'.append_sid("shop_effects.$phpEx?action=bsspecial&type=tcolor&bs=$tcolorbs").'"><tr><td class="row2"><span class="gensmall">Buy Title Color</span></td><td class="row2"><span class="gensmall">'.$shopstatarray[19].'</span></td>'.$colordropdown.'
         <td class="row2"><span class="gensmall"><input type="submit" value="'.$tcolorbs.' Color"></span></td><td class="row2"><span class="gensmall">'.$tcolorowned.'</span></td></tr></form>';
      }
      if ($shopstatarray[20] == on)
      {
         $shopinfo .= '<form method="post" action="'.append_sid("shop_effects.$phpEx?action=bsspecial&type=tglow&bs=$tglowbs").'"><tr><td class="row2"><span class="gensmall">Buy Title Glow</span></td><td class="row2"><span class="gensmall">'.$shopstatarray[21].'</span></td>'.$colordropdown.'
         <td class="row2"><span class="gensmall"><input type="submit" value="'.$tglowbs.' Glow"></span></td><td class="row2"><span class="gensmall">'.$tglowowned.'</span></td></tr></form>';
      }
      if ($shopstatarray[22] == on)
      {
         $shopinfo .= '<form method="post" action="'.append_sid("shop_effects.$phpEx?action=bsspecial&type=tshadow&bs=$tshadowbs").'"><tr><td class="row2"><span class="gensmall">Buy Title Shadow</span></td><td class="row2"><span class="gensmall">'.$shopstatarray[23].'</span></td>'.$colordropdown.'
         <td class="row2"><span class="gensmall"><input type="submit" value="'.$tshadowbs.' Shadow"></span></td><td class="row2"><span class="gensmall">'.$tshadowowned.'</span></td></tr></form>';
      }
   }
   if (($shopstatarray[24] == on) || ($shopstatarray[26] == on))
   {
      $shopinfo .= "<tr><td class=\"row2\" colspan=\"5\"><span class=\"gen\"><b>Custom Changes</b></span></td></tr>";
      $shopinfo .= "<tr><td class=\"row2\"><span class=\"gensmall\">Type</span></td><td class=\"row2\"><span class=\"gensmall\">Cost</span></td><td class=\"row2\"><span class=\"gensmall\">Change to</span></td><td class=\"row2\"><br></td><td class=\"row2\"><span class=\"gensmall\">Owned/Name</span></td></tr>";
      if ((($userbs[24] == no) || ($userbs[24] == off)) || ($userbs[26] == on)) { $ctitlebs = "Buy"; } else { $ctitlebs = "Remove"; $ctitleowned = "Yes"; }
      if ($shopstatarray[24] == on)
      {
         $shopinfo .= '<form method="post" action="'.append_sid("shop_effects.$phpEx?action=bsspecial&type=ctitle&bs=$ctitlebs").'"><tr><td class="row2"><span class="gensmall">Change Title</span></td><td class="row2"><span class="gensmall">'.$shopstatarray[25].'</span></td><td class="row2"><input type="text" name="newtitle" size="25" maxlength="25"></td>
         </td><td class="row2"><span class="gensmall"><input type="submit" value="'.$ctitlebs.' Title"></span></td><td class="row2"><span class="gensmall">'.$ctitleowned.'</span></td></tr></form>';
      }
      if ($shopstatarray[26] == on)
      {
         $shopinfo .= '<form method="post" action="'.append_sid("shop_effects.$phpEx?action=bsspecial&type=cusername&bs=Buy").'"><tr><td class="row2"><span class="gensmall">Change Username</span></td><td class="row2"><span class="gensmall">'.$shopstatarray[27].'</span></td><td class="row2"><input type="text" name="newname" size="25" maxlength="25"></td>
         <td class="row2"><span class="gensmall"><input type="submit" value="Change Name"></span></td><td class="row2"><br></td></tr></form>';
      }
      if ($shopstatarray[28] == on)
      {
         $shopinfo .= '<form method="post" action="'.append_sid("shop_effects.$phpEx?action=bsspecial&type=cutitle&bs=Buy").'"><tr><td class="row2"><span class="gensmall">Change Users Title</span></td><td class="row2"><span class="gensmall">'.$shopstatarray[29].'</span></td><td class="row2"><input type="text" name="newtitle" size="25" maxlength="25"></td>
         </td><td class="row2"><span class="gensmall"><input type="submit" value="Change User Title"></span></td><td class="row2"><input type="text" name="tchangename" size="10" maxlength="50"></td></tr></form>';
      }
   }
   if ($shopstatarray[12] == "on" || $shopstatarray[14] == "on" || $shopstatarray[16] == "on" || $shopstatarray[18] == "on" || $shopstatarray[20] == "on" || $shopstatarray[22] == "on") {
      $shopinfo .= '<tr><td class="row2" colspan="5"><span class="gen"><b>Test Effects</b></span></td></tr>';
      $shopinfo .= '<tr><td class="row2" colspan="2"><span class="gensmall">Type</span></td><td class="row2" colspan="3"><span class="gensmall">Colors</span></td></tr>';
      $shopinfo .= '<form method="post" action="'.append_sid("shop_effects.".$phpEx."?action=specialshop&viewname=true#effects").'">';
      if ($shopstatarray[12] == "on" || $shopstatarray[18] == "on")
      {
         $shopinfo .= '<tr><td class="row2" colspan="2"><a name="effects"></a><span class="gensmall">Color</span></td><td class="row2" colspan="3"><select name="color"><option value="none">None</option>'.str_replace('<td class="row2"><select name="color">', '', $colordropdown).'</tr>';
      }
      if ($shopstatarray[14] == "on" || $shopstatarray[20] == "on")
      {
         $shopinfo .= '<tr><td class="row2" colspan="2"><span class="gensmall">Glow</span></td><td class="row2" colspan="3"><select name="gcolor"><option value="none">None</option>'.str_replace('<td class="row2"><select name="color">', '', $colordropdown).'</tr>';
      }
      if ($shopstatarray[16] == "on" || $shopstatarray[22] == "on")
      {
         $shopinfo .= '<tr><td class="row2" colspan="2"><span class="gensmall" colspan="3">Shadow</span></td><td class="row2" colspan="3"><select name="scolor"><option value="none">None</option>'.str_replace('<td class="row2"><select name="color">', '', $colordropdown).'</tr>';
      }
      $shopinfo .= '<tr><td class="row2" colspan="2"><span class="gensmall" colspan="3">Test Text:</span></td><td class="row2" colspan="3"><input type="text" size="15" maxlength="25" name="testtext"></td></tr>';
      $shopinfo .= '<tr><td colspan="5" class="row2" align="center"><input type="submit" value="View Effects"></td></tr></form>';
   }
   if ($_REQUEST['viewname'] == "true") {
      if ($color != "none") { $testcolor = '<font color="'.$color.'">'; }
      if ($gcolor != "none") { $testglow = '; filter:glow(color=#'.$gcolor.', strength=5)'; }
      if ($scolor != "none") { $testshadow = '; filter:shadow(color=#'.$scolor.', strength=5)'; }
      if (!preg_match("/^[a-zA-Z0-9 ]*$/", $testtext)) { $text = $userdata['username']; }
      elseif (strlen($testtext) < 2) { $text = $userdata['username']; }
      else { $text = $testtext; }
      $shopinfo .= '<tr><td class="row2" colspan="5" align="center"><span class="gen"><span style="width:100'.$testshadow.''.$testglow.'">'.$testcolor.''.$text.'</font></span></span></td></tr>';
   }
   $page_title = 'Permissions and Effects Store';
   $title = $shopstatarray[5];
   $shoplocation = ' -> <a href="'.append_sid("shop_effects.$phpEx?action=specialshop").'" class="nav">'.$shopstatarray[5].' Abilities</a>';
   if (strlen($shopinfo) > 3) { $shoptablerows = 5; }
   else { $shoptablerows = 1; $shopinforow = '<tr><td class="row2"><span class="gen">There are currently no effects or privlages for sale in this shop.</span></td></tr>'; }

   // start of personal information
   $personal = '<tr><td class="row1" width="50%"><span class="gensmall"><a href="'.append_sid("shop.$phpEx?action=inventory&searchid=".$userdata['user_id']).'" class="navsmall">Your Inventory</a></span></td><td class="row1" align="right" width="50%"><span class="gensmall">'.$userdata['user_points'].' '.$board_config['points_name'].'</span></td></tr>';
   if (strlen($userdata['user_specmsg']) > 2) {
      $personal .= '<tr><td class="row2" colspan="2"><span class="gensmall"><font color="red">'.$userdata['user_specmsg'].'</font></span></td></tr>';
      $personal .= '<tr><td class="row2" colspan="2"><span class="gensmall"><a href="modules.php?name=Forums&file=shop&clm=true" class="gen">Clear Messages</a></span></td></tr>';
   }
   //end of personal information

   $template->assign_vars(array(
      'SHOPPERSONAL' => $personal,
      'SHOPLOCATION' => $shoplocation,
      'L_SHOP_TITLE' => $title,
      'SHOPTABLEROWS' => $shoptablerows,
      'SHOPLIST' => $shopinfo,
      'SHOPINFOROW' => $shopinforow,
   ));
   $template->assign_block_vars('', array());

}

//start of buy & sell sepcials
elseif ($_REQUEST['action'] == "bsspecial")
{
   if ( !$userdata['session_logged_in'] )
   {
      $redirect = "shop.$phpEx&action=bsspecial&type=$type&bs=$bs&color=$color";
      $redirect .= ( isset($user_id) ) ? '&user_id=' . $user_id : '';
      header('Location: ' . append_sid("login.$phpEx?redirect=$redirect", true));
   }
   $template->set_filenames(array( 'body' => 'shop_body.tpl'));

   $usereffects = explode("ß", $userdata['user_effects']);
   $userprivs = explode("ß", $userdata['user_privs']);
   $usercustitle = explode("ß", $userdata['user_custitle']);
   $userbs = array();
   $usercount = count($userprivs);
   for ($x = 0; $x < $usercount; $x++) { $temppriv = explode("Þ", $userprivs[$x]); $userbs[] = $temppriv[0]; $userbs[] = $temppriv[1]; }
   $usercount = count($usereffects);
   for ($x = 0; $x < $usercount; $x++) { $temppriv = explode("Þ", $usereffects[$x]); $userbs[] = $temppriv[0]; $userbs[] = $temppriv[1]; }
   $usercount = count($usercustitle);
   for ($x = 0; $x < $usercount; $x++) { $temppriv = explode("Þ", $usercustitle[$x]); $userbs[] = $temppriv[0]; $userbs[] = $temppriv[1]; }

   $shoparray = explode("ß", $board_config['specialshop']);
   $shoparraycount = count ($shoparray);
   $shopstatarray = array();
   for ($x = 0; $x < $shoparraycount; $x++)
   {
      $temparray = explode("Þ", $shoparray[$x]);
      $shopstatarray[] = $temparray[0];
      $shopstatarray[] = $temparray[1];
   }
   if ($_REQUEST['bs'] == "Buy") {
      if ((($type == "ctitle") && ($shopstatarray[24] == "on")) || (($type == "cutitle") && ($shopstatarray[28] == "on"))) {
         $tsql = "select * from " . RANKS_TABLE . " where rank_title='{$_REQUEST['newtitle']}'";
         if ( !($tresult = $db->sql_query($tsql)) ) { message_die(GENERAL_MESSAGE, 'Fatal Error Rank Info!'); }
         $trow = mysql_fetch_array($tresult);
         if (mysql_num_rows($tresult) > 0) { message_die(GENERAL_MESSAGE, 'That Rank has already been assigned!'); }
         elseif ((!preg_match("/^[a-zA-Z0-9 ]*$/", $newtitle)) || (strlen($newtitle) < 2)) { message_die(GENERAL_MESSAGE, 'That Rank is Invalid, it must only contain characters A-Z, a-z and 1-0. For more specific titles talk to an admin.'); }
         if (($type == "cutitle") && ($shopstatarray[28] == "on")) {
            if ($userdata['username'] == $tchangename) { message_die(GENERAL_MESSAGE, 'If you want to change your title, do it with the proper field!'); }
            $sql = "select * from " . USERS_TABLE . " where username='$tchangename'";
            if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_MESSAGE, 'Fatal Error Checking Username!'); }
            $ucrow = mysql_fetch_array($result);
            if ((($ucrow['user_level'] == 1) || ($ucrow['user_level'] == 2)) && ($userdata['user_level'] != 1)) { message_die(GENERAL_MESSAGE, 'You cannot change the rank of Admins or Moderators!'); }
            if (strlen($ucrow['username']) < 2) { message_die(GENERAL_MESSAGE, 'No such user called '.$tchangename.' Exists!'); }
            else { $specialcost = $shopstatarray[29]; }
         }
         else { $specialcost = $shopstatarray[25]; }
      }
      if (($type == cusername) && ($shopstatarray[26] == on)) {
         $sql = "select * from " . USERS_TABLE . " where username='$newname'";
         if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_MESSAGE, 'Fatal Error Checking Username!'); }
         if (mysql_num_rows($result) > 0) { message_die(GENERAL_MESSAGE, 'That name is already in use, go back and pick another one!'); }
         elseif ((!preg_match("/^[a-zA-Z0-9 ]*$/", $newname)) || (strlen($newname) < 2)) { message_die(GENERAL_MESSAGE, 'Invalid name, Characters must be A-Z & a-z. If you wish a different type of name change contact an admin.'); }
         else { $specialcost = $shopstatarray[27]; }
      }
      if (($type == tcolor) && ($shopstatarray[18] == on)) { $specialcost = $shopstatarray[19]; }
      if (($type == tglow) && ($shopstatarray[20] == on)) { $specialcost = $shopstatarray[21]; }
      if (($type == tshadow) && ($shopstatarray[22] == on)) { $specialcost = $shopstatarray[23]; }
      if (($type == avatar) && ($shopstatarray[6] == on)) { $specialcost = $shopstatarray[7]; }
      if (($type == sig) && ($shopstatarray[8] == on)) { $specialcost = $shopstatarray[9]; }
      if (($type == title) && ($shopstatarray[10] == on)) { $specialcost = $shopstatarray[11]; }
      if (($type == color) && ($shopstatarray[12] == on)) { $specialcost = $shopstatarray[13]; }
      if (($type == shadow) && ($shopstatarray[16] == on)) { $specialcost = $shopstatarray[17]; }
      if (($type == glow) && ($shopstatarray[14] == on)) { $specialcost = $shopstatarray[15]; }
      if (!is_numeric($specialcost)) { message_die(GENERAL_MESSAGE, 'Shop Function not Enabled or Error in Cost!'); }
      if (($type == color) || ($type == shadow) || ($type == glow) || ($type == tglow) || ($type == tcolor) || ($type == tshadow))
      {
         if (substr_count($colordropdown, '<option value="'.$color.'">') < 1) { message_die(GENERAL_MESSAGE, 'This is not a valid color!'); }
      }
      if (($type == ctitle) && (($userbs[24] == on) && ($userbs[26] != on))) { message_die(GENERAL_MESSAGE, 'You already own a custom title!'); }
      if (($type == tcolor) && ($userbs[18] == on)) { message_die(GENERAL_MESSAGE, 'You already have a colored title!'); }
      if (($type == tglow) && ($userbs[20] == on)) { message_die(GENERAL_MESSAGE, 'You already have a glowing title!'); }
      if (($type == tshadow) && ($userbs[22] == on)) { message_die(GENERAL_MESSAGE, 'You already have a shadowed title!'); }
      if (($type == avatar) && ($userbs[2] == on)) { message_die(GENERAL_MESSAGE, 'You already have avatar permissions!'); }
      if (($type == sig) && ($userbs[4] == on)) { message_die(GENERAL_MESSAGE, 'You already have signature permissions!'); }
      if (($type == title) && ($userbs[6] == on)) { message_die(GENERAL_MESSAGE, 'You already have title permissions!'); }
      if (($type == color) && ($userbs[10] == on)) { message_die(GENERAL_MESSAGE, 'You already have a color in your name!'); }
      if (($type == shadow) && ($userbs[12] == on)) { message_die(GENERAL_MESSAGE, 'You already have a shadow on your name!'); }
      if (($type == glow) && ($userbs[14] == on)) { message_die(GENERAL_MESSAGE, 'You already have a glow on your name!'); }
      $userleftamount = $userdata['user_points'] - $specialcost;
      if ($userleftamount < 0) { message_die(GENERAL_MESSAGE, 'You don\'t have enough to purchase that!'); }
      else { $upsql = "update " . USERS_TABLE . " set user_points='$userleftamount' where username='$userdata[username]'";
       if ( !($db->sql_query($upsql)) ) { message_die(GENERAL_MESSAGE, 'Fatal Error Updating User Info!'); } }
      if ($type == avatar) { $userprs = "ßonÞ".$userbs[3]."ß".$userbs[4]."Þ".$userbs[5]."ß".$userbs[6]."Þ".$userbs[7]; }
      if ($type == sig) { $userprs = "ß".$userbs[2]."Þ".$userbs[3]."ßonÞ".$userbs[5]."ß".$userbs[6]."Þ".$userbs[7]; }
      if ($type == title) { $userprs = "ß".$userbs[2]."Þ".$userbs[3]."ß".$userbs[4]."Þ".$userbs[5]."ßonÞ".$userbs[7]; }
      if (($type != title) && ($type != sig) && ($type != avatar)) { $userprs = "ß".$userbs[2]."Þ".$userbs[3]."ß".$userbs[4]."Þ".$userbs[5]."ß".$userbs[6]."Þ".$userbs[7]; }
      if ($type == color) { $usereff = "ßonÞ".$color."ß".$userbs[12]."Þ".$userbs[13]."ß".$userbs[14]."Þ".$userbs[15]; }
      if ($type == shadow) { $usereff = "ß".$userbs[10]."Þ".$userbs[11]."ßonÞ".$color."ß".$userbs[14]."Þ".$userbs[15]; }
      if ($type == glow) { $usereff = "ß".$userbs[10]."Þ".$userbs[11]."ß".$userbs[12]."Þ".$userbs[13]."ßonÞ".$color; }
      if (($type != glow) && ($type != shadow) && ($type != color)) { $usereff = "ß".$userbs[10]."Þ".$userbs[11]."ß".$userbs[12]."Þ".$userbs[13]."ß".$userbs[14]."Þ".$userbs[15]; }
      if ($type == tcolor) { $usercustitle = "ßonÞ".$color."ß".$userbs[20]."Þ".$userbs[21]."ß".$userbs[22]."Þ".$userbs[23]."ß".$userbs[24]."Þ".$userbs[25]."ß".$userbs[26]."Þ".$userbs[27]; }
      if ($type == tglow) { $usercustitle = "ß".$userbs[18]."Þ".$userbs[19]."ßonÞ".$color."ß".$userbs[22]."Þ".$userbs[23]."ß".$userbs[24]."Þ".$userbs[25]."ß".$userbs[26]."Þ".$userbs[27]; }
      if ($type == tshadow) { $usercustitle = "ß".$userbs[18]."Þ".$userbs[19]."ß".$userbs[20]."Þ".$userbs[21]."ßonÞ".$color."ß".$userbs[24]."Þ".$userbs[25]."ß".$userbs[26]."Þ".$userbs[27]; }
      if ($type == ctitle) {
         $usercustitle = "ß".$userbs[18]."Þ".$userbs[19]."ß".$userbs[20]."Þ".$userbs[21]."ß".$userbs[22]."Þ".$userbs[23]."ßonÞ".$newtitle."ßoffÞ0";
         $sql = "update " . USERS_TABLE . " set user_specmsg='' where username='$userdata[username]'";
         if (!($db->sql_query($sql))) { message_die(GENERAL_MESSAGE, 'Fatal Error clearing special messages!'); }
      }
      if (($type != tglow) && ($type != tshadow) && ($type != tcolor) && ($type != ctitle)) { $usercustitle = "ß".$userbs[18]."Þ".$userbs[19]."ß".$userbs[20]."Þ".$userbs[21]."ß".$userbs[22]."Þ".$userbs[23]."ß".$userbs[24]."Þ".$userbs[25]."ß".$userbs[26]."Þ".$userbs[27]; }
      if ($type != cutitle) { $ussql = "update " . USERS_TABLE . " set user_effects='$usereff', user_privs='$userprs', user_custitle='$usercustitle' where username='$userdata[username]'";
      if ( !($db->sql_query($ussql)) ) { message_die(GENERAL_MESSAGE, 'Fatal Error Updating User Info!'); } }
      if ($type == cusername) {
         $sql = "update " . USERS_TABLE . " set username='$newname' where username='$userdata[username]'";
         if (!($db->sql_query($sql))) { message_die(GENERAL_MESSAGE, 'Fatal Error changing username!'); }
      }
      if ($type == cutitle) {
         $usercustitle = explode("ß", $ucrow['user_custitle']);
         $usercount = count($usercustitle);
         $cuserbs = array();
         for ($x = 0; $x < $usercount; $x++) { $temppriv = explode("Þ", $usercustitle[$x]); $cuserbs[] = $temppriv[0]; $cuserbs[] = $temppriv[1]; }
         $usercustitle = "ß".$cuserbs[2]."Þ".$cuserbs[3]."ß".$cuserbs[4]."Þ".$cuserbs[5]."ß".$cuserbs[6]."Þ".$cuserbs[7]."ßonÞ".$newtitle."ß".$cuserbs[8]."Þ".$cuserbs[9];
         $usermessage = ' '.$userdata['username'].' has changed your title to<i> '.$newtitle.'. </i>If this is inappropriate, message an admin.';
         $sql = "update " . USERS_TABLE . " set user_custitle='$usercustitle', user_specmsg='$usermessage' where username='$tchangename'";
         if ( !($db->sql_query($sql)) ) { message_die(GENERAL_MESSAGE, 'Fatal Error Updating User Info!'); }
      }
      $page_title = 'Buy Special Ability';
      $title = $page_title;
      $shoplocation = ' -> <a href="'.append_sid("shop_effects.$phpEx?action=specialshop").'" class="nav">'.$shopstatarray[5].' Abilities</a> -> <a href="'.append_sid("shop_effects.$phpEx?action=specialshop").'" class="nav">Buy Special Ability</a>';
      $shopinforow = '<tr><td class="row2"><span class="gen">Your purchase has been successful!</span></td></tr>';
   }
   elseif ($_REQUEST['bs'] == "Remove") {
      if (($type == avatar) && (($userbs[2] == off) || ($userbs[2] == no))) { message_die(GENERAL_MESSAGE, 'You don\'t have avatar permissions to remove!'); }
      if (($type == sig) && (($userbs[4] == off) || ($userbs[4] == no))) { message_die(GENERAL_MESSAGE, 'You don\'t have signature permissions to remove!'); }
      if (($type == title) && (($userbs[6] == off) || ($userbs[6] == no))) { message_die(GENERAL_MESSAGE, 'You don\'t have title permissions to remove!'); }
      if (($type == color) && (($userbs[10] == off) || ($userbs[10] == no))) { message_die(GENERAL_MESSAGE, 'You don\'t have a color in your name to remove!'); }
      if (($type == shadow) && (($userbs[12] == off) || ($userbs[12] == no))) { message_die(GENERAL_MESSAGE, 'You don\'t have a shadow on your name to remove!'); }
      if (($type == glow) && (($userbs[14] == off) || ($userbs[14] == no))) { message_die(GENERAL_MESSAGE, 'You don\'t have a glow on your name to remove!'); }
      if (($type == tcolor) && (($userbs[18] == off) || ($userbs[18] == no))) { message_die(GENERAL_MESSAGE, 'You don\'t have a color in your title to remove!'); }
      if (($type == tglow) && (($userbs[20] == off) || ($userbs[20] == no))) { message_die(GENERAL_MESSAGE, 'You don\'t have a glow on your title to remove!'); }
      if (($type == tshadow) && (($userbs[22] == off) || ($userbs[22] == no))) { message_die(GENERAL_MESSAGE, 'You don\'t have a shadow on your title to remove!'); }
      if (($type == ctitle) && (($userbs[24] == off) || ($userbs[24] == no) || ($userbs[26] == on))) { message_die(GENERAL_MESSAGE, 'You don\'t have a custom title to remove!'); }
      if ($type == avatar) { $userprs = "ßoffÞ".$userbs[3]."ß".$userbs[4]."Þ".$userbs[5]."ß".$userbs[6]."Þ".$userbs[7]; }
      if ($type == sig) { $userprs = "ß".$userbs[2]."Þ".$userbs[3]."ßoffÞ".$userbs[5]."ß".$userbs[6]."Þ".$userbs[7]; }
      if ($type == title) { $userprs = "ß".$userbs[2]."Þ".$userbs[3]."ß".$userbs[4]."Þ".$userbs[5]."ßoffÞ".$userbs[7]; }
      if (($type != title) && ($type != sig) && ($type != avatar)) { $userprs = "ß".$userbs[2]."Þ".$userbs[3]."ß".$userbs[4]."Þ".$userbs[5]."ß".$userbs[6]."Þ".$userbs[7]; }
      if ($type == color) { $usereff = "ßoffÞ0ß".$userbs[12]."Þ".$userbs[13]."ß".$userbs[14]."Þ".$userbs[15]; }
      if ($type == shadow) { $usereff = "ß".$userbs[10]."Þ".$userbs[11]."ßoffÞ0ß".$userbs[14]."Þ".$userbs[15]; }
      if ($type == glow) { $usereff = "ß".$userbs[10]."Þ".$userbs[11]."ß".$userbs[12]."Þ".$userbs[13]."ßoffÞ0"; }
      if (($type != glow) && ($type != shadow) && ($type != color)) { $usereff = "ß".$userbs[10]."Þ".$userbs[11]."ß".$userbs[12]."Þ".$userbs[13]."ß".$userbs[14]."Þ".$userbs[15]; }
      if ($type == tcolor) { $usercustitle = "ßoffÞ0ß".$userbs[20]."Þ".$userbs[21]."ß".$userbs[22]."Þ".$userbs[23]."ß".$userbs[24]."Þ".$userbs[25]."ß".$userbs[26]."Þ".$userbs[27]; }
      if ($type == tglow) { $usercustitle = "ß".$userbs[18]."Þ".$userbs[19]."ßoffÞ0ß".$userbs[22]."Þ".$userbs[23]."ß".$userbs[24]."Þ".$userbs[25]."ß".$userbs[26]."Þ".$userbs[27]; }
      if ($type == tshadow) { $usercustitle = "ß".$userbs[18]."Þ".$userbs[19]."ß".$userbs[20]."Þ".$userbs[21]."ßoffÞ0ß".$userbs[24]."Þ".$userbs[25]."ß".$userbs[26]."Þ".$userbs[27]; }
      if ($type == ctitle) { $usercustitle = "ß".$userbs[18]."Þ".$userbs[19]."ß".$userbs[20]."Þ".$userbs[21]."ß".$userbs[22]."Þ".$userbs[23]."ßoffÞ0ß".$userbs[26]."Þ".$userbs[27]; }
      if (($type != tglow) && ($type != tshadow) && ($type != tcolor) && ($type != ctitle)) { $usercustitle = "ß".$userbs[18]."Þ".$userbs[19]."ß".$userbs[20]."Þ".$userbs[21]."ß".$userbs[22]."Þ".$userbs[23]."ß".$userbs[24]."Þ".$userbs[25]."ß".$userbs[26]."Þ".$userbs[27]; }
      $ussql = "update " . USERS_TABLE . " set user_effects='$usereff', user_privs='$userprs', user_custitle='$usercustitle' where username='$userdata[username]'";
      if ( !($db->sql_query($ussql)) ) { message_die(GENERAL_MESSAGE, 'Fatal Error Updating User Info!'); }
      $page_title = "Sell Special Ability";
      $title = $page_title;
      $shoplocation = ' -> <a href="'.append_sid("shop_effects.$phpEx?action=specialshop").'" class="nav">'.$shopstatarray[5].' Abilities</a> -> <a href="'.append_sid("shop_effects.$phpEx?action=specialshop").'" class="nav">Sell Special Ability</a>';
      $shopinforow = '<tr><td class="row2"><span class="gen">Your sale has been successful!</span></td></tr>';
   }

   // start of personal information
   $personal = '<tr><td class="row1" width="50%"><span class="gensmall"><a href="'.append_sid("shop.$phpEx?action=inventory&searchid=".$userdata['user_id']).'" class="navsmall">Your Inventory</a></span></td><td class="row1" align="right" width="50%"><span class="gensmall">'.$userdata['user_points'].' '.$board_config['points_name'].'</span></td></tr>';
   if (strlen($userdata['user_specmsg']) > 2) {
      $personal .= '<tr><td class="row2" colspan="2"><span class="gensmall"><font color="red">'.$userdata['user_specmsg'].'</font></span></td></tr>';
      $personal .= '<tr><td class="row2" colspan="2"><span class="gensmall"><a href="modules.php?name=Forums&file=shop&clm=true" class="gen">Clear Messages</a></span></td></tr>';
   }
   //end of personal information

   $template->assign_vars(array(
      'SHOPPERSONAL' => $personal,
      'SHOPLOCATION' => $shoplocation,
      'L_SHOP_TITLE' => $title,
      'SHOPTABLEROWS' => 1,
      'SHOPLIST' => $shopinfo,
      'SHOPINFOROW' => $shopinforow,
   ));
   $template->assign_block_vars('', array());
}

else
{
   message_die(GENERAL_MESSAGE, 'This is not a valid command!');
}

//
// Start output of page
//
include('includes/page_header.php');

//
// Generate the page
//
$template->pparse('body');

include('includes/page_tail.php');

?>


In the shop i made works but in the shop effects don´t


Back to top Reply with quote
#4   re: Shop Function not Enabled or Error in Cost!
Taut
PayPal Donation
CZ Revered Member
 Codezwiz Site Donator
Taut has been a member for over 20 year's 20 Year Member
usa.gif california.gif
Occupation: Entrepreneur
Gender: Female
Fav. Sports Team: SF Giants
Status: Offline
Joined: May 27, 2003
0.72 posts per day
Posts: 5530
Points: 481,695
   
try this, make sure to replace the extension to php



Attached Files
outk4s7_shop_effects.txt (36.35 KB, Downloaded: 5336 Time(s))


Back to top Reply with quote
#5   re: Shop Function not Enabled or Error in Cost!
0utk4s7
CZ Newbie
0utk4s7 has been a member for over 19 year's 19 Year Member
Gender: Male
Status: Offline
Joined: Feb 06, 2005
0.00 posts per day
Posts: 9
Points: 616
   
Tkz works now icon_biggrin.gif



Back to top Reply with quote
#6   
__PHANTOM__
CZ Super Newbie
__PHANTOM__ has been a member for over 19 year's 19 Year Member
usa.gif florida.gif
Age: 33
Gender: Male
Status: Offline
Joined: Dec 27, 2004
0.01 posts per day
Posts: 41
Points: 5,120
  MSN Messenger 
i dont get it... i have the same problem. what do i do to fix this?



Back to top Reply with quote
#7   re: Shop Function not Enabled or Error in Cost!
Taut
PayPal Donation
CZ Revered Member
 Codezwiz Site Donator
Taut has been a member for over 20 year's 20 Year Member
usa.gif california.gif
Occupation: Entrepreneur
Gender: Female
Fav. Sports Team: SF Giants
Status: Offline
Joined: May 27, 2003
0.72 posts per day
Posts: 5530
Points: 481,695
   
upload the shop-effects file I posted above and see if that works for you. Back-up your original files plz



Back to top Reply with quote
#8   re: Shop Function not Enabled or Error in Cost!
__PHANTOM__
CZ Super Newbie
__PHANTOM__ has been a member for over 19 year's 19 Year Member
usa.gif florida.gif
Age: 33
Gender: Male
Status: Offline
Joined: Dec 27, 2004
0.01 posts per day
Posts: 41
Points: 5,120
  MSN Messenger 
no, same error. i copied the file outk4s7 posted, still problem though icon_sad.gif



Back to top Reply with quote
#9   re: Shop Function not Enabled or Error in Cost!
Taut
PayPal Donation
CZ Revered Member
 Codezwiz Site Donator
Taut has been a member for over 20 year's 20 Year Member
usa.gif california.gif
Occupation: Entrepreneur
Gender: Female
Fav. Sports Team: SF Giants
Status: Offline
Joined: May 27, 2003
0.72 posts per day
Posts: 5530
Points: 481,695
   
no, copy the one I posted. That file has the corrections made to it...not the one that outkst posted.



Back to top Reply with quote
#10   re: Shop Function not Enabled or Error in Cost!
__PHANTOM__
CZ Super Newbie
__PHANTOM__ has been a member for over 19 year's 19 Year Member
usa.gif florida.gif
Age: 33
Gender: Male
Status: Offline
Joined: Dec 27, 2004
0.01 posts per day
Posts: 41
Points: 5,120
  MSN Messenger 
oh, lol hmm thats weird i didnt see it before lol. but now i do. i will try it hopefully it works



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