function actionPending() { $oDb = new BxDolDb(); $sFormName = 'categories_aprove_form'; $aItems = array(); if (is_array($_POST['pathes']) && !empty($_POST['pathes'])) { foreach ($_POST['pathes'] as $sValue) { list($sCategory, $sId, $sType) = split('%%', process_db_input($sValue, BX_TAGS_STRIP)); $oDb->query("UPDATE `sys_categories` SET `Status` = 'active' WHERE\n `Category` = '{$sCategory}' AND `ID` = {$sId} AND `Type` = '{$sType}'"); } } $aCategories = $oDb->getAll("SELECT * FROM `sys_categories` WHERE `Status` = 'passive'"); if (!empty($aCategories)) { foreach ($aCategories as $aCategory) { $aItems[] = array('name' => $aCategory['Category'], 'value' => $aCategory['Category'] . '%%' . $aCategory['ID'] . '%%' . $aCategory['Type'], 'title' => $aCategory['Category'] . '(' . $aCategory['Type'] . ')'); } $aButtons = array('action_activate' => _t('_categ_btn_activate')); $sControls = BxTemplSearchResult::showAdminActionsPanel($sFormName, $aButtons, 'pathes'); return $GLOBALS['oAdmTemplate']->parseHtmlByName('categories_list.html', array('form_name' => $sFormName, 'bx_repeat:items' => $aItems, 'controls' => $sControls)); } else { return MsgBox(_t('_Empty')); } }
function getData() { $oDb = new BxDolDb(); return $oDb->getAll("SELECT *, DAYOFMONTH(`Date`) AS `Day`\n FROM `sys_tags`\n WHERE `Date` >= TIMESTAMP('{$this->iYear}-{$this->iMonth}-1') AND `Date` < TIMESTAMP('{$this->iNextYear}-{$this->iNextMonth}-1')"); }
function getData() { $oDb = new BxDolDb(); return $oDb->getAll("SELECT *, DAYOFMONTH(`Date`) AS `Day`\n FROM `sys_categories`\n WHERE `Date` >= TIMESTAMP('{$this->iYear}-{$this->iMonth}-1')\n AND `Date` < TIMESTAMP('{$this->iNextYear}-{$this->iNextMonth}-1')\n AND `Owner` <> 0 AND `Status` = 'active'"); }