Пример #1
0
 function inject($initial_value, $accumulator_name, $iterator_name, $block)
 {
     $proc = new Proc($accumulator_name, $iterator_name, $block);
     foreach ($this as $iterator) {
         $initial_value = $proc->call($initial_value, $iterator);
     }
     return $initial_value;
 }
 public function actionAuthitemFields()
 {
     $result = Proc::GenerateColModel(AuthItem::model(), AuthItem::model()->AuthitemUser());
     /*  Proc::Fields_ChangeColModel($result, 'name', ['hidden' => false, 'isid' => false]); */
     /* "Checked" - Используется для выделения AuthItem's, присвоенные пользователю */
     Proc::Fields_ChangeColModel($result, 'Checked', ['hidden' => true, 'isid' => true]);
     Proc::Fields_ChangeColModel($result, 'type', ['edittype' => 'select', 'editoptions' => ['edittype' => 'select', 'value' => ':;0:Операция;1:Задача;2:Роль'], 'stype' => 'select', 'searchoptions' => ['value' => ':;0:Операция;1:Задача;2:Роль', 'defaultValue' => '', 'clearSearch' => false], 'formatter' => 'select']);
     echo json_encode($result);
 }
Пример #3
0
 /**
  * Функция возвращает критерий модели для диалогового окна "Список информационных систем"
  * 
  * @return \CDbCriteria
  */
 public function Islistcriteria()
 {
     // @todo Please modify the following code to remove attributes that should not be searched.
     $criteria = new CDbCriteria();
     $criteria->select = array('islist_id', 'islist_ico', 'islist_title', 'islist_text', 'islist_targeturl', 'islist_x1', 'islist_y1', 'islist_w', 'islist_h', 'islist_dim_w', 'islist_dim_h');
     foreach ($this->attributeNames() as $attr) {
         Proc::CompareCriteria($attr, (string) filter_input(INPUT_POST, $attr), $criteria);
     }
     return $criteria;
 }
Пример #4
0
 /**
  * Функция возвращает критерий модели для диалогового окна "Пользователи системы"
  * 
  * @return \CDbCriteria
  */
 public function Usercriteria()
 {
     // @todo Please modify the following code to remove attributes that should not be searched.
     $criteria = new CDbCriteria();
     $criteria->select = array('id', 'fullname', 'username');
     foreach ($this->attributeNames() as $attr) {
         Proc::CompareCriteria($attr, (string) filter_input(INPUT_POST, $attr), $criteria);
     }
     return $criteria;
 }
Пример #5
0
 /** Представление для выбора ролей в профиле группы LDAP
  * 
  * @param type $id - ID группы LDAP
  * @return type
  * @throws CHttpException
  */
 public static function v_AuthitemGroupldap()
 {
     if (!Proc::CheckAccessPortal('PermissionsEditor')) {
         throw new CHttpException(500, 'У пользователя нет доступа к представлению "v_AuthitemGroupldap"');
     }
     $id = (string) filter_input(INPUT_POST, 'id') !== '' ? (string) filter_input(INPUT_POST, 'id') : (string) filter_input(INPUT_GET, 'id');
     if ($id === '') {
         throw new CHttpException(500, 'отстутствует $_POST["id"] для представления "v_AuthitemGroupldap"');
     }
     $command = Yii::app()->db->createCommand();
     return $command->select(['NAME', 'description', 'itemname', 'IF (NAME = itemname,true,false) AS Checked'])->from(['AuthItem'])->leftJoin('AuthItemChild', 'parent = NAME')->leftJoin('authassignmentldap', ['and', 'itemname = NAME', 'groupid = :groupid'], [':groupid' => $id])->andWhere('not parent in (SELECT b.child FROM AuthItemChild b ) OR (parent IS NULL)')->andWhere('type=:type', [':type' => '2'])->group(['NAME'])->order(['NAME']);
 }
Пример #6
0
 /**
  * Выводит объект с данными и правами пользователя
  */
 public function actionGetPermissions()
 {
     $status = '';
     try {
         if (isset(Yii::app()->user->authmode) && Yii::app()->user->authmode === 'LDAP') {
             Yii::app()->ldap->connect();
         }
     } catch (Exception $ex) {
         Yii::app()->user->logout();
         $status = 'resetlogon';
     }
     echo json_encode(array_merge((array) (object) ['isGuest' => Yii::app()->user->isGuest ? true : false, 'LDAPAccess' => Yii::app()->hasComponent('ldap'), 'status' => $status], !Yii::app()->user->isGuest ? (array) (object) ['Name' => isset(Yii::app()->user->memberof) ? Yii::app()->ldap->user()->infoCollection(Yii::app()->user->name, array("*"))->displayname : Yii::app()->user->name, 'role' => Proc::GetAuthitemsbyUsername(), 'Authmode' => Yii::app()->user->authmode, 'Login' => strtolower(Yii::app()->user->getName())] : []));
 }
Пример #7
0
 /**
  * Функция выводит все CAuthItem, которые содержит группа LDAP, включая детей
  * 
  * @return array
  */
 public static function GetAuthItemsbyUserLDAP()
 {
     $autharr = [];
     if (isset(Yii::app()->user->memberof)) {
         $connection = Yii::app()->db;
         $sql = 'SELECT AuthItem.NAME FROM groupldap INNER JOIN authassignmentldap ON authassignmentldap.groupid = groupldap.id INNER JOIN AuthItem ON authassignmentldap.itemname = AuthItem.NAME WHERE groupldap.groupname IN ("' . implode('","', Yii::app()->user->memberof) . '")';
         $command = $connection->createCommand($sql);
         $rows = $command->queryAll();
         foreach ($rows as $i => $row) {
             array_push($autharr, $row['NAME']);
         }
     }
     $result = [];
     if (count((array) $autharr) > 0) {
         Proc::getItemChildrenRecursive($autharr, $result);
     }
     return $result;
 }
 public function actionIslistFields()
 {
     /* генерируем ColModel JQGrid на основе модели и ее критерия */
     $result = Proc::GenerateColModel(Islist::model(), Islist::model()->Islistcriteria());
     Proc::Fields_ChangeColModel($result, 'islist_ico', ['formatter' => 'IcoBuild']);
     Proc::Fields_ChangeColModel($result, 'islist_ico', ['search' => false]);
     Proc::Fields_ChangeColModel($result, 'islist_ico', ['align' => 'center']);
     Proc::Fields_ChangeColModel($result, 'islist_ico', ['width' => '100']);
     Proc::Fields_ChangeColModel($result, 'islist_ico', ['fixed' => true]);
     Proc::Fields_ChangeColModel($result, 'islist_text', ['classes' => 'longtextcell']);
     Proc::Fields_ChangeColModel($result, 'islist_targeturl', ['formatter' => 'URLBuild']);
     Proc::Fields_ChangeColModel($result, 'islist_x1', ['hidden' => true, 'isid' => true]);
     Proc::Fields_ChangeColModel($result, 'islist_y1', ['hidden' => true, 'isid' => true]);
     Proc::Fields_ChangeColModel($result, 'islist_w', ['hidden' => true, 'isid' => true]);
     Proc::Fields_ChangeColModel($result, 'islist_h', ['hidden' => true, 'isid' => true]);
     Proc::Fields_ChangeColModel($result, 'islist_dim_w', ['hidden' => true, 'isid' => true]);
     Proc::Fields_ChangeColModel($result, 'islist_dim_h', ['hidden' => true, 'isid' => true]);
     echo json_encode($result);
 }
Пример #9
0
 private static function AssignMatvid($material_name1c)
 {
     // Определяем Вид материальной ценности
     Proc::mb_preg_match_all('/[а-яА-Яa-zA-Z\\d]+/u', $material_name1c, $match_arr, PREG_OFFSET_CAPTURE, 0, 'UTF-8');
     $i = 0;
     $tmpmin = [1, ''];
     while ($i < count($match_arr[0])) {
         $word = $match_arr[0][$i];
         $str = mb_substr($material_name1c, 0, $word[1], 'UTF-8') . $word[0];
         $rows = Importmaterial::model()->FindAll(['condition' => "importmaterial_combination LIKE :importmaterial_combination", 'params' => [':importmaterial_combination' => $str . '%'], 'order' => 'CHAR_LENGTH(importmaterial_combination)']);
         if (count((array) $rows) === 1 && mb_stripos($material_name1c, $rows[0]['importmaterial_combination'], 0, 'UTF-8') === 0 || count((array) $rows) > 1) {
             $tmpmin = [$rows[0]['id_matvid'], $rows[0]['importmaterial_combination']];
         } else {
             break;
         }
         $i++;
     }
     // Если Вид материальной ценности не определен, то ставится ключ 1 со значением "Не определен"
     return $tmpmin[0];
 }
Пример #10
0
    </div>  
    <div id="taskdownlabel" class="downlabel">ЗАДАЧИ</div>
</div>

<div class="authitemsbuttonsright">
    <?php 
