(file) Return to func_editconf.php CVS log (file) (dir) Up to [RizwankCVS] / geekymedia_web / mysqlinks / lib

 1 rizwank 1.1 <?php
 2             //get set
 3             include('./config.php');
 4             
 5             // get authorised
 6             include('./validate.php');
 7             
 8             // get connected
 9             include('./database.php');
10             
11             ?>
12             <?php
13             
14             $cfg = "config.php";
15             
16             $newconfig = "<?php\r\n";
17             $newconfig .= "// please enter the path to the folder where you have installed MySQLinks on the following line.\r\n";
18             $newconfig .= " \$mysqvars['path'] = \"{$HTTP_POST_VARS['mysqvars']['path']}\";\r\n";
19             $newconfig .= "\r\n";	
20             $newconfig .= "// please enter the URL to which you have installed MySQLinks on the following line.\r\n";
21             $newconfig .= "// make sure to end with a slash or your MySQLinks WILL NOT WORK properly!\r\n";
22 rizwank 1.1 $newconfig .= " \$mysqvars['url'] = \"{$HTTP_POST_VARS['mysqvars']['url']}\";\r\n";
23             $newconfig .= "\r\n";
24             $newconfig .= "// please enter the name of the category you would like shown as default on the following line.\r\n";
25             $newconfig .= "// note: this is case sensitive.\r\n";
26             $newconfig .= " \$mysqvars['default_category'] = \"{$HTTP_POST_VARS['mysqvars']['default_category']}\";\r\n";
27             $newconfig .= "\r\n";
28             $newconfig .= "// set the filename that you would like to use for checking for recently updated blogs.\r\n";
29             $newconfig .= "// refer to the MySQLinks Help for more information about this.\r\n";
30             $newconfig .= " \$mysqvars['xml'] = \"{$HTTP_POST_VARS['mysqvars']['xml']}\";\r\n";
31             $newconfig .= "\r\n";
32             $newconfig .= "// please enter the number of columns that you would like your links to be listed in on the following line.\r\n";
33             $newconfig .= " \$mysqvars['columns'] = \"{$HTTP_POST_VARS['mysqvars']['columns']}\";\r\n";
34             $newconfig .= "\r\n";
35             $newconfig .= "// type a security code for using mysqlinc (to prevent other people including your links in their pages).\r\n";
36             $newconfig .= " \$mysqvars['incpw'] = \"{$HTTP_POST_VARS['mysqvars']['incpw']}\";\r\n";
37             $newconfig .= "\r\n";
38             $newconfig .= "// please enter the database username between the quotes on the following line.\r\n";
39             $newconfig .= " \$mysqdb['user'] = \"{$HTTP_POST_VARS['db']['user']}\";\r\n";
40             $newconfig .= "\r\n";
41             $newconfig .= "// please enter the database password between the quotes on the following line.\r\n";
42             $newconfig .= " \$mysqdb['pass'] = \"{$HTTP_POST_VARS['db']['pass']}\";\r\n";
43 rizwank 1.1 $newconfig .= "\r\n";
44             $newconfig .= "// please enter the database name between the quotes on the following line.\r\n";
45             $newconfig .= " \$mysqdb['name'] = \"{$HTTP_POST_VARS['db']['name']}\";\r\n";
46             $newconfig .= "\r\n";
47             $newconfig .= "// please enter the database server name between the quotes on the following line.\r\n";
48             $newconfig .= " \$mysqdb['host'] = \"{$HTTP_POST_VARS['db']['host']}\";\r\n";
49             $newconfig .= "\r\n";
50             $newconfig .= "// MySQLinks username\r\n";
51             $newconfig .= " \$mysquser['name'] = \"{$HTTP_POST_VARS['user']['name']}\";\r\n";
52             $newconfig .= "\r\n";
53             $newconfig .= "// MySQLinks password\r\n";
54             		if (($HTTP_POST_VARS['user']['pass_new'] != "") &&  ($HTTP_POST_VARS['user']['pass_ver'] != "") && ($HTTP_POST_VARS['user']['pass_new'] == $HTTP_POST_VARS['user']['pass_ver'])) {
55             			// they want a new password, both boxes are filled in and they are the same.
56             			$crypted = crypt($HTTP_POST_VARS['user']['pass_new'],'jl');
57             			$newconfig .= " \$mysquser['pass'] = \"$crypted\";\r\n";			
58             			} else {
59             			// no new pass, or passwords don't match
60             			$newconfig .= " \$mysquser['pass'] = \"{$HTTP_POST_VARS['user']['pass_old']}\";\r\n";
61             			}
62             
63             
64 rizwank 1.1 $newconfig .= "\r\n";
65             $newconfig .= "// MySQLinks real name\r\n";
66             $newconfig .= " \$mysquser['rname'] = \"{$HTTP_POST_VARS['user']['rname']}\";\r\n";
67             $newconfig .= "\r\n";
68             $newconfig .= "// MySQLinks user email\r\n";
69             $newconfig .= " \$mysquser['mail'] = \"{$HTTP_POST_VARS['user']['mail']}\";\r\n";
70             $newconfig .= "\r\n";
71             $newconfig .= "?>";
72             
73             
74             
75             
76             $write = fopen($cfg,'w');
77             fwrite($write,$newconfig);
78             fclose($write);
79             
80             $go = "Location: " . $HTTP_POST_VARS['mysqvars']['url'] . "admin.php?func=4&msg=89";
81             header($go);
82             
83             ?>

Rizwan Kassim
Powered by
ViewCVS 0.9.2