Advertisement
Guest User

Untitled

a guest
May 4th, 2016
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.04 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. if (!session_id( )) {
  15. session_start( );
  16. }
  17.  
  18. require_once( 'locale.php' );
  19. include_once( 'security.php' );
  20. include_once( 'display.php' );
  21. require_once( 'utils.php' );
  22. include_once( 'checkDate.js' );
  23. include_once( 'sharedUserAdmin.php' );
  24. $checkiphone = strpos( $_SERVER['HTTP_USER_AGENT'], 'iPhone' );
  25. $checkandroid = strpos( $_SERVER['HTTP_USER_AGENT'], 'Android' );
  26. $checkpalmpre = strpos( $_SERVER['HTTP_USER_AGENT'], 'webOS' );
  27. $checkberry = strpos( $_SERVER['HTTP_USER_AGENT'], 'BlackBerry' );
  28. $checknokia = strpos( $_SERVER['HTTP_USER_AGENT'], 'Nokia' );
  29. $checksonye = strpos( $_SERVER['HTTP_USER_AGENT'], 'SonyEricsson' );
  30. $checkipod = strpos( $_SERVER['HTTP_USER_AGENT'], 'iPod' );
  31. $checkipad = strpos( $_SERVER['HTTP_USER_AGENT'], 'iPad' );
  32.  
  33. if (( ( ( ( ( ( $checkiphone || $checkandroid ) || $checkipod ) || $checkipad ) || $checknokia ) || $checksonye ) || $checkberry )) {
  34. header( 'Location: iPhone.php' );
  35. } else {
  36. $study = 'study';
  37. $dir = dirname( $_SERVER['SCRIPT_FILENAME'] );
  38. $dir = substr( $dir, 0, strlen( $dir ) - 3 );
  39. $bypass = $dir . 'blank.easyWebpage.code';
  40.  
  41. if (( ( file_exists( $bypass ) && !isset( $_GET['settingCookies'] ) ) && strlen( $_GET['pageNumber'] ) == 0 )) {
  42. $study = '1';
  43. }
  44.  
  45. $dbcon = new MyConnection( );
  46. $database = $dbcon->database;
  47. $username = $dbcon->username;
  48. $queryexists1 = 'CREATE TABLE IF NOT EXISTS rvaeforward (id int(11) NOT NULL AUTO_INCREMENT, username char(25) NOT NULL, dbname char(255) NOT NULL, status smallint(1) NOT NULL, PRIMARY KEY (`id`))';
  49. $queryexists2 = 'CREATE TABLE IF NOT EXISTS rvsecurity (id smallint(6) NOT NULL AUTO_INCREMENT, function char(64) NOT NULL, description char(255) NOT NULL, status tinyint(1) DEFAULT NULL, minchar smallint(2) DEFAULT NULL, PRIMARY KEY (`id`))';
  50. $queryexists3 = 'CREATE TABLE IF NOT EXISTS rviqview (id int(11) NOT NULL AUTO_INCREMENT, function char(64) NOT NULL, description char(255) NOT NULL, status smallint(1) NOT NULL, PRIMARY KEY (`id`))';
  51. $queryexists4 = 'CREATE TABLE IF NOT EXISTS `rviqviewcall` (id smallint(6) NOT NULL AUTO_INCREMENT, computername char(255) NOT NULL, description char(255) DEFAULT NULL, iqviewurl char(255) DEFAULT NULL, PRIMARY KEY (`id`))';
  52. $resultCount1 = $dbcon->query( $queryexists1 );
  53. $resultCount2 = $dbcon->query( $queryexists2 );
  54. $resultCount3 = $dbcon->query( $queryexists3 );
  55. $resultCount4 = $dbcon->query( $queryexists4 );
  56. $resultCount2bb = $dbcon->query( 'SELECT * FROM rviqview' );
  57. $resultCount2aaa = $dbcon->num_rows( $resultCount2bb );
  58.  
  59. if ($resultCount2aaa == 0) {
  60. $queryinsert2a = 'INSERT INTO rvsecurity (id, function, description, status, minchar) VALUES
  61. (1, \'complexity\', \'Activate the password complexity mode\', 1, NULL),
  62. (2, \'length\', \'Define the minimum number of characters for the password\', 0, 5),
  63. (3, \'uppercase\', \'The password must feature at least one uppercase\', 0, NULL),
  64. (4, \'lowercase\', \'The password must feature at least one lowercase\', 0, NULL),
  65. (5, \'numbers\', \'The password must feature at least one number\', 0, NULL),
  66. (6, \'specialchar\', \'The password must feature at least one special character\', 0, NULL)';
  67. $resultCountInsert2a = $dbcon->query( $queryinsert2a );
  68. $queryinsert3a = 'INSERT INTO rviqview (id, function, description, status) VALUES (1, \'iqcall\', \'Active iQ-VIEW call instead of iQ-X\', 1)';
  69. $resultCountInsert3a = $dbcon->query( $queryinsert3a );
  70. $todososusers = $dbcon->query( 'SELECT * FROM privilege' );
  71.  
  72. while ($rowusers = $dbcon->fetch_row( $todososusers )) {
  73. $actualuser = $rowusers[0];
  74. addPrivilege( $database, $actualuser, $error );
  75. }
  76. }
  77.  
  78. function calculation($checkNumber, $checkFunction) {
  79. settype( $checkNumber, 'string' );
  80.  
  81. if ($checkFunction == 0) {
  82. $checkRes = 1;
  83. for ($i = 0; $i < strlen( $checkNumber ); $i++) {
  84. $checkRes = $checkRes * $checkNumber[$i];
  85. }
  86.  
  87. $checkRes = $checkRes / $i;
  88. } else {
  89. if ($checkFunction == 1) {
  90. $checkRes = 0;
  91. for ($i = 0; $i < strlen( $checkNumber ); $i++) {
  92. $checkRes = $checkRes + $checkNumber[$i];
  93. }
  94. } else {
  95. return false;
  96. }
  97. }
  98.  
  99. return $checkRes;
  100. }
  101.  
  102. function getPatientsAge($birthdate) {
  103. list( $year, $month, $day ) = explode( '-', $birthdate );
  104. $year_diff = date( 'Y' ) - $year;
  105. $month_diff = date( 'm' ) - $month;
  106. $day_diff = date( 'd' ) - $day;
  107.  
  108. if (( ( $day_diff < 0 && $month_diff == 0 ) || $month_diff < 0 )) {
  109. $year_diff--;
  110. }
  111.  
  112. return $year_diff;
  113. }
  114.  
  115. function sortItems($array, $order = 'ASC') {
  116. if (( is_array( $array ) && 0 < count( $array ) )) {
  117. foreach (array_keys( $array ) as $key) {
  118. $temp[$key] = $array[$key];
  119. ................................................................
  120. ............................
  121. .........
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement