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


PHP Organization::model方法代码示例

本文整理汇总了PHP中Organization::model方法的典型用法代码示例。如果您正苦于以下问题:PHP Organization::model方法的具体用法?PHP Organization::model怎么用?PHP Organization::model使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Organization的用法示例。


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

示例1: loadModel

 /**
  * @param integer $id the ID of the model to be loaded
  * @return Organization the loaded model
  * @throws CHttpException
  */
 protected function loadModel($id)
 {
     $model = Organization::model()->findByPk($id);
     if ($model === NULL) {
         $this->show404();
     }
     return $model;
 }
开发者ID:nsarvar,项目名称:performance,代码行数:13,代码来源:OrganizationController.php

示例2: actionOrganization

 function actionOrganization()
 {
     $this->checkLogin();
     $model = Organization::model()->find();
     if (!empty($_POST)) {
         $model->attributes = $_POST["Organization"];
         // show logo on bill
         $org_logo_show_on_bill = "no";
         $logo_show_on_header = "no";
         $logo_show_on_header_bg = "no";
         if (!empty($_POST['logo_show_on_header'])) {
             $logo_show_on_header = Util::input($_POST['logo_show_on_header']);
         }
         if (!empty($_POST['org_logo_show_on_bill'])) {
             $org_logo_show_on_bill = Util::input($_POST['org_logo_show_on_bill']);
         }
         if (!empty($_POST['logo_show_on_header_bg'])) {
             $logo_show_on_header_bg = Util::input($_POST['logo_show_on_header_bg']);
         }
         $on_bill = 'no';
         if ($org_logo_show_on_bill == 1) {
             $on_bill = 'yes';
         }
         $model->org_logo_show_on_bill = $on_bill;
         $model->logo_show_on_header = $logo_show_on_header;
         $model->logo_show_on_header_bg = $logo_show_on_header_bg;
         // logo
         if (!empty($_FILES['Organization'])) {
             $org_logo = $_FILES['Organization'];
             $name = $org_logo['name']['org_logo'];
             $tmp = $org_logo['tmp_name']['org_logo'];
             $size = $org_logo['size']['org_logo'];
             if ($size > 0) {
                 $ext = explode(".", $name);
                 $ext = $ext[count($ext) - 1];
                 $ext = strtolower($ext);
                 $name = microtime();
                 $name = str_replace(" ", "", $name);
                 $name = str_replace(".", "", $name);
                 if ($ext == "jpg" || $ext == "png") {
                     $newName = "{$name}.{$ext}";
                     if (move_uploaded_file($tmp, "upload/{$newName}")) {
                         // remove old file
                         $oldName = $model->org_logo;
                         if (file_exists('upload/' . $oldName)) {
                             @unlink('upload/' . $oldName);
                         }
                         $model->org_logo = $name . "." . $ext;
                     }
                 }
             }
         }
         $model->save();
     }
     $this->render("//Config/Organization", array('model' => $model));
 }
开发者ID:adsavin,项目名称:bswshop,代码行数:56,代码来源:ConfigController.php

示例3: search

 /**
  * @return CActiveDataProvider
  */
 public function search()
 {
     $criteria = new CDbCriteria();
     $criteria->alias = 'u';
     $criteria->select = 'u.id,u.login,u.organization_id,u.role,u.name,o.name as organization_name';
     $criteria->join = 'LEFT JOIN ' . Organization::model()->tableName() . ' as o on o.id = u.organization_id';
     $criteria->compare('u.login', $this->login, true);
     $criteria->compare('u.name', $this->name, true);
     $criteria->compare('u.email', $this->email, true);
     $criteria->compare('organization_id', $this->organization_id, true);
     $criteria->compare('role', $this->role, true);
     $criteria->compare('o.name', $this->organization_name, true);
     return new CActiveDataProvider($this, array('criteria' => $criteria, 'sort' => array('defaultOrder' => 'id ASC', 'attributes' => array('organization_name' => array('asc' => 'o.name', 'desc' => 'o.name DESC'), '*')), 'pagination' => array('pageSize' => 20)));
 }
开发者ID:nsarvar,项目名称:performance,代码行数:17,代码来源:User.php

