Advertisement
Guest User

PHPLockit Decoded

a guest
May 26th, 2013
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.00 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_setup {
  7. function install () {
  8. $db = true;
  9. $cron = true;
  10. include(GEO_BASE_DIR.'get_common_vars.php');
  11. if (PHP5_DIR) $admin_page_loader = Singleton::getInstance('geoAdmin');
  12. else $admin_page_loader =&Singleton::getInstance('geoAdmin');
  13. $sql = "CREATE TABLE IF NOT EXISTS`geodesic_addon_GeoModules_User_Graphics_data` (
  14.             `option_id` int(11) NOT NULL default '0',
  15.             `option_value` varchar(128) NOT NULL default '',
  16.                        PRIMARY KEY ( `option_id` )
  17.         )";
  18. $result = $db->Execute($sql);
  19. if (!$result){
  20. $admin_page_loader->userError('Database execution error, installation failed.');
  21. return false;
  22. }else {
  23. $admin_page_loader->userNotice('The table geodesic_addon_addon_GeoModules_User_Graphics_data created successfully.');
  24. }
  25. $sql = "INSERT INTO `geodesic_addon_GeoModules_User_Graphics_data` (`option_id`, `option_value`) VALUES(1, '468')";
  26. $result = $db->Execute($sql);
  27. if (!$result){
  28. $admin_page_loader->userError('Database execution error, installation failed.');
  29. return false;
  30. }else {
  31. $admin_page_loader->userNotice('Banner length option created.');
  32. }
  33. $sql = "INSERT INTO `geodesic_addon_GeoModules_User_Graphics_data` (`option_id`, `option_value`) VALUES(2, '60')";
  34. $result = $db->Execute($sql);
  35. if (!$result){
  36. $admin_page_loader->userError('Database execution error, installation failed.');
  37. return false;
  38. }else {
  39. $admin_page_loader->userNotice('Banner Width option created successfully.');
  40. }
  41. $sql = "INSERT INTO `geodesic_addon_GeoModules_User_Graphics_data` (`option_id`, `option_value`) VALUES(3, '50')";
  42. $result = $db->Execute($sql);
  43. if (!$result){
  44. $admin_page_loader->userError('Database execution error, installation failed.');
  45. return false;
  46. }else {
  47. $admin_page_loader->userNotice('Logo length option created successfully.');
  48. }
  49. $sql = "INSERT INTO `geodesic_addon_GeoModules_User_Graphics_data` (`option_id`, `option_value`) VALUES(4, '50')";
  50. $result = $db->Execute($sql);
  51. if (!$result){
  52. $admin_page_loader->userError('Database execution error, installation failed.');
  53. return false;
  54. }else {
  55. $admin_page_loader->userNotice('Logo Width Font color option created successfully.');
  56. }
  57. $admin_page_loader->userSuccess('The example addon installation script completed.');
  58. return true;
  59. }
  60. function uninstall (){
  61. $db = true;
  62. $cron = true;
  63. include(GEO_BASE_DIR.'get_common_vars.php');
  64. if (PHP5_DIR) $admin_page_loader = Singleton::getInstance('geoAdmin');
  65. else $admin_page_loader =&Singleton::getInstance('geoAdmin');
  66. $sql = 'DROP TABLE IF EXISTS `geodesic_addon_GeoModules_User_Graphics_data`';
  67. $result = $db->Execute($sql);
  68. if (!$result){
  69. $admin_page_loader->userError('Database execution error, installation failed.');
  70. return false;
  71. }else {
  72. $admin_page_loader->userNotice('The table geodesic_addon_GeoModules_User_Graphics_data has been removed.');
  73. }
  74. $admin_page_loader->userSuccess('Addon un-install script completed.');
  75. return true;
  76. }
  77. };
  78. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement