Beispiel #1
0
            }
    */
    if ($_FILES['imgfile']['error'] == UPLOAD_ERR_OK) {
        $filename = "module/lovestation/templates/default/images/carrelaxbargame/" . $_FILES['imgfile']['name'];
        $data['imgfile'] = $filename;
        //上传图片处理结束
    }
    $data['href'] = $href;
    $data['introduce'] = $introduce;
    $data['dateline'] = time();
    $whearr['id'] = $id;
    updatetable("cargames", $data, $whearr);
    MooMessageAdmin("更新成功", 'index.php?action=lovestation&h=carrelaxbargame');
    exit;
}
if (!checkGroup('lovestation', $h)) {
    MooMessageAdmin('您没有此操作的权限', 'index.php');
}
$h = MooGetGPC('h', 'string', 'G');
//日志变更类型
/*
$matchmaker_msg_array=array(0=>'处罚',1=>'奖励','3'=>'PK胜利','4'=>'PK失败','5'=>'PK资本支付','6'=>'PK资本返还');
if(!checkGroup('matchmaker',$h)){
    if(in_array($h,array('config_list','to_rewards','want_pk','my_pk','pk_me','pk_list','mylog','reward_log','isAuthRewards'))){
        exit('您没有此操作的权限');
    }else{
        exit(json_encode(array('flag'=>0,'msg'=>'您没有此操作的权限')));
    }
}
*/
switch ($h) {
Beispiel #2
0
 *
 * $Id: activate.php 10925 2011-09-02 14:12:02Z c_schmitz $
 */
//Ensure script is not run directly, avoid path disclosure
include_once "login_check.php";
//Login Check dies also if the script is started directly
include_once "activate_functions.php";
$postsid = returnglobal('sid');
$activateoutput = '';
$qtypes = getqtypelist('', 'array');
if (!isset($_POST['ok']) || !$_POST['ok']) {
    if (isset($_GET['fixnumbering']) && $_GET['fixnumbering']) {
        fixNumbering($_GET['fixnumbering']);
    }
    // Check consistency for groups and questions
    $failedgroupcheck = checkGroup($postsid);
    $failedcheck = checkQuestions($postsid, $surveyid, $qtypes);
    //IF ANY OF THE CHECKS FAILED, PRESENT THIS SCREEN
    if (isset($failedcheck) && $failedcheck || isset($failedgroupcheck) && $failedgroupcheck) {
        $activateoutput .= "<br />\n<div class='messagebox ui-corner-all'>\n";
        $activateoutput .= "<div class='header ui-widget-header'>" . $clang->gT("Activate Survey") . " ({$surveyid})</div>\n";
        $activateoutput .= "<div class='warningheader'>\n" . $clang->gT("Error") . "<br />\n";
        $activateoutput .= $clang->gT("Survey does not pass consistency check") . "</div>\n";
        $activateoutput .= "<p>\n";
        $activateoutput .= "<strong>" . $clang->gT("The following problems have been found:") . "</strong><br />\n";
        $activateoutput .= "<ul>\n";
        if (isset($failedcheck) && $failedcheck) {
            foreach ($failedcheck as $fc) {
                $activateoutput .= "<li> Question qid-{$fc[0]} (\"<a href='{$scriptname}?sid={$surveyid}&amp;gid={$fc['3']}&amp;qid={$fc['0']}'>{$fc[1]}</a>\"){$fc[2]}</li>\n";
            }
        }
Beispiel #3
0
        $data['province'] = MooGetGPC('province', 'integer', 'P');
        $data['activity_img'] = 'module/activity/templates/default/images/activity_new/' . MooGetGPC('img', 'string', 'P');
        $data['href'] = 'index.php?n=activity&h=' . MooGetGPC('href', 'string', 'P');
        $data['city'] = MooGetGPC('city', 'integer', 'P');
        $data['place'] = htmlspecialchars(trim(MooGetGPC('place', 'string', 'P')));
        $data['profile'] = htmlspecialchars(trim(MooGetGPC('profile', 'string', 'P')));
        $data['introduction'] = htmlspecialchars(trim(MooGetGPC('introduction', 'string', 'P')));
        updatetable('activity', $data, $where);
        MooMessageAdmin('活动修改成功', 'index.php?action=active_activity&h=edit&id=' . $id);
    }
    $sql = 'SELECT `type`,`title`,`price`,`price_online`,`starttime`,`endtime`,`opentime`,`closetime`,`issex`,`province`,`city`,`place`,`profile`,`introduction` from `' . $GLOBALS['dbTablePre'] . 'activity` where `id`=' . $id;
    $data = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql);
    require adminTemplate('active_activity_detail');
}
$h = MooGetGPC('h', 'string', 'G');
$h_array = array('list', 'add', 'edit');
$h = in_array($h, $h_array) ? $h : 'list';
if (!checkGroup('active_activity', $h)) {
    MooMessageAdmin('您没有此操作的权限', 'index.php?action=active_activity');
}
switch ($h) {
    case 'list':
        active_activity_list();
        break;
    case 'add':
        active_activity_add();
        break;
    case 'edit':
        active_activity_edit();
        break;
}
Beispiel #4
0
    $currenturl = preg_replace("/(&page=\\d+)/", "", $currenturl);
    $currenturl = preg_replace("/(&type=undealed)/", "", $currenturl);
    $currenturl = preg_replace("/(&type=dealed)/", "", $currenturl);
    $currenturl = preg_replace("/(&type=all)/", "", $currenturl);
    $currenturl2 = $currenturl;
    $currenturl = $currenturl . "&type={$type}";
    $pages = multipage($total['num'], $limit, $page, $currenturl);
    //note 跳转到某一页
    $page_num = ceil($total['num'] / $limit);
    //note 插入日志
    serverlog(1, $GLOBALS['dbTablePre'] . 'service_leer', "{$GLOBALS['username']}查看秋波列表", $GLOBALS['adminid']);
    require adminTemplate('active_leer_list');
}
/***********************************************控制层(C)*****************************************/
$h = MooGetGPC('h', 'string', 'G') == '' ? 'list' : MooGetGPC('h', 'string', 'G');
//note 动作列表
$hlist = array('list');
//note 判断页面是否存在
if (!in_array($h, $hlist)) {
    MooMessageAdmin('您要打开的页面不存在');
}
//note 判断是否有权限
if (!checkGroup('active_leer', $h)) {
    MooMessageAdmin('您没有此操作的权限');
}
switch ($h) {
    //note 秋波列表
    case 'list':
        active_leer_list();
        break;
}
Beispiel #5
0
    }
    $total = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql);
    $user_arr = $GLOBALS['_MooClass']['MooMySQL']->getAll($sql_detail);
    $currenturl = "index.php?action=active_uplink&h=list&choose={$choose}&keyword={$keyword}&startdate={$startdate}&enddate={$enddate}";
    $currenturl = $currenturl . "&type={$type}";
    $pages = multipage($total['num'], $limit, $page, $currenturl);
    //note 跳转到某一页
    $page_num = ceil($total['num'] / $limit);
    //note 插入日志
    serverlog(1, $GLOBALS['dbTablePre'] . 'servies', "{$GLOBALS['username']}查看会员上行列表", $GLOBALS['adminid']);
    //note 载入模块
    require adminTemplate('active_uplink_list');
}
/***********************************************控制层(C)*****************************************/
$h = MooGetGPC('h', 'string', 'G') == '' ? 'list' : MooGetGPC('h', 'string', 'G');
//note 动作列表
$hlist = array('list');
//note 判断页面是否存在
if (!in_array($h, $hlist)) {
    MooMessageAdmin('您要打开的页面不存在', 'index.php?action=site_media');
}
//note 判断是否有权限
if (!checkGroup('active_uplink', $h)) {
    MooMessageAdmin('您没有此操作的权限', 'index.php?action=site&h=site_media');
}
switch ($h) {
    //note 委托列表
    case 'list':
        active_uplink_list();
        break;
}
Beispiel #6
0
    $currenturl = preg_replace("/(&page=\\d+)/", "", $currenturl);
    $currenturl = preg_replace("/(&type=undealed)/", "", $currenturl);
    $currenturl = preg_replace("/(&type=dealed)/", "", $currenturl);
    $currenturl = preg_replace("/(&type=all)/", "", $currenturl);
    $currenturl2 = $currenturl;
    $currenturl = $currenturl . "&type={$type}";
    $pages = multipage($total['num'], $limit, $page, $currenturl);
    //note 跳转到某一页
    $page_num = ceil($total['num'] / $limit);
    //note 插入日志
    serverlog(1, $GLOBALS['dbTablePre'] . 'members_search', "{$GLOBALS['username']}操作会员委托", $GLOBALS['adminid']);
    require adminTemplate('active_commission_list');
}
/***********************************************控制层(C)*****************************************/
$h = MooGetGPC('h', 'string', 'G') == '' ? 'list' : MooGetGPC('h', 'string', 'G');
//note 动作列表
$hlist = array('list');
//note 判断页面是否存在
if (!in_array($h, $hlist)) {
    MooMessageAdmin('您要打开的页面不存在');
}
//note 判断是否有权限
if (!checkGroup('active_commission', $h)) {
    MooMessageAdmin('您没有此操作的权限');
}
switch ($h) {
    //note 委托列表
    case 'list':
        active_commission_list();
        break;
}
Beispiel #7
0
    $currenturl = preg_replace("/(&type=undealed)/", "", $currenturl);
    $currenturl = preg_replace("/(&type=dealed)/", "", $currenturl);
    $currenturl = preg_replace("/(&type=all)/", "", $currenturl);
    $currenturl2 = $currenturl;
    $currenturl = $currenturl . "&type={$type}";
    $pages = multipage($total['num'], $limit, $page, $currenturl);
    //note 跳转到某一页
    $page_num = ceil($total['num'] / $limit);
    //note 插入日志
    serverlog(1, $GLOBALS['dbTablePre'] . 'service_chat', "{$GLOBALS['username']}查看聊天记录列表", $GLOBALS['adminid']);
    //note 调用模板
    require adminTemplate('active_chat_list');
}
/***********************************************控制层(C)*****************************************/
$h = MooGetGPC('h', 'string', 'G') == '' ? 'list' : MooGetGPC('h', 'string', 'G');
//note 动作列表
$hlist = array('list');
//note 判断页面是否存在
if (!in_array($h, $hlist)) {
    MooMessageAdmin('您要打开的页面不存在', 'index.php?n=main');
}
//note 判断是否有权限
if (!checkGroup('active_chat', $h)) {
    MooMessageAdmin('您没有此操作的权限', 'index.php?n=main');
}
switch ($h) {
    //note 委托列表
    case 'list':
        active_chat_list();
        break;
}
$output .= "<h2>Groups</h2>";
/*
 *	If the ?group=THING query is defined, we're going to save that variable.
 *	If a user action is also defined, we'll do that. If it's just the group
 *	name, we'll list check that the user is a member of that group, then get
 *	all it's posts.
 */