示例4: actionChangeCode

 /** ==+== Изменение кода НО и редирект на прошлую страницу **/
 public function actionChangeCode($code)
 {
     if (!isset($code) || !is_numeric($code)) {
         throw new CHttpException(400, "Неверный запрос. Не указан код налогового органа!");
     }
     if (!Organization::model()->exists('code=:code', array(':code' => $code))) {
         throw new CHttpException(400, "Неверный запрос. Указан не существующий код налогового органа!");
     }
     if (!User::checkNo($code)) {
         throw new CHttpException(401, "Вам запрещен доступ к данному налоговому органу!");
     }
     User::changeNo($code);
     DefaultController::redirect(Yii::app()->request->urlReferrer);
 }
开发者ID:alexeevich,项目名称:portal,代码行数:15,代码来源:DefaultController.php

示例5: actionIndex

 /**
  * Manages all models.
  */
 public function actionIndex($idTree = null, $organization = null)
 {
     if ($idTree != null && $organization != null) {
         $allIfns = false;
         if (!Tree::model()->exists('id=:id AND module=:module and organization=:organization', array(':id' => $idTree, ':module' => 'news', ':organization' => $organization))) {
             throw new CHttpException(404, 'Страница не найдена.');
         }
     } else {
         $allIfns = true;
     }
     $model = new News('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['News'])) {
         $model->attributes = $_GET['News'];
     }
     $this->render('index', array('model' => $model, 'idTree' => $allIfns ? CHtml::listData(Organization::model()->findAll('code<>:code', array(':code' => '8600')), 'code', 'code') : $idTree, 'organization' => $organization, 'allIfns' => $allIfns));
 }
开发者ID:alexeevich,项目名称:portal,代码行数:21,代码来源:NewsController.php

示例6: actionCreate

 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     $model = new ImportantNotice();
     // Uncomment the following line if AJAX validation is needed
     $this->performAjaxValidation($model);
     if (isset($_POST['ImportantNotice'])) {
         $model->attributes = $_POST['ImportantNotice'];
         $org = Organization::model()->findAll();
         $model->notice_organization_id = $org[0]['organization_id'];
         $model->created_by = Yii::app()->user->id;
         $model->creation_date = new CDbExpression('NOW()');
         if ($model->save()) {
             //$this->redirect(array('view','id'=>$model->notice_id));
             $this->redirect(array('admin'));
         }
     }
     $this->render('create', array('model' => $model));
 }
开发者ID:rinodung,项目名称:EduSec3.0.0,代码行数:22,代码来源:ImportantNoticeController.php

示例7: exportData

 public function exportData($title, $filename, $html)
 {
     $mpdf = Yii::app()->ePdf->mpdf('utf-8', 'A4', 0, '', 15, 15, 25, 16, 4, 9, 'P');
     $org = Organization::model()->findAll();
     $src = Yii::app()->baseUrl . "/site/loadImage/id/" . $org[0]['organization_id'];
     $org_image = CHtml::link(CHtml::image(Yii::app()->controller->createUrl('/site/loadImage', array('id' => $org[0]['organization_id'])), 'No Image', array('width' => 90, 'height' => 70)));
     $org_name = $org[0]['organization_name'];
     $org_add = $org[0]['address_line1'] . "<br/>" . $org[0]['address_line2'];
     //$org_add=$org->address_line1." ".$org->address_line2."<br/>" . City::model()->findBypk(Organization::model()->findByPk(Yii::app()->user->getState('org_id'))->city)->city_name.", ".State::model()->findBypk(Organization::model()->findByPk(Yii::app()->user->getState('org_id'))->state)->state_name.", ".Country::model()->findBypk(Organization::model()->findByPk(Yii::app()->user->getState('org_id'))->country)->name.".";
     $mpdf->SetHTMLHeader('<table style="border-bottom:1.6px solid #74b9fo;border-top:hidden;border-left:hidden;border-right:hidden;width:100%;"><tr style="border:hidden"><td vertical-align="center" style="width:35px;border:hidden" align="left">' . $org_image . '</td><td style="border:hidden;text-align:left;color:#555555;"><b style="font-size:22px;">' . $org_name . '</b><br/><span style="font-size:10.2px">' . $org_add . '</td></tr></table>');
     $stylesheet = file_get_contents('css/pdf.css');
     // external css
     $mpdf->WriteHTML($stylesheet, 0);
     $mpdf->WriteHTML('<watermarkimage src=' . $src . ' alpha="0.33" size="50,30"/>');
     //$mpdf->SetWatermarkImage('images/rudraSoftech.png',0.5, '');
     $mpdf->showWatermarkImage = true;
     $arr = array('odd' => array('L' => array('content' => $title, 'font-size' => 10, 'font-style' => 'B', 'font-family' => 'serif', 'color' => '#27292b'), 'C' => array('content' => 'Page - {PAGENO}/{nbpg}', 'font-size' => 10, 'font-style' => 'B', 'font-family' => 'serif', 'color' => '#27292b'), 'R' => array('content' => 'Printed @ {DATE j-m-Y}', 'font-size' => 10, 'font-style' => 'B', 'font-family' => 'serif', 'color' => '#27292b'), 'line' => 1), 'even' => array());
     $mpdf->SetFooter($arr);
     $mpdf->WriteHTML('<sethtmlpageheader name="main" page="ALL" value="on" show-this-page="1">');
     $mpdf->WriteHTML($html);
     $mpdf->Output($filename, "I");
 }
