Advertisement
Guest User

PHPLockit Decoded

a guest
May 25th, 2013
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 9.92 KB | None | 0 0
  1. <?php
  2. /*
  3. * Desc: This file is decoded by PHP Decoder
  4. * Website: http://phpdecoder.wordpress.com/
  5. */
  6. class addon_GeoModules_User_Graphics_admin {
  7. var $body;
  8. function init_text($language_id)
  9. {
  10. $return_var['my_account_links_label'] = array (
  11. 'name'=>'My Account Links Label',
  12. 'desc'=>'Text for Signs/Flyers link in the My Account Links module',
  13. 'type'=>'input',
  14. 'default'=>'My Logo and Banner'
  15. );
  16. $return_var['my_account_links_icon'] = array (
  17. 'name'=>'My Account Links Icon',
  18. 'desc'=>'Icon for Signs/Flyers link in the My Account Links module (complete img tag)',
  19. 'type'=>'textarea',
  20. 'default'=>''
  21. );
  22. return $return_var;
  23. }
  24. function init_pages () {
  25. menu_category::addMenuCategory('addon_GeoModules_User_Graphics_admin','','GeoModules_User_Graphics Addon Category','','','');
  26. menu_page::addonAddPage('addon_GeoModules_User_Graphics_help','addon_GeoModules_User_Graphics_admin','Help','GeoModules_User_Graphics','');
  27. menu_page::addonAddPage('addon_GeoModules_User_Graphics_setup','addon_GeoModules_User_Graphics_admin','Setup','GeoModules_User_Graphics','');
  28. }
  29. function display_addon_GeoModules_User_Graphics_help ()
  30. {
  31. $db = 1;
  32. include GEO_BASE_DIR .'get_common_vars.php';
  33. $base_URL = $db->get_site_setting('classifieds_file_name');
  34. $util = geoAddon::getUtil('GeoModules_User_Graphics');
  35. $this->body = $util->getGeoModBanner()."<br/>";
  36. $this->body .= "
  37.     <p><b><big>Initial Setup:</big></b></p>
  38.     <p>Once installed you must select the templates used to display the graphics pages to the user. Whichever
  39.     template you choose will use replace the (!MAINBODY!) contents with the display and edit contents for the
  40.     user's graphics. To do this, you can find an \"Edit Page\" link on the \"Manage Addons\" page or click
  41.     this link <a href=\" ".$base_URL."?mc=addon_management&page=addon_page_edit&addon=GeoModules_User_Graphics\">\"Edit Page\"</a>
  42.     If you do not set these templates, the pages will be blank</p><br/>
  43.    
  44.     <p><b><big>Three tags to place in your templates:</big></b></p>
  45.      
  46.     <p><b> (!addon.geo_modules.GeoModules_User_Graphics.display_user_settings_link!)</b></p>
  47.     <p>Place this tag in your User Management Home template. This page containst the links to
  48.     other account settings such as \"My Account Information\" and \"My Messages\"</p>
  49.    
  50.     <p><b> (!addon.geo_modules.GeoModules_User_Graphics.display_user_logo!)</b></p>
  51.     <p>This is the tag that displays the smaller logo graphic in each of the user's listings. You want to
  52.     place this tag in the classified/auction details templates. </p>
  53.    
  54.     <p><b>(!addon.geo_modules.GeoModules_User_Graphics.display_user_banner!)</p></b>
  55.     <p>This is generally a larger graphic such as a banner and it is displayed in the page that lists all
  56.     of the seller's listings. Place this tag in your \"Sellers Other Listings\" template.</p>
  57.    
  58.    
  59.     <p><b><font color=#ff0000> Detail Help On Setting This Addon Up </b></font></p>
  60.      <p> <font color=#008000>
  61.      1) Go To Your Template and Select the BASIC1 Template <br>
  62.      2) Turn off the HTML editor<br>
  63.      3) Copy everything in this template<br>
  64.      4) Create another template and call it (Users Ads) Paste in Here<br><br>
  65.      
  66.       Now that you have 1 new template that is identical to the basic 1 Follow these instructions<br><br>
  67.      
  68.      1) Click On Pages Management and select Browsing Listings<br>
  69.      2) Select Sellers Other Listings<br>
  70.      3) Edit Sellers Other Listings<br>
  71.      4) Select the template you create for the sellers other listings.<br><br>
  72.                  
  73.       Ok Now we have the pages connected properly. Lets drop are tags in now. <br><br>
  74.      
  75.       1) This will display the Banner Graphic in when some clicks on sellers other ads<br>
  76.       <font color=#000000>(!addon.geo_modules.GeoModules_User_Graphics.display_user_banner!)</font><font color=#008000>
  77. <br><br>
  78.       2) We will take this tag and paste it just above the MAINBODY tag in the template Sellers other listings. <br>
  79.       If you wish to center this above the listings then simple use some center html code above and below it.</font><br><br>
  80.      
  81.       <font color=#ff0000><b> Now to setup The logo of the user </font></b><br>
  82.        Setting this up is very easy. Simply take the tag <br>
  83.        <font color=#000000>(!addon.geo_modules.GeoModules_User_Graphics.display_user_logo!)</font> <br> and open the template CLASSIFIED DETAILS TEMPLATE 1 then place
  84.        this tag where you want the logo of the user to display.
  85.        
  86. <br><br>
  87. <b><font color=#ff0000>Have the Link display in the Myaccount section template so the user can add the banner and logo </font></b><br><br>
  88. 1) Copy this tag <font color=#000000>(!addon.geo_modules.GeoModules_User_Graphics.display_user_settings_link!)</font><br>
  89. 2) Goto to template and select USER MANAGEMENT CONTENT and paste it into this template.<br><br>
  90.  
  91. *NOTE* You may also wish to inform the user that there logo or banner will look much better if they make them in your settings.
  92. if the user uploads a huge photo then it may not look very clue. You can also Edit them yourself if you like. You will find them located in the
  93. userimages folder just off your main root of where geodesics index.php is. When you enter userimages folder you will also find a number. This is the number
  94. of of the user. To locate which user belong to which banners and logos simply look at the user ad. Now copy the users username. Go into your admin and click on
  95. usergroups then search users. Locate the user and then click on them. In here it will list the number of this user. So now you can find there logo and banner.
  96. A new folder is made for each user. <br><br>
  97.  
  98.  This should get you going if you are still lost contact Geomodules and I will help you out.<br><br>
  99.  
  100.        
  101.    
  102.    
  103.    
  104.     ";
  105. geoAdmin::display_page($this->body);
  106. }
  107. function display_addon_GeoModules_User_Graphics_setup ()
  108. {
  109. $db = DataAccess::getInstance();
  110. $sqlBannerLength = "SELECT option_value FROM geodesic_addon_GeoModules_User_Graphics_data WHERE option_id = 1";
  111. $BannerLength = $db->GetOne($sqlBannerLength);
  112. $sqlBannerWidth = "SELECT option_value FROM geodesic_addon_GeoModules_User_Graphics_data WHERE option_id = 2";
  113. $BannerWidth = $db->GetOne($sqlBannerWidth);
  114. $sqlLogolength = "SELECT option_value FROM geodesic_addon_GeoModules_User_Graphics_data WHERE option_id = 3";
  115. $LogoLength = $db->GetOne($sqlLogolength);
  116. $sqlLogoWidth = "SELECT option_value FROM geodesic_addon_GeoModules_User_Graphics_data WHERE option_id = 4";
  117. $LogoWidth = $db->GetOne($sqlLogoWidth);
  118. $this->body .= "<p><b><big>Set the Width and Height of the images after the user has uploaded</big></b></p>";
  119. $this->body .= "Dealer Module Style Settings<br /><br />\n";
  120. $this->body .= "<form action=\"\" method=\"POST\">
  121.                Banner Length: (in pixels, enter numbers only example 460)
  122.                <br/>
  123.                <input type=\"text\" name=\"banner_length\" /> Currently:".$BannerLength."
  124.                <br/><br/>
  125.                Banner Width: (in pixels, enter numbers only example 60)
  126.                <br/>
  127.                <input type=\"text\" name=\"banner_width\" /> Currently:".$BannerWidth."
  128.                <br/><br/>
  129.                Logo Length: (in pxels, enter numbers only example 50.)
  130.                <br/>
  131.                <input type=\"text\" name=\"logo_length\" /> Currently:".$LogoLength."
  132.                 <br/><br/>
  133.                Logo Width: (in pxels, enter numbers only example 50.)
  134.                <br/>
  135.                <input type=\"text\" name=\"logo_width\" /> Currently:".$LogoWidth."
  136.  
  137.                <br/><br/>
  138.                
  139.              
  140.                <input type=\"submit\" name=\"auto_save\" value=\"Update\" />
  141.                
  142.  
  143.  
  144.                </form>";
  145. geoAdmin::display_page($this->body);
  146. }
  147. function update_addon_GeoModules_User_Graphics_setup() {
  148. $db = DataAccess::getInstance();
  149. if ( ($_POST["settings_reset"]) == "Reset")
  150. {
  151. $sqlUpdate = "UPDATE `geodesic_addon_GeoModules_Auction_Timer_data` SET `option_id` = 1,`option_value` = '468' WHERE  `geodesic_addon_GeoModules_User_Graphics_data`.`option_id` = 1";
  152. $db->Execute($sqlUpdate);
  153. $sqlUpdate = "UPDATE `geodesic_addon_GeoModules_Auction_Timer_data` SET `option_id` = 2,`option_value` = '60' WHERE  `geodesic_addon_GeoModules_User_Graphics_data`.`option_id` = 2";
  154. $db->Execute($sqlUpdate);
  155. $sqlUpdate = "UPDATE `geodesic_addon_GeoModules_Auction_Timer_data` SET `option_id` = 3,`option_value` = '60' WHERE  `geodesic_addon_GeoModules_User_Graphics_data`.`option_id` = 3";
  156. $db->Execute($sqlUpdate);
  157. $sqlUpdate = "UPDATE `geodesic_addon_GeoModules_Auction_Timer_data` SET `option_id` = 4,`option_value` = '60' WHERE  `geodesic_addon_GeoModules_User_Graphics_data`.`option_id` = 4";
  158. $db->Execute($sqlUpdate);
  159. $this->body .= "<strong>Settings Restored to default</strong><br /><br /> ";
  160. return true;
  161. }
  162. else
  163. {
  164. if ( ($_POST["banner_length"])!= null)
  165. {
  166. $sqlBannerLength = "UPDATE geodesic_addon_GeoModules_User_Graphics_data
  167.                SET option_value='".$_POST["banner_length"]."' WHERE option_id = '1'";
  168. $db->Execute($sqlBannerLength);
  169. }
  170. if ( ($_POST["banner_width"])!= null)
  171. {
  172. $sqlBannerWidth = "UPDATE geodesic_addon_GeoModules_User_Graphics_data
  173.                SET option_value='".$_POST["banner_width"]."' WHERE option_id = '2'";
  174. $db->Execute($sqlBannerWidth);
  175. }
  176. if ( ($_POST["logo_length"])!= null)
  177. {
  178. $sqlLogolength = "UPDATE geodesic_addon_GeoModules_User_Graphics_data
  179.                SET option_value='".$_POST["logo_length"]."' WHERE option_id = '3'";
  180. $db->Execute($sqlLogolength);
  181. }
  182. if ( ($_POST["logo_width"])!= null)
  183. {
  184. $sqlLogoWidth = "UPDATE geodesic_addon_GeoModules_User_Graphics_data
  185.                SET option_value='".$_POST["logo_width"]."' WHERE option_id = '4'";
  186. $db->Execute($sqlLogoWidth);
  187. }
  188. $this->body .= "<strong>Settings saved</strong><br /><br /> ";
  189. return true;
  190. geoAdmin::display_page($this->body);
  191. }
  192. }
  193. };
  194. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement