<?php
require_once('../includes/config.php');
$install_version = '1.7.6';
if(isset($_GET['lang']))
{
$_POST['lang'] = $_GET['lang'];
}
if(isset($_POST['lang']))
{
require_once('lang/lang_'.$_POST['lang'].'.php');
}
// Check to see if the script is already installed
if(isset($config['installed']))
{
if($config['version'] == $install_version)
{
// Exit the script
exit('Kubelance is already installed.');
}
else
{
header('Location: upgrade_'.$config['version'].'.php');
exit;
}
}
$error = '';
// Check that their config file is writtable
if(is_writable('../includes/config.php'))
{
if(!isset($_POST['lang']))
{
$step = 2;
}
else
{
if(!isset($_POST['DBHost']))
{
$step = 3;
}
else
{
// Test the connection
if(mysql_connect($_POST['DBHost'], $_POST['DBUser'], $_POST['DBPass']))
{
if(mysql_select_db($_POST['DBName']))
{
if(isset($_POST['adminuser']))
{
if(trim($_POST['adminuser']) == '')
{
$step = 4;
}
else
{
$site_path = str_replace('\\','/',ereg_replace('install', '', dirname(__FILE__)));
$site_url = "http://" . $_SERVER['HTTP_HOST'] . ereg_replace ("index.php", "", ereg_replace ("install/", "", $_SERVER['PHP_SELF']));
// Content that will be written to the config file
$content = "<?php\n";
$content.= "\$config['db']['host'] = '".addslashes($_POST['DBHost'])."';\n";
$content.= "\$config['db']['name'] = '".addslashes($_POST['DBName'])."';\n";
$content.= "\$config['db']['user'] = '".addslashes($_POST['DBUser'])."';\n";
$content.= "\$config['db']['pass'] = '".addslashes($_POST['DBPass'])."';\n";
$content.= "\$config['db']['pre'] = '".addslashes($_POST['DBPre'])."';\n";
$content.= "\n";
$content.= "\$config['site_title'] = 'Kubelance';\n";
$content.= "\$config['site_url'] = '".addslashes($site_url)."';\n";
$content.= "\$config['admin_email'] = '';\n";
$content.= "\$config['cron_time'] = '0';\n";
$content.= "\$config['pay_type'] = '".$config['pay_type']."';\n";
$content.= "\$config['security'] = '".$config['security']."';\n";
$content.= "\$config['mailbox_en'] = '".$config['mailbox_en']."';\n";
$content.= "\n";
$content.= "\$config['currency_sign'] = '\$';\n";
$content.= "\$config['currency_code'] = 'USD';\n";
$content.= "\$config['currency_pos'] = 'BEF';\n";
$content.= "\$config['transfer_en'] = '1';\n";
$content.= "\$config['transfer_min'] = '10';\n";
$content.= "\$config['escrow_en'] = '0';\n";
$content.= "\n";
$content.= "\$config['start_amount_provider'] = '5';\n";
$content.= "\$config['start_amount_buyer'] = '5';\n";
$content.= "\$config['post_project_amount'] = '0';\n";
$content.= "\$config['post_featured_amount'] = '30';\n";
$content.= "\$config['post_job_amount'] = '40';\n";
$content.= "\$config['provider_com'] = '".addslashes(stripslashes($config['provider_com']))."';\n";
$content.= "\$config['buyer_com'] = '".addslashes(stripslashes($config['buyer_com']))."';\n";
$content.= "\$config['provider_fee'] = '".addslashes(stripslashes($config['provider_fee']))."';\n";
$content.= "\$config['buyer_fee'] = '".addslashes(stripslashes($config['buyer_fee']))."';\n";
$content.= "\$config['bid_fee'] = '0';\n";
$content.= "\$config['enable_quotes'] = '1';\n";
$content.= "\$config['multiple_accounts'] = '1';\n";
$content.= "\$config['latest_project_limit'] = '10';\n";
$content.= "\$config['featured_project_limit'] = '10';\n";
$content.= "\$config['job_listings_limit'] = '10';\n";
$content.= "\$config['mod_rewrite'] = '0';\n";
$content.= "\$config['rows_per_page'] = '15';\n";
$content.= "\$config['transfer_filter'] = '1';\n";
$content.= "\$config['provider_public_post'] = '0';\n";
$content.= "\$config['email_validation'] = '1';\n";
$content.= "\$config['userlangsel'] = '0';\n";
$content.= "\n";
$content.= "\$config['email']['type'] = '".addslashes(stripslashes($config['email']['type']))."';\n";
$content.= "\$config['email']['smtp']['host'] = '".addslashes(stripslashes($config['email']['smtp']['host']))."';\n";
$content.= "\$config['email']['smtp']['user'] = '".addslashes(stripslashes($config['email']['smtp']['user']))."';\n";
$content.= "\$config['email']['smtp']['pass'] = '".addslashes(stripslashes($config['email']['smtp']['pass']))."';\n";
$content.= "\n";
$content.= "\$config['xml']['latest'] = '".$config['xml']['latest']."';\n";
$content.= "\$config['xml']['featured'] = '".$config['xml']['featured']."';\n";
$content.= "\n";
$content.= "\$config['images']['max_size'] = '30000';\n";
$content.= "\$config['images']['max_height'] = '500';\n";
$content.= "\$config['images']['max_width'] = '200';\n";
$content.= "\n";
$content.= "\$config['cookie_time'] = '2592000';\n";
$content.= "\$config['cookie_name'] = 'KubelabsC';\n";
$content.= "\n";
$content.= "\$config['tpl_name'] = '".$config['tpl_name']."';\n";
$content.= "\$config['version'] = '".$config['version']."';\n";
$content.= "\$config['lang'] = '".addslashes($_POST['lang'])."';\n";
$content.= "\$config['temp_php'] = '".$config['temp_php']."';\n";
$content.= "\$config['installed'] = '1';\n";
$content.= "?>";
// Open the includes/config.php for writting
$handle = fopen('../includes/config.php', 'w');
// Write the config file
fwrite($handle, $content);
// Close the file
fclose($handle);
// Create admin menu table
mysql_query("CREATE TABLE `".addslashes($_POST['DBPre'])."amenu` ( `menu_id` smallint(3) unsigned NOT NULL auto_increment, `sort_id` smallint(3) unsigned NOT NULL default '0', `parent_id` smallint(3) unsigned NOT NULL default '0', `menu_title` varchar(40) NOT NULL default '', `menu_icon` varchar(100) NOT NULL default '', `menu_url` varchar(255) NOT NULL default '', `menu_target` varchar(10) NOT NULL default '', `menu_desc` varchar(100) NOT NULL default '', PRIMARY KEY (`menu_id`))");
mysql_query("INSERT INTO `".addslashes($_POST['DBPre'])."amenu` VALUES (1, 10, 0, 'Configuration', '', '', '', '');");
mysql_query("INSERT INTO `".addslashes($_POST['DBPre'])."amenu` VALUES (8, 20, 1, 'Rules', '', '', '', '');");
mysql_query("INSERT INTO `".addslashes($_POST['DBPre'])."amenu` VALUES (5, 90, 0, 'Content', '', '', '', '');");
mysql_query("INSERT INTO `".addslashes($_POST['DBPre'])."amenu` VALUES (70, 30, 1, 'Site Details', '<img src=\"images/smicon_config.gif\">', 'configuration.php', '', '');");
mysql_query("INSERT INTO `".addslashes($_POST['DBPre'])."amenu` VALUES (6, 20, 91, 'Add Page', '<img src=\"images/smicon_addrule.gif\">', 'content_add.php', '', '');");
mysql_query("INSERT INTO `".addslashes($_POST['DBPre'])."amenu` VALUES (7, 30, 91, 'Edit Page', '<img src=\"images/smicon_editrule.gif\">', 'content_edit.php', '', '');");
mysql_query("INSERT INTO `".addslashes($_POST['DBPre'])."amenu` VALUES (9, 0, 8, 'Add Rule', '<img src=\"images/smicon_addrule.gif\">', 'rules_add.php', '', '');");
mysql_query("INSERT INTO `".addslashes($_POST['DBPre'])."amenu` VALUES (10, 0, 8, 'Edit Rule', '<img src=\"images/smicon_editrule.gif\">', 'rules_edit.php', '', '');");
mysql_query("INSERT INTO `".addslashes($_POST['DBPre'])."amenu` VALUES (11, 9, 5, 'FAQ', '', '', '', '');");
mysql_query("INSERT INTO `".addslashes($_POST['DBPre'])."amenu` VALUES (14, 0, 11, 'Add Entry', '<img src=\"images/smicon_addrule.gif\">', 'faq_entry_add.php', '', '');");
mysql_q
没有合适的资源?快使用搜索试试~ 我知道了~
网上项目外包平台kubelance
共804个文件
gif:296个
php:257个
html:97个
需积分: 34 13 下载量 91 浏览量
2010-03-09
16:57:57
上传
评论
收藏 1.36MB RAR 举报
温馨提示
全球领先的网上项目外包平台,好不容易找到的。只是没有仔细测过,倒是可以安装
资源推荐
资源详情
资源评论
收起资源包目录
网上项目外包平台kubelance (804个子文件)
theme.css 8KB
style.css 3KB
style.css 2KB
editor.css 592B
Thumbs.db 7KB
sshot.gif 22KB
logo.gif 3KB
flag_en.gif 3KB
img.gif 3KB
img.gif 3KB
btnParagraph.gif 2KB
btnFontName.gif 2KB
btnPasteWord.gif 2KB
btnRemoveFormat.gif 2KB
btnPaste.gif 2KB
btnPreview.gif 2KB
btnBackColor.gif 2KB
btnImage.gif 2KB
btnPasteWord.gif 2KB
btnContentBlock.gif 2KB
btnRemoveFormat.gif 2KB
btnPaste.gif 2KB
btnPasteText.gif 2KB
btnPreview.gif 2KB
btnStyleSelect.gif 2KB
btnBackColor.gif 2KB
btnSave.gif 2KB
btnFlash.gif 2KB
btnFullScreen.gif 2KB
btnImage.gif 2KB
btnPasteText.gif 2KB
btnFontSize.gif 2KB
btnTableEdit.gif 2KB
btnForm.gif 2KB
btnStyle.gif 2KB
btnTable.gif 2KB
btnCustomTag.gif 2KB
btnStyleSelect.gif 2KB
btnSave.gif 2KB
btnFlash.gif 2KB
btnFullScreen.gif 2KB
btnCopy.gif 2KB
btnRedo.gif 2KB
btnUndo.gif 2KB
btnMedia.gif 2KB
btnSearch.gif 2KB
btnInternalLink.gif 2KB
flag_spanish.gif 2KB
btnPrint.gif 2KB
btnTableEdit.gif 2KB
btnStyle.gif 2KB
btnTable.gif 2KB
btnRedo.gif 2KB
btnUndo.gif 2KB
btnClean.gif 2KB
btnCopy.gif 2KB
btnCut.gif 2KB
btnMedia.gif 2KB
btnRTL.gif 2KB
btnForeColor.gif 2KB
btnCustomObject.gif 2KB
btnAbsolute.gif 2KB
btnLTR.gif 2KB
btnCut.gif 2KB
btnParagraph.gif 2KB
btnSpellCheck.gif 2KB
btnCustom5.gif 2KB
btnFontName.gif 2KB
btnHyperlink.gif 2KB
btnNumber.gif 2KB
btnCustom1.gif 2KB
btnCustom3.gif 2KB
btnCustom4.gif 2KB
btnCustom2.gif 2KB
btnGuideline.gif 2KB
btnCustom7.gif 2KB
btnCustom6.gif 2KB
btnDelete.gif 2KB
btnStrikethrough.gif 2KB
btnIndent.gif 2KB
btnSubscript.gif 2KB
btnBold.gif 2KB
btnUnderline.gif 2KB
btnBookmark.gif 2KB
btnSource.gif 2KB
btnSymbol.gif 2KB
btnSuperscript.gif 2KB
btnLeft.gif 2KB
btnOutdent.gif 2KB
btnList.gif 2KB
btnCenter.gif 2KB
btnFull.gif 2KB
btnItalic.gif 2KB
btnRight.gif 2KB
btnLine.gif 2KB
image_buyer.gif 2KB
btnContentBlock.gif 2KB
img_reset.gif 2KB
img_reset.gif 2KB
btnFontSize.gif 2KB
共 804 条
- 1
- 2
- 3
- 4
- 5
- 6
- 9
资源评论
qiteng9952
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功