开发者ID:rinodung,项目名称:EduSec3.0.0,代码行数:22,代码来源:ExportToPdf.php

示例8: init

 public function init()
 {
     parent::init();
     Yii::app()->name = 'Система управления';
     //Yii::app()->theme = 'bootstrap-admin';
     // this method is called when the module is being created
     // you may place code here to customize the module or the application
     // import the module-level models and components
     $this->setImport(array('admin.models.*', 'admin.components.*'));
     Yii::app()->setComponents(array('errorHandler' => array('errorAction' => '/admin/default/error')));
     //$this->layout = '/layouts/column2';
     $code = '';
     // загрузка текущей организации
     if (!Yii::app()->user->isGuest && Yii::app()->session['code_no'] == '') {
         // проверяем параметр kod_no у текущего пользователя
         $codeNoUser = User::model()->findByPk(Yii::app()->user->getId())->kod_no;
         if ($codeNoUser != '' && User::checkNo($codeNoUser)) {
             $code = $codeNoUser;
         } else {
             $codeNoUser = '';
         }
         if ($codeNoUser == '') {
             if (Yii::app()->user->admin) {
                 if (Organization::model()->exists()) {
                     $code = Organization::model()->find(array('order' => 'code'))->code;
                 }
             } else {
                 if (isset(User::model()->findByPk(Yii::app()->user->getId())->organization)) {
                     $code = User::model()->findByPk(Yii::app()->user->getId())->organization[0]['code'];
                 }
             }
             if ($code != '') {
                 User::changeNo($code);
             }
         }
         Yii::app()->session['code_no'] = $code;
     }
 }
开发者ID:alexeevich,项目名称:portal,代码行数:38,代码来源:AdminModule.php

示例9: actionRecpt_list

 public function actionRecpt_list()
 {
     $this->layout = 'receipt_layout';
     $misc_fees_payment = MiscellaneousFeesPaymentCash::model()->findByPk($_REQUEST['id']);
     $model = StudentTransaction::model()->findByPk($misc_fees_payment->miscellaneous_fees_payment_cash_student_id);
     $stud_id = $model->student_transaction_student_id;
     $stud_model = StudentInfo::model()->findByPk($model->student_transaction_student_id);
     $acd_term = AcademicTermPeriod::model()->findByPk($model->student_academic_term_period_tran_id);
     $branch = Branch::model()->findByPk($model->student_transaction_branch_id);
     $test = Yii::app()->user->getState('org_id');
     $org = Organization::model()->findByPk($test)->organization_name;
     //print_r($_REQUEST['id']);
     //print "<br/>model".$misc_fees_payment->miscellaneous_fees_payment_cash_student_id;
     //print "<br/>reciept_no".$misc_fees_payment->miscellaneous_fees_payment_cash_receipt_id;
     //print "<br/>stud_id".$model->student_transaction_student_id;
     //print "<br/>curent date".date('d/m/y');
     //print "<br/>stud_model".$stud_model->student_first_name.''.$stud_model->student_middle_name.''.$stud_model->student_last_name;
     //print "<br/>dbdate".$misc_fees_payment->miscellaneous_fees_payment_cash_creation_date;
     //print "<br/>branch_name".$branch->branch_name;
     //print "<br/>academic_term".$acd_term->academic_terms_period_name;
     //print "</br>roll no".$stud_model->student_roll_no;
     //exit;
     $this->render('recpt_list', array('model' => $model, 'org' => $org, 'stud_model' => $stud_model, 'acd_term' => $acd_term, 'branch' => $branch, 'misc_fees_payment' => $misc_fees_payment));
 }
