当前位置: 首页>>代码示例>>PHP>>正文


PHP makeGroup函数代码示例

本文整理汇总了PHP中makeGroup函数的典型用法代码示例。如果您正苦于以下问题:PHP makeGroup函数的具体用法?PHP makeGroup怎么用?PHP makeGroup使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了makeGroup函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getOnlineUsersInfo

function getOnlineUsersInfo($sUserId, $bInit)
{
    global $aXmlTemplates;
    $aSaved = getSavedUsers();
    $aActive = getActiveUsers($sUserId);
    $aFriends = getFriends($sUserId);
    saveUsers($aActive);
    $sContents = "";
    if ($bInit) {
        $aFullUsers = array_unique(array_merge($aActive['online'], $aFriends));
    } else {
        $aFullUsers = array_diff($aActive['online'], $aSaved['online'], $aFriends);
        $aNewOfflineUsers = array_intersect($aSaved['online'], $aActive['offline']);
        $aNewOnlineUsers = array_intersect($aSaved['offline'], $aActive['online'], $aFriends);
        for ($i = 0; $i < count($aNewOfflineUsers); $i++) {
            $sContents .= parseXml($aXmlTemplates['user'], $aNewOfflineUsers[$i], FALSE_VAL);
        }
        for ($i = 0; $i < count($aNewOnlineUsers); $i++) {
            $sContents .= parseXml($aXmlTemplates['user'], $aNewOnlineUsers[$i], TRUE_VAL);
        }
    }
    $rResult = getUsersMedia($aFullUsers);
    if ($rResult != null) {
        for ($i = 0; $i < mysql_num_rows($rResult); $i++) {
            $aUser = mysql_fetch_assoc($rResult);
            $aUserInfo = getUserInfo($aUser['ID']);
            $sOnline = in_array($aUser['ID'], $aActive['online']) ? TRUE_VAL : FALSE_VAL;
            $sFriend = in_array($aUser['ID'], $aFriends) ? TRUE_VAL : FALSE_VAL;
            $sMusic = $aUser['CountMusic'] > 0 ? TRUE_VAL : FALSE_VAL;
            $sVideo = $aUser['CountVideo'] > 0 ? TRUE_VAL : FALSE_VAL;
            $sContents .= parseXml($aXmlTemplates['user'], $aUser['ID'], $aUserInfo['nick'], $aUserInfo['sex'], $aUserInfo['age'], $aUserInfo['photo'], $aUserInfo['profile'], $sOnline, $sFriend, $sMusic, $sVideo);
        }
    }
    return makeGroup($sContents, "users");
}
开发者ID:dalinhuang,项目名称:shopexts,代码行数:35,代码来源:functions.inc.php

示例2: parseXml

             $sMessage = "msgFileNotFound";
             break;
     }
     $sContents = parseXml($aXmlTemplates['result'], $sMessage, $sStatus);
     if ($sStatus == SUCCESS_VAL) {
         $sContents .= parseXml($aXmlTemplates['file'], $sId, $sGetFile, $sGetFile, $sImageFile, $aFile['Time'], $sSaveName);
     }
     break;
     /**
      * Get user's playlist by ID
      */
 /**
  * Get user's playlist by ID
  */
 case 'getList':
     $sContents = makeGroup(video_getList($sId), "files");
     break;
 case 'processFile':
     $sTempFileName = $sId . TEMP_FILE_NAME;
     $sTempFile = $sFilesPath . $sTempFileName . FLV_EXTENSION;
     @unlink($sTempFile);
     deleteTempFiles($sId);
     $sRecordedFileUrl = getRMSUrl($sServerApp, true) . $sStreamsFolder . $sFile . FLV_EXTENSION;
     $sContents = parseXml($aXmlTemplates['result'], "msgProcessingError", FAILED_VAL);
     if (function_exists("curl_init")) {
         $fTemp = fopen($sTempFile, "w");
         $curl = curl_init();
         curl_setopt($curl, CURLOPT_URL, $sRecordedFileUrl);
         curl_setopt($curl, CURLOPT_FILE, $fTemp);
         curl_setopt($curl, CURLOPT_HEADER, false);
         curl_exec($curl);
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:31,代码来源:actions.inc.php

示例3: switch

switch ($sAction) {
    case 'getPlugins':
        $sFolder = "/plugins/";
        $sContents = "";
        $sPluginsPath = $sModulesPath . $sModule . $sFolder;
        if (is_dir($sPluginsPath)) {
            if ($rDirHandle = opendir($sModulesPath . $sModule . $sFolder)) {
                while (false !== ($sPlugin = readdir($rDirHandle))) {
                    if (strpos($sPlugin, ".swf") === strlen($sPlugin) - 4) {
                        $sContents .= parseXml(array(1 => '<plugin><![CDATA[#1#]]></plugin>'), $sModulesUrl . $sModule . $sFolder . $sPlugin);
                    }
                }
            }
            closedir($rDirHandle);
        }
        $sContents = makeGroup($sContents, "plugins");
        break;
        /**
         * gets skins
         */
    /**
     * gets skins
     */
    case 'getSkins':
        $sContents = printFiles($sModule, "skins", false, true);
        break;
        /**
         * Sets default skin.
         */
    /**
     * Sets default skin.
开发者ID:dalinhuang,项目名称:shopexts,代码行数:31,代码来源:actions.inc.php

示例4: refreshUsersInfo

/**
 * ===> The rest of functions is for XML version only. <===
 * Update user's status
 * @comment - Refreshed
 */
function refreshUsersInfo($iId = 0, $sMode = 'all')
{
    global $aXmlTemplates;
    global $sModule;
    $iUpdateInterval = (int) getSettingValue($sModule, "updateInterval");
    $iIdleTime = (int) getSettingValue($sModule, "idleTime");
    $iDeleteTime = (int) getSettingValue($sModule, "deleteTime");
    //--- refresh current user's track ---//
    $sQuery = "UPDATE `" . MODULE_DB_PREFIX . "CurrentUsers` SET `Status`='" . USER_STATUS_OLD . "', `When`=UNIX_TIMESTAMP() WHERE `Status`<>'" . USER_STATUS_KICK . "' AND IF(`Status` IN ('" . USER_STATUS_NEW . "', '" . USER_STATUS_TYPE . "', '" . USER_STATUS_ROOM . "') AND `When`>=(UNIX_TIMESTAMP()-" . $iUpdateInterval . "), `ID`='-1', `ID`='" . $iId . "')";
    getResult($sQuery);
    //--- refresh other users' states ---//
    $sQuery = "UPDATE `" . MODULE_DB_PREFIX . "CurrentUsers` SET `When`=UNIX_TIMESTAMP(), `Status`='" . USER_STATUS_IDLE . "' WHERE `Status`<>'" . USER_STATUS_IDLE . "' AND `When`<=(UNIX_TIMESTAMP()-" . $iIdleTime . ")";
    getResult($sQuery);
    //--- delete idle users, whose track was not refreshed more than delete time ---//
    $sQuery = "DELETE FROM `" . MODULE_DB_PREFIX . "CurrentUsers` WHERE `Status`='" . USER_STATUS_IDLE . "' AND `When`<=(UNIX_TIMESTAMP()-" . $iDeleteTime . ")";
    getResult($sQuery);
    //--- delete old rooms ---//
    $sQuery = "DELETE FROM `" . MODULE_DB_PREFIX . "Rooms` WHERE `Status`='" . ROOM_STATUS_DELETE . "' AND `When`<=(UNIX_TIMESTAMP()-" . $iDeleteTime . ")";
    getResult($sQuery);
    //--- delete old messages ---//
    $sQuery = "DELETE FROM `" . MODULE_DB_PREFIX . "Messages` WHERE `When`<=(UNIX_TIMESTAMP()-" . $iDeleteTime . ")";
    getResult($sQuery);
    //--- Get information about users in the chat ---//
    switch ($sMode) {
        case 'upd':
            $rRes = getResult("SELECT ccu.`ID` AS `ID`, ccu.`Nick` AS `Nick`, ccu.`Sex` AS `Sex`, ccu.`Age` AS `Age`, ccu.`Desc` AS `Desc`, ccu.`Photo` AS `Photo`, ccu.`Profile` AS `Profile`, ccu.`Status` AS `Status`, ccu.`RoomID` AS `RoomID`, rp.`Type` AS `Type` FROM `" . MODULE_DB_PREFIX . "Profiles` AS rp, `" . MODULE_DB_PREFIX . "CurrentUsers` AS ccu WHERE rp.`ID`=ccu.`ID` ORDER BY ccu.`When`");
            while ($aUser = mysql_fetch_assoc($rRes)) {
                if ($aUser['ID'] == $iId && !($aUser['Status'] == USER_STATUS_KICK || $aUser['Status'] == USER_STATUS_TYPE)) {
                    continue;
                }
                switch ($aUser['Status']) {
                    case USER_STATUS_NEW:
                        $sContent .= parseXml($aXmlTemplates['user'], $aUser['ID'], $aUser['Status'], $aUser['Nick'], $aUser['Sex'], $aUser['Age'], $aUser['Desc'], $aUser['Photo'], $aUser['Profile'], $aUser['Type'], $aUser['RoomID']);
                        break;
                    case USER_STATUS_ROOM:
                        $sContent .= parseXml($aXmlTemplates['user'], $aUser['ID'], $aUser['Status'], $aUser['RoomID']);
                        break;
                    case USER_STATUS_TYPE:
                        $sContent .= parseXml($aXmlTemplates['user'], $aUser['ID'], $aUser['Status'], $aUser['RoomID'], $aUser['Type']);
                        break;
                    case USER_STATUS_IDLE:
                    case USER_STATUS_KICK:
                        $sContent .= parseXml($aXmlTemplates['user'], $aUser['ID'], $aUser['Status']);
                        break;
                }
            }
            break;
        case 'all':
            $rRes = getResult("SELECT ccu.`ID` AS `ID`, ccu.`Nick` AS `Nick`, ccu.`Sex` AS `Sex`, ccu.`Age` AS `Age`, ccu.`Desc` AS `Desc`, ccu.`Photo` AS `Photo`, ccu.`Profile` AS `Profile`, ccu.`RoomID` AS `RoomID`, rp.`Type` AS `Type` FROM `" . MODULE_DB_PREFIX . "Profiles` AS rp, `" . MODULE_DB_PREFIX . "CurrentUsers` AS ccu WHERE rp.`ID`=ccu.`ID` AND ccu.`Status` NOT IN ('" . USER_STATUS_IDLE . "', '" . USER_STATUS_KICK . "') AND rp.`Banned`='false' ORDER BY ccu.`When`");
            while ($aUser = mysql_fetch_assoc($rRes)) {
                $sContent .= parseXml($aXmlTemplates['user'], $aUser['ID'], "new", $aUser['Nick'], $aUser['Sex'], $aUser['Age'], $aUser['Desc'], $aUser['Photo'], $aUser['Profile'], $aUser['Type'], $aUser['RoomID']);
            }
            break;
    }
    return makeGroup($sContent, "users");
}
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:61,代码来源:functions.inc.php

示例5: getResult

     $res = getResult("SELECT * FROM `" . MODULE_DB_PREFIX . "Files` AS `F` INNER JOIN `" . MODULE_DB_PREFIX . "PlayLists` AS `PL` ON `ID` = `FileId` WHERE " . $sApprovedFactor . "`PL`.`Owner` = '" . $sId . "' ORDER BY `PL`.`Order`");
     for ($i = 0; $i < mysql_num_rows($res); $i++) {
         $aFile = mysql_fetch_assoc($res);
         $sPlayFile = $aFile['ID'] . PLAY_EXTENSION;
         $sSaveFile = $aFile['ID'] . SAVE_EXTENSION;
         $sImageFile = $aFile['ID'] . IMAGE_EXTENSION;
         $sThumbFile = $aFile['ID'] . THUMB_FILE_NAME . IMAGE_EXTENSION;
         if (!file_exists($sFilesPath . $sThumbFile)) {
             $sThumbFile = $sImageFile;
         }
         if (!file_exists($sFilesPath . $sPlayFile) || !file_exists($sFilesPath . $sSaveFile) || !file_exists($sFilesPath . $sImageFile)) {
             continue;
         }
         $sContents .= parseXml($aXmlTemplates['file'], $aFile['ID'], $sPlayFile, $sSaveFile, $sImageFile, $sThumbFile, $aFile['Time'], $aFile['Approved'], $aFile['Title'], $aFile['Tags'], $aFile['Description']);
     }
     $sContents = makeGroup($sContents, "files");
     $sContents = parseXml($aXmlTemplates['result'], "", SUCCESS_VAL) . $sContents;
     break;
     /**
      * Change playlist elements playing order
      */
 /**
  * Change playlist elements playing order
  */
 case 'changeOrder':
     $res = getResult("SELECT `FileId`, `Order` FROM `" . MODULE_DB_PREFIX . "PlayLists` WHERE `Owner`='" . $sId . "' AND (`FileId`='" . $sFile . "' OR `FileId`='" . $sSecondFile . "')");
     $oFile1 = mysql_fetch_assoc($res);
     $oFile2 = mysql_fetch_assoc($res);
     getResult("UPDATE `" . MODULE_DB_PREFIX . "PlayLists` SET `Order`='" . $oFile1['Order'] . "' WHERE `FileId`='" . $oFile2['FileId'] . "' AND `Owner`='" . $sId . "'");
     getResult("UPDATE `" . MODULE_DB_PREFIX . "PlayLists` SET `Order`='" . $oFile2['Order'] . "' WHERE `FileId`='" . $oFile1['FileId'] . "' AND `Owner`='" . $sId . "'");
     $sContents = parseXml($aXmlTemplates['result'], TRUE_VAL);
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:31,代码来源:actions.inc.php

示例6: getFileContents

/**
 * gets file contents
 * @param sWidget - the name of the widget.
 * @param sCase - skins/langs
 */
function getFileContents($sWidget, $sFile, $bArray = false)
{
    global $sModulesPath;
    global $aErrorCodes;
    $sFile = $sWidget . $sFile;
    $sFileName = $sModulesPath . $sFile;
    if (!file_exists($sFileName)) {
        return array('value' => getError($aErrorCodes[1], $sFile), 'status' => FAILED_VAL, 'contents' => $bArray ? array() : "");
    }
    $rHandle = fopen($sFileName, "rt");
    $iFileSize = filesize($sFileName);
    $sContents = $iFileSize > 0 ? fread($rHandle, filesize($sFileName)) : makeGroup("", "items");
    fclose($rHandle);
    $aContents = xmlGetValues($sContents, "item");
    return array('value' => "", 'status' => SUCCESS_VAL, 'contents' => $bArray ? $aContents : $sContents);
}
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:21,代码来源:functions.inc.php

示例7: parseXml

             $sMessage = "msgFileNotFound";
             break;
     }
     $sContents = parseXml($aXmlTemplates['result'], $sMessage, $sStatus);
     if ($sStatus == SUCCESS_VAL) {
         $sContents .= parseXml($aXmlTemplates['file'], $sId, $sGetFile, $sGetFile, $sImageFile, $aFile['Time'], $sSaveName);
     }
     break;
     /**
      * Get user's playlist by ID
      */
 /**
  * Get user's playlist by ID
  */
 case 'getList':
     $sContents = makeGroup("", "files");
     break;
 case 'processFile':
     $sTempFileName = $sId . VC_TEMP_FILE_NAME;
     $sTempFile = $sFilesPath . $sTempFileName . VC_FLV_EXTENSION;
     @unlink($sTempFile);
     _deleteTempFiles($sId);
     $sRecordedFileUrl = getRMSUrl($sServerApp, true) . $sStreamsFolder . $sFile . VC_FLV_EXTENSION;
     $sContents = parseXml($aXmlTemplates['result'], "msgProcessingError", FAILED_VAL);
     if (function_exists("curl_init")) {
         $fTemp = fopen($sTempFile, "w");
         $curl = curl_init();
         curl_setopt($curl, CURLOPT_URL, $sRecordedFileUrl);
         curl_setopt($curl, CURLOPT_FILE, $fTemp);
         curl_setopt($curl, CURLOPT_HEADER, false);
         curl_exec($curl);
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:31,代码来源:actions.inc.php

示例8: getSettingValue

             $aStatus = getSettingValue($sInner, "status", "main", true);
             $sStatus = $aStatus['status'] == FAILED_VAL ? WIDGET_STATUS_NOT_INSTALLED : $aStatus['value'];
             $sStatus = empty($sStatus) || $sStatus == "" ? WIDGET_STATUS_NOT_INSTALLED : $sStatus;
             $sStatus = "666" != checkPermissions($sModulesPath . $sInner . "/xml/main.xml") ? WIDGET_STATUS_NOT_INSTALLED : $sStatus;
             $sVersion = isset($aInfo) ? $aInfo['version'] : "";
             $sTitle = isset($aInfo) ? $aInfo['title'] : "";
             $sAuthor = isset($aInfo) ? $aInfo['author'] : "";
             $sAuthorUrl = isset($aInfo) ? $aInfo['authorUrl'] : "";
             $sImageUrl = file_exists($sModulesPath . $sInner . "/data/preview.jpg") ? $sModulesUrl . $sInner . "/data/preview.jpg" : "";
             $aContents[] = parseXml($aXmlTemplates['widget'], $sInner, $sVersion, $sTitle, $sAuthor, $sAuthorUrl, $sImageUrl, $sStatus, $sAdminUrl);
             $aTitles[] = $sTitle;
             array_multisort($aTitles, $aContents);
             $sContent = implode("", $aContents);
         }
     }
     $sContents = makeGroup($sContent, "widgets");
     break;
     /**
      * Gets widget code.
      */
 /**
  * Gets widget code.
  */
 case 'getWidgetCode':
     $aResult = getFileContents($sWidget, "/xml/main.xml", true);
     if ($aResult['status'] == SUCCESS_VAL) {
         $aContents = $aResult['contents'];
         $sCode = $aContents['code'];
         if (empty($sCode)) {
             if (secureCheckWidgetName($sWidget)) {
                 require_once $sModulesPath . $sWidget . "/inc/constants.inc.php";
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:31,代码来源:actions.inc.php

示例9: makeGroup

  * Note. This action is used in XML mode and by ADMIN.
  */
 case 'update':
     //--- check for new rooms ---//
     $sContents .= makeGroup(getRooms('upd', $sId), "rooms");
     //--- update user's info ---//
     $sContents .= refreshUsersInfo($sId, 'upd');
     //--- check for new messages ---//
     $iUpdateInterval = (int) getSettingValue($sModule, "updateInterval");
     $sMsgs = "";
     $res = getResult("SELECT cm.`ID` AS `ID`, cm.`Msg` AS `Msg`, cm.`Style` AS `Style`, ccu.`ID` AS `userID` FROM `" . MODULE_DB_PREFIX . "Messages` AS cm, `" . MODULE_DB_PREFIX . "CurrentUsers` AS ccu WHERE cm.`UserID`=ccu.`ID` AND cm.`UserID`<>'" . $sId . "' AND cm.`When`>=(UNIX_TIMESTAMP()-" . $iUpdateInterval . ") ORDER BY cm.`ID`");
     while ($aMsg = mysql_fetch_assoc($res)) {
         $aStyle = unserialize($aMsg['Style']);
         $sMsgs .= parseXml($aXmlTemplates['message'], $aMsg['ID'], stripslashes($aMsg['Msg']), $aMsg['userID'], $aStyle['color'], $aStyle['bold'], $aStyle['underline'], $aStyle['italic'], $aStyle['smileset']);
     }
     $sContents .= makeGroup($sMsgs, "msgs");
     break;
     /**
      * Add message to database.
      */
 /**
  * Add message to database.
  */
 case 'newMessage':
     $c = $_REQUEST['color'] ? $_REQUEST['color'] : "0";
     $b = $_REQUEST['bold'] ? $_REQUEST['bold'] : "false";
     $u = $_REQUEST['underline'] ? $_REQUEST['underline'] : "false";
     $i = $_REQUEST['italic'] ? $_REQUEST['italic'] : "false";
     $sStyle = serialize(array('color' => $c, 'bold' => $b, 'underline' => $u, 'italic' => $i, 'smileset' => $sSmileset));
     getResult("INSERT INTO `" . MODULE_DB_PREFIX . "Messages`(`UserID`, `Msg`, `Style`, `When`) VALUES('" . $sId . "', '" . addslashes($sMsg) . "', '" . $sStyle . "', UNIX_TIMESTAMP())");
     break;
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:31,代码来源:actions.inc.php

示例10: PrepareData

function PrepareData(&$person_count,$type){
	
	global $GroupCostCenter;
	global $GroupPersonType;
	
	global $where;
	global $param;
	
	$payment_type = $_POST["PayType"] ;
	$pay_year = $_POST["pay_year"];
	$pay_month = $_POST["pay_month"];

	$where = "";
	$param = array(
		":year" => $pay_year,
		":month" => $pay_month,
		":ptype" => $payment_type
	);
	
	makeWhere();
	$group = makeGroup();
	
	$month_start = DateModules::shamsi_to_miladi($pay_year . "-" . $pay_month . "-1");
	
	if($type == 'TSummary') {
		manage_salary_utils::simulate_tax($pay_year, $pay_month, $payment_type);
		manage_salary_utils::simulate_bime($pay_year, $pay_month, $payment_type);
			
	$MainRows = PdoDataAccess::runquery("
		SELECT pi.salary_item_type_id,
			sit.full_title sit_title,
			sit.effect_type,
			max(pi.pay_year) pay_year,
			max(pi.pay_month) pay_month,
			sum(pay_value) pay_sum,
			sum(diff_pay_value * diff_value_coef) diff_pay_sum,
			sum(CASE WHEN pi.salary_item_type_id IN(146,147,148,747) THEN tts.value WHEN pi.salary_item_type_id IN(9920,145,144) THEN tis.value ELSE get_value END) get_sum,
			sum(CASE WHEN pi.salary_item_type_id IN(146,147,148,747,9920,145,144,744) THEN 0 ELSE diff_get_value * diff_value_coef END) diff_get_sum,
			sum(CASE WHEN pi.salary_item_type_id IN(146,147,148,747) THEN tts.param2 WHEN pi.salary_item_type_id IN(9920,145,144) THEN tis.param2 ELSE pi.param2 END) param2,
			sum(CASE WHEN pi.salary_item_type_id IN(146,147,148,747,9920,145,144,744) THEN 0 ELSE diff_param2 * diff_param2_coef END) diff_param2,
			sum(CASE WHEN pi.salary_item_type_id IN(146,147,148,747) THEN tts.param3 WHEN pi.salary_item_type_id IN(9920,145,144) THEN tis.param3 ELSE pi.param3 END) param3,
			sum(CASE WHEN pi.salary_item_type_id IN(146,147,148,747,9920,145,144,744) THEN 0 ELSE diff_param3 * diff_param3_coef END) diff_param3,
			sum(CASE
					WHEN (s.last_retired_pay IS NOT NULL
						AND s.last_retired_pay < '$month_start') THEN pi.param3
				END) retired_for_org_up30,
			sum(CASE
					WHEN (s.last_retired_pay IS NOT NULL
						AND s.last_retired_pay < '$month_start') THEN diff_param3 * diff_param3_coef
				END) diff_retired_for_org_up30,

			sum(CASE
					WHEN (s.last_retired_pay IS NULL
						OR s.last_retired_pay >= '$month_start') THEN pi.param3
				END) retired_for_org_dn30,
			sum(CASE
					WHEN (s.last_retired_pay IS NULL
						OR s.last_retired_pay >= '$month_start') THEN diff_param3 * diff_param3_coef
				END) diff_retired_for_org_dn30,
			sum(pi.param7) param7,
			sum(pi.diff_param7 * pi.diff_value_coef) diff_param7,								  
			max(s.person_type) person_type,
			max(pi.cost_center_id) cost_center_id,
			max(cc.title) cost_center_title,
			max(ou.ptitle) unit_title,
			max(s.person_type) person_type,
			max(w.ouid) ouid

		FROM payment_items pi
			INNER JOIN payments p
				ON(pi.pay_year = p.pay_year AND pi.pay_month = p.pay_month AND pi.staff_id = p.staff_id AND pi.payment_type = p.payment_type 
					AND pi.pay_year = :year AND pi.pay_month = :month)
			INNER JOIN writs w
				ON(p.writ_id = w.writ_id AND p.writ_ver = w.writ_ver AND p.staff_id = w.staff_id AND w.state=" . WRIT_SALARY . ")
			LEFT OUTER JOIN org_new_units ou
				ON(w.ouid = ou.ouid)
			LEFT OUTER JOIN cost_centers cc
				ON (pi.cost_center_id = cc.cost_center_id)
			LEFT OUTER JOIN salary_item_types sit
				ON (sit.salary_item_type_id = pi.salary_item_type_id AND sit.credit_topic = 1)
			LEFT OUTER JOIN staff s
				ON (pi.staff_id = s.staff_id)
			LEFT OUTER JOIN temp_tax_include_sum tts
				ON (tts.staff_id = pi.staff_id AND pi.salary_item_type_id IN(146,147,148,747))
			LEFT OUTER JOIN temp_insure_include_sum tis
				ON (tis.staff_id = pi.staff_id AND pi.salary_item_type_id IN(9920,145,144,744)) 
				
		WHERE pi.payment_type = :ptype AND pi.pay_year=:year AND pi.pay_month=:month $where
				
		GROUP BY pi.salary_item_type_id,sit.effect_type,sit.full_title $group
		ORDER BY pi.pay_year,pi.pay_month" . $group . ",pi.salary_item_type_id", $param);
	
	//echo PdoDataAccess::GetLatestQueryString();
	}
	elseif($type == 'Summary') {
	
		$MainRows = PdoDataAccess::runquery(" SELECT   pi.salary_item_type_id,
													   sit.full_title sit_title,
													   sit.effect_type,
													   max(pi.pay_year) pay_year,
//.........这里部分代码省略.........
开发者ID:jafarkhani,项目名称:rtfund,代码行数:101,代码来源:treasure_summary.php

示例11: parseXml

             $sContents .= parseXml($aXmlTemplates['board'], $sBoardId, BOARD_STATUS_NEW, $aBoard['Title'], $aUserInfo['nick'], $aUserInfo['profile'], $sImage);
         } else {
             $iModifiedTime = filemtime($sFilesPath . $sBoardId . $sFileExtension);
             if ($iModifiedTime >= $iCurrentTime - $iUpdateInterval) {
                 $sContents .= parseXml($aXmlTemplates['board'], $sBoardId, BOARD_STATUS_UPDATED);
             }
         }
     }
     for ($i = 0; $i < $iAllCount; $i++) {
         if (!isset($aBoards[$aAll[$i]])) {
             $sBoardId = $aAll[$i];
             @unlink($sFilesPath . $sBoardId . $sFileExtension);
             $sContents .= parseXml($aXmlTemplates['board'], $sBoardId, BOARD_STATUS_CLOSED);
         }
     }
     $sContents = makeGroup($sContents, 'boards');
     break;
     /**
      * Transmit new Scene file from specified Board.
      * param - boardId
      * param - width
      * param - height
      * param - data
      */
 /**
  * Transmit new Scene file from specified Board.
  * param - boardId
  * param - width
  * param - height
  * param - data
  */
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:31,代码来源:actions.inc.php

示例12: getOnline

  */
 case "updateOnlineUsers":
     $aCurDbOnline = getOnline();
     $aCurProgOnline = empty($_REQUEST['online']) ? array() : explode(",", $_REQUEST['online']);
     //--- Get new online users ---//
     $aNewOnline = array_diff($aCurDbOnline, $aCurProgOnline);
     foreach ($aNewOnline as $iNewOnline) {
         $aUserInfo = getUserInfo($iNewOnline);
         $sContents .= parseXml($aXmlTemplates['user'], $iNewOnline, $aUserInfo['nick'], $aUserInfo['sex'], $aUserInfo['age'], TRUE_VAL, $aUserInfo['photo'], $aUserInfo['profile']);
     }
     //--- Get new offline users ---//
     $aNewOffline = array_diff($aCurProgOnline, $aCurDbOnline);
     foreach ($aNewOffline as $iNewOffline) {
         $sContents .= parseXml($aXmlTemplates['user'], $iNewOffline, FALSE_VAL);
     }
     $sContents = makeGroup($sContents, "users");
     break;
     /**
      * Updates user's information in RayPresenceUsers table.
      * For Users, who didn't login into Ray Presence, but logged in into site.
      * @param id - user's ID.
      * @param status - user's status.
      */
 /**
  * Updates user's information in RayPresenceUsers table.
  * For Users, who didn't login into Ray Presence, but logged in into site.
  * @param id - user's ID.
  * @param status - user's status.
  */
 case "updateOnlineStatus":
     updateOnline($sId, $sStatus);
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:31,代码来源:actions.inc.php

示例13: getValue

        $iCount = getValue("SELECT COUNT(`ID`) FROM `" . MODULE_DB_PREFIX . "Messages`");
        if ($iCount > $iMaxCount) {
            getResult("DELETE FROM `" . MODULE_DB_PREFIX . "Messages` ORDER BY `ID` LIMIT " . ($iCount - $iMaxCount));
        }
        $sIn = empty($sGot) ? "1" : "`ID` NOT IN (" . $sGot . ")";
        $sUserFactor = empty($sId) ? "" : " AND `UserID`<>'" . $sId . "'";
        $sSql = "SELECT * FROM `" . MODULE_DB_PREFIX . "Messages` WHERE " . $sIn . $sUserFactor . " AND `When`>=(UNIX_TIMESTAMP()-" . $iUpdateInterval . ") ORDER BY `ID`";
        //break shouldn't be here
    //break shouldn't be here
    case 'getMessages':
        $sContents = "";
        if (!isset($sSql)) {
            $sSql = "SELECT * FROM `" . MODULE_DB_PREFIX . "Messages` ORDER BY `ID`";
        }
        $rResult = getResult($sSql);
        while ($aMsg = mysql_fetch_assoc($rResult)) {
            $aUserInfo = empty($aMsg['UserID']) ? array('nick' => "", 'profile' => "") : getUserInfo($aMsg['UserID']);
            $sContents .= parseXml($aXmlTemplates['message'], $aMsg['ID'], stripslashes($aMsg['Msg']), $aUserInfo['nick'], $aUserInfo['profile']);
        }
        $sContents = makeGroup($sContents, "messages");
        break;
        /**
         * Add message to database.
         */
    /**
     * Add message to database.
     */
    case 'newMessage':
        getResult("INSERT INTO `" . MODULE_DB_PREFIX . "Messages`(`UserID`, `Msg`, `When`) VALUES('" . $sId . "', '" . addslashes($sMsg) . "', UNIX_TIMESTAMP())");
        break;
}
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:31,代码来源:actions.inc.php

示例14: makeGroup

 public function makeGroup()
 {
     $result = makeGroup();
     print_r($result);
 }
开发者ID:dlpc,项目名称:we_three,代码行数:5,代码来源:groupmanage.php

示例15: printFiles

/**
 * get extra files for module in XML format
 * @param $sModule - module name
 * @param $sFolder - folder name for which value is set
 * @param $bGetDate - get dates of files
 * @return $sContents - XML formatted result
 */
function printFiles($sModule, $sFolder = "langs", $bGetDate = false, $bGetNames = false)
{
    global $sIncPath;
    global $sModulesUrl;
    require_once $sIncPath . "xmlTemplates.inc.php";
    $aFileContents = getFileContents($sModule, "/xml/" . $sFolder . ".xml", true);
    $aFiles = $aFileContents['contents'];
    $aEnabledFiles = array();
    foreach ($aFiles as $sFile => $sEnabled) {
        if ($sEnabled == TRUE_VAL) {
            $aEnabledFiles[] = $sFile;
        }
    }
    $sDefault = $aFiles['_default_'];
    $aResult = getExtraFiles($sModule, $sFolder, true, $bGetDate);
    $sCurrent = $aResult['current'];
    $sCurrent = in_array($sCurrent, $aEnabledFiles) ? $sCurrent : $sDefault;
    $sCurrentFile = $sCurrent . "." . $aResult['extension'];
    $aRealFiles = array_flip($aResult['files']);
    $aFileDates = $aResult['dates'];
    $sContents = "";
    for ($i = 0; $i < count($aEnabledFiles); $i++) {
        if (isset($aRealFiles[$aEnabledFiles[$i]])) {
            $sFile = $aEnabledFiles[$i];
            if ($bGetDate) {
                $sContents .= parseXml($aXmlTemplates['file'], $sFile, $aFileDates[$aRealFiles[$sFile]]);
            } else {
                if ($bGetNames) {
                    $sName = $sFolder == "langs" ? getSettingValue($sModule, "_name_", $sFile, false, "langs") : getSettingValue($sModule, $sFile, "skinsNames");
                    if (empty($sName)) {
                        $sName = $sFile;
                    }
                    $sContents .= parseXml($aXmlTemplates['file'], $sFile, $sName, "");
                } else {
                    $sContents .= parseXml($aXmlTemplates['file'], $sFile);
                }
            }
        }
    }
    $sContents = makeGroup($sContents, "files");
    $sContents .= parseXml($aXmlTemplates['current'], $sCurrent, $sModulesUrl . $sModule . "/" . $sFolder . "/" . $sCurrentFile);
    return $sContents;
}
开发者ID:dalinhuang,项目名称:shopexts,代码行数:50,代码来源:apiFunctions.inc.php


注:本文中的makeGroup函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。