Parse error: syntax error , unexpected ';' 18...
本帖最后由 zzr 于 2015-4-1 16:38 编辑解密出来的,没看出哪里错了。。。
大家别回复了。。。沉贴吧。。。
[*]_tpl->assign( 'row', $list );
[*] daocall( 'vhostinfo', 'getDomain', array( $list['name'] ) );
[*] $list = ;
[*] $this->_tpl->assign( 'list', $list );
[*] return true;
[*] }
[*]
[*] return false;
[*] }
[*]
[*] /**
[*] * name 如果为域名,则为单个搜索,传入string $search_key
[*] * 如果不是域名,则为like搜索.传入数组$search_key
[*] */
[*] function pageVhost() {
[*] $search_key = null;
[*]
[*] if ($_REQUEST['name']) {
[*] trim( $_REQUEST['name'] );
[*] $name = ;
[*]
[*] if (strchr( $name, '.' )) {
[*] daocall( 'vhostinfo', 'findDomain', array( $name ) );
[*] $domain = ;
[*]
[*] if ($domain) {
[*] $domain['vhost'];
[*] $search_key = ;
[*] }
[*] }
[*]else {
[*] $search_key['name'] = $name;
[*] }
[*] }
[*]
[*] intval( $_REQUEST['page'] );
[*] $page = ;
[*]
[*] if ($page _tpl->assign( 'count', $count );
[*]
[*] if (is_array( $products )) {
[*] foreach ($products as ) {
[*] ;
[*] $product = ;
[*] $p[$product['id']] = $product;
[*] }
[*] }
[*]
[*] $p['0'] = array( 'product_name' => '自由类型' );
[*] $this->_tpl->assign( 'product', $p );
[*] $this->_tpl->assign( 'username', getRole( 'user' ) );
[*] $this->_tpl->assign( 'name', $name );
[*] $this->_tpl->assign( 'count', $count );
[*] $this->_tpl->assign( 'total_page', $total_page );
[*] $this->_tpl->assign( 'page', $page );
[*] $this->_tpl->assign( 'page_count', $page_count );
[*] $this->_tpl->assign( 'list', $list );
[*] $this->_tpl->display( 'vhostproduct/listVhost.html' );
[*] }
[*]
[*] /**
[*] * 删除无用域名
[*] */
[*] function delExpireDomain() {
[*] daocall( 'vhostinfo', 'selectExpireDomain', array( 'vhost', 'name' ) );
[*] $vhosts = ;
[*]
[*] if (is_array( $vhosts )) {
[*] foreach ($vhosts as ) {
[*] ;
[*] $vhost = ;
[*] echo '正在删除' . $vhost['vhost'] . '域名信息
';
[*] daocall( 'vhostinfo', 'delAllInfo', array( $vhost['vhost'] ) );
[*] }
[*] }
[*]
[*] exit( '删除完成' );
[*] }
[*]
[*] /**
[*] * 删除主机
[*] */
[*] function del() {
[*] trim( $_REQUEST['name'] );
[*] $vhost = ;
[*] $json['code'] = 400;
[*] @apicall( 'cdn', 'delCdnAccessFile', array( $vhost ) );
[*]
[*] if (@apicall( 'vhost', 'del', array( 'localhost', $vhost ) )) {
[*] $json['code'] = 200;
[*] }
[*]else {
[*] if ($GLOBALS['last_error']) {
[*] $json['msg'] = $GLOBALS['last_error'];
[*] }
[*] }
[*]
[*] exit( json_encode( $json ) );
[*] }
[*]
[*] /**
[*] * 暂停主机或开通
[*] */
[*] function setStatus() {
[*] trim( $_REQUEST['name'] );
[*] $vhost = ;
[*] $json['code'] = 400;
[*]
[*] if (!$vhost) {
[*] $json['msg'] = '参数name不能为空';
[*] exit( json_encode( $json ) );
[*] }
[*]
[*] daocall( 'vhost', 'getNode', array( $vhost ) );
[*] $node = ;
[*]
[*] if (!$node) {
[*] $json['msg'] = '获取节点信息失败';
[*] exit( json_encode( $json ) );
[*] }
[*]
[*]
[*] if (apicall( 'vhost', 'changeStatus', array( $node, $vhost, $_REQUEST['status'] ) )) {
[*] $json['code'] = 200;
[*] }
[*]
[*] exit( json_encode( $json ) );
[*] }
[*]
[*] /**
[*] * 重建虚拟主机
[*] */
[*] function resync() {
[*] $vhost = trim( $_REQUEST['name'] );
[*] $json['code'] = 400;
[*]
[*] if (!$vhost) {
[*] $json['msg'] = '参数name不能为空';
[*] exit( json_encode( $json ) );
[*] }
[*]
[*]
[*] if (apicall( 'vhost', 'resync', array( $vhost ) )) {
[*] $json['code'] = 200;
[*] }
[*]
[*] exit( json_encode( $json ) );
[*] }
[*]
[*] /**
[*] * 重设密码
[*] */
[*] function randPassword() {
[*] $_REQUEST['name'];
[*] $vhost = ;
[*] getRandPasswd();
[*] $passwd = ;
[*] daocall( 'vhost', 'getVhost', array( $vhost ) );
[*] $node = ;
[*] $node['node'] = 'localhost';
[*]
[*] if (apicall( 'vhost', 'changePassword', array( $node['node'], $vhost, $passwd ) )) {
[*] exit( '成功,新密码: ' . $passwd );
[*] return null;
[*] }
[*]
[*] exit( '重设密码出错' );
[*] }
[*]
[*] /**
[*] * 重设数据库密码
[*] */
[*] function randDbPassword() {
[*] $_REQUEST['name'];
[*] $vhost = ;
[*] daocall( 'vhost', 'getVhost', array( $vhost, array( 'db_quota', 'uid' ) ) );
[*] $node = ;
[*] $node['node'] = 'localhost';
[*]
[*] if (( !$node && $node['db_quota'] == 0 )) {
[*] $msg = '重设数据库密码出错,该产品没有数据库。';
[*] }
[*]else {
[*] getRandPasswd();
[*] $passwd = ;
[*] apicall( 'nodes', 'makeDbProduct', array( $node['node'] ) );
[*] $db = ;
[*]
[*] if (( $db && $db->password( $node['uid'], $passwd ) )) {
[*] $msg = '新数据库密码是: ' . $passwd;
[*] }
[*]else {
[*] $msg = '重设数据库密码出错,请联系管理员。';
[*] }
[*] }
[*]
[*] $this->_tpl->assign( 'msg', $msg );
[*] return $this->showVhost();
[*] }
[*]
[*] /**
[*] * 模拟登陆
[*] */
[*] function impLogin() {
[*] registerRole( 'vhost', $_REQUEST['name'] );
[*] header( 'Location: /vhost/' );
[*] exit();
[*] }
[*] }
[*]
[*]?>复制代码
if (is_array( $products )) {
foreach ($products as ) {
;
$product = ;
$p[$product['id']] = $product;
}
}
这一段是什么鬼? 错的一 B $list = ;这是what ? $passwd = ; 这是啥? 哪个爹交你这么写过? $vhost = ; daocall( 'vhost', 'getVhost', array( $vhost, array( 'db_quota', 'uid' ) ) ); $node = ;
页:
[1]