//Join group dialogue
$output .= file_get_contents("templates/join-group.html");
//New group dialogue.
$output .= file_get_contents("templates/new-group.html");
if (isset($_POST['create-group'])) {
    $new_group = mysqli_real_escape_string($conn, $_POST['new-group']);
    //If the group doesn't exist yet...
    if (!checkGroup($new_group)) {
        $private = isset($_POST['private']);
        //If $private is 1 (true) leave it as 1, else set to 0 (false).
        $private = $private == 1 ? 1 : 0;
        //spit($private);
        $username = $_SESSION['username'];
        $sql = "INSERT INTO Groups (name, private, owner) VALUES ('{$new_group}', '{$private}', '{$username}')";
        $result = mysqli_query($conn, $sql);
        if ($result) {
            //spit("A");
            addtoGroup($new_group, $username);
            $output .= "<p>Group created successfully.</p>";
        } else {
            //spit("B");
            $output .= "<p>" . mysqli_error($conn) . "</p>";
        }
Beispiel #9
0
    $uid = MooGetGPC('uid', 'integer', 'R');
    $data = $GLOBALS['_MooClass']['MooMySQL']->getAll('SELECT * FROM ' . $GLOBALS['dbTablePre'] . 'cooperation where uid = ' . $uid);
    $v = $data['0'];
    require adminTemplate('active_cooperation_remark');
    exit;
}
$h = MooGetGPC('h', 'string', 'R') == '' ? 'list' : MooGetGPC('h', 'string', 'R');
$act = MooGetGPC('act', 'string', 'R') == '' ? 'list' : MooGetGPC('act', 'string', 'R');
//note 动作列表
$hlist = array('list', 'search', 'edit', 'remark', 'update');
//note 判断页面是否存在
if (!in_array($h, $hlist)) {
    MooMessageAdmin('您要打开的页面不存在', 'index.php?action=site_media');
}
//note 判断是否有权限
if (!checkGroup('active_cooperation', $h)) {
    MooMessageAdmin('您没有此操作的权限', 'index.php?action=site&h=site_media');
}
switch ($act) {
    case 'search':
        cooperation_search();
        break;
    case 'edit':
        cooperation_edit();
        break;
    case 'remark':
        cooperation_remark();
        break;
    case 'remark_update':
        cooperation_remark_update();
        break;
Beispiel #10
0
				                        </h4>
		                    		</a>
			                    </div>
			                </div>
			                <?php 
    $query = $conn->prepare('SELECT * FROM departments ORDER BY name ASC');
    $query->execute();
    $row = $query->fetch(PDO::FETCH_ASSOC);
    $i = 0;
    while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
        if ($row['name'] == 'FinanceandHR') {
            $dep = 'Finance';
        } else {
            $dep = $row['humanName'];
        }
        if ($_SESSION['access'] == 10 || checkGroup($dep)) {
            echo '
						                <div class="panel panel-default">
						                    <div class="panel-heading">
						                    	<a class="ajax-link" data-toggle="collapse" data-parent="#accordion" href="#collapse' . $i . '" data-href-url="admin/dashboard.php?department=' . $row['name'] . '">
							                        <h4 class="panel-title">';
            if ($row['name'] == "CommunicationsandSales") {
                echo 'Comms and Sales';
            } elseif ($row['name'] == "FinanceandHR") {
                echo 'Finance';
            } else {
                echo $row['humanName'];
            }
            echo '</h4>
						                        </a>
						                    </div>
Beispiel #11
0
    $isedit = 1;
    $id = MooGetGPC('id', 'integer', 'G');
    $sql = "SELECT * FROM {$GLOBALS['dbTablePre']}media WHERE id = {$id}";
    $news = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql);
    require adminTemplate('site_media_add');
}
/***********************************************控制层(C)*****************************************/
$h = MooGetGPC('h', 'string', 'G') == '' ? 'list' : MooGetGPC('h', 'string', 'G');
//note 动作列表
$hlist = array('list', 'add', 'del', 'edit');
//note 判断页面是否存在
if (!in_array($h, $hlist)) {
    MooMessageAdmin('您要打开的页面不存在', 'index.php?action=site_media');
}
//note 判断是否有权限
if (!checkGroup('site_media', $h)) {
    MooMessageAdmin('您没有此操作的权限', 'index.php?action=site&h=site_media');
}
switch ($h) {
    //note 报道列表
    case 'list':
        site_media_list();
        break;
        //note 添加媒体报道
    //note 添加媒体报道
    case 'add':
        site_media_add();
        break;
        //note 删除媒体报道
    //note 删除媒体报道
    case 'del':
 /**
  * Function responsible to activate survey.
  *
  * @access public
  * @param int $iSurveyID
  * @return void
  */
 public function activate($iSurveyID)
 {
     if (!Permission::model()->hasSurveyPermission($iSurveyID, 'surveyactivation', 'update')) {
         die;
     }
     $iSurveyID = (int) $iSurveyID;
     $aData = array();
     $aData['sidemenu']['state'] = false;
     $aData['aSurveysettings'] = getSurveyInfo($iSurveyID);
     $aData['surveyid'] = $iSurveyID;
     $surveyinfo = Survey::model()->findByPk($iSurveyID)->surveyinfo;
     $aData['title_bar']['title'] = $surveyinfo['surveyls_title'] . "(" . gT("ID") . ":" . $iSurveyID . ")";
     // Die if this is not possible
     if (!isset($aData['aSurveysettings']['active']) || $aData['aSurveysettings']['active'] == 'Y') {
         $this->getController()->error('Survey not active');
     }
     $qtypes = getQuestionTypeList('', 'array');
     Yii::app()->loadHelper("admin/activate");
     if (empty($_POST['ok'])) {
         if (isset($_GET['fixnumbering']) && $_GET['fixnumbering']) {
             fixNumbering($_GET['fixnumbering'], $iSurveyID);
         }
         // Check consistency for groups and questions
         $failedgroupcheck = checkGroup($iSurveyID);
         $failedcheck = checkQuestions($iSurveyID, $iSurveyID, $qtypes);
         $aData['failedcheck'] = $failedcheck;
         $aData['failedgroupcheck'] = $failedgroupcheck;
         $aData['aSurveysettings'] = getSurveyInfo($iSurveyID);
         $this->_renderWrappedTemplate('survey', 'activateSurvey_view', $aData);
     } else {
         $survey = Survey::model()->findByAttributes(array('sid' => $iSurveyID));
         if (!is_null($survey)) {
             $survey->anonymized = Yii::app()->request->getPost('anonymized');
             $survey->datestamp = Yii::app()->request->getPost('datestamp');
             $survey->ipaddr = Yii::app()->request->getPost('ipaddr');
             $survey->refurl = Yii::app()->request->getPost('refurl');
             $survey->savetimings = Yii::app()->request->getPost('savetimings');
             $survey->save();
             Survey::model()->resetCache();
             // Make sure the saved values will be picked up
         }
         $aResult = activateSurvey($iSurveyID);
         if (isset($aResult['error'])) {
             $aViewUrls['output'] = "<br />\n<div class='messagebox ui-corner-all'>\n";
             if ($aResult['error'] == 'surveytablecreation') {
                 $aViewUrls['output'] .= "<div class='alert alert-warning' role='alert'>" . gT("Survey table could not be created.") . "</div>\n";
             } else {
                 $aViewUrls['output'] .= "<div class='alert alert-success' role='alert'>" . gT("Timings table could not be created.") . "</div>\n";
             }
             $aViewUrls['output'] .= "<strong class='text-warning'>" . gT("Database error!!") . "\n " . "\n" . "<pre>" . var_export($aResult['error'], true) . "</pre>\n\n                <a href='" . Yii::app()->getController()->createUrl("admin/survey/sa/view/surveyid/" . $iSurveyID) . "'>" . gT("Main Admin Screen") . "</a>\n</strong><br/>";
         } else {
             $warning = isset($aResult['warning']) ? true : false;
             $allowregister = $survey->allowregister == 'Y' ? true : false;
             $onclickAction = convertGETtoPOST(Yii::app()->getController()->createUrl("admin/tokens/sa/index/surveyid/" . $iSurveyID));
             $closedOnclickAction = convertGETtoPOST(Yii::app()->getController()->createUrl("admin/tokens/sa/index/surveyid/" . $iSurveyID));
             $noOnclickAction = convertGETtoPOST(Yii::app()->getController()->createUrl("admin/survey/sa/view/surveyid/" . $iSurveyID));
             $activationData = array('iSurveyID' => $iSurveyID, 'warning' => $warning, 'allowregister' => $allowregister, 'onclickAction' => $onclickAction, 'closedOnclickAction' => $closedOnclickAction, 'noOnclickAction' => $noOnclickAction);
             $aViewUrls['output'] = $this->getController()->renderPartial('/admin/survey/_activation_feedback', $activationData, true);
         }
         $this->_renderWrappedTemplate('survey', $aViewUrls, $aData);
     }
 }
Beispiel #13
0
        }
    }
    $sql = "SELECT * FROM {$GLOBALS['dbTablePre']}admin_action WHERE id='{$actionid}'";
    $adminaction = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql);
    require_once adminTemplate('adminaction_edit');
}
/***********************************************控制层(C)*****************************************/
$h = MooGetGPC('h', 'string') == '' ? 'list' : MooGetGPC('h', 'string');
//note 动作列表
$hlist = array('list', 'add', 'edit');
//note 判断页面是否存在
if (!in_array($h, $hlist)) {
    MooMessageAdmin('您要打开的页面不存在', 'index.php?action=system_adminaction&h=list');
}
//note 判断是否有权限
if (!checkGroup('system_adminaction', $h)) {
    MooMessageAdmin('您没有此操作的权限', 'index.php?action=admin&h=index', 1);
}
switch ($h) {
    //note 所有操作列表
    case 'list':
        system_adminaction_list();
        break;
        //note 添加操作
    //note 添加操作
    case 'add':
        system_adminaction_add();
        break;
        //note 修改操作
    //note 修改操作
    case 'edit':
Beispiel #14
0
        echo '缓存重建成功,请重新刷新页面 <br>';
        print_r($hntest_cache);
    } else {
        echo '缓存生成失败!';
    }
}
/***********************************************控制层(C)*****************************************/
$h = MooGetGPC('h', 'string') == '' ? 'question_list' : MooGetGPC('h', 'string');
//note 判断是否有权限
//echo 'hntest_'.$h;exit;
require 'include/hntest_function.php';
if (!file_exists('../data/cache/hntest_cache.php')) {
    hntest_cache();
}
require '../data/cache/hntest_cache.php';
if (!checkGroup('hntest', $h)) {
    MooMessageAdmin('您没有此操作的权限', 'index.php?action=admin&h=index', 1);
}
if (isset($_GET['cache'])) {
    $h = 'cache';
}
switch ($h) {
    case 'question_list':
        hntest_question_list();
        break;
    case 'question_modify':
        hntest_question_modify();
        break;
    case 'question_del':
        hntest_question_del();
        break;
Beispiel #15
0
        MooMessageAdmin('队红娘币限额设置成功', $referer, 1);
    } else {
        MooMessageAdmin('队红娘币限额设置失败<br/>USER_SQL=>' . $user_sql . '<br/>MANAGE_SQL=>' . $manage_sql, $referer, 1);
    }
}
/***********************************************控制层(C)*****************************************/
$h = MooGetGPC('h', 'string') == '' ? 'list' : MooGetGPC('h', 'string');
//note 动作列表
$hlist = array('teamlist', 'addteam', 'teammember', 'addteammember', 'delteam', 'editteam', 'del_teammember', 'set_leader', 'change');
//note 判断页面是否存在
if (!in_array($h, $hlist)) {
    salert('打开的页面不存在');
    exit;
}
//note 判断是否有权限
$nav_list = checkGroup('system_adminteam', $h);
if (!$nav_list) {
    salert('您没有此操作权限');
    exit;
}
include './include/system_function.php';
switch ($h) {
    //组管理
    case 'teamlist':
        system_adminteam_teamlist();
        break;
    case 'addteam':
        system_adminteam_addteam();
        break;
    case 'teammember':
        system_adminteam_teammember();
Beispiel #16
0
            $kefe_inf_arr = $GLOBALS['_MooClass']['MooMySQL']->getAll($sql);
            foreach ($kefe_inf_arr as $key => $kefu_info) {
                $sql = "SELECT count(1) num FROM {$GLOBALS['dbTablePre']}admin_deluser b where sid='{$kefu_info['uid']}' and " . $time_between;
                $del_user_num_arr = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql);
                $del_user_num[$key] = $del_user_num_arr['num'];
            }
        }
    }
    require_once adminTemplate("financial_deluser_count");
}
/***********************************************控制层(C)*****************************************/
$h = MooGetGPC('h', 'string', 'G') == '' ? 'list' : MooGetGPC('h', 'string', 'G');
//note 动作列表
$hlist = array('list', 'delcount');
//note 判断页面是否存在
if (!in_array($h, $hlist)) {
    salert('您要打开的页面不存在');
}
//note 判断是否有权限
if (!checkGroup('financial_tele_info', $h)) {
    salert('您没有此操作的权限');
}
switch ($h) {
    //note 委托列表
    case 'list':
        financial_tele_info_list();
        break;
    case 'delcount':
        financial_deluser_count();
        break;
}
Beispiel #17
0
    $sql = "DELETE FROM {$GLOBALS['dbTablePre']}love_type WHERE id = {$id}";
    $GLOBALS['_MooClass']['MooMySQL']->query($sql);
    //note 插入日志
    serverlog(4, $GLOBALS['dbTablePre'] . 'love_type', '删除测试评分结果', $GLOBALS['adminid']);
    salert("删除成功", 'index.php?action=site_lovetype&h=list');
}
/***********************************************控制层(C)*****************************************/
$h = MooGetGPC('h', 'string', 'G') == '' ? 'list' : MooGetGPC('h', 'string', 'G');
//note 动作列表
$hlist = array('list', 'add', 'del');
//note 判断页面是否存在
if (!in_array($h, $hlist)) {
    MooMessageAdmin('您要打开的页面不存在', 'index.php?action=site_lovetype');
}
//note 判断是否有权限
if (!checkGroup('site_lovetype', $h)) {
    MooMessageAdmin('您没有此操作的权限', 'index.php?action=site&h=site_lovetype');
}
switch ($h) {
    //note 评分结果列表
    case 'list':
        site_lovetype_list();
        break;
        //note 添加评分结果
    //note 添加评分结果
    case 'add':
        site_lovetype_add();
        break;
        //note 删除评分结果
    //note 删除评分结果
    case 'del':
Beispiel #18
0
    $currenturl2 = preg_replace("/(&page=\\d+)/", "", $currenturl);
    $currenturl = preg_replace("/(&orderlogintime=(desc|asc))/", "", $currenturl2);
    $currenturl = preg_replace("/(&orderreal_lastvisit=(desc|asc))/", "", $currenturl);
    return $currenturl . '|' . $currenturl2;
}
/***********************************************控制层(C)*****************************************/
$h = MooGetGPC('h', 'string') == '' ? 'letter' : MooGetGPC('h', 'string');
//note 动作列表
$hlist = array('letter', 'photo', 'monolog', 'image', 'school', 'story', 'storyfirst', 'storyimage', 'paper', 'report', 'feedback', 'feedback_s', 'imagick_rotate', 'check_introduce', 'comment', 'check_content', 'video', 'member_video', 'voice', 'member_voice');
//note 判断页面是否存在
if (!in_array($h, $hlist)) {
    salert('您要打开的页面不存在');
    exit;
}
//note 判断是否有权限
if (!checkGroup('check', $h)) {
    //	salert('您没有此审核操作的权限');exit;
}
//note Control Case:
switch ($h) {
    //note 站内信
    case 'letter':
        check_letter();
        break;
        //note 形象照
    //note 形象照
    case 'photo':
        check_photo();
        break;
        //note 内心独白
    //note 内心独白
Beispiel #19
0
    exit;
}
$query = $conn->prepare('SELECT humanName FROM departments WHERE name = :department');
$query->bindValue(':department', $deptemp, PDO::PARAM_STR);
$query->execute();
$row = $query->fetch(PDO::FETCH_ASSOC);
$department = $row["humanName"];
?>
	</head>
	<body>
		<?php 
include 'navbar.php';
?>
		
		<?php 
if ($auth && checkGroup($department)) {
    ?>
		<!--main container-->
		<div class="container-fluid" id="main"><!--Private stuff in here-->
			<div class="row">
					
				<div class="col-md-3 col-sm-6"><!-- Left hand col-->
				
					<?php 
    include 'w_links_private.php';
    ?>
				
				</div><!--/left hand col-->
				<div class="col-md-6 col-sm-6"> <!--middle col-->
				
					<?php 
Beispiel #20
0
            }
            if ($type == 'update') {
                serverlog(3, $GLOBALS['dbTablePre'] . 'financial_orderok', "{$GLOBALS['username']}修改财务报表提成记录ID为:{$id}的备注", $GLOBALS['adminid']);
                MooMessageAdmin('备注修改成功', 'index.php?action=financial_totalwage&h=list');
            }
        }
    }
    //note 调用模板
    require adminTemplate('financial_totalwage_add');
}
/***********************************************控制层(C)*****************************************/
$h = MooGetGPC('h', 'string', 'G') == '' ? 'list' : MooGetGPC('h', 'string', 'G');
//note 动作列表
$hlist = array('list', 'remark');
//note 判断页面是否存在
if (!in_array($h, $hlist)) {
    MooMessageAdmin('您要打开的页面不存在', 'index.php?n=main');
}
//note 判断是否有权限
if (!checkGroup('financial_totalwage', $h)) {
    MooMessageAdmin('您没有此操作的权限', 'index.php?n=main');
}
switch ($h) {
    //note 委托列表
    case 'list':
        financial_totalwage_list();
        break;
    case 'remark':
        financial_totalwage_remark();
        break;
}
Beispiel #21
0
    $currenturl = preg_replace("/(&page=\\d+)/", "", $currenturl);
    $currenturl = preg_replace("/(&type=undealed)/", "", $currenturl);
    $currenturl = preg_replace("/(&type=dealed)/", "", $currenturl);
    $currenturl = preg_replace("/(&type=all)/", "", $currenturl);
    $currenturl2 = $currenturl;
    $currenturl = $currenturl . "&type={$type}";
    $pages = multipage($total, $limit, $page, $currenturl);
    //note 跳转到某一页
    $page_num = ceil($total / $limit);
    //note 插入日志
    serverlog(1, $GLOBALS['dbTablePre'] . 'servies', "{$GLOBALS['username']}查看站内短信列表", $GLOBALS['adminid']);
    require adminTemplate('active_websms_list');
}
/***********************************************控制层(C)*****************************************/
$h = MooGetGPC('h', 'string', 'G') == '' ? 'list' : MooGetGPC('h', 'string', 'G');
//note 动作列表
$hlist = array('list');
//note 判断页面是否存在
if (!in_array($h, $hlist)) {
    MooMessageAdmin('您要打开的页面不存在', 'index.php?action=site_media');
}
//note 判断是否有权限
if (!checkGroup('active_websms', $h)) {
    MooMessageAdmin('您没有此操作的权限', 'index.php?action=site&h=site_media');
}
switch ($h) {
    //note 委托列表
    case 'list':
        active_websms_list();
        break;
}
Beispiel #22
0
    } else {
        MooMessageAdmin('数据传递失败', $_SERVER['HTTP_REFERER']);
    }
}
/**
 * *********************************************控制层(C)****************************************
 */
$h = MooGetGPC('h', 'string', 'G') == '' ? 'list' : MooGetGPC('h', 'string', 'G');
// note 动作列表
$hlist = array('list', 'edit', 'add', 'password', 'kefucache', 'change');
// note 判断页面是否存在
if (!in_array($h, $hlist)) {
    MooMessageAdmin('您要打开的页面不存在', 'index.php?action=system_adminuser&h=list');
}
// note 判断是否有权限
if (!checkGroup('system_adminuser', $h)) {
    MooMessageAdmin('您没有此操作的权限', 'index.php?action=system_admin&h=index', 1);
}
switch ($h) {
    // note 管理员列表
    case 'list':
        system_adminuser_list();
        break;
        // note 添加管理员
    // note 添加管理员
    case 'add':
        system_adminuser_add();
        break;
        // note 修改管理员信息
    // note 修改管理员信息
    case 'edit':
Beispiel #23
0
    $page_links = multipage($total, $page_per, $page, $currenturl);
    // $page_links=str_replace('7651','7652',$page_links);
    $sql = "SELECT uid,username FROM {$GLOBALS['dbTablePre']}admin_user";
    $user_list = $GLOBALS['_MooClass']['MooMySQL']->getAll($sql);
    require_once adminTemplate('adminlog_list');
}
/***********************************************控制层(C)*****************************************/
$h = MooGetGPC('h', 'string') == '' ? 'list' : MooGetGPC('h', 'string');
//note 动作列表
$hlist = array('list', 'del', 'search');
//note 判断页面是否存在
if (!in_array($h, $hlist)) {
    MooMessageAdmin('您要打开的页面不存在', 'index.php?action=system_adminlog&h=list');
}
//note 判断是否有权限
if (!checkGroup('system_adminlog', $h)) {
    MooMessageAdmin('您没有此操作的权限', 'index.php?action=system_admin&h=index', 1);
}
switch ($h) {
    //note 管理员日志列表
    case 'list':
        system_adminlog_list();
        break;
        //note 删除管理员日志
    //note 删除管理员日志
    case 'del':
        system_adminlog_del();
        break;
        //note 查询特定管理员日志
    //note 查询特定管理员日志
    case 'search':
Beispiel #24
0
}
//foreach($_POST as $key => $value ){$post .=$key.' => '.$value; };
//проверка введённых данных, используем модуль
$v = new Valitron\Validator($_POST);
$v->rule('required', ['name', 'url', 'description']);
if (!$v->validate()) {
    exit(createMessageJson(false, 'Неполные данные ' . $post));
}
//cделаем проверку, что выполнена регистрация
//смотрим , есть ли в сессии логи и пароль, и проверяем
session_start();
//
if (!isset($_SESSION) or !isset($_SESSION['password_hash'])) {
    exit(createMessageJson(false, 'Не выполнена регистрация в системе'));
}
$res = checkGroup($_SESSION['password_hash'], admins);
if ($res) {
    exit(createMessageJson($res));
}
$name = $_POST['name'];
$url = $_POST['url'];
$image = $_POST['image'];
$description = $_POST['description'];
$file = $_FILES['image'];
//проверяем размер файла
if ($file['size'] == 0 or $file['size'] > 2097152) {
    exit(createMessageJson(false, 'Загрузите файл разрешённого размера'));
}
//провряем формат файла
$imageinfo = getimagesize($file['tmp_name']);
if ($imageinfo['mime'] != 'image/gif' and $imageinfo['mime'] != 'image/jpeg' and $imageinfo['mime'] != 'image/png') {
Beispiel #25
0
    $currenturl = "index.php?action=financial&h=classStatistics";
    // echo $currenturl;
    $pages = multipage($total, $page_per, $page, $currenturl);
    //加载模板
    require adminTemplate('financial_classStatistics');
}
/***********************************************控制层(C)*****************************************/
$h = MooGetGPC('h', 'string');
//note 动作列表
$hlist = array('msm_grade_count', 'feedback_fraction', 'member_grade_count', 'delstatistics', 'showreason', 'classStatistics', 'NewClassStat');
//note 判断页面是否存在
if (!in_array($h, $hlist)) {
    salert('您要打开的页面不存在');
}
//note 判断是否有权限
if (!checkGroup('financial', $h)) {
    salert('您没有修改此操作的权限');
}
switch ($h) {
    //note 来自网站对红娘的评分
    case 'feedback_fraction':
        financial_feedback_fraction();
        break;
        //note 短信评分统计
    //note 短信评分统计
    case 'msm_grade_count':
        financial_msm_grade_count();
        break;
        //会员跟进步骤统计
    //会员跟进步骤统计
    case 'member_grade_count':
Beispiel #26
0
    $currenturl = 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"] . $url;
    $url2 = "apply_time1={$apply_time1}&apply_time2={$apply_time2}&sid={$apply_sid}&uid={$uid}";
    $currenturl = "index.php?action=vipuser&h=pay_query&" . $url2;
    $page_links = multipage($total, $page_per, $page, $currenturl);
    require adminTemplate('vipuser_pay_query');
}
/***********************************************控制层(C)*****************************************/
$h = MooGetGPC('h', 'string', 'G') == '' ? 'pay' : MooGetGPC('h', 'string', 'G');
//note 动作列表
$hlist = array('pay', 'nopay', 'downline', 'upgrade_apply', 'pay_other', 'apply_list', 'high', 'diamond', 'city_star', 'vip_summary', 'viped', 'hurryhigh', 'hurrydiamond', 'getvip_group', 'pay_query');
//note 判断页面是否存在
if (!in_array($h, $hlist)) {
    MooMessageAdmin('您要打开的页面不存在', 'index.php?action=vipuser');
}
//note 判断是否有权限
if (!checkGroup('vipuser', $h)) {
    MooMessageAdmin('您没有此操作的权限', 'index.php?action=vipuser');
}
switch ($h) {
    case 'pay':
        //note 已支付列表
        vipuser_pay();
        break;
    case 'nopay':
        //note 未支付列表
        vipuser_nopay();
        break;
    case 'downline':
        //note 线下支付
        vipuser_downline();
        break;
Beispiel #27
0
        MooMessageAdmin('群组红娘币规则设置成功', $referer, 1);
    } else {
        MooMessageAdmin('群组红娘币规则设置失败<br/>GROUP_SQL=>' . $group_sql . '<br/>USER_SQL=>' . $user_sql, $referer, 1);
    }
}
/***********************************************控制层(C)*****************************************/
$h = MooGetGPC('h', 'string') == '' ? 'list' : MooGetGPC('h', 'string');
//note 动作列表
$hlist = array('grouplist', 'addgroup', 'groupmember', 'addgroupmember', 'delgroup', 'editgroup', 'del_groupmember', 'set_leader', 'change');
//note 判断页面是否存在
if (!in_array($h, $hlist)) {
    salert('打开的页面不存在');
    exit;
}
//note 判断是否有权限
$nav_list = checkGroup('system_adminmanage', $h);
if (!$nav_list) {
    salert('您没有此操作权限');
    exit;
}
include './include/system_function.php';
switch ($h) {
    //组管理
    case 'grouplist':
        system_adminmanage_grouplist();
        break;
    case 'addgroup':
        system_adminmanage_addgroup();
        break;
    case 'groupmember':
        system_adminmanage_groupmember();
Beispiel #28
0
            echo iconv('utf-8', 'gbk', $v['name']) . "\t";
            echo iconv('utf-8', 'gbk', date("Y-m-d", $v['dateline'])) . "\t\n";
        }
        exit;
    }
    //note 数据库查询
    $sql = "SELECT COUNT(*) num FROM {$GLOBALS['dbTablePre']}financial_orderok {$where}";
    $total = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql);
    //note 插入日志
    serverlog(1, $GLOBALS['dbTablePre'] . 'financial_orderok', "{$GLOBALS['username']}查看成功订单总数记录列表", $GLOBALS['adminid']);
    //note 调用模板
    require adminTemplate('financial_ordertotal_list');
}
/***********************************************控制层(C)*****************************************/
$h = MooGetGPC('h', 'string', 'G') == '' ? 'list' : MooGetGPC('h', 'string', 'G');
//note 动作列表
$hlist = array('list');
//note 判断页面是否存在
if (!in_array($h, $hlist)) {
    MooMessageAdmin('您要打开的页面不存在', 'index.php?n=main');
}
//note 判断是否有权限
if (!checkGroup('financial_orderok', $h)) {
    MooMessageAdmin('您没有此操作的权限', 'index.php?n=main');
}
switch ($h) {
    //note 成功订单列表
    case 'list':
        financial_ordertotal_list();
        break;
}
Beispiel #29
0
 /**
  * Function responsible to activate survey.
  *
  * @access public
  * @param int $iSurveyID
  * @return void
  */
 public function activate($iSurveyID)
 {
     if (!Permission::model()->hasSurveyPermission($iSurveyID, 'surveyactivation', 'update')) {
         die;
     }
     $iSurveyID = (int) $iSurveyID;
     $aData = array();
     $aData['aSurveysettings'] = getSurveyInfo($iSurveyID);
     $aData['surveyid'] = $iSurveyID;
     // Die if this is not possible
     if (!isset($aData['aSurveysettings']['active']) || $aData['aSurveysettings']['active'] == 'Y') {
         $this->getController()->error('Survey not active');
     }
     $qtypes = getQuestionTypeList('', 'array');
     Yii::app()->loadHelper("admin/activate");
     if (empty($_POST['ok'])) {
         if (isset($_GET['fixnumbering']) && $_GET['fixnumbering']) {
             fixNumbering($_GET['fixnumbering'], $iSurveyID);
         }
         // Check consistency for groups and questions
         $failedgroupcheck = checkGroup($iSurveyID);
         $failedcheck = checkQuestions($iSurveyID, $iSurveyID, $qtypes);
         $aData['failedcheck'] = $failedcheck;
         $aData['failedgroupcheck'] = $failedgroupcheck;
         $aData['aSurveysettings'] = getSurveyInfo($iSurveyID);
         $this->_renderWrappedTemplate('survey', 'activateSurvey_view', $aData);
     } else {
         $survey = Survey::model()->findByAttributes(array('sid' => $iSurveyID));
         if (!is_null($survey)) {
             $survey->anonymized = Yii::app()->request->getPost('anonymized');
             $survey->datestamp = Yii::app()->request->getPost('datestamp');
             $survey->ipaddr = Yii::app()->request->getPost('ipaddr');
             $survey->refurl = Yii::app()->request->getPost('refurl');
             $survey->savetimings = Yii::app()->request->getPost('savetimings');
             $survey->save();
             Survey::model()->resetCache();
             // Make sure the saved values will be picked up
         }
         $aResult = activateSurvey($iSurveyID);
         if (isset($aResult['error'])) {
             $aViewUrls['output'] = "<br />\n<div class='messagebox ui-corner-all'>\n" . "<div class='header ui-widget-header'>" . gT("Activate Survey") . " ({$iSurveyID})</div>\n";
             if ($aResult['error'] == 'surveytablecreation') {
                 $aViewUrls['output'] .= "<div class='warningheader'>" . gT("Survey table could not be created.") . "</div>\n";
             } else {
                 $aViewUrls['output'] .= "<div class='warningheader'>" . gT("Timings table could not be created.") . "</div>\n";
             }
             $aViewUrls['output'] .= "<p>" . gT("Database error!!") . "\n <font color='red'>" . "</font>\n" . "<pre>" . var_export($aResult['error'], true) . "</pre>\n\n                <a href='" . Yii::app()->getController()->createUrl("admin/survey/sa/view/surveyid/" . $iSurveyID) . "'>" . gT("Main Admin Screen") . "</a>\n</div>";
         } else {
             $aViewUrls['output'] = "<br />\n<div class='messagebox ui-corner-all'>\n" . "<div class='header ui-widget-header'>" . gT("Activate Survey") . " ({$iSurveyID})</div>\n" . "<div class='successheader'>" . gT("Survey has been activated. Results table has been successfully created.") . "</div><br /><br />\n";
             if (isset($aResult['warning'])) {
                 $aViewUrls['output'] .= "<div class='warningheader'>" . gT("The required directory for saving the uploaded files couldn't be created. Please check file premissions on the /upload/surveys directory.") . "</div>";
             }
             if ($survey->allowregister == 'Y') {
                 $aViewUrls['output'] .= gT("This survey allows public registration. A token table must also be created.") . "<br /><br />\n" . "<input type='submit' value='" . gT("Initialise tokens") . "' onclick=\"" . convertGETtoPOST(Yii::app()->getController()->createUrl("admin/tokens/sa/index/surveyid/" . $iSurveyID)) . "\" />\n";
             } else {
                 $aViewUrls['output'] .= gT("This survey is now active, and responses can be recorded.") . "<br /><br />\n" . "<strong>" . gT("Open-access mode") . ":</strong> " . gT("No invitation code is needed to complete the survey.") . "<br />" . gT("You can switch to the closed-access mode by initialising a token table with the button below.") . "<br /><br />\n" . "<input type='submit' value='" . gT("Switch to closed-access mode") . "' onclick=\"" . convertGETtoPOST(Yii::app()->getController()->createUrl("admin/tokens/sa/index/surveyid/" . $iSurveyID)) . "\" />\n" . "<input type='submit' value='" . gT("No, thanks.") . "' onclick=\"" . convertGETtoPOST(Yii::app()->getController()->createUrl("admin/survey/sa/view/surveyid/" . $iSurveyID)) . "\" />\n";
             }
             $aViewUrls['output'] .= "</div><br />&nbsp;\n";
         }
         $this->_renderWrappedTemplate('survey', $aViewUrls, $aData);
     }
 }
Beispiel #30
0
    $data['time'] = date('Y-m-d H:i:s', $data['time']);
    $data['type_str'] = $GLOBALS['matchmaker_msg_array'][$data['type']];
    $data['msg'] = (empty($data2['title']) ? '' : $data2['title'] . '<br/>') . (empty($data2['msg']) ? '' : $data2['msg'] . '<br/>') . $data['msg'];
    exit(json_encode(array('flag' => 1, 'msg' => $data)));
}
/**
 * 创建红娘币变更信息
 */
function bulidmsg()
{
    $msg_array = array(0 => '处罚', 1 => '奖励', '3' => 'PK胜利', '4' => 'PK失败', '5' => 'PK资本支付', '6' => 'PK资本返还');
}
$h = MooGetGPC('h', 'string', 'G');
//日志变更类型
$matchmaker_msg_array = array(0 => '处罚', 1 => '奖励', '3' => 'PK胜利', '4' => 'PK失败', '5' => 'PK资本支付', '6' => 'PK资本返还');
if (!checkGroup('matchmaker', $h)) {
    if (in_array($h, array('config_list', 'to_rewards', 'want_pk', 'my_pk', 'pk_me', 'pk_list', 'mylog', 'reward_log', 'isAuthRewards'))) {
        exit('您没有此操作的权限');
    } else {
        exit(json_encode(array('flag' => 0, 'msg' => '您没有此操作的权限')));
    }
}
if (in_array($h, array('put_rewards', 'add_pk', 'respond', 'judge'))) {
    $now = intval(date('Hi'));
    if ($now > '2330' || $now < '130') {
        exit(json_encode(array('flag' => 0, 'msg' => '朋友天色不早了,还是洗洗睡吧。')));
    }
}
switch ($h) {
    case 'config_list':
        reward_config_list();