/* Сохранить */
Proc::ButtonConstruct($this, ['id' => 'authitemssavebutton', 'caption' => 'Сохранить', 'onclickfunc' => 'SaveRoleDialog()']);
/* Закрыть */
Proc::ButtonConstruct($this, ['id' => 'authitemsclosebutton', 'caption' => 'Закрыть', 'onclickfunc' => '$("#authitemsdialog").dialog("close")']);
?>
 
</div>
<div class="authitemsbuttonsleft">
    <?php 
/* Создать */
Proc::ButtonConstruct($this, ['id' => 'DialogAuthItemNewButton', 'caption' => 'Создать', 'onclickfunc' => 'LoadNewItemDialog(this, "add")']);
/* Изменить */
Proc::ButtonConstruct($this, ['id' => 'DialogAuthItemEditButton', 'caption' => 'Изменить', 'onclickfunc' => 'LoadNewItemDialog(this, "edit")']);
/* Удалить */
Proc::ButtonConstruct($this, ['id' => 'DialogAuthItemDelButton', 'caption' => 'Удалить', 'onclickfunc' => 'DeleteAuthItem()']);
/* Копировать */
Proc::ButtonConstruct($this, ['id' => 'DialogAuthItemCopyButton', 'caption' => 'Копировать', 'onclickfunc' => 'CopyAuthItem()']);
?>
 
</div>

<?php 
/* Диалог "Создать новую роль" */
$this->beginWidget('zii.widgets.jui.CJuiDialog', array_replace_recursive(Proc::GetDefDialogOptions(['id' => 'authitemnewdialog', 'savebuttonfunc' => 'AuthItemSaveButton($(this))']), ['options' => ['width' => 450]]));
$this->endWidget('zii.widgets.jui.CJuiDialog');
Пример #11
0
<?php

/* Функция создает Jquery Tabs, в которой закладки отображаются, если у пользователя есть право видимости этой закладки */
Proc::TabsConstruct($this, ['id' => 'administrationtabs', 'tabs' => array('Общие настройки' => ['PermAccess' => 'GeneralSettings', 'ajax' => Yii::app()->createUrl('Configurations/Configuration/Config'), 'id' => 'configtab'], 'Права доступа' => ['PermAccess' => 'PermissionsEditor', 'ajax' => Yii::app()->createUrl('Configurations/AuthItemManager/Tab'), 'id' => 'permissionstab'], 'Настройки портала ОФОМС' => ['PermAccess' => 'PortalOfomsConfig', 'ajax' => Yii::app()->createUrl('Configurations/OfomsManager/Tab'), 'id' => 'ofomsconftab']), 'htmlOptions' => ['class' => 'transparentload']]);
Пример #12
0
    <tbody>
        <tr>
            <td style="height: 400px; width: 960px;/*height: 400px; width: 960px;*/" class="grid_container"> 
                <div style="width: 1px;">
                    <table id="Usergrid"></table>
                    <div id="Userpager"></div> 
                </div>
            </td>
        </tr>
        <tr>
            <td class="buttonMenuBottom">
                <?php 
/* Добавить пользователя */
Proc::ButtonConstruct($this, ['id' => 'user_profile_new', 'caption' => 'Добавить', 'onclickfunc' => 'UserProfileDialog(this, "add")']);
/* Изменить пользователя */
Proc::ButtonConstruct($this, ['id' => 'user_profile_edit', 'caption' => 'Изменить', 'onclickfunc' => 'UserProfileDialog(this, "edit")']);
/* Удалить пользователя */
Proc::ButtonConstruct($this, ['id' => 'user_delete', 'caption' => 'Удалить', 'onclickfunc' => 'UserProfileDialog(this, "del")']);
/* Сменить пароль */
Proc::ButtonConstruct($this, ['id' => 'user_changepassword', 'caption' => 'Сменить пароль', 'onclickfunc' => 'UserProfileDialog(this, "changepassword")']);
?>
            </td>
        </tr>
    </tbody>
</table>

<?php 
$this->beginWidget('zii.widgets.jui.CJuiDialog', Proc::GetDefDialogOptions(['id' => 'UserForm', 'label' => AuthItem::GetLabel(), 'savebuttonfunc' => 'UserSaveButton($(this))']));
$this->endWidget('zii.widgets.jui.CJuiDialog');
$this->beginWidget('zii.widgets.jui.CJuiDialog', array_replace_recursive(Proc::GetDefDialogOptions(['id' => 'UserChangePasswordForm', 'label' => 'Сменить пароль', 'savebuttonfunc' => 'UserSaveButton($(this))']), ['options' => ['width' => 300]]));
$this->endWidget('zii.widgets.jui.CJuiDialog');
Пример #13
0
Yii::app()->getClientScript()->registerScriptFile(Yii::app()->request->baseUrl . '/js/proc/GroupsLDAP.js', CClientScript::POS_HEAD);
?>

<table>
    <tbody>
        <tr>
            <td style="height: 400px; width: 960px;" class="grid_container"> 
                <div style="width: 1px;">
                    <table id="Groupldapgrid"></table>
                    <div id="Groupldappager"></div> 
                </div>
            </td>
        </tr>
        <tr>
            <td class="buttonMenuBottom">
                <?php 
/* Добавить группу LDAP */
Proc::ButtonConstruct($this, ['id' => 'groupldap_profile_new', 'caption' => 'Добавить', 'onclickfunc' => 'GroupldapProfileDialog(this, "add")']);
/* Изменить группу LDAP */
Proc::ButtonConstruct($this, ['id' => 'groupldap_profile_edit', 'caption' => 'Изменить', 'onclickfunc' => 'GroupldapProfileDialog(this, "edit")']);
/* Удалить группу LDAP */
Proc::ButtonConstruct($this, ['id' => 'groupldap_delete', 'caption' => 'Удалить', 'onclickfunc' => 'GroupldapProfileDialog(this, "del")']);
?>
            </td>
        </tr>
    </tbody>
</table>

<?php 
$this->beginWidget('zii.widgets.jui.CJuiDialog', Proc::GetDefDialogOptions(['id' => 'GroupldapForm', 'label' => AuthItem::GetLabel(), 'savebuttonfunc' => 'GroupldapSaveButton($(this))']));
$this->endWidget('zii.widgets.jui.CJuiDialog');
Пример #14
0
        <tr>
            <!--id="td1"-->
            <td   class="grid_container" style="padding-top: 0;"> 
                <div style="height: 400px; width: 1px;">
                    <table id="PortalOFOMSgrid"></table>
                    <div id="PortalOFOMSpager"></div>
                </div>
            </td>
        </tr>
        <tr>
            <td class="buttonMenuBottom">
                <?php 
/* Прикрепить к ЛПУ */
if (Proc::CheckAccessPortal('PortalOfomsViewPrik')) {
    Proc::ButtonConstruct($this, ['id' => 'portalofoms_prik', 'caption' => 'Прикрепить', 'onclickfunc' => 'PortalOFOMSPrikDialog(this)']);
}
/* Помощь */
Proc::ButtonConstruct($this, ['id' => 'portalofoms_help', 'caption' => 'Помощь', 'onclickfunc' => 'LoadDialogContent({dialogelem_id: "portalofomshelpdialog",loadurl:"' . Yii::app()->createUrl('PortalOFOMS/PortalOFOMS/LoadPortalOFOMSHelpContent') . '", buttonelem: $(this)})']);
?>
            </td>
        </tr>
    </tbody>
</table>

<?php 
/* Диалог "Прикрепить" */
$this->beginWidget('zii.widgets.jui.CJuiDialog', array_replace_recursive(Proc::GetDefDialogOptions(['id' => 'portalofomsprikdialog', 'label' => 'Прикрепление пациента', 'savebuttonfunc' => 'PortalOFOMSPrikSaveButton($(this))']), ['options' => ['width' => 350]]));
$this->endWidget('zii.widgets.jui.CJuiDialog');
/* Диалог "Помощь" */
$this->beginWidget('zii.widgets.jui.CJuiDialog', array_replace_recursive(Proc::GetDefDialogOptions(['id' => 'portalofomshelpdialog', 'label' => 'Помощь']), ['options' => ['width' => 1000]]));
$this->endWidget('zii.widgets.jui.CJuiDialog');
Пример #15
0
 /**
  */
 protected function output($result)
 {
     switch ($application = $this->config->application) {
         case 'dot':
         case 'neato':
         case 'fdp':
         case 'circo':
         case 'twopi':
             Proc::Pipe(Core_Strings::format('%s -T%s %s', $application, $this->config->format, $this->config->output ? ' -o ' . $this->config->output : ''), 'w')->write($result)->close();
             break;
         default:
             throw new Dev_Diagram_Exception(Core_Strings::format('Unknown application (%s)', $application));
     }
 }
        <tr>
            <td style="height: 400px; width: 960px;/*height: 400px; width: 960px;*/" class="grid_container"> 
                <div style="width: 1px;">
                    <table id="Importemployeegrid"></table>
                    <div id="Importemployeepager"></div>  
                </div>
            </td>
        </tr>
        <tr>
            <td class="buttonMenuBottom">
                <?php 
/* Добавить */
//Proc::ButtonConstruct($this, ['id' => 'fr_importmaterial_addbutton', 'caption' => 'Добавить', 'onclickfunc' => 'console.debug("test")']);
?>
                <?php 
/* Изменить */
//  Proc::ButtonConstruct($this, ['id' => 'fr_importmaterial_editbutton', 'caption' => 'Изменить', 'onclickfunc' => 'console.debug("test")']);
?>
                <?php 
/* Удалить */
//    Proc::ButtonConstruct($this, ['id' => 'fr_importmaterial_delbutton', 'caption' => 'Удалить', 'onclickfunc' => 'console.debug("test")']);
?>
            </td>
        </tr>
    </tbody>
</table>

<?php 
/* Диалог добавления нового словосочетания для импорта сотрудников */
$this->beginWidget('zii.widgets.jui.CJuiDialog', Proc::GetDefDialogOptions(['id' => 'fr_importemployeeprofiledialog', 'label' => 'Профиль', 'savebuttonfunc' => 'ImportemployeeSaveButton($(this))']));
$this->endWidget('zii.widgets.jui.CJuiDialog');
<table style="height: 400px;">
    <tbody>
        <tr>
            <td  style="width: 897px; height: 400px; /*width: 960px;*/" class="grid_container"> 
                <div style="width: 1px;">
                    <table id="Impemployeegrid"></table>
                    <div id="Impemployeepager"></div>  
                </div>
            </td>
        </tr>
    </tbody>
</table>

<?php 
/* Диалог "Сотрудники" */
$this->beginWidget('zii.widgets.jui.CJuiDialog', Proc::GetDefDialogOptions(['id' => 'fr_spravemployeedialog', 'label' => 'Сотрудники', 'savebuttonfunc' => 'EmployeeChooseButton($(this))', 'savebuttonlabel' => 'Выбрать']));
$this->endWidget('zii.widgets.jui.CJuiDialog');
Пример #18
0
                            <tr>
                                <td>
                                    <div style="padding: 10px;" id="uploadexcellist">Загрузить файл Excel</div>
                                    <div class="upload_Statusbar"></div>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </fieldset>
            </td>
        </tr>
        <tr>
            <td id="td2"  class="grid_container"> 
                <div style="height: 400px; width: 1px;">
                    <div id="PortalOFOMSPriklistgrid_div" style="opacity: 0;">
                        <table id="PortalOFOMSPriklistgrid"></table>
                        <div id="PortalOFOMSPriklistpager"></div>
                    </div>
                </div>
            </td>
        </tr>
        <tr>
            <td class="buttonMenuBottom" style="border-top: 1px solid #8E846B;">
                <?php 
/* Помощь */
Proc::ButtonConstruct($this, ['id' => 'portalofomsprik_help', 'caption' => 'Помощь', 'onclickfunc' => 'LoadDialogContent({dialogelem_id: "portalofomshelpdialog",loadurl:"' . Yii::app()->createUrl('PortalOFOMS/PortalOFOMS/LoadPortalOFOMSHelpContent') . '", buttonelem: $(this), onafterload: function() { $("#ofomshelptabs").tabs( "option", "active", 2 ); }})']);
?>
            </td>
        </tr>
    </tbody>
</table>
Пример #19
0
 public function actionGetLogreport()
 {
     $logreportid = (string) filter_input(INPUT_GET, 'logreportid');
     if ($logreportid === '') {
         throw new CHttpException(500, 'Fregat/Fregat/GetLogreport((): не передан параметр logreportid');
     }
     ini_set('max_execution_time', 1000);
     // 1000 seconds
     ini_set('memory_limit', 1073741824);
     // 1Gbyte Max Memory
     /* Загружаем PHPExcel */
     $objPHPExcel = new PHPExcel();
     /* Границы таблицы */
     $ramka = array('borders' => array('allborders' => array('style' => PHPExcel_Style_Border::BORDER_THIN)));
     /* Жирный шрифт для шапки таблицы */
     $font = array('font' => array('bold' => true), 'alignment' => array('horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER));
     $rows = ARData::Data(Logreport::model(), Logreport::model()->GetLogreportCriteria($logreportid))->GetDataObject();
     $itog = $objPHPExcel->getActiveSheet();
     $itog->setTitle('Итоги');
     $matsheet = $objPHPExcel->createSheet(1);
     $matsheet->setTitle('Материальные ценности');
     $empsheet = $objPHPExcel->createSheet(2);
     $empsheet->setTitle('Сотрудники');
     $trafsheet = $objPHPExcel->createSheet(3);
     $trafsheet->setTitle('Операции над мат. ценностями');
     $itog->setCellValueByColumnAndRow(0, 1, 'Отчет импорта №' . $logreportid);
     $itog->setCellValueByColumnAndRow(0, 2, 'Дата: ' . date('d.m.Y', strtotime($rows->values[0]['logreport_date'])));
     $itog->getStyle('A2')->applyFromArray(array('font' => array('italic' => true, 'size' => 12)));
     $itog->setCellValueByColumnAndRow(0, 4, Logreport::model()->getAttributeLabel('logreport_amount'));
     $itog->setCellValueByColumnAndRow(1, 4, Logreport::model()->getAttributeLabel('logreport_additions'));
     $itog->setCellValueByColumnAndRow(2, 4, Logreport::model()->getAttributeLabel('logreport_updates'));
     $itog->setCellValueByColumnAndRow(3, 4, Logreport::model()->getAttributeLabel('logreport_errors'));
     $itog->setCellValueByColumnAndRow(4, 4, Logreport::model()->getAttributeLabel('logreport_missed'));
     $itog->setCellValueByColumnAndRow(0, 5, $rows->values[0]['logreport_amount']);
     $itog->setCellValueByColumnAndRow(1, 5, $rows->values[0]['logreport_additions']);
     $itog->setCellValueByColumnAndRow(2, 5, $rows->values[0]['logreport_updates']);
     $itog->setCellValueByColumnAndRow(3, 5, $rows->values[0]['logreport_errors']);
     $itog->setCellValueByColumnAndRow(4, 5, $rows->values[0]['logreport_missed']);
     $itog->getStyle('A4:E5')->applyFromArray($ramka);
     $itog->getStyle('A4:E4')->applyFromArray($font);
     $itog->getStyle('A1')->applyFromArray(array('font' => array('bold' => true, 'size' => 14), 'alignment' => array('horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER)));
     $itog->mergeCells('A1:E1');
     $c = count($rows->fields);
     /* Авторазмер колонок Excel */
     foreach (range(0, $c) as $col) {
         $itog->getColumnDimensionByColumn($col)->setAutoSize(true);
     }
     //      ----------------  Материальные ценности ------------------------------------------
     $rows = ARData::Data(Matlog::model(), Matlog::model()->GetMatlogCriteria($logreportid))->GetDataObject();
     $this->ExcelApplyValues($matsheet, $rows, ['date' => ['material_release'], 'string' => ['material_1c', 'material_inv', 'material_serial'], 'case' => ['material_tip' => [1 => 'Основное средство', 2 => 'Материал']]]);
     // ----------------------- Сотрудники -------------------------------
     $rows = ARData::Data(Employeelog::model(), Employeelog::model()->GetEmployeelogCriteria($logreportid))->GetDataObject();
     $this->ExcelApplyValues($empsheet, $rows);
     // ---------------------- Операции над материальными ценностями -------------------------------------------
     $rows = ARData::Data(Traflog::model(), Traflog::model()->GetTraflogCriteria($logreportid))->GetDataObject();
     $this->ExcelApplyValues($trafsheet, $rows, ['string' => ['material_1c', 'material_inv']]);
     /* присваиваем имя файла от имени модели */
     $FileName = 'Отчет импорта в систему Фрегат';
     // Устанавливаем имя листа
     //  $itog->setTitle($FileName);
     // Выбираем первый лист
     $objPHPExcel->setActiveSheetIndex(0);
     /* Формируем файл Excel */
     $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
     /* Proc::SaveFileIfExists() - Функция выводит подходящее имя файла, которое еще не существует. mb_convert_encoding() - Изменяем кодировку на кодировку Windows */
     $FileName = DIRECTORY_SEPARATOR === '/' ? $FileName : mb_convert_encoding($FileName, 'Windows-1251', 'UTF-8');
     $fileroot = Proc::SaveFileIfExists('files/' . $FileName . '.xlsx');
     /* Сохраняем файл в папку "files" */
     $objWriter->save('files/' . $fileroot);
     /* Возвращаем имя файла Excel */
     if (DIRECTORY_SEPARATOR === '/') {
         echo $fileroot;
     } else {
         echo mb_convert_encoding($fileroot, 'UTF-8', 'Windows-1251');
     }
 }
Пример #20
0
<fieldset class="ui-widget-content ui-corner-all basic_fieldset permissionsblock">
    <legend class="ui-widget-header">Настройка списка информационных систем на главной странице</legend>
    <div>
        <div>
            <?php 
Proc::ButtonConstruct($this, ['id' => 'buttonislistgriddialog', 'caption' => 'Список информационных систем', 'onclickfunc' => 'LoadDialogContent({dialogelem_id: "islistdialog",loadurl:"' . Yii::app()->createUrl('Configurations/IslistManager/LoadISlistContent') . '", buttonelem: $(this)})']);
?>
        </div>
    </div>
</fieldset>

<?php 
/* Диалог "Список информационных систем" */
$this->beginWidget('zii.widgets.jui.CJuiDialog', Proc::GetDefDialogOptions(['id' => 'islistdialog', 'label' => Islist::GetLabel(), 'buttons' => false]));
$this->endWidget('zii.widgets.jui.CJuiDialog');
Пример #21
0
 /**
  * Отправляет сообщение
  *
  * @param Mail_Message_Message $message
  *
  * @return boolean
  */
 public function send(Mail_Message_Message $message)
 {
     $pipe = Proc::Pipe($this->sendmail_command(), 'wb');
     Mail_Serialize::Encoder()->to_stream($pipe)->encode($message);
     return $pipe->close()->exit_status ? false : true;
 }
Пример #22
0
<?php

/* Функция создает Jquery Tabs, в которой закладки отображаются, если у пользователя есть право видимости этой закладки */
Proc::TabsConstruct($this, ['id' => 'ofomshelptabs', 'tabs' => array('Проверка полиса' => ['PermAccess' => 'PortalOfomsView', 'ajax' => Yii::app()->createUrl('PortalOFOMS/PortalOFOMS/HelpContent'), 'id' => 'portaltab'], 'Прикрепление пациента' => ['PermAccess' => 'PortalOfomsViewPrik', 'ajax' => Yii::app()->createUrl('PortalOFOMS/PortalOFOMS/HelpPrikContent'), 'id' => 'priktab'], 'Прикрепление пациента (списком)' => ['PermAccess' => 'PortalOfomsViewPrikList', 'ajax' => Yii::app()->createUrl('PortalOFOMS/PortalOFOMS/HelpPrikListContent'), 'id' => 'priklisttab'])]);
<?php

Yii::app()->getClientScript()->registerScriptFile(Yii::app()->request->baseUrl . '/js/proc/Fregat/importreport.js', CClientScript::POS_HEAD);
?>

<table>
    <tbody>
        <tr>
            <td style="height: 400px; width: 960px;/*height: 400px; width: 960px;*/" class="grid_container"> 
                <div style="width: 1px;">
                    <table id="Logreportgrid"></table>
                    <div id="Logreportpager"></div> 
                </div>
            </td>
        </tr>
        <tr>
            <td class="buttonMenuBottom">
                <?php 
/* Загрузить отчет */
Proc::ButtonConstruct($this, ['id' => 'fr_importreport_downloadbutton', 'caption' => 'Загрузить отчет', 'onclickfunc' => 'DownloadImportreport();']);
?>
            </td>
        </tr>
    </tbody>
</table>
Пример #24
0
<?php

Yii::app()->getClientScript()->registerScriptFile(Yii::app()->request->baseUrl . '/js/proc/ISListConf.js', CClientScript::POS_BEGIN);
Yii::app()->clientScript->registerCssFile(Yii::app()->request->baseUrl . '/css/ISListConf.css');
?>
<table>
    <tbody>
        <tr>
            <td id="td1" style="height: 400px; width: 960px;" class="grid_container"> 
                <table id="Islistgrid"></table>
                <div id="Islistpager"></div> 
            </td>
        </tr>
        <tr>
            <td class="buttonMenuBottom">
                <?php 
/* Добавить информационную систему */
Proc::ButtonConstruct($this, ['id' => 'islist_profile_new', 'caption' => 'Добавить', 'onclickfunc' => 'IslistProfileDialog(this, "add")']);
/* Изменить информационную систему */
Proc::ButtonConstruct($this, ['id' => 'islist_profile_edit', 'caption' => 'Изменить', 'onclickfunc' => 'IslistProfileDialog(this, "edit")']);
/* Удалить информационную систему */
Proc::ButtonConstruct($this, ['id' => 'islist_delete', 'caption' => 'Удалить', 'onclickfunc' => 'IslistProfileDialog(this, "del")']);
?>
            </td>
        </tr>
    </tbody>
</table>

<?php 
$this->beginWidget('zii.widgets.jui.CJuiDialog', array_replace_recursive(Proc::GetDefDialogOptions(['id' => 'IslistForm', 'label' => 'Профиль информационной системы', 'savebuttonfunc' => 'IslistSaveButton($(this))']), ['options' => ['draggable' => false]]));
$this->endWidget('zii.widgets.jui.CJuiDialog');
Пример #25
0
 public function testProc()
 {
     $proc = new Proc('value', 'return strrev($value);');
     $this->assertEquals("TSET", $proc->call('TEST'));
 }
Пример #26
0
<?php

require_once 'clsProc.php';
$cwd = '/var/www/html/examples';
$env = 'null';
$t = array("cwd" => $cwd);
// create new process object
$process = new Proc('cd /var/www/html/examples/; ls -l', $t);
$output = $process->getReadOut();
//echo $output;
//var_dump($output);
$n = explode("\n", $output);
?>
<html>
<head>
	<title>Working?</title>
</head>
<body>
	<pre>
		<?php 
foreach ($n as $item) {
    print '<p>' . $item . '</p>';
}
?>
	</pre>
</body>
</html>
Пример #27
0
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="language" content="en" />
        <link href="favicon.ico" rel="shortcut icon" type="image/x-icon" />
        <?php 
Proc::LoadContentResources();
?>
        <title>Портал</title>
    </head>

    <body>

        <div class="container_yii" id="page">

            <div id="header">
                <div>
                    <img class="headerimage" src="images/header.jpg"></img> 
                </div>
                <div id="info" class="ui-corner-left ui-state-default">
                    <table>
                        <tbody>
                            <tr><td class="ui-button-text">Пользователь:</td></tr>
                            <tr><td id="info_name"><?php 
echo isset(Yii::app()->user->name) ? Yii::app()->user->name : '';
?>
</td></tr>
                        </tbody>
                    </table>
                </div>
Пример #28
0
<?php

Yii::app()->clientScript->registerCssFile(Yii::app()->request->baseUrl . '/css/PortalOFOMS.css');
/* Функция создает Jquery Tabs, в которой закладки отображаются, если у пользователя есть право видимости этой закладки */
Proc::TabsConstruct($this, ['id' => 'portalofomstabs', 'tabs' => array('Проверка полисов' => ['PermAccess' => 'PortalOfomsView', 'ajax' => Yii::app()->createUrl('PortalOFOMS/PortalOFOMS/Tab'), 'id' => 'permissionstab'], 'Прикрепление (списком)' => ['PermAccess' => 'PortalOfomsViewPrikList', 'ajax' => Yii::app()->createUrl('PortalOFOMS/PortalOFOMS/TabPrik'), 'id' => 'ofomsconftab']), 'htmlOptions' => ['class' => 'transparentload'], 'juitab_load' => 'if ($(ui.panel)[0].id === "ui-id-2") $("#portalofoms_kbp").focus();']);
Пример #29
0
 public function attributeLabels()
 {
     return Proc::GetLabelModel($this);
 }
Пример #30
0
<?php

Yii::app()->getClientScript()->registerScriptFile(Yii::app()->request->baseUrl . '/js/proc/Fregat/sprav.js', CClientScript::POS_HEAD);
?>

<fieldset class="ui-widget-content ui-corner-all basic_fieldset permissionsblock">
    <legend class="ui-widget-header">Материальные ценности</legend>
    <div>
        <div>
            <?php 
Proc::ButtonConstruct($this, ['id' => 'fr_spravgrupavidbutton', 'caption' => 'Группы материальных ценностей', 'onclickfunc' => 'LoadDialogContent({dialogelem_id: "fr_spravgrupaviddialog",loadurl:"' . Yii::app()->createUrl('Fregat/Fregat/LoadGrupavidContent') . '", buttonelem: $(this)})']);
?>
        </div>
       <div>
            <?php 
Proc::ButtonConstruct($this, ['id' => 'fr_spravemployeebutton', 'caption' => 'Сотрудники', 'onclickfunc' => 'LoadDialogContent({dialogelem_id: "fr_spravemployeedialog",loadurl:"' . Yii::app()->createUrl('Fregat/Fregat/LoadEmployeeContent') . '", buttonelem: $(this)})']);
?>
        </div>
    </div>
</fieldset>

<?php 
/* Диалог "Группы материальных ценностей" */
$this->beginWidget('zii.widgets.jui.CJuiDialog', Proc::GetDefDialogOptions(['id' => 'fr_spravgrupaviddialog', 'label' => 'Группы материальных ценностей', 'buttons' => false]));
$this->endWidget('zii.widgets.jui.CJuiDialog');
/* Диалог "Сотрудники" */
$this->beginWidget('zii.widgets.jui.CJuiDialog', Proc::GetDefDialogOptions(['id' => 'fr_spravemployeedialog', 'label' => 'Сотрудники']));
$this->endWidget('zii.widgets.jui.CJuiDialog');