开发者ID:sharmarakesh,项目名称:edusec-college-management-system,代码行数:24,代码来源:MiscellaneousFeesPaymentCashController.php

示例10: array

	'id'=>'mydialog',
	// additional javascript options for the dialog plugin
	'options'=>array(
		'title'=>'List of Organization',
		'autoOpen'=>true,
		'modal'=>true,	
                'height'=>'auto',
                'width'=>400,
                'resizable'=>false,
                'draggable'=>false,
		'close' => 'js:function(event, ui) { location.href = "'.Yii::app()->createUrl("student/studentRegistrationInfo/admin").'"; }'
	),
));
?>
<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'hostel-fees-cash-form',
	'enableAjaxValidation'=>true,
	'clientOptions'=>array('validateOnSubmit'=>true),
)); 
?>
	<div class="row">
		<?php echo $form->labelEx($model,'organization_id'); ?><br>
		<?php echo $form->dropDownList($model, 'organization_id', CHtml::listData(Organization::model()->findAll(),'organization_id','organization_name'),array('empty'=>'Select College','onchange'=>'this.form.submit()')); ?>
	</div>

<?php $this->endWidget(); ?>
<?php
$this->endWidget('zii.widgets.jui.CJuiDialog');
?>
</div><!-- form -->
开发者ID:rinodung,项目名称:EduSec3.0.0,代码行数:30,代码来源:studentRegistration.php

示例11: array

            <!------------------------header part--------------------->
	    <div class="headerpart1">
              <div class="receipt-logo">
			<?php 
        $test = Yii::app()->user->getState('org_id');
        if (isset($test)) {
            echo CHtml::image(Yii::app()->controller->createUrl('/site/loadImage', array('id' => Yii::app()->user->getState('org_id'))), 'No Image', array('width' => 114, 'height' => 100));
        }
        ?>
</div>

       
                  <div class="institutename"></div> 
               <div class="title">
		<?php 
        $org_data = Organization::model()->findByPk(Yii::app()->user->getState('org_id'));
        echo $org_data->organization_name;
        ?>
</div>
	       <div class="address"><?php 
        echo $org_data->address_line1 . ' ' . City::model()->findByPk($org_data->city)->city_name . ', ' . State::model()->findByPk($org_data->state)->state_name . ', ' . Country::model()->findByPk($org_data->country)->name;
        ?>
</div>
            </div>

	   <!------------------------content part------------------------->
   	
	    <div class="contentpart1">
	     
	 <div class="receipt">receipt</div>
           <div class="receipt_header"></div>   
开发者ID:sharmarakesh,项目名称:edusec-college-management-system,代码行数:31,代码来源:branch_receipt_generate_view.php

示例12: array

       <div class="part1">
            <!------------------------header part--------------------->
	   <div class="header" style="border-bottom:3px solid;   margin-left: -5px;padding-right: 10px;">
      		     <div class="logo" >
 			    <?php 
        echo CHtml::image(Yii::app()->controller->createUrl('/site/loadImage', array('id' => Yii::app()->user->getState('org_id'))), 'No Image', array('width' => 80, 'height' => 55));
        ?>
 	            </div>

    		    <div class="address" style="font-size:12px;">
			    <?php 
        $org_data = Organization::model()->findByPk(Yii::app()->user->getState('org_id'));
        echo $org_data->organization_name . "</br>";
        echo $org_data->address_line1 . " ";
        echo $org_data->address_line2 . "</br>";
        echo City::model()->findBypk(Organization::model()->findByPk(Yii::app()->user->getState('org_id'))->city)->city_name . ", " . State::model()->findBypk(Organization::model()->findByPk(Yii::app()->user->getState('org_id'))->state)->state_name . ", " . Country::model()->findBypk(Organization::model()->findByPk(Yii::app()->user->getState('org_id'))->country)->name . ".";
        ?>
   
    		   </div>
 		</div>

	   <!------------------------content part------------------------->
   	
	    <div class="contentpart1">
	     
	 <div class="receipt">receipt</div>
           <div class="receipt_header"></div>   
		<div class="rcp_info">
			<div class="rcp_rno">
				<div class="rno">Receipt no.</div>
                       	        <div class="rnoline">
