code stringlengths 1 2.01M | language stringclasses 1
value |
|---|---|
<?php
class template_detail extends theme
{
public function center()
{
$technic = $this->get('technic');
?>
<div class="center-title"><?php echo $technic->title; ?></div>
<div class="center-content">
<?php echo $technic->description; ?>
</div>
<?php
}
}
?> | PHP |
<?php
class template_listing extends theme
{
protected function head()
{
?>
<!--[if IE]>
<script type="text/javascript" language="javascript" src="js/excanvas.compiled.js"></script>
<![endif]-->
<script type="text/javascript" language="javascript" src="js/jquery.bt.min.js"></script>
<link type="text/c... | PHP |
<?php
class template_detail extends theme
{
protected function head()
{
?>
<link type="text/css" rel="stylesheet" href="templates/product/css/detail.css">
<script type="text/javascript" language="javascript" src="templates/product/js/detail.js"></script>
<?php
}
protected function center()
{
$... | PHP |
<?php
class template_guest_list extends theme
{
protected function head()
{
?>
<link type="text/css" rel="stylesheet" href="templates/project/css/project.css">
<script type="text/javascript" language="javascript" src="templates/project/js/project.js"></script>
<?php
}
protected function center()
... | PHP |
<?php
class template_guest_detail extends theme
{
protected function head()
{
?>
<link type="text/css" rel="stylesheet" href="templates/project/css/project.css">
<script type="text/javascript" language="javascript" src="templates/project/js/project.js"></script>
<?php
}
protected function center(... | PHP |
<?php
class template_guest_detail extends theme
{
protected function head()
{
?>
<link type="text/css" rel="stylesheet" href="templates/project/css/project.css">
<script type="text/javascript" language="javascript" src="templates/project/js/project.js"></script>
<?php
}
protected function center(... | PHP |
<?php
class template_customer_list extends theme
{
protected function head()
{
?>
<link type="text/css" rel="stylesheet" href="templates/project/css/project.css">
<script type="text/javascript" language="javascript" src="templates/project/js/project.js"></script>
<?php
}
protected function center... | PHP |
<?php
class template_listing extends theme
{
protected function head()
{
?>
<link type="text/css" rel="stylesheet" href="templates/pricing/css/listing.css">
<script type="text/javascript" language="javascript" src="templates/pricing/js/listing.js"></script>
<?php
}
protected function center()
{... | PHP |
<?php
class template_create extends theme
{
protected function head()
{
?>
<script type="text/javascript" language="javascript" src="js/jquery.validate.pack.js"></script>
<link type="text/css" rel="stylesheet" href="templates/pricing/css/create.css">
<script type="text/javascript" language="javascript" ... | PHP |
<?php
class template_detail extends theme
{
protected function head()
{
?>
<!--[if IE]>
<script type="text/javascript" language="javascript" src="js/excanvas.compiled.js"></script>
<![endif]-->
<script type="text/javascript" language="javascript" src="js/jquery.bt.min.js"></script>
<link type="text/cs... | PHP |
<?php
class template_listing extends theme
{
protected function head()
{
?>
<script type="text/javascript" language="javascript" src="js/jquery.validate.pack.js"></script>
<link type="text/css" rel="stylesheet" href="templates/message/css/listing.css">
<script type="text/javascript" language="javascript... | PHP |
<?php
class config_mail
{
public $from_mail = '1024i@163.com';
public $from_name = '1024 Intelligence';
public $charset = 'utf-8';
public $encoding = 'base64';
public $smtp = true;
public $smtp_host = 'smtp.163.com';
public $smtp_port = 25;
public $smtp_user = '1024i';
public $smtp_pass = '... | PHP |
<?php
class config_db
{
public $db_host = 'localhost';
public $db_user = '1024i';
public $db_pass = '1024i_10241024';
public $db_name = '1024i';
}
?> | PHP |
<?php
class config_theme
{
public $name = 'default';
}
?> | PHP |
<?php
class config_system
{
public $offline = false;
public $offline_message = '网站升级, 暂时无法访问。';
public $site_url = 'http://www.1024i.com/';
public $site_name = '1024 Intelligence 专业网站程序开发';
public $sef = true;
}
?> | PHP |
<?php
define('BONE_ROOT', dirname(__FILE__) );
define( 'DS', DIRECTORY_SEPARATOR );
require( BONE_ROOT.DS.'system'.DS.'tool.php' );
require( BONE_ROOT.DS.'system'.DS.'bone.php' );
require( BONE_ROOT.DS.'system'.DS.'worker.php' );
$worker = new worker();
$worker->start();
$worker->work();
$worker->stop();
... | PHP |
<?php
abstract class table
{
protected $table_name = '';
protected $table_key = '';
protected $error = '';
public function __construct($table_name, $table_key='id')
{
$this->table_name = $table_name;
$this->table_key = $table_key;
}
/*
绑定一个数据源, GET, POST, 或者一个数组, 对象
*/
public function bind($data)
{... | PHP |
<?php
abstract class bone
{
public static $version = '1.2'; // 系统版本号
public static $tables = null; // 保存表实例
public static $controllers = null; // 保存控制器实例
public static $models = null; // 保存模型实例
public static $templates = null; // 保存模板实例
public static $configs = null; // 保存配置文件实例
public static ... | PHP |
<?php
abstract class model
{
protected $error = null;
public function set_error($error){$this->error=$error;}
public function get_error(){return $this->error;}
} | PHP |
<?php
class database
{
static private $instance = null;
protected $error_num = 0; // 错误代码
protected $error_msg = ''; // 错误信息
protected $connection = null; // 数据库连接
protected $cursor = null; // 查询结果游标
// 构造函数 私有, 单件模式, 禁止用户创建实例
private function __construct()
{
$config = bone::get_config('db'... | PHP |
<?php
abstract class menu
{
protected $menus = array();
protected $menu_tree = null;
public function __construct()
{
}
// 添加菜单项
public function add_menu($menu_id, $parent_id, $name, $controller, $task='', $param='', $url='')
{
if(array_key_exists($menu_id, $this->menus))
{
$menu = ... | PHP |
<?php
/*
* 获取 $_GET 传送的数据
*/
function get($parameter_name=null, $default_value=null, $convert_type='string', $escape=true)
{
return request($parameter_name, $default_value, 'get', $convert_type, $escape);
}
/*
* 获取 $_POST 传送的数据
*/
function post($parameter_name=null, $default_value=null, $convert_ty... | PHP |
<?php
class worker
{
public function start()
{
// 检查网站配置, 是否暂停服务
$config = bone::get_config('system');
if($config->offline)
{
exit($config->offline_message);
}
// 启动 session
bone::get_session();
// 调用自动运行文件
$dir = dir(BONE_ROOT.DS.'autorun');
while (($file = $dir->read()) ... | PHP |
<?php
class session
{
function __construct()
{
if (session_id())
{
session_unset();
session_destroy();
}
ini_set('session.save_handler', 'files');
ini_set('session.use_trans_sid', '0');
session_cache_limiter('none');
session_start();
header('P3P: CP="NOI ADM DEV PSAi COM NAV OU... | PHP |
<?php
class user
{
public $id = 0;
public $username = '';
public $email = '';
public $name = '';
public $role = 0;
public $guest = 1;
public function is_customer()
{
return $this->role & USER_ROLE_CUSTOMER;
}
public function is_developer()
{
return $this->role & USER_ROLE_DEVELOPE... | PHP |
<?php
class template
{
protected $title = ''; // 标题
protected $meta_keyword = ''; // meta
protected $meta_description = '';
protected $data = array(); // 数据
protected $pagination = null; // 分页类
protected $editor = false; // 编辑器是否已加载
// 网站界面布局 为 false 时表示没有该区域
protected $north = true; //... | PHP |
<?php
abstract class library
{
protected $error = null;
public function set_error($error){$this->error=$error;}
public function get_error(){return $this->error;}
} | PHP |
<?php
abstract class controller
{
protected $task = null; // 当前任务名
protected $data = null; // 保存 controller 数据
protected $ajax = null; // 保存 ajax 数据
public function __construct()
{
$session = bone::get_session();
if($session->has('controller.message'))
$this->data['controller.message'] = $se... | PHP |
<?php
class model_user extends model
{
// 登陆
public function login($username, $password, $rememberme = false)
{
$session = bone::get_session();
$ip = $_SERVER["REMOTE_ADDR"];
$times = $session->get( $ip );
if( !$times ) $times=0;
$times++;
if($times>10)
{
$this->set_error('系统检测到您... | PHP |
<?php
$config = bone::get_config('system');
if($config->sef)
{
// 如果启用了搜索引擎优化, 则把网址按以下规则匹配
// {controller}-{task}-{param_name}-{param_value}-{param_name}-{param_value}.html
// 其中参数 {param_name}-{param_value} 值对不限数量
$uri = $_SERVER['REQUEST_URI'];
$start_pos = strripos($uri,'/')+1;
/*
if($start_... | PHP |
<?php
/*
@版本日期: 2010年5月30日
@著作权所有: Lou Barnes ( http://www.loubarnes.com )
获得使用本类库的许可, 您必须保留著作权声明信息.
报告漏洞,意见或建议, 请联系 Lou Barnes(iua1024@gmail.com) 或登陆 http://www.loubarnes.com
*/
class library_mail extends library
{
private $from_mail = null; // 发件邮箱
private $from_name = null; // 发件人
private $repl... | PHP |
<?php
/*
@版本日期: 2011年4月3日
@著作权所有: 1024 intelligence ( http://www.1024i.com )
获得使用本类库的许可, 您必须保留著作权声明信息.
报告漏洞,意见或建议, 请联系 Lou Barnes(iua1024@gmail.com)
*/
class library_captcha extends library
{
private $image; // 画布
private $width; // 宽度
private $height; // 高度
private $font_family; // 字体
... | PHP |
<?php
/*
@版本日期: 2010年08月28日
@著作权所有: Lou Barnes ( http://www.loubarnes.com )
获得使用本类库的许可, 您必须保留著作权声明信息.
报告漏洞,意见或建议, 请联系 Lou Barnes(iua1024@gmail.com) 或登陆 http://www.loubarnes.com
*/
class library_fso extends library
{
// 构造函数
public function __construct(){}
// 析构函数
public function __destruct()... | PHP |
<?php
include_once BONE_ROOT.DS.APP_DIR.DS.'templates'.DS.'menu'.DS.'menu.php';
class template_listing extends template_menu
{
protected function head()
{
$menu_list = $this->get('menu_list');
?>
<script type="text/javascript" language="javascript" src="templates/menu/js/listing.js"></script>
<script... | PHP |
<?php
include_once BONE_ROOT.DS.APP_DIR.DS.'templates'.DS.'menu'.DS.'menu.php';
class template_group_listing extends template_menu
{
protected function center()
{
$group_list = $this->get('group_list');
$this->toolbar();
?>
<div class="box">
<div class="box-tl"><div class="box-tr"><div clas... | PHP |
<?php
include_once BONE_ROOT.DS.APP_DIR.DS.'templates'.DS.'menu'.DS.'menu.php';
class template_edit extends template_menu
{
protected function center()
{
$group = $this->get('group');
$menu = $this->get('menu');
$this->toolbar();
?>
<div class="box">
<div class="box-tl"><div class="box-t... | PHP |
<?php
class template_menu extends theme
{
protected function toolbar()
{
$group_list = $this->get('group_list');
?>
<div class="box">
<div class="box-tl"><div class="box-tr"><div class="box-tm"></div></div></div>
<div class="box-m">
<div class="toobar">
<?php
foreach($group_list as $g... | PHP |
<?php
include_once BONE_ROOT.DS.APP_DIR.DS.'templates'.DS.'menu'.DS.'menu.php';
class template_group_edit extends template_menu
{
protected function center()
{
$group = $this->get('group');
$this->toolbar();
?>
<div class="box">
<div class="box-tl"><div class="box-tr"><div class="box-tm"></... | PHP |
<?php
include_once BONE_ROOT.DS.APP_DIR.DS.'templates'.DS.'config'.DS.'config.php';
class template_config_mail_test extends template_config
{
protected function center()
{
$this->toolbar();
$config = $this->get('config');
?>
<div class="box">
<div class="box-tl"><div class="box-tr"><div c... | PHP |
<?php
class template_config extends theme
{
protected function toolbar()
{
?>
<div class="box">
<div class="box-tl"><div class="box-tr"><div class="box-tm"></div></div></div>
<div class="box-m">
<div class="toobar">
<a href="./?controller=config&task=config_system">配置系统参数</a> | ... | PHP |
<?php
include_once BONE_ROOT.DS.APP_DIR.DS.'templates'.DS.'config'.DS.'config.php';
class template_config_mail extends template_config
{
protected function center()
{
$this->toolbar();
$config = $this->get('config');
?>
<div class="box">
<div class="box-tl"><div class="box-tr"><div class="b... | PHP |
<?php
include_once BONE_ROOT.DS.APP_DIR.DS.'templates'.DS.'config'.DS.'config.php';
class template_config_system extends template_config
{
protected function center()
{
$this->toolbar();
$config = $this->get('config');
?>
<div class="box">
<div class="box-tl"><div class="box-tr"><div class=... | PHP |
<?php
include_once BONE_ROOT.DS.APP_DIR.DS.'templates'.DS.'user'.DS.'user.php';
class template_listing extends template_user
{
protected function head()
{
?>
<script type="text/javascript" language="javascript" src="../js/pagination.class.js"></script>
<link type="text/css" rel="stylesheet" href="templ... | PHP |
<?php
include_once BONE_ROOT.DS.APP_DIR.DS.'templates'.DS.'user'.DS.'user.php';
class template_edit extends template_user
{
protected function head()
{
?>
<script type="text/javascript" language="javascript" src="templates/user/js/edit.js"></script>
<?php
}
protected function center()
{
... | PHP |
<?php
class template_user extends theme
{
protected function toolbar()
{
?>
<div class="box">
<div class="box-tl"><div class="box-tr"><div class="box-tm"></div></div></div>
<div class="box-m">
<div class="toobar">
<a href="./?controller=user&task=listing">用户列表</a> |
<a ... | PHP |
<?php
class template_dashboard extends theme
{
protected function center()
{
?>
后台管理首页
<?php
}
}
?> | PHP |
<?php
class template_login extends theme
{
public function __construct()
{
$this->north = false; //顶部
$this->south = false; //底部
}
protected function head()
{
?>
<link rel="stylesheet" href="templates/user/css/login.css">
<script type="text/javascript" language="javascript" src="templates/u... | PHP |
<?php
include_once BONE_ROOT.DS.APP_DIR.DS.'templates'.DS.'content'.DS.'content.php';
class template_listing extends template_content
{
protected function head()
{
$frontpage_id = 0;
$content_list = $this->get('content_list');
foreach($content_list as $content)
{
if($content->frontpage==1)
{
... | PHP |
<?php
include_once BONE_ROOT.DS.APP_DIR.DS.'templates'.DS.'content'.DS.'content.php';
class template_category_listing extends template_content
{
protected function head()
{
$category_list = $this->get('category_list');
?>
<script type="text/javascript" language="javascript" src="templates/content/js/... | PHP |
<?php
include_once BONE_ROOT.DS.APP_DIR.DS.'templates'.DS.'content'.DS.'content.php';
class template_edit extends template_content
{
protected function head()
{
$this->load_editor();
}
protected function center()
{
$content_id = $this->get('content_id');
$content = $this->get('content');
... | PHP |
<?php
class template_content extends theme
{
protected function toolbar()
{
?>
<div class="box">
<div class="box-tl"><div class="box-tr"><div class="box-tm"></div></div></div>
<div class="box-m">
<div class="toobar">
<a href="./?controller=content&task=listing">文章列表</a> |
... | PHP |
<?php
include_once BONE_ROOT.DS.APP_DIR.DS.'templates'.DS.'technic'.DS.'technic.php';
class template_listing extends template_technic
{
protected function head()
{
?>
<link type="text/css" rel="stylesheet" href="templates/technic/css/listing.css">
<script type="text/javascript" language="javascript" sr... | PHP |
<?php
include_once BONE_ROOT.DS.APP_DIR.DS.'templates'.DS.'technic'.DS.'technic.php';
class template_edit extends template_technic
{
protected function head()
{
$this->load_editor();
}
protected function center()
{
$technic = $this->get('technic');
$categories = $this->get('categories');
... | PHP |
<?php
class template_technic extends theme
{
protected function toolbar()
{
?>
<div class="box">
<div class="box-tl"><div class="box-tr"><div class="box-tm"></div></div></div>
<div class="box-m">
<div class="toobar">
<a href="./?controller=technic&task=listing">技术文档列表</a> |
... | PHP |
<?php
include_once BONE_ROOT.DS.APP_DIR.DS.'templates'.DS.'product'.DS.'product.php';
class template_listing extends template_product
{
protected function head()
{
$products = $this->get('products');
?>
<link type="text/css" rel="stylesheet" href="templates/product/css/listing.css">
<script type="tex... | PHP |
<?php
include_once BONE_ROOT.DS.APP_DIR.DS.'templates'.DS.'product'.DS.'product.php';
class template_edit extends template_product
{
protected function head()
{
$this->load_editor();
}
protected function center()
{
$product_id = $this->get('product_id');
$product = $this->get('product');
... | PHP |
<?php
class template_product extends theme
{
protected function toolbar()
{
?>
<div class="box">
<div class="box-tl"><div class="box-tr"><div class="box-tm"></div></div></div>
<div class="box-m">
<div class="toobar">
<a href="./?controller=product&task=listing">产品列表</a> |
... | PHP |
<?php
class config_theme
{
public $name = 'default';
}
?> | PHP |
<?php
class config_bone_webservices
{
public $uri = 'http://www.mrbone.org/webservices';
public $uri_theme = 'http://www.mrbone.org/webservices/theme';
public $uri_application = 'http://www.mrbone.org/webservices/application';
}
?> | PHP |
<?php
define( 'DS', DIRECTORY_SEPARATOR );
define( 'APP_DIR', 'admin' );
define( 'BONE_ROOT', str_replace(DS.APP_DIR,'', dirname(__FILE__)) );
require( BONE_ROOT.DS.'system'.DS.'tool.php' );
require( BONE_ROOT.DS.'system'.DS.'bone.php' );
require( BONE_ROOT.DS.APP_DIR.DS.'system'.DS.'worker.php' );
$worker =... | PHP |
<?php
class model_application extends model
{
public function get_list()
{
$db = bone::get_db();
return $db->get_object_list( 'SELECT * FROM `bone_application`' );
}
public function get_frontend_controller_list($application_id=0)
{
$db = bone::get_db();
if($application_id==0)
return $d... | PHP |
<?php
class model_config extends model
{
public function save($config, $name, $app_dir = null)
{
$vars = get_object_vars($config);
$buf = "<?php\r\n";
$buf .= 'class config_'.$name."\r\n";
$buf .= "{\r\n";
foreach($vars as $key=>$val)
{
$buf .= ' public $'.$key.' = ';
if( is_bool(... | PHP |
<?php
class model_theme extends model
{
public function get_theme_list()
{
$db = bone::get_db();
return $db->get_objects( 'SELECT * FROM `bone_theme`' );
}
public function make_default($theme_id)
{
$db = bone::get_db();
$db->execute( 'UPDATE `bone_theme` SET `is_default`=0 WHERE `is_defa... | PHP |
<?php
class model_menu extends model
{
// 获取菜单组列表
public function get_group_list()
{
$db = bone::get_db();
return $db->get_objects( 'SELECT * FROM `bone_menu_group` ORDER BY `is_backend` ASC' );
}
// 获取菜单组中总数
public function get_group_sum()
{
$db = bone::get_db();
return $db->get_resul... | PHP |
<?php
class model_user extends model
{
public function login($username, $password)
{
$session = bone::get_session();
$ip = $_SERVER["REMOTE_ADDR"];
$times = $session->get( $ip );
if( !$times ) $times=0;
$times++;
if($times>10)
{
$this->set_error('系统检测到您的登陆行为异常, 限制登陆!');
return fal... | PHP |
<?php
class controller_application extends controller_theme
{
public function __construct()
{
parent::__construct();
}
public function listing()
{
$model = bone::get_model('application', APP_DIR);
$applications = $model->get_list();
$template = bone::get_template('application.listing', ... | PHP |
<?php
class controller_config extends controller_theme
{
public function __construct()
{
parent::__construct();
}
public function config_system()
{
$config = bone::get_config('system');
$template = bone::get_template('config.config_system', APP_DIR);
$template->set_title('配置系统参数');
$... | PHP |
<?php
class controller_theme extends controller
{
public function __construct()
{
$my = bone::get_user();
if($my->guest || !isset($my->is_admin) || $my->is_admin!=1 )
{
$controller = get('controller');
$task = get('task');
if( $controller!='user' || ($task!='login' && $task!='ajax_login... | PHP |
<?php
class controller_menu extends controller_theme
{
public function __construct()
{
parent::__construct();
$model = bone::get_model('menu', APP_DIR);
$this->set_data('group_list', $model->get_group_list());
}
//菜单组列表
public function group_listing()
{
$template = bone::get_template('m... | PHP |
<?php
class controller_themes extends controller_theme
{
public function __construct()
{
parent::__construct();
}
public function listing()
{
$model = bone::get_model('theme', APP_DIR);
$theme_list = $model->get_theme_list();
$template = bone::get_template('themes.listing', APP_DIR);
... | PHP |
<?php
class controller_technic extends controller_theme
{
public function __construct()
{
parent::__construct();
}
public function listing()
{
$key = get('key', null);
$category_id = get('category_id', 0, 'int');
$model = bone::get_model('technic');
$template = bone::get_template('t... | PHP |
<?php
class controller_user extends controller_theme
{
public function __construct()
{
parent::__construct();
}
// 登陆页面
public function login()
{
$my = bone::get_user();
if(!$my->guest && isset($my->is_admin) && $my->is_admin==1)
{
$this->redirect('./?controller=user&task=dashboard');... | PHP |
<?php
class controller_product extends controller_theme
{
public function __construct()
{
parent::__construct();
}
public function listing()
{
$category_id = get('category_id', 0, 'int');
$model = bone::get_model('product', APP_DIR);
$template = bone::get_template('product.listing', AP... | PHP |
<?php
class controller_content extends controller_theme
{
public function __construct()
{
parent::__construct();
}
public function listing()
{
$category_id = get('category_id', -1, 'int');
$model = bone::get_model('content', APP_DIR);
$template = bone::get_template('content.listing', AP... | PHP |
<?php
class controller_upload extends controller_theme
{
public function __construct()
{
parent::__construct();
}
// 上传图像 jpg, gif, png
public function upload_image()
{
$template = bone::get_template('upload.upload_image', APP_DIR);
$template->set_title('上传图像文件');
$template->set_data($t... | PHP |
<?php
class table_application extends table
{
public $id = 0;
public $application_id = 0;
public $application = '';
public $name = '';
public $description = '';
public $auther = '';
public $auther_email = '';
public $auther_website = '';
public $thumbnail = '';
public $image = '';
public $install_time = 0;
... | PHP |
<?php
class table_theme extends table
{
public $id = 0;
public $theme_id = 0;
public $theme = '';
public $name = '';
public $description = '';
public $auther = '';
public $auther_email = '';
public $auther_website = '';
public $thumbnail = '';
public $image = '';
public $is_default = 0;
public $install_tim... | PHP |
<?php
class table_application_backend_controller extends table
{
public $id = 0;
public $application_id = 0;
public $tasks = '';
function __construct()
{
parent::__construct( 'bone_application_backend_controller', 'id');
}
} | PHP |
<?php
class table_application_install_log extends table
{
public $id = 0;
public $application_id = 0;
public $file = '';
function __construct()
{
parent::__construct( 'bone_application_install_log', 'id');
}
}
| PHP |
<?php
class table_application_frontend_controller extends table
{
public $id = 0;
public $application_id = 0;
public $tasks = '';
function __construct()
{
parent::__construct( 'bone_application_frontend_controller', 'id');
}
} | PHP |
<?php
class theme extends template
{
public function __construct()
{
$this->north = true; //顶部
$this->west = true; //左部
$this->center = true; //中部
$this->east = false; //无右部
$this->south = true; //底部
}
// head 头, 用于子类添加js和css
protected function head(){}
public function display(... | PHP |
<?php
class menu_main extends menu
{
public function __construct()
{
$this->add_menu(2, 0, '文章管理', 'content', 'listing', '', '');
$this->add_menu(3, 0, '用户管理', 'user', 'listing', '', '');
$this->add_menu(14, 0, '业务范围', 'product', 'listing', '', '');
$this->add_menu(15, 0, '技术文档', 'technic', ... | PHP |
<?php
class controller_captcha extends controller
{
public function __construct()
{
parent::__construct();
}
public function test()
{
$captcha = bone::get('captcha');
$captcha->set_font_color( array(255,0,255) );
$captcha->draw();
$captcha->add_point(20); // 添加20个干扰点
$captcha->add_l... | PHP |
<?php
class controller_theme extends controller
{
public function __construct()
{
$my = bone::get_user();
if($my->guest)
{
$model = bone::get_model('user');
$model->rememberme();
}
$menu_id = request('menu_id', 1);
$main_menu = bone::get_menu('main');
$foot_menu = bone::ge... | PHP |
<?php
class controller_technic extends controller_theme
{
public function __construct()
{
parent::__construct();
}
// 列表
public function listing()
{
$category_id = get('category_id', 0, 'int');
$model = bone::get_model('technic');
$template = bone::get_template('technic.listing');
... | PHP |
<?php
include_once BONE_ROOT.DS.'controllers'.DS.'vars.php';
class controller_message extends controller_theme
{
public function __construct()
{
parent::__construct();
}
// 留言列表
public function listing()
{
$template = bone::get_template('message.listing');
$template->set_title('留言');
... | PHP |
<?php
define('HOURLY_RATE',50); //工时收费
// 项目步骤
define('PROJECT_STEP_CREATE',0); //客户新建项目
define('PROJECT_STEP_SET_MANAGER',10); //管理员设置项目经理
define('PROJECT_STEP_QUOTA',20); //项目经理报价 用大力的那个时间单
define('PROJECT_STEP_REJECT_QUOTA',23); //客户拒绝报价
define('PROJECT_STEP_ACCEPT_QUOTA',27); //客户接收报价
define('PROJE... | PHP |
<?php
include_once BONE_ROOT.DS.'controllers'.DS.'vars.php';
class controller_project extends controller_theme
{
public function __construct()
{
$my = bone::get_user();
$task = get('task');
switch($task)
{
case 'guest_list':
case 'guest_detail':
break;
default:
if($my-... | PHP |
<?php
class controller_user extends controller_theme
{
public function __construct()
{
parent::__construct();
}
// 登陆页面
public function login()
{
$my = bone::get_user();
if(!$my->guest)
{
$this->redirect( url('./') );
}
$template = bone::get_template('user.login');
$templ... | PHP |
<?php
include_once BONE_ROOT.DS.'controllers'.DS.'vars.php';
class controller_team extends controller_theme
{
public function __construct()
{
parent::__construct();
}
// 团队成员列表
public function users()
{
$model = bone::get_model('team');
$users = $model->get_users(0, 3);
$template... | PHP |
<?php
class controller_product extends controller_theme
{
public function __construct()
{
parent::__construct();
}
// 业务范围
public function listing()
{
$model = bone::get_model('product');
$products = $model->get_products();
$categories = $model->get_categories();
$template = bone:... | PHP |
<?php
class controller_content extends controller_theme
{
public function __construct()
{
parent::__construct();
}
public function frontpage()
{
$id = get('id', 0, 'int');
$content = bone::get_table('content');
$content->load_frontpage();
$content->hit();
$template = bone::get_temp... | PHP |
<?php
include_once BONE_ROOT.DS.'controllers'.DS.'vars.php';
class controller_home extends controller_theme
{
public function __construct()
{
parent::__construct();
}
public function home()
{
$model = bone::get_model('team');
$team_users = $model->get_users();
$template = bone::get_te... | PHP |
<?php
include_once BONE_ROOT.DS.'controllers'.DS.'vars.php';
class controller_pricing extends controller_theme
{
public function __construct()
{
parent::__construct();
}
// 最近报价列表
public function create()
{
$model = bone::get_model('pricing');
$recent_pricings = $model->get_priced_prici... | PHP |
<?php
class table_content_category extends table
{
public $id = 0;
public $parent_id = 0;
public $name = '';
function __construct()
{
parent::__construct( 'bone_content_category', 'id');
}
} | PHP |
<?php
class table_menu_group extends table
{
public $id = 0;
public $name = '';
public $class_name = '';
public $is_backend = 0;
function __construct()
{
parent::__construct( 'bone_menu_group', 'id');
}
} | PHP |
<?php
class table_menu extends table
{
public $id = 0;
public $group_id = 0;
public $parent_id = 0;
public $name = '';
public $controller = '';
public $task = '';
public $param = '';
public $url = '';
public $ordering = 0;
function __construct()
{
parent::__construct( 'bone_menu', 'id');
}
} | PHP |
<?php
class table_technic extends table
{
public $id = 0;
public $category_id = 0;
public $title = '';
public $description = '';
public $summary = '';
public $keyword = '';
public $demo = '';
public $hits = 0;
public $create_by_id = 0;
public $create_time = 0;
public function __construct()
{
parent::__c... | PHP |
<?php
class table_technic_category extends table
{
public $id = 0;
public $name = '';
function __construct()
{
parent::__construct( 'bone_technic_category', 'id');
}
} | PHP |
<?php
class table_message extends table
{
public $id = 0;
public $user_id = 0;
public $name = '';
public $email = '';
public $title = '';
public $ip = '';
public $create_time = 0;
public $manager_id = 0;
public $reply = '';
public $reply_time = 0;
function __construct()
{
parent::__construct( 'bone_mes... | PHP |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.