PageRenderTime 48ms CodeModel.GetById 20ms RepoModel.GetById 1ms app.codeStats 0ms

/ASTRA_Demo_Server/udrive/home/admin/www/phpMyBackupPro/sys_vars.inc.php

https://github.com/shafiqissani/ASTRA-College-Website
PHP | 264 lines | 225 code | 9 blank | 30 comment | 61 complexity | 042ed0aedda199f89967e24261baf6f3 MD5 | raw file
  1. <?php
  2. /*
  3. +--------------------------------------------------------------------------+
  4. | phpMyBackupPro |
  5. +--------------------------------------------------------------------------+
  6. | Copyright (c) 2004-2007 by Dirk Randhahn |
  7. | http://www.phpMyBackupPro.net |
  8. | version information can be found in definitions.php. |
  9. | |
  10. | This program is free software; you can redistribute it and/or |
  11. | modify it under the terms of the GNU General Public License |
  12. | as published by the Free Software Foundation; either version 2 |
  13. | of the License, or (at your option) any later version. |
  14. | |
  15. | This program is distributed in the hope that it will be useful, |
  16. | but WITHOUT ANY WARRANTY; without even the implied warranty of |
  17. | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
  18. | GNU General Public License for more details. |
  19. | |
  20. | You should have received a copy of the GNU General Public License |
  21. | along with this program; if not, write to the Free Software |
  22. | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.|
  23. +--------------------------------------------------------------------------+
  24. */
  25. // system variables are documented in documents/SYSTEM_VARIABLES.txt
  26. // set general system variables
  27. $update=FALSE;
  28. if (!isset($PMBP_SYS_VAR['last_scheduled'])) {
  29. $PMBP_SYS_VAR['last_scheduled']="";
  30. $update=TRUE;
  31. }
  32. if (!isset($PMBP_SYS_VAR['this_login'])) {
  33. $PMBP_SYS_VAR['this_login']="";
  34. $update=TRUE;
  35. }
  36. if (!isset($PMBP_SYS_VAR['last_login'])) {
  37. $PMBP_SYS_VAR['last_login']="";
  38. $update=TRUE;
  39. }
  40. if (isset($CONF['sql_passwd']) && isset($CONF['sql_user'])) {
  41. if (!isset($PMBP_SYS_VAR['security_key']) && $CONF['sql_passwd'] && $CONF['sql_user']) {
  42. $PMBP_SYS_VAR['security_key']=md5($_SERVER['PHP_SELF'].$CONF['sql_passwd'].$CONF['sql_user']);
  43. $update=TRUE;
  44. }
  45. }
  46. if (!isset($PMBP_SYS_VAR['dir_lists'])) {
  47. $PMBP_SYS_VAR['dir_lists']=1;
  48. $update=TRUE;
  49. }
  50. if (!isset($PMBP_SYS_VAR['memory_limit'])) {
  51. $PMBP_SYS_VAR['memory_limit']=9500000*4; // (less than) 4 mb
  52. $update=TRUE;
  53. }
  54. if (!isset($PMBP_SYS_VAR['except_tables'])) {
  55. $PMBP_SYS_VAR['except_tables']="";
  56. $update=TRUE;
  57. }
  58. if (!isset($PMBP_SYS_VAR['scheduled_debug'])) {
  59. $PMBP_SYS_VAR['scheduled_debug']=0;
  60. $update=TRUE;
  61. }
  62. if (!isset($PMBP_SYS_VAR['schedule_all_dbs'])) {
  63. $PMBP_SYS_VAR['schedule_all_dbs']=0;
  64. $update=TRUE;
  65. }
  66. if (!isset($PMBP_SYS_VAR['ftp_timeout'])) {
  67. $PMBP_SYS_VAR['ftp_timeout']=10;
  68. $update=TRUE;
  69. }
  70. if (!isset($PMBP_SYS_VAR['dir_email_backup'])) {
  71. $PMBP_SYS_VAR['dir_email_backup']=0;
  72. $update=TRUE;
  73. }
  74. // update login sys vars
  75. if (isset($_GET['login']) || isset($_POST['login'])) {
  76. $login_str=strftime($CONF['date'],time())." (IP: ".$_SERVER['REMOTE_ADDR'].")";
  77. if ($login_str!=$PMBP_SYS_VAR['this_login'])
  78. {
  79. $PMBP_SYS_VAR['last_login']=$PMBP_SYS_VAR['this_login'];
  80. $PMBP_SYS_VAR['this_login']=$login_str;
  81. $update=TRUE;
  82. }
  83. }
  84. // functions.inc.php
  85. if (!isset($PMBP_SYS_VAR['F_dbs'])) {
  86. $PMBP_SYS_VAR['F_dbs']="";
  87. $update=TRUE;
  88. }
  89. if (!isset($PMBP_SYS_VAR['F_comment'])) {
  90. $PMBP_SYS_VAR['F_comment']="";
  91. $update=TRUE;
  92. }
  93. if (!isset($PMBP_SYS_VAR['F_tables'])) {
  94. $PMBP_SYS_VAR['F_tables']=1;
  95. $update=TRUE;
  96. }
  97. if (!isset($PMBP_SYS_VAR['F_data'])) {
  98. $PMBP_SYS_VAR['F_data']=1;
  99. $update=TRUE;
  100. }
  101. if (!isset($PMBP_SYS_VAR['F_drop'])) {
  102. $PMBP_SYS_VAR['F_drop']=1;
  103. $update=TRUE;
  104. }
  105. if (!isset($PMBP_SYS_VAR['F_compression'])) {
  106. $PMBP_SYS_VAR['F_compression']="";
  107. $update=TRUE;
  108. }
  109. if (!isset($PMBP_SYS_VAR['F_ftp_dirs'])) {
  110. $PMBP_SYS_VAR['F_ftp_dirs']="";
  111. $update=TRUE;
  112. }
  113. if (!isset($PMBP_SYS_VAR['F_ftp_dirs_2'])) {
  114. $PMBP_SYS_VAR['F_ftp_dirs_2']="";
  115. $update=TRUE;
  116. }
  117. if (!isset($PMBP_SYS_VAR['F_packed'])) {
  118. $PMBP_SYS_VAR['F_packed']="";
  119. $update=TRUE;
  120. }
  121. if (!isset($PMBP_SYS_VAR['F_updates'])) {
  122. $PMBP_SYS_VAR['F_updates']=1;
  123. $update=TRUE;
  124. }
  125. if (!isset($PMBP_SYS_VAR['F_ffadd'])) {
  126. $PMBP_SYS_VAR['F_ffadd']=1;
  127. $update=TRUE;
  128. }
  129. // scheduled.php
  130. if (!isset($PMBP_SYS_VAR['EXS_scheduled_file'])) {
  131. $PMBP_SYS_VAR['EXS_scheduled_file']="???.php";
  132. $update=TRUE;
  133. }
  134. if (!isset($PMBP_SYS_VAR['EXS_scheduled_dir'])) {
  135. $PMBP_SYS_VAR['EXS_scheduled_dir']=0;
  136. $update=TRUE;
  137. }
  138. if (!isset($PMBP_SYS_VAR['EXS_period'])) {
  139. $PMBP_SYS_VAR['EXS_period']="";
  140. $update=TRUE;
  141. }
  142. // global_conf.php
  143. if (!isset($CONF['sitename'])) {
  144. $CONF['sitename']="mySite";
  145. $update=TRUE;
  146. }
  147. if (!isset($CONF['lang'])) {
  148. $CONF['lang']="english";
  149. $update=TRUE;
  150. }
  151. if (!isset($CONF['import_error'])) {
  152. $CONF['import_error']="1";
  153. $update=TRUE;
  154. }
  155. if (!isset($CONF['no_login'])) {
  156. $CONF['no_login']="0";
  157. $update=TRUE;
  158. }
  159. if (!isset($CONF['login'])) {
  160. $CONF['login']="0";
  161. $update=TRUE;
  162. }
  163. if (!isset($CONF['dir_backup'])) {
  164. $CONF['dir_backup']="0";
  165. $update=TRUE;
  166. }
  167. if (!isset($CONF['dir_rec'])) {
  168. $CONF['dir_rec']="1";
  169. $update=TRUE;
  170. }
  171. if (!isset($CONF['email_use'])) {
  172. $CONF['email_use']="0";
  173. $update=TRUE;
  174. }
  175. if (!isset($CONF['email'])) {
  176. $CONF['email']="";
  177. $update=TRUE;
  178. }
  179. if (!isset($CONF['ftp_use'])) {
  180. $CONF['ftp_use']="0";
  181. $update=TRUE;
  182. }
  183. if (!isset($CONF['ftp_pasv'])) {
  184. $CONF['ftp_pasv']="1";
  185. $update=TRUE;
  186. }
  187. if (!isset($CONF['ftp_del'])) {
  188. $CONF['ftp_del']="1";
  189. $update=TRUE;
  190. }
  191. if (!isset($CONF['ftp_server'])) {
  192. $CONF['ftp_server']="";
  193. $update=TRUE;
  194. }
  195. if (!isset($CONF['ftp_user'])) {
  196. $CONF['ftp_user']="";
  197. $update=TRUE;
  198. }
  199. if (!isset($CONF['ftp_passwd'])) {
  200. $CONF['ftp_passwd']="";
  201. $update=TRUE;
  202. }
  203. if (!isset($CONF['ftp_path'])) {
  204. $CONF['ftp_path']="";
  205. $update=TRUE;
  206. }
  207. if (!isset($CONF['ftp_port'])) {
  208. $CONF['ftp_port']="21";
  209. $update=TRUE;
  210. }
  211. if (!$_SESSION['multi_user_mode']) {
  212. if (!isset($CONF['sql_passwd'])) {
  213. $CONF['sql_passwd']="";
  214. $update=TRUE;
  215. }
  216. if (!isset($CONF['sql_host'])) {
  217. $CONF['sql_host']="localhost";
  218. $update=TRUE;
  219. }
  220. if (!isset($CONF['sql_user'])) {
  221. $CONF['sql_user']="";
  222. $update=TRUE;
  223. }
  224. if (!isset($CONF['sql_db'])) {
  225. $CONF['sql_db']="";
  226. $update=TRUE;
  227. }
  228. }
  229. if (!isset($CONF['date'])) {
  230. $CONF['date']="%x %X";
  231. $update=TRUE;
  232. }
  233. if (!isset($CONF['del_time'])) {
  234. $CONF['del_time']="7";
  235. $update=TRUE;
  236. }
  237. if (!isset($CONF['del_number'])) {
  238. $CONF['del_number']="5";
  239. $update=TRUE;
  240. }
  241. if (!isset($CONF['timelimit'])) {
  242. $CONF['timelimit']="60";
  243. $update=TRUE;
  244. }
  245. if (!isset($CONF['confirm'])) {
  246. $CONF['confirm']="1";
  247. $update=TRUE;
  248. }
  249. if (!isset($CONF['stylesheet'])) {
  250. $CONF['stylesheet']="standard";
  251. $update=TRUE;
  252. }
  253. // save global_conf.php
  254. if ($update) PMBP_save_global_conf();
  255. ?>