开发者ID:sharmarakesh,项目名称:edusec-college-management-system,代码行数:31,代码来源:receipt_generate_view.php

示例13:

	<b><?php 
echo CHtml::encode($data->getAttributeLabel('batch_name'));
?>
:</b>
	<?php 
echo CHtml::encode($data->batch_name);
?>
	<br />

	<b><?php 
echo CHtml::encode($data->getAttributeLabel('batch_organization_id'));
?>
:</b>
	<?php 
$org_name = Organization::model()->findbyPk($data->batch_organization_id);
?>
	<?php 
echo CHtml::encode($org_name->organization_name);
?>
	<br/>

	<b><?php 
echo CHtml::encode($data->getAttributeLabel('batch_created_by'));
?>
:</b>
	<?php 
$create_user = User::model()->findbyPk($data->batch_created_by);
?>
	
	<?php 
开发者ID:sharmarakesh,项目名称:edusec-college-management-system,代码行数:30,代码来源:_view.php

示例14: array

            <!--==============Page Content Start [here]=====================-->
            <div class="header">
            	<div class="header-left">
		<?php echo CHtml::link(CHtml::image(Yii::app()->controller->createUrl('/site/loadImage'),'No Image',array('width'=>80,'height'=>70)),array('/dashboard/dashboard') , array('style'=>'float: left;'));
		?>
		<div class='org-name' style="float: left; margin: 20px; font-size: 30px;">
		   <?php $orgName = Organization::model()->findAll(); 
			print CHtml::link($orgName[0]->organization_name, array('/dashboard/dashboard'));
		   ?>
		</div>
		</div>
                <div class="header-right">
                	<div class="nav">
                      <ul class="nav-list">
                        <li><a href="#" class="nav-link orange"><i class="fa fa-bell"></i> <span class="nav-counter nav-counter-green">4</span></a></li>
                      <?php 
		    $empsession = 0;
		    $studsession = 0;
		    $count = 0;
		    if(!Yii::app()->user->isGuest){
		      $studsession = Yii::app()->user->getState('stud_id');
		      $empsession = Yii::app()->user->getState('emp_id');
		    }
		    if(!Yii::app()->user->isGuest && !Yii::app()->user->getState('parent_id'))
		    {
			$count = 0;
			$count = Mailbox::model()->newMsgs(Yii::app()->user->id);	
		     ?>
			<li><a href="<?php echo Yii::app()->baseUrl;?>/mailbox" class="nav-link green"><i class="fa fa-envelope"></i> <span class="nav-counter nav-counter-blue"><?php echo $count;?></span></a></li>
		   <?php			
		    }?>
开发者ID:rinodung,项目名称:EduSec3.0.0,代码行数:31,代码来源:header.php

示例15: array

<title>Print ID Card</title>
<link rel="stylesheet" type="text/css" href="<?php 
echo Yii::app()->request->baseUrl;
?>
/css/printstudentid.css"/>
<?php 
$gobackimage = CHtml::image('../images/Goback.png', 'No Image', array('height' => '40', 'width' => 40));
echo CHtml::link('GO BACK', Yii::app()->createUrl('report/Studentid'), array('title' => 'Go Back')) . "&nbsp;&nbsp;";
?>
<button style="float:right; margin-right:50%;" onclick="javascript:window.print()" id="printid">Print</button>
</div></br></br>
<?php 
$org_id = Yii::app()->user->getState('org_id');
$org_data = Organization::model()->findByAttributes(array('organization_id' => $org_id));
$orgcity = City::model()->findByPk($org_data->city)->city_name;
$orgstate = State::model()->findByPk($org_data->state)->state_name;
$i = 0;
if ($student_data1 && $selected_list) {
    foreach ($student_data1 as $stud) {
        $orglogo = CHtml::image(Yii::app()->controller->createUrl('/site/loadImage', array('id' => Yii::app()->user->getState('org_id'))), 'No Image', array('width' => 65, 'height' => 65));
        $studphoto = StudentPhotos::model()->findByPk($stud['student_transaction_student_photos_id'])->student_photos_path;
        ?>
<div class="outer">
<!--main div-->
<div class="main">
	<!--Header div-->
	<div class="idcardheader">
		<div class="logo">
			<?php 
        echo $orglogo;
        ?>
开发者ID:sharmarakesh,项目名称:EduSec2.0.0,代码行数:31,代码来源:print_idcard.php


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