Advertisement
Guest User

Untitled

a guest
May 15th, 2014
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.69 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by deZender.Net
  5. * @ deZender (PHP5 Decoder for SourceGuardian & phpSHIELD)
  6. *
  7. * @ Version : 1.1.6.0
  8. * @ Author : DeZender
  9. * @ Release on : 02.06.2013
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. class clsTbsLocator {
  15. public $PosBeg = false;
  16. public $PosEnd = false;
  17. public $Enlarged = false;
  18. public $FullName = false;
  19. public $SubName = '';
  20. public $SubOk = false;
  21. public $SubLst = array( );
  22. public $SubNbr = 0;
  23. public $PrmLst = array( );
  24. public $PrmIfNbr = false;
  25. public $MagnetId = false;
  26. public $BlockFound = false;
  27. public $FirstMerge = true;
  28. public $ConvProtect = true;
  29. public $ConvHtml = true;
  30. public $ConvMode = 1;
  31. public $ConvBr = true;
  32. }
  33.  
  34. class clsTbsDataSource {
  35. public $Type = false;
  36. public $SubType = 0;
  37. public $SrcId = false;
  38. public $Query = '';
  39. public $RecSet = false;
  40. public $RecKey = '';
  41. public $RecNum = 0;
  42. public $RecNumInit = 0;
  43. public $RecSaving = false;
  44. public $RecSaved = false;
  45. public $RecBuffer = false;
  46. public $CurrRec = false;
  47. public $TBS = false;
  48. public $OnDataOk = false;
  49. public $OnDataPrm = false;
  50. public $OnDataPrmDone = array( );
  51. public $OnDataPi = false;
  52.  
  53. public function DataAlert($Msg) {
  54. return $this->TBS->meth_Misc_Alert( 'when merging block ' . $this->TBS->_ChrOpen . $this->TBS->_CurrBlock . $this->TBS->_ChrClose, $Msg );
  55. }
  56.  
  57. public function DataPrepare(&$SrcId, $TBS) {
  58. $this->SrcId = &$SrcId;
  59. $this->TBS = &$TBS;
  60.  
  61. $FctInfo = false;
  62. $FctObj = false;
  63.  
  64. if (is_array( $SrcId )) {
  65. $this->Type = 0;
  66. } else {
  67. if (is_resource( $SrcId )) {
  68. $Key = get_resource_type( $SrcId );
  69. switch ($Key) {
  70. case 'mysql link': {
  71. $this->Type = 6;
  72. break;
  73. }
  74.  
  75. case 'mysql link persistent': {
  76. $this->Type = 6;
  77. break;
  78. }
  79.  
  80. case 'mysql result': {
  81. $this->Type = 6;
  82. $this->SubType = 1;
  83. break;
  84. }
  85.  
  86. case 'pgsql link': {
  87. $this->Type = 7;
  88. break;
  89. }
  90.  
  91. case 'pgsql link persistent': {
  92. $this->Type = 7;
  93. break;
  94. }
  95.  
  96. case 'pgsql result': {
  97. $this->Type = 7;
  98. $this->SubType = 1;
  99. break;
  100. }
  101.  
  102. case 'sqlite database': {
  103. $this->Type = 8;
  104. break;
  105. }
  106.  
  107. case 'sqlite database (persistent)': {
  108. $this->Type = 8;
  109. break;
  110. }
  111.  
  112. case 'sqlite result': {
  113. $this->Type = 8;
  114. $this->SubType = 1;
  115. break;
  116. }
  117.  
  118. default: {
  119. $FctInfo = $Key;
  120. $FctCat = 'r';
  121. }
  122. }
  123. } else {
  124. if (is_string( $SrcId )) {
  125. switch (strtolower( $SrcId )) {
  126. case 'array': {
  127. $this->Type = 0;
  128. $this->SubType = 1;
  129. break;
  130. }
  131.  
  132. case 'clear': {
  133. $this->Type = 0;
  134. $this->SubType = 3;
  135. break;
  136. }
  137.  
  138. case 'mysql': {
  139. $this->Type = 6;
  140. $this->SubType = 2;
  141. break;
  142. }
  143.  
  144. case 'text': {
  145. $this->Type = 2;
  146. break;
  147. }
  148.  
  149. case 'num': {
  150. $this->Type = 1;
  151. break;
  152. }
  153.  
  154. default: {
  155. $FctInfo = $SrcId;
  156. $FctCat = 'k';
  157. }
  158. }
  159. } else {
  160. if (is_object( $SrcId )) {
  161. $FctInfo = get_class( $SrcId );
  162. $FctCat = 'o';
  163. $FctObj = &$SrcId;
  164. $this->SrcId = &$SrcId;
  165. } else {
  166. if ($SrcId === false) {
  167. $this->DataAlert( 'the specified source is set to FALSE. Maybe your connection has failed.' );
  168. } else {
  169. $this->DataAlert( 'unsupported variable type : \'' . gettype( $SrcId ) . '\'.' );
  170. }
  171. }
  172. }
  173. }
  174. }
  175.  
  176.  
  177. if ($FctInfo !== false) {
  178. $ErrMsg = false;
  179.  
  180. if ($TBS->meth_Misc_UserFctCheck( $FctInfo, $FctCat, $FctObj, $ErrMsg )) {
  181. $this->Type = $FctInfo['type'];
  182.  
  183. if ($this->Type !== 5) {
  184. if ($this->Type === 4) {
  185. $this->FctPrm = array( false, 0 );
  186. $this->SrcId = &$FctInfo['open'][0];
  187. }
  188.  
  189. $this->FctOpen = &$FctInfo['open'];
  190. $this->FctFetch = &$FctInfo['fetch'];
  191. $this->FctClose = &$FctInfo['close'];
  192. }
  193. } else {
  194. $this->Type = $this->DataAlert( $ErrMsg );
  195. }
  196. }
  197.  
  198. return $this->Type !== false;
  199. }
  200.  
  201. public function DataOpen($Query) {
  202. $this->CurrRec = true;
  203.  
  204. if ($this->RecSaved) {
  205. $this->FirstRec = true;
  206. $this->RecKey = '';
  207. $this->RecNum = $this->RecNumInit;
  208.  
  209. if ($this->OnDataOk) {
  210. $this->OnDataArgs[1] = &$this->CurrRec;
  211. }
  212.  
  213. return true;
  214. }
  215. ..........................................................
  216. ................................
  217. ..............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement