Changeset 7387 for trunk/templates/base/scripts/BxBaseUserAlertsView.php
- Timestamp:
- 10/31/08 11:35:27 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/templates/base/scripts/BxBaseUserAlertsView.php
r7227 r7387 1 1 <?php 2 2 3 require_once('inc/header.inc.php'); 4 require_once(BX_DIRECTORY_PATH_INC . 'db.inc.php'); 5 require_once(BX_DIRECTORY_PATH_INC . 'languages.inc.php'); 6 require_once(BX_DIRECTORY_PATH_INC . 'profiles.inc.php'); 3 require_once(BX_DIRECTORY_PATH_INC . 'header.inc.php'); 7 4 require_once(BX_DIRECTORY_PATH_CLASSES . 'BxDolAlerts.php'); 8 5 … … 24 21 $this->oConf = new BxDolAlerts('', '', 0, 0); 25 22 26 if (is_array($aInActive) ) {23 if (is_array($aInActive) && !empty($aInActive)) { 27 24 foreach ($aInActive as $iKey => $sValue) 28 25 $sAdd .= " AND `{$this->oConf->aAlrFields['actionUnit']}` <> '$sValue'"; … … 41 38 $sqlQuery = str_replace('__mainFields__', trim($sMainFields, ', '), $sqlTempl); 42 39 $rData = db_res($sqlQuery); 43 40 44 41 if (mysql_num_rows($rData) > 0) { 45 42 while ($aMess = mysql_fetch_assoc($rData)) { 46 43 $this->aList[$aMess['alertId']] = $aMess; 47 $sqlDelCond .= $aMess['alertId'] . ",";48 44 } 49 $sqlQuery = "DELETE FROM `{$this->oConf->sAlrTable}`50 WHERE `{$this->oConf->aAlrFields['alertId']}` NOT IN (".trim($sqlDelCond,",").")51 AND `{$this->oConf->aAlrFields['alertRcpId']}`='{$this->iOwner}'";52 db_res($sqlQuery);53 45 } 54 46 } … … 85 77 WHERE `{$this->oConf->aAlrFields['alertRcpId']}`='$this->iOwner' AND `{$this->oConf->aAlrFields['alertNew']}`=1 86 78 GROUP BY `{$this->oConf->aAlrFields['actionUnit']}`"; 87 79 88 80 $rData = db_res($sqlQuery); 89 81 while ($aUnit = mysql_fetch_assoc($rData)) … … 96 88 $sCode = '<div id="alertsMenu">'; 97 89 if (is_array($aUnits)) { 90 $oUnits = new BxDolAlertsResponseUser(); 98 91 foreach ($aUnits as $iKey => $sValue) 99 92 $sCode .= ' 100 93 <input type="checkbox" name="' . $sValue . '" id="' . $sValue . '"> 101 <label for="' . $sValue . '"><img src="'.getTemplateIcon($ this->oConf->aSupportUnits[$sValue]['picFile']).'" alt="'._t($this->oConf->aSupportUnits[$sValue]['caption']).'"></label>94 <label for="' . $sValue . '"><img src="'.getTemplateIcon($oUnits->aSupportUnits[$sValue]['picFile']).'" alt="'._t($oUnits->aSupportUnits[$sValue]['caption']).'"></label> 102 95 '; 103 96 }
Note: See TracChangeset
for help on using the changeset viewer.