コード例 #1
0
}
if ($missing || isset($_cancel)) {
    write_errors($config['_html_return'], $store);
    // show confirm page
} elseif (!empty($config['_html_confirm'])) {
    parse_html($config['_html_confirm'], $store);
    // perform all actions
} else {
    if ($config['_mail_to']) {
        write_mail();
    }
    if ($config['_save_csv']) {
        write_csv($config['_csv_directory'] . '/' . $config['_save_csv'] . '.csv');
    }
    if ($config['_save_database']) {
        write_database($config['_save_database']);
    }
    if ($config['_mail_confirm']) {
        write_receipt();
    }
    if (empty($config['_html_thanks'])) {
        parse_html($config['_html_return'], $store);
    } else {
        parse_html($config['_html_thanks'], $store);
    }
}
exit;
// === C O D E ==========================================================
/**
 *	make sure the script is called from this server only
 * otherwise exit to block usage
コード例 #2
0
ファイル: step2.php プロジェクト: xiuno/xiunobbs
             message(-1, "尝试创建数据库失败:{$name}");
         }
     } elseif ($db->errno != 0) {
         message(-1, $db->errstr);
     }
 } else {
     message(-1, '不支持的 type');
 }
 $r = $db->find_one("SELECT * FROM `bbs_user` LIMIT 1");
 !empty($r) and !$force and message(5, '已经安装过了。');
 !is_dir('./upload/avatar') and mkdir('./upload/avatar', 0777);
 !is_dir('./upload/forum') and mkdir('./upload/forum', 0777);
 !is_dir('./upload/attach') and mkdir('./upload/attach', 0777);
 $conf['auth_key'] = md5(time()) . md5(uniqid());
 file_put_contents('./conf/conf.php', "<?php\r\nreturn " . var_export($conf, true) . ";\r\n?>");
 write_database('./install/install.sql');
 $salt = rand(100000, 999999);
 $pwd = md5(md5($adminpass) . $salt);
 $admin = array('username' => $adminuser, 'email' => $adminemail, 'password' => $pwd, 'salt' => $salt, 'create_ip' => $longip, 'create_date' => $time);
 user_update(1, $admin);
 /*friendlink_create(array(
 		'name'         => 'Xiuno BBS',
 		'url'         => 'http://bbs.xiuno.com/',
 		'rank'         => 0,
 		'create_date'  => $time,
 	));*/
 $setting = array('sitebrief' => '', 'seo_title' => '', 'seo_keywords' => '', 'seo_description' => '', 'footer_code' => '');
 kv_set('setting', $setting);
 // 写测试数据
 if ($test_data == 1) {
     runtime_truncate();
コード例 #3
0
ファイル: install_new.php プロジェクト: Jireck-npds/npds_dune
 }
 switch ($op) {
     case 'write_database':
         global $stage, $langue, $stage6_ok, $NPDS_Prefix, $pre_tab, $sql_com;
         //        include('config.php');
         //          if (version_compare(PHP_VERSION, '5.3.0') >= 0) {
         //       include_once('lib/mysqli.php');
         //    } else{
         //       include_once('lib/mysql.php');
         //    }
         require 'install/sql/build_sql-create.php';
         build_sql_create($NPDS_Prefix);
         //        mysql_connex();
         sql_connect();
         require 'install/sql/sql-create.php';
         write_database();
         echo '
     <h3>' . ins_translate('Base de données') . '</h3>';
         if ($stage6_ok == 1) {
             $msg = 'La base de données a été créée avec succès !';
         } elseif ($stage6_ok == 0) {
             $msg = "La base de données n'a pas pu être créée. Vérifiez les paramètres ainsi que vos fichiers, puis réessayez à nouveau.";
         }
         echo '<form name="next" method="post" action="install.php">' . ins_translate($msg);
         if ($stage6_ok == 1) {
             $Xinst_log = date('d/m/y  H:j:s') . ' : Création tables et/ou base de donnée pour ' . $cms_name . "\n";
             $file = fopen("slogs/install.log", "a");
             fwrite($file, $Xinst_log);
             fclose($file);
             echo '
              <input type="hidden" name="langue" value="' . $langue . '" />
コード例 #4
0
ファイル: index.php プロジェクト: kdmurray91/stacks
// (at your option) any later version.
//
// Stacks is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Stacks.  If not, see <http://www.gnu.org/licenses/>.
//
require_once "header.php";
$database = isset($_GET['db']) ? $_GET['db'] : "";
if (strlen($database) == 0) {
    write_database_list($database);
} else {
    write_database($database);
}
function write_database_list($database)
{
    global $db_user, $db_pass, $db_host, $root_path, $img_path, $mysql_bin;
    $databases = array();
    exec("{$mysql_bin} --user={$db_user} --password={$db_pass} -h {$db_host} -N -B -e \"SHOW DATABASES LIKE '%_radtags'\"", $databases);
    $page_title = "Stacks Databases";
    write_header($page_title);
    echo <<<EOQ
<h4 class="info_head">
  <img id="sources_img" src="{$img_path}/caret-d.png" />
  <a onclick="toggle_div('sources', '{$img_path}', 'page_state');">Stacks Databases</a>
</h4>

<a name="results_top"></a>