/** * This is construct base of the class. * * A public constructor; initializes the variable $instanceDataBase. * */ public function __construct($instanceDataBase) { parent::__construct($instanceDataBase); Profession::setDataOperationBusiness($instanceDataBase); Profession::getBusiness(); Profession::getDescriptionBusiness(); }
public function post($resourceVals, $data, $userId) { global $logger, $warnings_payload; $userId = 5; $professionId = $resourceVals['user-professions']; if (isset($professionId)) { $warnings_payload[] = 'POST call to /user-professions must not have ' . '/professionID appended i.e. POST /user-professions'; throw new UnsupportedResourceMethodException(); } if ($data['name'] != null) { $nameObj = $this->collapDAO->queryByName($data['name']); if (empty($nameObj)) { $professionObj = new Profession($data['name']); $logger->debug("POSTed Profession Detail: " . $professionObj->toString()); $this->collapDAO->insert($professionObj); $userProfessionDetail = $professionObj->toArray(); if (isset($userProfessionDetail['id'])) { $userProfessionObj = new UserProfession($userId, $userProfessionDetail['id']); $logger->debug("POSTed User Profession Detail: " . $userProfessionObj->toString()); $this->collapDAO->insertUserProfession($userProfessionObj); $userProfessionDetail = $userProfessionObj->toArray(); } } else { $nameProf = $nameObj[0]->toArray(); $userProfessionObj = new UserProfession($userId, $nameProf['id']); $logger->debug("POSTed User Profession Detail: " . $userProfessionObj->toString()); $this->collapDAO->insertUserProfession($userProfessionObj); $userProfessionDetail = $userProfessionObj->toArray(); } } else { $userProfessionObj = new UserProfession($userId, $data['profession_id']); $logger->debug("POSTed User Profession Detail: " . $userProfessionObj->toString()); $this->collapDAO->insertUserProfession($userProfessionObj); $userProfessionDetail = $userProfessionObj->toArray(); } if (!isset($userProfessionDetail['id'])) { return array('code' => '2011'); } $this->userProfessionDetail[] = $userProfessionDetail; return array('code' => '2001', 'data' => array('userProfessionDetail' => $this->userProfessionDetail)); }
public function EditResume() { if (Auth::check()) { $user = Auth::user(); $id = $user->id; $resume = User::find($id)->resume()->first(); if (!is_null($resume)) { $project = Resume::find($id)->userproject()->get(); } $skills = Skill::lists('skill'); $professions = Profession::lists('profession'); return View::make('register.resumes', compact('user', 'resume', 'project', 'skills', 'professions')); } else { return Redirect::guest('ow_login'); } }
</td> <td> <?php echo $form->dropDownList($model, 'id_nationality', CHtml::listData(Nationality::model()->findAll(), 'id', 'name')); ?> </td> </tr> <tr> <td><?php echo $form->labelEx($model, 'id_profession'); ?> </td> <td> <?php echo $form->dropDownList($model, 'id_profession', CHtml::listData(Profession::model()->findAll(), 'id', 'name')); ?> </td> </tr> <tr> <td><?php echo CHtml::activeLabelEx($model, 'verifiedCode'); ?> </td> <td> <?php $this->widget('CCaptcha', array('buttonType' => 'button')); ?> </td>
/** * @return Commoner|Profession */ public static function getIt() { return parent::getIt(); }
$fec_nac_madre = ''; } if ($action == 'EDIT' || $action == 'INSERT') { Forms::printInput('TEXT', 'fec_nac_madre', $fec_nac_madre, 'datePickerAny', array(), array(), $preview_flag); } elseif ($action == 'PREVIEW') { $fec_nac_madre = $action == 'PREVIEW' ? $data_madre['bithday'] : ''; if ($fec_nac_madre == "00/00/0000") { $fec_nac_madre = ''; } echo $fec_nac_madre; } ?> </td> <td>PROFESION:</td> <td> <?php $object = new Profession($db); $catalogo = $object->getListProfession(); ?> <select name="PROFESSION_MADRE"> <option value="0">SELECCIONE UNA OPCION</option> <?php $profession = ''; if ($action == 'EDIT' || $action == 'PREVIEW') { $profession = $data_madre['profession']; } foreach ($catalogo as $item) { ?> <option value="<?php echo $item['id']; ?>
$v_label = $property["pages"]["person/profession"]; // Decidir en funcion a la accion $title_1 = $v_label["NEW_TITLE"]; // INSERT $action = 'INSERT'; if (isset($_GET['EDIT'])) { $action = 'EDIT'; $title_1 = $v_label["EDIT_TITLE"]; $elementAction = $_GET['EDIT']; } elseif (isset($_GET['PREVIEW'])) { $action = 'PREVIEW'; $title_1 = $v_label["PREVIEW_TITLE"]; $elementAction = $_GET['PREVIEW']; } if ($action != 'INSERT') { $element = new Profession($registry[$nameDataBase]); $list = $element->getListProfession($elementAction); $data = $list[0]; } // simplificar acceso a etiquetas de formulario $v_label_gral_form = $property["pages"]["general_form"]; ?> <div class="grid_10"> <div class="box round first"> <h2><?php echo $title_1; ?>
/** * Update the professional information of the user * @param $educationId * @param $fieldId * @param $occupationId * @param $salary * @param $currencyId * @return array */ public function updateUserProfessionalInformation($educationId, $fieldId, $occupationId, $salary, $currencyId) { $Object = new Profession(); $result = $Object->updateUserProfession($educationId, $fieldId, $occupationId, $salary, $currencyId); return $result; }
<?php $this->breadcrumbs = array(Yii::t('flexiblearn', 'Accounts') => array('index'), Yii::t('flexiblearn', 'Manage')); ?> <h1><?php echo Yii::t('flexiblearn', 'Manage Accounts'); ?> </h1> <?php $this->widget('zii.widgets.grid.CGridView', array('id' => 'account-grid', 'enablePagination' => true, 'dataProvider' => $model->search(), 'filter' => $model, 'columns' => array(array('header' => 'No', 'value' => '$this->grid->dataProvider->pagination->currentPage*$this->grid->dataProvider->pagination->pageSize + $row+1', 'htmlOptions' => array('class' => 'number-column')), 'username', array('name' => 'fullname', 'filter' => false), array('name' => 'tel', 'filter' => false), array('name' => 'dateOfBirth', 'filter' => false, 'value' => 'Yii::app()->dateFormatter->format("' . Yii::app()->params['dateFormat'] . '",$data->dateOfBirth)'), array('name' => 'id_nationality', 'filter' => CHtml::listData(Nationality::model()->findAll(), 'id', 'name'), 'value' => '($data->nationality)?$data->nationality->name:""'), array('name' => 'id_profession', 'filter' => CHtml::listData(Profession::model()->findAll(), 'id', 'name'), 'value' => '($data->profession)?$data->profession->name:""'), array('header' => Yii::t('flexiblearn', 'Role'), 'value' => 'Yii::t("zii", $data->role)'), array('class' => 'CButtonColumn'))));
} }}); }); </script> <?php $action = 'LIST'; if (isset($_POST['ACTION'])) { $action = $_POST['ACTION']; } else { if (isset($_GET['ACTION'])) { $action = $_GET['ACTION']; } } $user = new User($registry[$nameDataBase]); $catalog = new Profession($registry[$nameDataBase]); // Simplificar la ruta de propiedades $v_label = $property["pages"]["person/profession_admin"]; $v_label_list = $property["pages"]["general_list"]; // Simplificar el ruteo de edicion/visualizacion $v_route_edit_preview = 'index.php?page=person/profession'; // Simplificar el ruteo de insert $v_route_insert = '?page=person/profession'; // Simplificar el ruteo de lista $v_route_list = 'index.php?page=person/profession_admin'; switch ($action) { case 'INSERT': $transaction = new Transaction($registry[$nameDataBase]); Profession::setDataOperationBusiness($registry[$nameDataBase]); $idTransaction = $transaction->insertTransaction(array(Profession::$business, Profession::$insert, Profession::$descriptionBusiness)); $data = array($_POST['NAME']);
<?php $numero = 1; if (isset($_GET['NUMBER'])) { $numero = $_GET['NUMBER']; } $id = 1; if (isset($_GET['ID'])) { $id = $_GET['ID']; } $action = 'INSERT'; if (isset($_GET['ACTION']) && $_GET['ACTION'] == 'EDIT') { $action = 'EDIT'; } $profesion = new Profession($db); $catalogo1 = $profesion->getListProfession(); $grade = new GradeEducation($db); $catalogo2 = $grade->getListGradeEducation(); //print_r($catalogo2); $pk_id_person_profession = 0; $pk_id_profession = 0; $pk_id_grade_education = 0; if ($action == 'EDIT') { $pk_id_person_profession = $_GET['pk_id_person_profession']; $pk_id_profession = $_GET['pk_id_profession']; $pk_id_grade_education = $_GET['pk_id_grade_education']; } ?> <div id="profesion_din_<?php