query
stringlengths 7
5.25k
| document
stringlengths 15
1.06M
| metadata
dict | negatives
sequencelengths 3
101
| negative_scores
sequencelengths 3
101
| document_score
stringlengths 3
10
| document_rank
stringclasses 102
values |
---|---|---|---|---|---|---|
Returns the static model of the specified AR class. Please note that you should have this exact method in all your CActiveRecord descendants! | public static function model($className=__CLASS__)
{
return parent::model($className);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function model() {\n return parent::model(get_called_class());\n }",
"public function model()\r\n {\r\n return static::class;\r\n }",
"public static function model($className=__CLASS__) { return parent::model($className); }",
"public static function model($className=__CLASS__)\n {\n return CActiveRecord::model($className);\n }",
"static public function model($className = __CLASS__)\r\n {\r\n return parent::model($className);\r\n }",
"public static function model($class = __CLASS__)\n\t{\n\t\treturn parent::model(get_called_class());\n\t}",
"public static function model($class = __CLASS__)\n {\n return parent::model($class);\n }",
"public static function model($className=__CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className=__CLASS__) {\r\n return parent::model($className);\r\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }"
] | [
"0.75750446",
"0.7528519",
"0.7271581",
"0.72703993",
"0.72617143",
"0.7213263",
"0.72127366",
"0.7131883",
"0.71287453",
"0.71287453",
"0.7102495",
"0.7102467",
"0.7102467",
"0.7074701",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163",
"0.7064163"
] | 0.0 | -1 |
Returns admin scaffold add fields | public function getAdd()
{
return array(
'Currency.name' => array('type' => 'text', 'label' => __("Name")),
'Currency.code' => array('type' => 'text', 'label' => __("Code")),
'Currency.rate' => array('type' => 'text', 'label' => __("Rate"))
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addFields()\n {\n // add field\n $this->addField(new DataObject([\n 'key' => 'css_class',\n 'type' => 'multiselect',\n 'values' => $this->cssClassRowModel->toOptionArray(),\n 'label' => __('CSS Class'),\n ]));\n\n // add save button\n $this->addField(new DataObject([\n 'key' => 'save',\n 'type' => 'note',\n 'label' => ' ',\n 'options' => [\n 'text' => $this->getButtonHtml(\n __('Save'),\n 'window.pageDesignerConfig.setSettings.bind(this)()',\n 'action-primary save-settings'\n ),\n ],\n ]));\n\n return $this;\n }",
"public function buildFields()\n {\n $this->addField('name', 'kuma_menu.menu.adminlist.field.name', true);\n }",
"function extraFields() {\n\t\n\t\t$file_id = JRequest::getVar('id');\n\t\t$filename = JRequest::getVar('filename');\n\t\t\n\t\tif (!$filename) {\n\t\t\texit();\n\t\t}\n\t\t\n\t\t$model = $this->getModel();\n\t\t$form = $model->getFieldForm($file_id, 'bulk');\n\t\t\n\t\tif (!$form) {\n\t\t\techo \"There was an error creating the form\";\n\t\t\texit();\n\t\t}\n\t\t\n\t\techo '<div class=\"fltlft\" style=\"width:250px;\">';\n\t\techo '<fieldset class=\"adminform\">';\n\t\techo '<legend>Edit '.$filename.'</legend>';\n\t\techo '<div class=\"adminformlist\">';\n\n\t\tforeach ($form->getFieldset() as $field) {\n\t\t\tJHtml::_('wbty.renderField', $field);\n\t\t}\n\t\techo \"</div></fieldset></div>\";\n\t\t\n\t\texit();\n\t}",
"public function onAddField()\n {\n return $this->makePartial('create_field_form');\n }",
"public function getAddForm();",
"public function actionCreate(){\n $parents=CylTables::model()->findAll(\n array(\n 'condition'=>'isParent=\"1\" AND display_status = \"1\"',\n 'order'=>'menu_order'\n ));\n $model = new CylFields();\n $this->render('new-field', array('model' => $model,'parents' => $parents));\n }",
"public function index() {\n $content = $this->lcopun->copun_add_form();\n $this->template->full_admin_html_view($content);\n }",
"public function addAdmin()\n {\n return view('super_admin/addAdmin');\n }",
"function getCategoryFields() {\n\t\t\n\t\t$model = $this->getModel();\n\t\t$category_id = JRequest::getVar('id');\n\t\t$form = $model->getFieldForm($category_id, 'category');\n\t\t\n\t\tif (!$form) {\n\t\t\techo \"There was an error creating the form\";\n\t\t\texit();\n\t\t}\n\t\t\n\t\techo '<div class=\"fltlft\" style=\"width:250px;\">';\n\t\techo '<fieldset class=\"adminform\" >';\n\t\techo '<legend>New Category</legend>';\n\t\techo '<div class=\"adminformlist\">';\n\t\tforeach ($form->getFieldset() as $field) {\n\t\t\tJHtml::_('wbty.renderField', $field);\n\t\t}\n\t\techo \"</div></fieldset></div>\";\n\t\t\n\t\texit();\n\t}",
"public function buildFields()\n {\n $this->addField('name', 'media.adminlist.configurator.name', true);\n $this->addField('contentType', 'media.adminlist.configurator.type', true);\n $this->addField('updatedAt', 'media.adminlist.configurator.date', true);\n $this->addField('filesize', 'media.adminlist.configurator.filesize', true);\n }",
"public function showAddForm()\n {\n $cmsInfo = [\n 'moduleTitle' => __(\"Master Data\"),\n 'subModuleTitle' => __(\"Module Management\"),\n 'subTitle' => __(\"Add Module\")\n ];\n\n $dynamic_route = Config::get('constants.defines.APP_MODULES_CREATE');\n return view('modules.edit_add', compact('cmsInfo', 'dynamic_route'));\n }",
"protected function addElements() \n {\n \n // Add \"usuario\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'nombre',\n 'options' => [\n 'label' => 'Usuario Adicional',\n ],\n ]);\n \n \n // Add \"telefono\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'telefono',\n 'options' => [\n 'label' => 'Teléfono',\n ],\n ]);\n \n // Add \"email\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'email',\n 'options' => [\n 'label' => 'Mail',\n ],\n ]);\n \n // Add \"usuario\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'skype',\n 'options' => [\n 'label' => 'Skype',\n ],\n ]);\n \n // Add \"id\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'id',\n 'options' => [\n 'label' => 'id',\n ],\n ]);\n \n \n // Add the Submit button\n $this->add([\n 'type' => 'submit',\n 'name' => 'submit',\n 'attributes' => [\n 'value' => 'Create'\n ],\n ]);\n\n }",
"public function getFormCustomFields(){\n\t}",
"public function getAdd()\n {\n \treturn view(\"admin.user.add\");\n }",
"public function actionAdd()\n\t{\n\t\t$formId = $this->_input->filterSingle('form_id', XenForo_Input::UINT);\n\t\t$type = $this->_input->filterSingle('type', XenForo_Input::STRING);\n\t\t\n\t\t$fieldModel = $this->_getFieldModel();\n\t\t$fieldTypes = $fieldModel->getCountByType();\n\t\t\n\t\t$options = array();\n\t\t$options[] = array(\n\t\t 'value' => 'user',\n\t\t 'label' => new XenForo_Phrase('field'),\n\t\t 'selected' => true\n\t\t);\n\t\t\n\t\t// if global fields exist, include in the types\n\t\tif (array_key_exists('global', $fieldTypes))\n\t\t{\n\t\t\t$options[] = array(\n\t\t\t 'value' => 'global',\n\t\t\t 'label' => new XenForo_Phrase('global_field')\n\t\t\t);\n\t\t}\n\t\t\n\t\t// if template fields exist, include in the types\n\t\tif (array_key_exists('template', $fieldTypes))\n\t\t{\n\t\t\t$options[] = array(\n\t\t\t 'value' => 'template',\n\t\t\t 'label' => new XenForo_Phrase('template_field') \n\t\t\t);\n\t\t}\n\t\t\n\t\t// if there are no options other than user, just send them to the add field page\n\t\tif (!$type && count($options) == 1)\n\t\t{\n\t\t\t$type = 'user';\n\t\t}\n\t\t\n\t\t// association a field to a form\n\t\tif ($formId && $type)\n\t\t{\n\t\t\t$default = array(\n\t\t\t\t'field_id' => null,\n\t\t\t\t'form_id' => $this->_input->filterSingle('form_id', XenForo_Input::UINT),\n\t\t\t\t'display_order' => $this->_getFieldModel()->getGreatestDisplayOrderByFormId($formId) + 10,\n\t\t\t\t'field_type' => 'textbox',\n\t\t\t\t'field_choices' => '',\n\t\t\t\t'match_type' => 'none',\n\t\t\t\t'match_regex' => '',\n\t\t\t\t'match_callback_class' => '',\n\t\t\t\t'match_callback_method' => '',\n\t\t\t\t'max_length' => 0,\n\t\t\t\t'min_length' => 0,\n\t\t\t\t'required' => 0,\n\t\t\t\t'type' => $type,\n\t\t\t\t'active' => 1,\n\t\t\t\t'pre_text' => '',\n\t\t\t\t'post_text' => ''\n\t\t\t);\n\t\t\t\n\t\t\tswitch ($type)\n\t\t\t{\n\t\t\t case 'global':\n\t\t {\n\t\t return $this->responseReroute('KomuKu_SimpleForms_ControllerAdmin_Form', 'add-global-field');\n\t\t }\n\t\t\t case 'template':\n\t\t {\n\t\t return $this->responseReroute('KomuKu_SimpleForms_ControllerAdmin_Form', 'add-template-field');\n\t\t }\n\t\t\t default:\n\t\t {\n\t\t return $this->_getFieldAddEditResponse($default);\n\t\t }\n\t\t\t}\n\t\t}\n\t\t\n\t\t// adding a global/template field\n\t\telse if (!$formId && $type)\n\t\t{\n\t\t $default = array(\n\t 'field_id' => null,\n\t 'field_type' => 'textbox',\n\t 'field_choices' => '',\n\t 'match_type' => 'none',\n\t 'match_regex' => '',\n\t 'match_callback_class' => '',\n\t 'match_callback_method' => '',\n\t 'max_length' => 0,\n\t\t \t'min_length' => 0,\n\t 'type' => $type,\n\t\t \t'pre_text' => '',\n\t\t \t'post_text' => ''\n\t\t );\n\t\t \n\t\t if ($type != 'global')\n\t\t {\n\t\t \t$default['display_order'] = 1;\n\t\t \t$default['required'] = 0;\n\t\t \t$default['active'] = 1;\n\t\t }\n\t\t \n\t\t return $this->_getFieldAddEditResponse($default);\n\t\t}\n\t\t\n\t\t// association type\n\t\telse\n\t\t{\n\t\t\t$viewParams = array(\n\t\t\t\t'formId' => $formId,\n\t\t\t\t'options' => $options\n\t\t\t);\n\t\t\t\n\t\t\treturn $this->responseView('KomuKu_SimpleForms_ViewAdmin_Field_AddType', 'kmkform__field_add_type', $viewParams);\n\t\t}\n\t}",
"public function addAdmin()\n {\n return view('backend.pages.admin.add-admin');\n }",
"protected function addElements() \n {\n // Add \"email\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'title',\n 'options' => [\n 'label' => 'Title',\n ],\n ]);\n \n // Add \"parent_id\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'parent_id', \n 'options' => [\n 'label' => 'Full Name',\n ],\n ]);\n \n if ($this->scenario == 'create') {\n \n\n }\n \n // Add \"status\" field\n $this->add([ \n 'type' => 'select',\n 'name' => 'status',\n 'options' => [\n 'label' => 'Status',\n 'value_options' => [\n 1 => 'Active',\n 2 => 'Retired', \n ]\n ],\n ]);\n \n // Add the Submit button\n $this->add([\n 'type' => 'submit',\n 'name' => 'submit',\n 'attributes' => [ \n 'value' => 'Create'\n ],\n ]);\n }",
"public function admin_add_new() {\n ?>\n <div class=\"wrap\">\n <h2><?php _e('Add New Form', 'swpm-form-builder'); ?></h2>\n <?php\n include_once( SWPM_FORM_BUILDER_PATH . 'includes/admin-new-form.php' );\n ?>\n </div>\n <?php\n }",
"static function custom_get_creatable_fields() {\n # use this functionality to get a list of all field in the table\n return self::default_get_updatable_fields();\n }",
"public function getAddMod()\n {\n return view('admin.addmod');\n }",
"public function getAdd()\n\t{\n\t $form = \\FormBuilder::create($this->form, [\n 'method' => 'POST',\n 'model' => $this->getModelInstance(),\n 'url' => ($this->url_prefix.'/add')\n ]);\n return view($this->tpl_prefix.'add',array('catalog'=>$this), compact('form'));\n\t}",
"public function addForm()\n {\n return view('postsAdmin._postsAdmin_addForm');\n }",
"public function get_admin_add() {\n //Grab the categories\n $categories = array();\n foreach (Category::get() as $category) {\n $categories[$category->id] = $category->title;\n }\n //Create a data array\n $data = array(\n 'section' => 'post',\n 'pageTitle' => 'Add Blog Post',\n 'categories' => $categories,\n );\n\n //Build the view\n return View::make('admin.post.form', $data);\n }",
"protected function createFormFields() {\n\t}",
"public function getAddAdmin(){\n return view('auth.addAdmin');\n }",
"public static function form_fields(){\n\n \treturn [\n [\n \t'id'=> 'description',\n \t'name'=> 'description', \n \t'desc'=> 'Description', \n \t'val'=>\tnull, \n \t'type'=> 'text',\n \t'maxlength'=> 255,\n \t'required'=> 'required',\n ],\n\n [\n \t'id'=> 'rate',\n \t'name'=> 'rate', \n \t'desc'=> 'Discount Rate', \n \t'val'=>\tnull, \n \t'type'=> 'number',\n \t'min'=> 0,\n \t'max'=> 100,\n \t'step'=> '0.01',\n \t'required'=> 'required',\n ],\n\n [\n \t'id'=> 'stat',\n \t'name'=> 'stat', \n \t'desc'=> 'isActive', \n \t'val'=>1, \n \t'type'=> 'checkbox',\n ],\n ];\n\n }",
"public function admin_add() {\n\t\tparent::admin_add();\n\n\t\t$users = $this->ShopList->User->find('list');\n\t\t$shopShippingMethods = $this->ShopList->ShopShippingMethod->find('list');\n\t\t$shopPaymentMethods = $this->ShopList->ShopPaymentMethod->find('list');\n\t\t$this->set(compact('users', 'shopShippingMethods', 'shopPaymentMethods'));\n\t}",
"public function add_edit_form(){\n\n $_id = $_GET['id']; \n $tblName = $this->get_tbl_name();\n\n $source = DB::table($tblName)->where('id',$_id)->get();\n\n $source_first = $source[0];\n\n // mhtml::dump($source_first);\n\n\n $struct = $this->struct;\n\n mhtml::startForm(\"edit\",\"backend_edit.php\");\n\n // loop througth fields\n foreach ($this->edit as $key => $field) {\n\n $kind = $struct[$field] ;\n if($kind == 'string') {$kind = 'text' ;} \n $value = $source_first[$field];\n\n mhtml::field($this->virtual_names[$field],$field,$kind,$value);\n\n }\n\n // add secret field for password\n if(isset($this->edit_secret)){\n if($this->edit_secret == true ){\n\n Logger::warn(\"we use one secret only on secret[0] in secret array in model\");\n $virtual_pass = $this->virtual_names[$this->secret[0]];\n mhtml::field($virtual_pass,$this->secret[0],'password');\n\n }\n }\n\n \n\n\n\n\n // mhtml::field('user name ','user_name','text',\"mohammed\");\n // mhtml::field('passwording','password','password');\n // mhtml::field('age','age','number');\n\n mhtml::field_id_model();\n\n mhtml::submitForm();\n\n mhtml::endForm();\n\n }",
"protected function addElements() \n { \n // Add \"nom\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'nom_parent',\n 'attributes' => [\n 'id' => 'nom_parent',\n 'style' => 'width: 50%'\n ],\n 'options' => [\n 'label' => 'Nom de famille:',\n ],\n ]);\n \n // Add \"prenom\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'prenom_parent',\n 'attributes' => [\n 'id' => 'prenom_parent',\n 'style' => 'width: 50%'\n ],\n 'options' => [\n 'label' => 'Prénom parent:',\n ],\n ]);\n \n // Add \"domicile\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'domicile',\n 'attributes' => [\n 'id' => 'domicile',\n 'style' => 'width: 50%'\n ],\n 'options' => [\n 'label' => 'Domicile:',\n ],\n ]);\n \n // Add \"telephone_number\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'telephone1',\n 'attributes' => [\n 'id' => 'telephone1'\n ],\n 'options' => [\n 'label' => 'Téléphone 1',\n ],\n ]);\n \n // Add \"telephone_number\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'telephone2',\n 'attributes' => [\n 'id' => 'telephone2'\n ],\n 'options' => [\n 'label' => 'Téléphone 2',\n ],\n ]);\n \n // Add \"code eleve \" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'email_parent',\n 'attributes' => [\n 'id' => 'email_parent',\n 'style' => 'width: 50%'\n ],\n 'options' => [\n 'label' => 'E-mail:',\n ],\n ]);\n \n // Add \"comment\" field\n $this->add([ \n 'type' => 'textarea',\n 'name' => 'commentaire',\n 'options' =>[\n 'label' => 'Commentaires:',\n ],\n 'attributes' => [\n 'id' => 'commentaire',\n 'style' => 'width: 50%'\n ], \n ]);\n \n // Add the submit button\n $this->add([\n 'type' => 'submit',\n 'name' => 'submit',\n 'attributes' => [ \n 'value' => 'Enregistrer',\n 'id' => 'submitbutton',\n ],\n ]); \n \n }",
"function fields() {\n return array(\n 'title' => 'The title of the content',\n 'fieldname' => t('fieldname'),\n 'title' => t('title'),\n 'label' => t('Label'),\n 'data_type' => t('data type'),\n 'html_type' => t('html_type'),\n );\n }",
"public function model_test_add_form()\n\t{\n\t\t$CI =& get_instance();\n\t\t$CI->load->model('admin/Model_tests');\n\t\t\n\t\t$class_list = $CI->Model_tests->retrieve_class_list();\n\t\t$datas = array(\n\t\t\t\t'title' => 'Add Model Test',\n\t\t\t\t'class_list' => $class_list\n\t\t\t);\t\t\t\n\t\t$model_testForm = $CI->parser->parse('admin_view/model_test/add_test_form',$datas,true);\n\t\treturn $model_testForm;\n\t}",
"public function getCMSFields() {\n $fields = parent::getCMSFields();\n\n\n $fields->addFIeldTOTab('Root.Main',new TextField('Title','Image Title'));\n $fields->addFIeldTOTab('Root.Main',new TextareaField('Description','Photo Description (Max 500 Charachters)'));\n $fields->addFIeldTOTab('Root.Main',new UploadField('Image','Photo'));\n\n return $fields;\n }",
"public function getAdd()\n {\n return view(\"Policy::add-edit\");\n }",
"public function create()\n {\n return view('admin.create_adds');\n }",
"public function admin_add(){\n $content = $this->load->view(\"users/users_form\",\"\",true);\n echo Modules::run(\"template/load_admin\", \"Add New User\", $content);\n }",
"public function buildFormFields()\n {\n $this->addField(\n SharpFormTextField::make('title')\n ->setLabel('Title')\n )->addField(\n SharpFormUploadField::make('cover')\n ->setLabel('Cover')\n ->setFileFilterImages()\n ->setCropRatio('1:1')\n ->setStorageBasePath('data/service')\n )->addField(\n SharpFormNumberField::make('price')\n ->setLabel('Price')\n )->addField(\n SharpFormMarkdownField::make('description')->setToolbar([\n SharpFormMarkdownField::B, SharpFormMarkdownField::I,\n SharpFormMarkdownField::SEPARATOR,\n SharpFormMarkdownField::IMG,\n SharpFormMarkdownField::SEPARATOR,\n SharpFormMarkdownField::A,\n ])\n )->addField(\n SharpFormTagsField::make('tags',\n Tag::orderBy('label')->get()->pluck('label', 'id')->all()\n )->setLabel('Tags')\n ->setCreatable(true)\n ->setCreateAttribute('name')\n );\n }",
"public function add_settings_fields()\n\t{\n\t\t$this->add_field(\n\t\t\t'section-info',\n\t\t\t'name',\n\t\t\t'Name',\n\t\t\t'print_field_name',\n\t\t\tarray()\n\t\t);\n\t}",
"public function buildShowFields()\n {\n $this->addField(\n SharpShowTextField::make('id')\n ->setLabel('Id:')\n )->addField(\n SharpShowTextField::make('name')\n ->setLabel('name:')\n )->addField(\n SharpShowTextField::make('url')\n ->setLabel('url:')\n )->addField(\n SharpShowTextField::make('vendor_id')\n ->setLabel('vendor_id')\n )->addField(\n SharpShowTextField::make('parent_id')\n ->setLabel('parent_id')\n )->addField(\n SharpShowTextField::make('created_at')\n ->setLabel('Created At:')\n )->addField(\n SharpShowTextField::make('updated_at')\n ->setLabel('Updated At:')\n )->addField(\n SharpShowEntityListField::make('products', 'product')\n ->hideFilterWithValue('category', function($instanceId) {\n return $instanceId;\n })\n ->showEntityState(false)\n ->showReorderButton(true)\n ->showCreateButton(false)\n );\n }",
"protected function getCreateFormFields()\n {\n return $this->formFields();\n }",
"public function admin_add_new() {\n?>\n\t<div class=\"wrap\">\n\t\t<h2><?php _e( 'Add New Form', 'visual-form-builder-pro' ); ?></h2>\n<?php\n\t\tinclude_once( trailingslashit( plugin_dir_path( __FILE__ ) ) . 'includes/admin-new-form.php' );\n?>\n\t</div>\n<?php\n\t}",
"function lb_show_add_record_page_action() {\n\tlb_show_templates(\n\t\tarray(\n\t\t\t'name' => 'add',\n\t\t)\n\t);\n}",
"public function showAddAdminPanel(){\n return $this->view('frontend/admin/addadmin.twig');\n }",
"function imbaf_properties_create_add_fields(){\n ?>\n <div class=\"form-field\">\n <label for=\"term_meta[imbaf_property_type]\">Typ</label>\n\n <select name=\"term_meta[imbaf_property_type]\">\n\n <?php\n\n foreach($this -> property_types as $property){\n\n ?> <option style=\"width:100%;\" value=\"<?php echo $property['value']; ?>\"><?php echo $property['label']; ?></option> <?php\n\n }\n\n\n ?>\n </select>\n\n <p class=\"description\"><?php _e('Vergleichswert-Typ','imb_affiliate'); ?></p>\n\n\n\n <label for=\"term_meta[imbaf_property_icon]\">Icon</label>\n <input type=\"text\" name=\"term_meta[imbaf_property_icon]\">\n\n <p class=\"description\"><?php _e('Font Awesome Icon','imb_affiliate'); ?></p>\n\n\n <label for=\"term_meta[imbaf_property_prefix]\"><?php _e('Präfix','imb_affiliate'); ?></label>\n <input type=\"text\" name=\"term_meta[imbaf_property_prefix]\">\n\n <p class=\"description\"><?php _e('Vorgestellter Wert (ca.)','imb_affiliate'); ?></p>\n\n <label for=\"term_meta[imbaf_property_suffix]\"><?php _e('Suffix','imb_affiliate'); ?></label>\n <input type=\"text\" name=\"term_meta[imbaf_property_suffix]\">\n <p class=\"description\"><?php _e('Nachgestellter Wert (z.B. kg, MhZ etc.)','imb_affiliate'); ?></p>\n\n\n\n </div>\n <?php\n\n\n }",
"public function index() {\n $content = $this->llocation->location_add_form();\n $this->template->full_admin_html_view($content);\n }",
"public function getInputfields() {\n\n\t\t// get module getInputfields set config class\n \t$inputfields = parent::getInputfields();\n\n\t\t// get InputfieldText module\n \t$f = $this->modules->get('InputfieldText');\n \t$f->attr('name', 'findStr');\n \t$f->label = 'Find in text';\n\t\t$f->description = 'Add a word or pattern to find and replace within your text.';\n\n\t\t// add User role input to form config\n\t\t$inputfields->add($f);\n\n\n\t\t// get new InputfieldText module\n\t\t$f = $this->modules->get('InputfieldText');\n\t $f->attr('name', 'replaceStr');\n\t $f->label = 'Replace text';\n\t\t$f->description = 'text to show on the front end.';\n\n\t\t// add Page redirect input to form config\n\t $inputfields->add($f);\n\n\t\t// return module config inputs\n\t return $inputfields;\n \t}",
"public function fields()\n {\n return [\n Text::make('Name')\n ->value($this->model->name),\n ];\n }",
"protected function form()\n {\n return Admin::form(Headline::class, function (Form $form) {\n\n $form->display('id', 'ID');\n\n $form->text('title', 'Judul');\n $form->trumbowyg('excerpt','Summary');\n $form->image('image','Photo')->move('/headline');\n $form->trumbowyg('content','Content')->attribute(['id' => 'trumbowyg']);;\n\n //DPD use mutli select\n $form->select('daerah_id','DPD')->options(Daerah::all()->pluck('name', 'id')); \n\n $states = [\n 'on' => ['value' => 1, 'text' => 'enable', 'color' => 'success'],\n 'off' => ['value' => 0, 'text' => 'disable', 'color' => 'danger'],\n ];\n $form->text('uri','External Url');\n $form->switch('publish','Publish')->states($states);\n $form->hidden('author_id')->value(Admin::user()->id);\n $form->display('created_at', 'Created At');\n $form->display('updated_at', 'Updated At');\n });\n }",
"public function getCMSFields()\n {\n $commentField = $this->AllowHtml ? HTMLEditorField::class : TextareaField::class;\n $fields = new FieldList(\n $this\n ->obj('Created')\n ->scaffoldFormField($this->fieldLabel('Created'))\n ->performReadonlyTransformation(),\n TextField::create('Name', $this->fieldLabel('Name')),\n $commentField::create('Comment', $this->fieldLabel('Comment')),\n EmailField::create('Email', $this->fieldLabel('Email')),\n TextField::create('URL', $this->fieldLabel('URL')),\n FieldGroup::create(array(\n CheckboxField::create('Moderated', $this->fieldLabel('Moderated')),\n CheckboxField::create('IsSpam', $this->fieldLabel('IsSpam')),\n ))\n ->setTitle(_t(__CLASS__ . '.OPTIONS', 'Options'))\n ->setDescription(_t(\n __CLASS__ . '.OPTION_DESCRIPTION',\n 'Unmoderated and spam comments will not be displayed until approved'\n ))\n );\n\n // Show member name if given\n if (($author = $this->Author()) && $author->exists()) {\n $fields->insertAfter(\n 'Name',\n TextField::create('AuthorMember', $this->fieldLabel('Author'), $author->Title)\n ->performReadonlyTransformation()\n );\n }\n\n // Show parent comment if given\n if (($parent = $this->ParentComment()) && $parent->exists()) {\n $fields->push(new HeaderField(\n 'ParentComment_Title',\n _t(__CLASS__ . '.ParentComment_Title', 'This comment is a reply to the below')\n ));\n // Created date\n // FIXME - the method setName in DatetimeField is not chainable, hence\n // the lack of chaining here\n $createdField = $parent\n ->obj('Created')\n ->scaffoldFormField($parent->fieldLabel('Created'));\n $createdField->setName('ParentComment_Created');\n $createdField->setValue($parent->Created);\n $createdField->performReadonlyTransformation();\n $fields->push($createdField);\n\n // Name (could be member or string value)\n $fields->push(\n $parent\n ->obj('AuthorName')\n ->scaffoldFormField($parent->fieldLabel('AuthorName'))\n ->setName('ParentComment_AuthorName')\n ->setValue($parent->getAuthorName())\n ->performReadonlyTransformation()\n );\n\n // Comment body\n $fields->push(\n $parent\n ->obj('EscapedComment')\n ->scaffoldFormField($parent->fieldLabel(self::class))\n ->setName('ParentComment_EscapedComment')\n ->setValue($parent->Comment)\n ->performReadonlyTransformation()\n );\n }\n\n $this->extend('updateCMSFields', $fields);\n return $fields;\n }",
"public function add() {\n\n $this->viewBuilder()->layout('admin');\n $doctor = $this->Admins->newEntity();\n if ($this->request->is('post')) {\n// if(!empty($this->request->data['allpermissions']))\n// {\n// $this->request->data['permissions'] = implode(',',$this->request->data['allpermissions']);\n// }\n $doctors = $this->Admins->patchEntity($doctor, $this->request->data);\n \n $this->request->data['created'] = gmdate(\"Y-m-d h:i:s\");\n $this->request->data['modified'] = gmdate(\"Y-m-d h:i:s\"); \n \n if ($this->Admins->save($doctors)) {\n $this->Flash->success(__('The Admin has been saved.'));\n //pr($this->request->data); pr($doctors); exit;\n return $this->redirect(['action' => 'index']);\n } else {\n $this->Flash->error(__('The Admin could not be saved. Please, try again.'));\n }\n } else {\n $this->request->data['first_name'] = '';\n $this->request->data['last_name'] = '';\n $this->request->data['phone'] = '';\n $this->request->data['username'] = '';\n $this->request->data['email'] = '';\n }\n //$this->loadModel('AdminMenus');\n //$menus = $this->AdminMenus->find()->all();\n $this->set(compact('doctor','menus'));\n $this->set('_serialize', ['doctor']);\n }",
"abstract public function fields(AdminRequest $request);",
"public function add()\n\t{\n\t\t$this->template('crud/add');\t\n\t}",
"public function create()\n {\n return view('superAdmin.addAdmin');\n }",
"public function defineFormFields()\n {\n return 'fields.yaml';\n }",
"public function createfield(){\n \treturn view('field.create');\n }",
"public function index()\n\t{\n\t\t$content = $this->lcustomer->customer_add_form();\n\t\t$this->template->full_admin_html_view($content);\n\t}",
"public function getAdd()\n {\n return view('manage.content.help.action.add');\n }",
"public function setup() {\n\t\t/*\n\t\t|--------------------------------------------------------------------------\n\t\t| BASIC CRUD INFORMATION\n\t\t|--------------------------------------------------------------------------\n\t\t*/\n $this->crud->setModel(\"App\\Models\\CoursEnLigne\");\n $this->crud->setRoute(\"admin/coursenligne\");\n $this->crud->setEntityNameStrings('cours en ligne', 'cours en ligne');\n\t\t/*\n\t\t|--------------------------------------------------------------------------\n\t\t| COLUMNS AND FIELDS\n\t\t|--------------------------------------------------------------------------\n\t\t*/\n\t\t// ------ CRUD COLUMNS\n $this->crud->setColumns(['titre', ['label' => \"Nom du formateur\",\n \t\t 'type' => 'select',\n 'name' => 'formateur_id',\n \t\t 'entity' => 'formateur',\n \t\t 'attribute' => 'full_name',\n \t\t 'model' => \"App\\Models\\Formateur\"\n \t\t\t ]\n ]);\n\t\t// ------ CRUD FIELDS\n $this->crud->addField([\n\t\t\t'name' => 'titre',\n\t\t\t'label' => \"Titre*\"\n\t\t]);\n\t\t$this->crud->addField([ // SELECT\n 'label' => \"Formateur*\",\n 'type' => 'select2',\n 'name' => 'formateur_id',\n 'entity' => 'formateur',\n 'attribute' => 'full_name',\n 'model' => \"App\\Models\\Formateur\",\n ]);\n $this->crud->addField([\n\t\t\t'name' => 'texte',\n\t\t\t'label' => \"Texte\",\n\t\t\t'type' => 'wysiwyg'\n\t\t]);\n\t\t$this->crud->addField([ // date_picker\n\t\t 'name' => 'date',\n\t\t 'type' => 'date_picker',\n\t\t 'label' => 'Date',\n\t\t // optional:\n\t\t 'date_picker_options' => [\n\t\t 'todayBtn' => true,\n\t\t 'format' => 'dd-mm-yyyy',\n\t\t 'language' => 'fr'\n\t\t ],\n\t\t]);\n\n\t\t$this->crud->addField([ // Time\n \t\t 'name' => 'heure',\n \t\t'label' => 'Heure',\n \t\t'type' => 'time'\n\t\t]);\n\t\t$this->crud->addField([\n\t\t\t'name' => 'prix',\n\t\t\t'label' => \"Prix*\",\n\t\t\t'type' => 'number'\n\t\t]);\n\t\t$this->crud->addField([\n\t\t\t'name' => 'stock',\n\t\t\t'label' => \"En stock\",\n\t\t\t'type' => 'checkbox'\n\t\t]);\n\n }",
"public function listRegisterFields(){\n\t\t$this->registerFieldString('name_hld', 'Tipo');\n\t}",
"public function addCustomFields()\n {\n if (!($enabled_custom_fields = $this->getDataManager()->getOption('custom_fields'))) {\n $enabled_custom_fields = array();\n }\n if (!($enabled_profile_fields = $this->getDataManager()->getOption('custom_fields_additional'))) {\n $enabled_profile_fields = array();\n }\n ?>\n <fieldset data-rm-target=\"#custom-fields .custom-field-select option\" id=\"profile-fields\" class=\"checkbox-list rm-ctrl syncstate\"<?php echo !$this->getDataManager()->getOption('enable_sync') ? ' disabled=\"disabled\"' : '' ?>>\n <?php foreach ($this->custom_fields as $custom_field): ?>\n <div>\n <label>\n <input class=\"profile-field-checkbox\" type=\"checkbox\" name=\"<?php echo $this->getViewKey().'[custom_fields_additional][]' ?>\" value=\"<?php echo $custom_field->getId() ?>\"<?php echo in_array($custom_field->getId(), $enabled_profile_fields) ? ' checked=\"checked\"' : '' ?> />\n <?php echo $custom_field->getName() ?> (<?php _e('customfield.type.'.$custom_field->getFieldType(), 'mgrt-wordpress') ?>)\n </label>\n </div>\n <?php endforeach; ?>\n </fieldset>\n <p class=\"description\"><?php _e('form.sync.field.custom.more.help', 'mgrt-wordpress') ?></p>\n <?php\n }",
"public function profile_admin()\n {\n parent::__construct();\n\t\t$this->setAttribute('method', 'post');\n\t\t$this->setAttribute('class', 'profile_form');\n \n\t\t$this->add(array(\n 'name' => 'user_name',\n 'type' => 'text',\n\t\t\t\"required\"=>true,\n 'options' =>array(\n 'label' => \"Full Name\",\n ),\n\t\t\t'attributes' =>array( // Array of attributes\n\t\t\t\t'class' => 'form-control required', \n\t\t\t\t\"placeholder\" => \"Full Name\", \n\t\t\t ),\n ));\n\t\t\n\t\t\n\t\t$this->add(array(\n 'name' => 'user_email',\n 'type' => 'text',\n\t\t\t\"required\"=>true,\n 'options' =>array(\n 'label' => \"Email\",\n ),\n\t\t\t\n\t\t\t'attributes' =>array( // Array of attributes\n\t\t\t\t'class' => 'form-control required email checkemail_exclude', \n\t\t\t\t\"placeholder\" => \"Email Address\", \n\t\t\t ),\n ));\n\t\t\n\t\t$this->add(array(\n 'name' => 'user_address',\n 'type' => 'text',\n\t\t\t\"required\"=>true,\n 'options' =>array(\n 'label' => \"Address\",\n ),\n\t\t\t'attributes' =>array( // Array of attributes\n\t\t\t\t'class' => 'form-control required', \n\t\t\t\t\"placeholder\" => \"Address\", \n\t\t\t ),\n ));\n\t\t\n\t\t$this->add(array(\n 'name' => 'user_phone',\n 'type' => 'text',\n\t\t\t\"required\"=>true,\n 'options' =>array(\n 'label' => \"Phone Number\",\n ),\n\t\t\t'attributes' =>array( // Array of attributes\n\t\t\t\t'class' => 'form-control required', \n\t\t\t\t\"placeholder\" => \"Phone Number\", \n\t\t\t\t'id'=>'user_phone', \n\t\t\t ),\n ));\n\t\t\n\t\t$this->add(array(\n 'name' => 'user_city',\n 'type' => 'text',\n\t\t\t\"required\"=>true,\n 'options' =>array(\n 'label' => \"City\",\n ),\n\t\t\t'attributes' =>array( // Array of attributes\n\t\t\t\t'class' => 'form-control required', \n\t\t\t\t\"placeholder\" => \"City\", \n\t\t\t ),\n ));\n\t\t\n\t\t$this->add(array(\n 'name' => 'user_state',\n 'type' => 'text',\n\t\t\t\"required\"=>true,\n 'options' =>array(\n 'label' => \"State\",\n ),\n\t\t\t'attributes' =>array( // Array of attributes\n\t\t\t\t'class' => 'form-control required', \n\t\t\t\t\"placeholder\" => \"State\", \n\t\t\t ),\n ));\n\t\t$this->add(array(\n 'name' => 'user_country',\n 'type' => 'text',\n\t\t\t\"required\"=>true,\n 'options' =>array(\n 'label' => \"Country\",\n ),\n\t\t\t'attributes' =>array( // Array of attributes\n\t\t\t\t'class' => 'form-control required', \n\t\t\t\t\"placeholder\" => \"Country\", \n\t\t\t ),\n ));\n\t\t\n\t\t$this->add(array(\n\t\t\t'name' => 'user_image',\n\t\t\t'type' => 'file',\t\t\t\n\t\t\t'options' =>array(\n\t\t\t\t'label' => \"Profile Image\",\n\t\t\t),\n\t\t\t\"accept\"=>\"image/*\",\n\t\t\t'attributes' =>array( // Array of attributes\n\t\t\t\t'class' => 'default', \n\t\t\t\t\"id\" => \"user_image\", \n\t\t\t\t\"accept\"=>\"image/*\"\t\t\t\t\n\t\t\t ),\n\t\t));\t\n }",
"protected function form()\n {\n return Admin::form(FactoryModel::class, function (Form $form) {\n\n $form->display('id', 'ID');\n $form->text('name','厂家名称')->rules('required');\n $form->text('boss','老板')->rules('required');\n $form->text('telephone','手机号');\n $form->text('address','地址');\n $form->text('mark','备注');\n\n $form->display('created_at', 'Created At');\n $form->display('updated_at', 'Updated At');\n });\n }",
"function display_add_field($recordid = 0, $formdata = NULL) {\n return $this->display_browse_field($recordid, 'addtemplate');\n }",
"function display_add() {\n $this->_addform->display();\n }",
"public function buildFormFields()\n {\n $this->addFormField(\n SharpTextFormFieldConfig::create(\"titre\")\n ->setLabel(\"Titre\")\n );\n\n $this->addFormField(\n SharpTextFormFieldConfig::create(\"soustitre\")\n ->setLabel(\"Sous-titre\")\n );\n\n $this->addFormField(\n SharpTextFormFieldConfig::create(\"slug\")\n ->setLabel(\"Slug\")\n );\n\n $this->addFormField(\n SharpTextFormFieldConfig::create(\"url\")\n ->setLabel(\"URL du projet\")\n );\n\n $this->addFormField(\n SharpMarkdownFormFieldConfig::create(\"texte\")\n ->setLabel(\"Texte\")\n ->showToolbar(true)\n );\n\n $this->addFormField(\n SharpCheckFormFieldConfig::create(\"is_open_source\")\n ->setText(\"Projet Open-source\")\n );\n\n $this->addFormField(\n SharpPivotFormFieldConfig::create(\"technos\", SharpTechnoRepository::class)\n ->setLabel(\"Technologies\")\n ->setAddable(true)\n ->setSortable(true)\n ->setOrderAttribute(\"ordre\")\n ->setCreateAttribute(\"nom\")\n );\n\n $this->addFormField(\n SharpListFormFieldConfig::create(\"screenshots\")\n ->setLabel(\"Screenshots\")\n ->setSortable(true)->setOrderAttribute(\"ordre\")\n ->setAddable(true)->setAddButtonText(\"Ajouter un screenshot\")\n ->setRemovable(true)->setRemoveButtonText(\"Supprimer\")\n ->addItemFormField(\n SharpFileFormFieldConfig::create(\"fichier\")\n ->setFileFilterImages()\n ->setMaxFileSize(5)\n ->setThumbnail(\"100x100\")\n ->addGeneratedThumbnail(\"600x\"))\n ->addItemFormField(\n SharpTextFormFieldConfig::create(\"tag\")\n ->addAttribute(\"placeholder\", \"Tag\"))\n ->addItemFormField(\n SharpTextareaFormFieldConfig::create(\"legende\")\n ->setRows(3))\n ->setItemFormTemplate(\n SharpListItemFormTemplateConfig::create()\n ->addField(\"fichier\")\n ->addField(\"tag\")\n ->addField(\"legende\")\n )\n );\n\n $this->addFormTemplateColumn(\n SharpFormTemplateColumnConfig::create(7)\n ->addField(\"titre\")\n ->addField(\"soustitre\")\n ->addField([\"slug:5\", \"url:7\"])\n ->addField(\"technos\")\n ->addField(\"is_open_source\")\n\n )->addFormTemplateColumn(\n SharpFormTemplateColumnConfig::create(5)\n ->addField(\"texte\")\n ->addField(\"screenshots\")\n );\n }",
"public function addAction()\n {\n// $m = $this->baseView('view',['lside','passportAdmin'],['lside'=>['list' => $this->names,'base' => ''],'cont' => ['fsd']]);\n// $p = $cr->render($m,[]);\n $p = $this->add($this->model);\n return $this->baseView('view',['admin/lside','passport/admin/add'],['lside'=>['list' => $this->names,'base' => ''],'cont' => $p]);\n }",
"public function getCMSFields() {\n\t\t$fields = parent::getCMSFields();\n\n\t\t// Hide these from editing\n\t\t$fields->removeByName('ParentID');\n\t\t$fields->removeByName('Sort');\n\n\t\t//Remove to re-add\n\t\t$fields->removeByName('Type');\n\n\t\t$content = $fields->dataFieldByName('Content');\n\t\t$numberToDisplay = $fields->dataFieldByName('NumberToDisplay');\n\t\t$html = $fields->dataFieldByName('HTML');\n\t\t$subtitle = $fields->dataFieldByName('SubTitle');\n\n\t\t// $fields->dataFieldByName('Width');\n\n\t\t$fields->replaceField('Width',\n\t\t\t$width = DropdownField::create('Width', 'Width', $this->getColumns())\n\t\t);\n\n\t\t$width->setDescription(\"Width of panel at desktop size\");\n\n\n\t\t$html->setRows(20);\n\n\t\t$fields->insertAfter(\n\t\t\t$link = LinkField::create('LinkID', 'Link'),\n\t\t\t'Content'\n\t\t);\n\n\t\t$image = $fields->dataFieldByName('Image');\n\t\t$image->setFolderName('Uploads/Small-Images');\n\n\t\t$fields->removeByName('Image');\n\n\t\t$fields->insertAfter(\n\t\t\t$type = OptionSetField::create(\n\t\t\t\t\"Type\", \"Type\",\n\t\t\t\t$this->dbObject('Type')->enumValues()\n\t\t\t), \"Width\"\n\t\t);\n\n\t\t$type->addExtraClass('inline-short-list');\n\n\t\t$fields->insertAfter($imageUpload = DisplayLogicWrapper::create($image), 'LinkID');\n\t\t$imageUpload->hideUnless(\"Type\")->isEqualTo(\"Content\")->orIf(\"Type\")->isEqualTo(\"Image\");\n\n\t\t$html->hideUnless(\"Type\")->isEqualTo(\"HTML\");\n\t\t$subtitle->hideUnless(\"Type\")->isEqualTo(\"HTML\");\n\n\t\t$link->hideUnless(\"Type\")->isEqualTo(\"Content\")->orIf(\"Type\")->isEqualTo(\"Image\");\n\n\t\t$numberToDisplay->hideUnless(\"Type\")->isEqualTo(\"News\");\n\n\t\t$content->hideUnless(\"Type\")->isEqualTo(\"Content\");\n\n\t\t// Archived\n\t\t$fields->removeByName('Archived');\n\t\t$fields->addFieldToTab('Root.Main', $group = new CompositeField(\n\t\t\t$label = new LabelField(\"LabelArchive\",\"Archive this feature?\"),\n\t\t\tnew CheckboxField('Archived', '')\n\t\t));\n\n\t\t$group->addExtraClass(\"special field\");\n\t\t$label->addExtraClass(\"left\");\n\n\t\treturn $fields;\n\t}",
"private function addElements(): void\n {\n // Add additional form fields\n $this->add([\n 'name' => 'masterFile',\n 'type' => Checkbox::class,\n 'attributes' => [\n 'id' => 'masterFile',\n 'class' => 'form-check-input',\n ],\n 'options' => [\n 'label' => 'Create master export file',\n 'label_attributes' => [\n 'class' => 'form-check-label',\n ],\n ],\n ]);\n\n $this->add([\n 'name' => 'debugTranslations',\n 'type' => Checkbox::class,\n 'attributes' => [\n 'id' => 'debugTranslations',\n 'class' => 'form-check-input',\n ],\n 'options' => [\n 'label' => 'Create debug translations',\n 'label_attributes' => [\n 'class' => 'form-check-label',\n ],\n ],\n ]);\n }",
"public function create()\n {\n return view('admin.add');\n }",
"public function create()\n {\n return view('admin.add');\n }",
"function create_custom_fields() {\n // Get all components to be listed\n $this->get_components();\n // Add components meta box\n if ( function_exists( 'add_meta_box' ) ) {\n foreach ( $this->postTypes as $postType ) {\n add_meta_box( 'wpnext', 'WPNext Builder', array( &$this, 'display_custom_fields' ), $postType, 'normal', 'high' );\n }\n }\n }",
"public function create()\n {\n return view('admin.additionals.create');\n }",
"public function renderAdd()\r\n\t{\r\n\t\t$this['itemForm']['save']->caption = 'Přidat';\r\n $this->template->titul = self::TITUL_ADD;\r\n\t\t$this->template->is_addon = TRUE;\r\n\r\n\t}",
"protected function setupShowOperation(): void\n {\n $this->crud->addColumn([\n 'name' => 'name',\n 'type' => 'text',\n 'label' => 'Наименование',\n ]);\n $this->crud->addColumn([\n 'name' => 'category_id',\n 'type' => 'select',\n 'label' => 'Категория',\n 'entity' => 'category',\n 'attribute' => \"name\",\n 'model' => Category::class,\n ]);\n $this->crud->addColumn([\n 'name' => 'photos',\n 'label' => 'Фотографии',\n 'type' => 'upload_multiple',\n 'disk' => 'public'\n ]);\n $this->crud->addColumn([\n 'name' => 'attributes',\n 'label' => 'Атрибуты',\n 'type' => 'attributes',\n 'entity_singular' => 'атрибут',\n 'columns' => [\n 'name' => 'Название атрибута',\n 'value' => 'Значение',\n ],\n 'min' => 0,\n ]);\n }",
"function get_field_list()\r\n\t{\r\n\t\t$fields = array();\r\n\r\n\t\tif (Authority::can('edit', 'admin/item/definition'))\r\n\t\t{\r\n\t\t\t$id_definition = $this->input->post('id_item_definition');\r\n\r\n\t\t\t$fields = $this->extend_field_model->get_lang_list(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'parent' => 'item',\r\n\t\t\t\t\t'id_parent' => $id_definition\r\n\t\t\t\t),\r\n\t\t\t\tSettings::get_lang('default')\r\n\t\t\t);\r\n\r\n\t\t\t// Set type names\r\n\t\t\tforeach($fields as &$field)\r\n\t\t\t{\r\n\t\t\t\t$field['type_name'] = self::$_TYPE_NAMES[$field['type']];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//\r\n\t\t$this->template['id_item_definition'] = $id_definition;\r\n\t\t$this->template['fields'] = $fields;\r\n\r\n\t\t$this->output('item/definition/fields');\r\n\t}",
"public function form()\n {\n \n return Admin::form(articleModel::class, function (Form $form) {\n $articlecats = articleCatModel::all()->toArray();\n $arr = array_pluck($articlecats, 'name', 'id');\n $form->select('cid','文章分类')->options($arr);\n $form->text('title','文章标题');\n// $form->textarea('content','文章内容');\n $form->editor('content','文章内容');\n $form->image('img','文章图片');\n $form->display('created_at', '创建时间');\n $form->display('updated_at', '更新时间');\n });\n }",
"function add_sections_and_fields(): void {}",
"function init_form_fields() {\n\n \tinclude ( SUMO_SAGEPLUGINPATH . 'includes/sagepay-form-admin.php' );\n\n }",
"protected function setupListOperation()\n {\n $this->crud->addColumns([\n [\n 'name' => 'name',\n 'label' => 'Название',\n ],\n [\n 'name' => 'description',\n 'label' => 'Описание',\n\n ],\n [\n 'name' => 'price',\n 'label' => 'Цена',\n ],\n [\n 'name' => 'time_start',\n 'label' => 'Дата начало',\n 'type' => \"date\",\n ],\n [\n 'name' => 'time_finish',\n 'label' => 'Дата финиша',\n 'type' => \"date\",\n ],\n [\n 'name' => 'car_id',\n 'label' => 'Автомобиль',\n 'type' => 'select',\n 'entity' => 'car',\n 'attribute' => 'register_id',\n 'model' => 'App\\Models\\Car',\n ],\n [\n 'name' => 'employee_id',\n 'label' => 'Сотрудник',\n 'type' => 'select',\n 'entity' => 'employee',\n 'attribute' => 'full_name',\n 'model' => 'App\\Models\\Employee',\n ],\n ]);\n }",
"public function admin_add() {\r\n if(isset($this->data[$this->modelClass])) {\r\n\t\t\t$this->_message($this->{$this->modelClass}->bsSave($this->data, 'add'));\r\n }\r\n\t\t$this->render('admin_edit');\r\n }",
"public function get_edit_form_fields()\n\t{\n\t\t$creditsInputted = optional_param('credits', 0, PARAM_TEXT);\n\t\tif($creditsInputted == 0)\n\t\t{\n if(isset($this->id) && $this->id != -1)\n {\n $creditsInputted = $this->credits;\n }\n else\n {\n $creditsInputted = $this->get_default_credits();\n }\n\t\t}\n\t\treturn '<div class=\"inputContainer\"><div class=\"inputLeft\">'.\n '<label for=\"credits\">'.$this->get_credits_display_name(). \n ' : </label></div><div class=\"inputRight\"><input type=\"text\"'.\n 'name=\"credits\" id=\"credits\" value=\"'.$creditsInputted.'\"/></div></div>';\n\t}",
"protected function form()\n {\n // return Admin::form(Campaign_setting_form::class, function (Form $form) {\n // });\n }",
"public function addMetaFieldsToEditForm()\n\t{\n\t\t$interval = $this->getMetaFields('interval');\n\t\t$animation = $this->getMetaFields('animation');\n\n\t\t?>\n\t\t\t<tr class=\"form-field\">\n\t\t\t\t<th scope=\"row\">\n\t\t\t\t\t<label for=\"interval\">Tijd tussen slides</label>\n\t\t\t\t</th>\n\t\t\t\t<td>\n\t\t\t\t\t<input name=\"interval\" id=\"interval\" type=\"text\" value=\"<?php echo $interval;?>\" size=\"40\">\n\t\t\t\t\t<p class=\"description\">De tijd tussen slides in milliseconden (1000ms = 1s).</p>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr class=\"form-field\">\n\t\t\t\t<th scope=\"row\">\n\t\t\t\t\t<label for=\"animation\">Animatie</label>\n\t\t\t\t</th>\n\t\t\t\t<td>\n\t\t\t\t\t<select name=\"animation\" id=\"animation\">\n\t\t\t\t\t\t<option <?php selected($animation, 'slide'); ?> value=\"slide\">Slide</option>\n\t\t\t\t\t\t<option <?php selected($animation, 'fade'); ?> value=\"fade\">Fade</option>\n\t\t\t\t\t</select>\n\t\t\t\t\t<p class=\"description\">Selecteer de animatie die gebruikt wordt door de slideshow.</p>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t<?php\n\t}",
"protected function form()\n {\n return Admin::form(Industry::class, function (Form $form) {\n\n\n $form->text('name',\"名称\");\n $form->number('order_by', \"行业排序\")->value(9);\n $form->display('created_at', '创建时间');\n $form->display('updated_at', '最后修改时间');\n });\n }",
"public function create()\n {\n return View('admin.part.add_part')->with('skills', Skill::all());\n }",
"function get_extra_fields()\n\t{\n\t\t// Give user options\n\t\t// - where to copy files from [actually this field is in admin_import.php]\n\t\t// - theme to save into (advise they should use Theme Wizard to create a theme with similar colour first)\n\t\t// - whether to Comcode-convert\n\t\t// - whether to fix invalid XHTML\n\t\t// - the base URL to use to turn absolute URLs into relative URLs\n\n\t\t$fields=new ocp_tempcode();\n\n\t\t$themes=new ocp_tempcode();\n\t\trequire_code('themes2');\n\t\t$_themes=find_all_themes();\n\t\trequire_code('form_templates');\n\t\tforeach ($_themes as $theme=>$theme_title)\n\t\t{\n\t\t\t$themes->attach(form_input_list_entry($theme,($theme==$GLOBALS['FORUM_DRIVER']->get_theme()),$theme_title));\n\t\t}\n\t\t$fields=form_input_list(do_lang_tempcode('THEME'),do_lang_tempcode('THEME_TO_SAVE_INTO'),'theme',$themes,NULL,true);\n\n\t\t$fields->attach(form_input_tick(do_lang_tempcode('WHETHER_CONVERT_COMCODE'),do_lang_tempcode('DESCRIPTION_WHETHER_CONVERT_COMCODE'),'convert_to_comcode',false));\n\n\t\t$fields->attach(form_input_tick(do_lang_tempcode('FIX_INVALID_HTML'),do_lang_tempcode('DESCRIPTION_FIX_INVALID_HTML'),'fix_html',true));\n\n\t\t$fields->attach(form_input_line(do_lang_tempcode('installer:BASE_URL'),do_lang_tempcode('DESCRIPTION_IMPORT_BASE_URL'),'base_url',get_base_url(),true));\n\n\t\treturn $fields;\n\t}",
"public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}",
"protected function form()\n {\n return Admin::form(MenuItem::class, function (Form $form) {\n $form->tools(function (Form\\Tools $tools) {\n $tools->disableListButton();\n });\n\n $form->hidden('company_id','品牌編號')->default(Session::get('company_id')); \n $form->hidden('store_id','店家編號')->default(Session::get('store_id'));\n\n $group_id = MenuItem::getGroupID(Session::get('menu_item_id'));\n\n $form->select('group_id', trans('idelivery.cuisine.group.name'))->options(\n CuisineGroup::where('company_id', Session::get('company_id'))\n ->where('store_id', Session::get('store_id'))\n ->orWhere(function ($query) {\n $query->where('company_id', '=', Session::get('company_id'))\n ->where('store_id', '=', 0);\n })\n ->pluck('group_name', 'id')\n )->default($group_id);\n\n $form->text('name', trans('idelivery.cuisine.item.name'))->rules('required|max:25')->placeholder('限25字');\n $form->textarea('intro', '簡介')->rows(3);\n $form->image('picture', '圖片')->uniqueName()->rules('max:900')\n ->move(env('ADMIN_UPLOAD_PATH', '') . 'store/image/menu_item/' . Session::get('store_id'));\n $form->divide();\n\n $unit = json_decode(MenuItem::getUnit(Session::get('company_id'), Session::get('store_id')), true);\n \n $new = false;\n if (request()->isMethod('POST')) {\n $new = true;\n }\n\n $options_list = array();\n\n if (!empty($unit)) {\n $unit_id_list = array();\n\n foreach ($unit as $row) {\n $unit_id_list[] = $row['id'];\n }\n\n $attr = json_decode(MenuItem::getAttr($unit_id_list), true);\n $i = 0;\n\n foreach ($unit as $unit_row) {\n $attr_arr = array();\n $attr_opt = array();\n $options = array();\n $default = 0;\n\n foreach ($attr as $val) {\n if ($unit_row['id'] == $val['unit_id']) {\n $attr_opt[$val['id']] = $val['attr_name'];\n\n if ($new == true) {\n if ($val['is_default'] == '1') {\n $default = $val['id'];\n }\n } else {\n $spec = json_decode(MenuItem::getSpecRelation(Session::get('menu_item_id')), true);\n if (!empty($spec)) {\n foreach ($spec as $spec_row) {\n if ( ! empty($spec_row['attribute'])) {\n foreach ($spec_row['attribute'] as $attr_row) {\n if ($val['id'] == $attr_row['id']) {\n if ($attr_row['selected'] == true) {\n $default = $attr_row['id'];\n }\n }\n }\n }\n }\n }\n }\n\n $attr_arr = array(\n 'id' => $val['id'],\n 'title' => $val['attr_name'],\n 'subtitle' => '',\n 'selected' => $val['is_default'] == '1' ? true : false,\n 'extra_price' => $val['extra_price']\n );\n\n $options[] = $attr_arr;\n }\n }\n\n $options_list[] = array(\n 'unit_id' => $unit_row['id'],\n 'unit_title' => $unit_row['unit_name'],\n 'is_multiple' => $unit_row['is_multiple'],\n 'required' => $unit_row['is_required'],\n 'attribute' => (empty($options)||$options == \"[]\") ? null : $options,\n );\n }\n }\n \n $form->multipleSelect('unit', trans('idelivery.cuisine.unit.title'))->options(\n CuisineUnit::where('company_id', Session::get('company_id'))\n ->where('store_id', Session::get('store_id'))\n ->orWhere(function ($query) {\n $query->where('company_id', '=', Session::get('company_id'))\n ->where('store_id', '=', 0);\n })\n ->pluck('unit_name', 'id')\n );\n\n $form->ignore('spec_relation');\n $form->divide();\n\n $form->hasMany('size', '份量價格', function (Form\\NestedForm $form) {\n $form->hidden('id','份量編號');\n $form->hidden('item_id','餐點編號')->default(Session::get('menu_item_id'));\n $form->text('size_name', '份量名稱')->rules('nullable');\n $form->number('price', '價格')->rules('required');\n $form->switch('is_selected', '預設選取')->states($this->selected_arr)->default(2);\n $form->switch('status', '份量狀態')->states($this->status_size_arr)->default(1);\n });\n\n $form->divide();\n $form->number('points', '獲得點數')->min(0);\n $form->switch('hidden', 'App隱藏')->states($this->hidden_arr);\n $form->switch('status', '狀態')->states($this->status_arr)->default(1); \n\n $form->saving(function (Form $form) {\n\n $sizes = $form->size;\n $is_price_null = false;\n $selected_cnt = 0;\n if (!empty($sizes)) {\n foreach ($sizes as $val) {\n if (empty($val['price'])) {\n $is_price_null = true;\n }\n\n if ($val['is_selected'] == 'on') {\n $selected_cnt = $selected_cnt + 1;\n }\n }\n } else {\n $is_price_null = true;\n }\n\n if ($is_price_null) {\n admin_toastr('份量價格不得為空!','warning');\n return back();\n }\n\n if ($selected_cnt == 0) {\n admin_toastr('份量預設選取不得全為否!','warning');\n return back();\n }\n\n if ($selected_cnt > 1) {\n admin_toastr('份量預設選取數量超過限制!','warning');\n return back();\n }\n\n });\n\n $form->saved(function (Form $form) use ($options_list) {\n\n $menu_item_unit = array();\n $unit_select = array();\n\n foreach ($options_list as $rows) {\n foreach ($form->unit as $key => $val) {\n if ($val == $rows['unit_id']) {\n $menu_item_unit[] = array(\n 'item_id' => $form->model()->id, \n 'unit_id' => $val\n );\n\n $unit_select[] = $rows;\n }\n }\n }\n\n MenuItem::addMenuItemUnit($form->model()->id, $menu_item_unit);\n\n if (!empty($unit_select)) {\n MenuItem::updateSpecRelation($form->model()->id, json_encode($unit_select));\n }\n\n Session::forget('menu_item_id');\n\n $size_ids = array();\n $size_names = array();\n \n foreach ($form->size as $row) {\n $size_ids[] = $row['id'];\n $size_names[] = $row['size_name'];\n }\n\n //不知為何沒有update size_name???\n MenuItem::updateSizeName($size_ids, $size_names);\n\n return redirect('/admin/store/set/cuisine_group');\n });\n\n });\n }",
"public function getCMSFields()\n {\n $fields = parent::getCMSFields();\n $fields->replaceField('Country', new DropdownField('Country', 'based on a sale to ', EcommerceCountry::get_country_dropdown()));\n $fields->replaceField('Root.Main', new DropdownField('TaxType', 'Tax Type', singleton($this->ClassName)->dbObject('TaxType')->enumValues()));\n\n $fields->removeByName('DefaultCountry');\n $fields->addFieldToTab('Root.Debug', new ReadonlyField('DefaultCountryShown', 'Prices are based on sale to', $this->DefaultCountry));\n\n $fields->removeByName('DefaultRate');\n $fields->addFieldToTab('Root.Debug', new ReadonlyField('DefaultRateShown', 'Default rate', $this->DefaultRate));\n\n $fields->removeByName('CurrentRate');\n $fields->addFieldToTab('Root.Debug', new ReadonlyField('CurrentRateShown', 'Rate for current order', $this->CurrentRate));\n\n $fields->removeByName('RawTableValue');\n $fields->addFieldToTab('Root.Debug', new ReadonlyField('RawTableValueShown', 'Raw table value', $this->RawTableValue));\n\n $fields->removeByName('DebugString');\n $fields->addFieldToTab('Root.Debug', new ReadonlyField('DebugStringShown', 'Debug String', $this->DebugString));\n\n return $fields;\n }",
"public function admin_create()\n {\n return View::make('admin_create');\n }",
"public function getCMSFields()\n {\n //declare var $fields\n $fields = parent::getCMSFields();\n //create Reviews Section GridField\n $fields->addFieldToTab('Root.Reviews', GridField::create(\n 'Reviews',\n 'Client Reviews',\n $this->Reviews(),\n GridFieldConfig_RecordEditor::create()\n ));\n\n return $fields;\n }",
"public function instance_fields() { \n\n\t\t$fields['name'] \t= array('description'=>_('Instance Name'),'type'=>'textbox'); \n\t\t$fields['host'] \t= array('description'=>_('Hostname'),'type'=>'textbox'); \n\t\t$fields['port']\t\t= array('description'=>_('Port'),'type'=>'textbox'); \n\t\t$fields['password']\t= array('description'=>_('Password'),'type'=>'textbox'); \n\n\t\treturn $fields; \n\n\t}",
"abstract function buildShowFields(): void;",
"public function getFrontendFields();",
"public function setup()\n {\n $this->crud->setModel('App\\Models\\Manufacturer');\n $this->crud->setRoute(config('backpack.base.route_prefix') . '/manufacturer');\n $this->crud->setEntityNameStrings('manufacturer', 'manufacturers');\n\n $this->crud->logFrom = 'manufacturer';\n $this->crud->addButtonFromView('line','showLog','show_log','end');\n\n /*\n |--------------------------------------------------------------------------\n | CrudPanel Configuration\n |--------------------------------------------------------------------------\n */\n\n // TODO: remove setFromDb() and manually define Fields and Columns\n $this->crud->addFields\n ([\n [\n 'label' => 'Название',\n 'type' => 'text',\n 'name' => 'title'\n ],\n [\n 'label' => 'Описание',\n 'type' => 'summernote',\n 'name' => 'description'\n ],\n [\n 'label' => 'Мета H1',\n 'type' => 'text',\n 'name' => 'h1'\n ],\n [\n 'label' => 'Мета title',\n 'type' => 'text',\n 'name' => 'meta_title'\n ],\n [\n 'label' => 'Мета description',\n 'type' => 'text',\n 'name' => 'meta_description'\n ],\n [\n 'label' => 'Фото',\n 'type' => 'browse_custom',\n 'name' => 'image'\n ],\n [\n 'label' => 'Порядок сортировки',\n 'type' => 'number',\n 'name' => 'sort_order',\n 'default' => 0\n ],\n [\n 'label' => 'Статус',\n 'type' => 'select_from_array',\n 'name' => 'active',\n 'options' => [\n 0 => 'Выкл',\n 1 => 'Вкл'\n ]\n ],\n [\n 'label' => 'Поле object_type таблицы urls',\n 'name' => 'object_type',\n 'type' => 'hidden',\n 'entity' => 'url',\n 'model' => 'App\\Models\\Url',\n 'value' => 'manufacturer'\n ],\n [\n 'label' => 'SEO Url товара',\n 'name' => 'url',\n 'type' => 'text',\n 'entity' => 'url',\n 'model' => 'App\\Models\\Url',\n ],\n ]);\n\n $this->crud->getCurrentEntry();\n if($this->crud->entry && $this->crud->entry->url->url){\n $this->crud->addfield([\n 'label' => 'Ссылка',\n 'name' => 'href',\n 'type' => 'href',\n 'value' => url($this->crud->entry->url->url),\n ]);\n }\n\n $this->crud->addColumn([\n 'label' => 'Название',\n 'type' => 'text',\n 'name' => 'title'\n ]);\n\n // add asterisk for fields that are required in ManufacturerRequest\n $this->crud->setRequiredFields(StoreRequest::class, 'create');\n $this->crud->setRequiredFields(UpdateRequest::class, 'edit');\n }",
"protected function form()\n {\n return Admin::form(ThreeTotalRecord::class, function (Form $form) {\n\n $form->display('id', 'ID');\n\n $form->display('created_at', 'Created At');\n $form->display('updated_at', 'Updated At');\n });\n }",
"public function addField();",
"public function add(){\n $this->edit();\n }",
"public function admin_add(){\n \n $this->set(\"title_for_layout\",\"Create a Satellite Group\");\n \n // Load all existing satellites\n $this->set('satellites', $this->Satellite->find('all'));\n }",
"public function add()\n\t{\n\t\t$fake_id = $this->_get_id_cur();\n\t\t$form = array();\n\t\t$form['view'] = 'form';\n\t\t$form['validation']['params'] = $this->_get_params();\n\t\t$form['submit'] = function()use ($fake_id)\n\t\t{\n\t\t\t$data = $this->_get_inputs();\n\t\t\t$data['sort_order'] = $this->_model()->get_total() + 1;\n\t\t\t$id = 0;\n\t\t\t$this->_model()->create($data,$id);\n\t\t\t// Cap nhat lai table_id table file\n\t\t\tmodel('file')->update_table_id_of_mod($this->_get_mod(), $fake_id, $id);\n\t\t\tfake_id_del($this->_get_mod());\n\n\t\t\tset_message(lang('notice_add_success'));\n\t\t\t\n\t\t\treturn admin_url($this->_get_mod());\n\t\t};\n\t\t$form['form'] = function() use ($fake_id)\n\t\t{\n\t\t\t$this->_create_view_data($fake_id);\n\n\t\t\t$this->_display('form');\n\t\t};\n\t\t$this->_form($form);\n\t}",
"public function getCreate()\n\t{\n\t\treturn View::make('admin.admin.create');\n\t}"
] | [
"0.70100605",
"0.69106483",
"0.69070846",
"0.685093",
"0.6829194",
"0.6647369",
"0.65952253",
"0.657273",
"0.6567986",
"0.65673476",
"0.6544343",
"0.65407425",
"0.65240747",
"0.64959407",
"0.6491949",
"0.64528936",
"0.643904",
"0.6438289",
"0.64342725",
"0.6433798",
"0.639999",
"0.6398831",
"0.6387078",
"0.6379231",
"0.6356741",
"0.63514525",
"0.6338999",
"0.6335264",
"0.6330299",
"0.6327224",
"0.63252056",
"0.63155395",
"0.6310596",
"0.630005",
"0.6296549",
"0.62537235",
"0.62536556",
"0.62482184",
"0.6230443",
"0.62274826",
"0.6212505",
"0.6211246",
"0.6209818",
"0.62039214",
"0.6203059",
"0.6201096",
"0.61916995",
"0.6181768",
"0.61750776",
"0.6174702",
"0.61700535",
"0.6162496",
"0.6155718",
"0.6152954",
"0.61451375",
"0.6144355",
"0.6128217",
"0.61281246",
"0.6116871",
"0.61023223",
"0.6102184",
"0.60977733",
"0.60947186",
"0.608882",
"0.6079824",
"0.6071715",
"0.6068813",
"0.6054167",
"0.6054167",
"0.60445243",
"0.60440946",
"0.60402465",
"0.6036339",
"0.60344493",
"0.6028759",
"0.60271657",
"0.60203564",
"0.60189664",
"0.6018276",
"0.60141045",
"0.600902",
"0.6008369",
"0.60059166",
"0.600486",
"0.60038406",
"0.6000945",
"0.5999348",
"0.5994784",
"0.5992394",
"0.5988823",
"0.5986473",
"0.5986393",
"0.59855187",
"0.59731287",
"0.59671694",
"0.5962238",
"0.59599245",
"0.595954",
"0.5956438",
"0.59550726"
] | 0.63020533 | 33 |
Returns admin scaffold edit fields | public function getEdit($data)
{
return array(
'Currency.name' => array('type' => 'text', 'label' => __("Name")),
'Currency.code' => array('type' => 'text', 'label' => __("Code")),
'Currency.rate' => array('type' => 'text', 'label' => __("Rate"))
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getEditForm();",
"protected function _edit(){\n\t\treturn $this->_editForm();\n\t}",
"public function editForm() {\n return tpl::load(__DIR__ . DS . 'form.php', array('field' => $this));\n }",
"public function getEdit()\n\t{\n\t}",
"public function add_edit_form(){\n\n $_id = $_GET['id']; \n $tblName = $this->get_tbl_name();\n\n $source = DB::table($tblName)->where('id',$_id)->get();\n\n $source_first = $source[0];\n\n // mhtml::dump($source_first);\n\n\n $struct = $this->struct;\n\n mhtml::startForm(\"edit\",\"backend_edit.php\");\n\n // loop througth fields\n foreach ($this->edit as $key => $field) {\n\n $kind = $struct[$field] ;\n if($kind == 'string') {$kind = 'text' ;} \n $value = $source_first[$field];\n\n mhtml::field($this->virtual_names[$field],$field,$kind,$value);\n\n }\n\n // add secret field for password\n if(isset($this->edit_secret)){\n if($this->edit_secret == true ){\n\n Logger::warn(\"we use one secret only on secret[0] in secret array in model\");\n $virtual_pass = $this->virtual_names[$this->secret[0]];\n mhtml::field($virtual_pass,$this->secret[0],'password');\n\n }\n }\n\n \n\n\n\n\n // mhtml::field('user name ','user_name','text',\"mohammed\");\n // mhtml::field('passwording','password','password');\n // mhtml::field('age','age','number');\n\n mhtml::field_id_model();\n\n mhtml::submitForm();\n\n mhtml::endForm();\n\n }",
"public function get_edit_form_fields()\n\t{\n\t\t$creditsInputted = optional_param('credits', 0, PARAM_TEXT);\n\t\tif($creditsInputted == 0)\n\t\t{\n if(isset($this->id) && $this->id != -1)\n {\n $creditsInputted = $this->credits;\n }\n else\n {\n $creditsInputted = $this->get_default_credits();\n }\n\t\t}\n\t\treturn '<div class=\"inputContainer\"><div class=\"inputLeft\">'.\n '<label for=\"credits\">'.$this->get_credits_display_name(). \n ' : </label></div><div class=\"inputRight\"><input type=\"text\"'.\n 'name=\"credits\" id=\"credits\" value=\"'.$creditsInputted.'\"/></div></div>';\n\t}",
"public function edit()\n {\n // $logged_in = false;\n // if ($this->isLoggedIn()) {\n // $logged_in = true;\n // }\n \t$client_custom_fields = $this->Clients->getCustomFieldValues(1);\n return $this->set('client_custom_fields', $client_custom_fields);\n\n }",
"public function edit()\n { \n return view('admin.control.edit');\n }",
"public function ItemEditForm() {\n $form = parent::ItemEditForm();\n\n return $form;\n }",
"public function edit()\n {\n\t$this->log(\"edit function\");\n\n \t// Check whether client is logged in\n // $logged_in = false;\n // if ($this->isLoggedIn()) {\n // $logged_in = true;\n // }\n\n // Get custom fields from Client controller => save\n \t$client_custom_fields = $this->Clients->getCustomFieldValues(1);\n return $this->set('client_custom_fields', $client_custom_fields);\n }",
"protected function form()\n {\n return Admin::form(FactoryModel::class, function (Form $form) {\n\n $form->display('id', 'ID');\n $form->text('name','厂家名称')->rules('required');\n $form->text('boss','老板')->rules('required');\n $form->text('telephone','手机号');\n $form->text('address','地址');\n $form->text('mark','备注');\n\n $form->display('created_at', 'Created At');\n $form->display('updated_at', 'Updated At');\n });\n }",
"function extraFields() {\n\t\n\t\t$file_id = JRequest::getVar('id');\n\t\t$filename = JRequest::getVar('filename');\n\t\t\n\t\tif (!$filename) {\n\t\t\texit();\n\t\t}\n\t\t\n\t\t$model = $this->getModel();\n\t\t$form = $model->getFieldForm($file_id, 'bulk');\n\t\t\n\t\tif (!$form) {\n\t\t\techo \"There was an error creating the form\";\n\t\t\texit();\n\t\t}\n\t\t\n\t\techo '<div class=\"fltlft\" style=\"width:250px;\">';\n\t\techo '<fieldset class=\"adminform\">';\n\t\techo '<legend>Edit '.$filename.'</legend>';\n\t\techo '<div class=\"adminformlist\">';\n\n\t\tforeach ($form->getFieldset() as $field) {\n\t\t\tJHtml::_('wbty.renderField', $field);\n\t\t}\n\t\techo \"</div></fieldset></div>\";\n\t\t\n\t\texit();\n\t}",
"public function getEditFields(): array\n\t{\n\t\t$fields = [];\n\t\t$editFields = ['name'];\n\t\t$editFields[] = 'icon';\n\t\tif ($this->fieldModel->getModule()->isEntityModule()) {\n\t\t\tif (!$this->getId()) {\n\t\t\t\t$editFields[] = 'roles';\n\t\t\t}\n\t\t\t$editFields[] = 'description';\n\t\t\t$editFields[] = 'prefix';\n\t\t\tif ($this->fieldModel->getFieldParams()['isProcessStatusField'] ?? false) {\n\t\t\t\tif (\\App\\Db::getInstance()->getTableSchema($this->getTableName())->getColumn('time_counting')) {\n\t\t\t\t\t$editFields[] = 'time_counting';\n\t\t\t\t}\n\t\t\t\t$editFields[] = 'record_state';\n\t\t\t}\n\t\t\tif (15 === $this->fieldModel->getUIType()) {\n\t\t\t\t$editFields[] = 'close_state';\n\t\t\t}\n\t\t}\n\n\t\tforeach ($editFields as $fieldName) {\n\t\t\t$propertyModel = $this->getFieldInstanceByName($fieldName);\n\t\t\tif (null !== $this->get($fieldName)) {\n\t\t\t\t$propertyModel->set('fieldvalue', $this->get($fieldName));\n\t\t\t} elseif (($defaultValue = $propertyModel->get('defaultvalue')) !== null) {\n\t\t\t\t$propertyModel->set('fieldvalue', $defaultValue);\n\t\t\t}\n\t\t\t$fields[$fieldName] = $propertyModel;\n\t\t}\n\n\t\treturn $fields;\n\t}",
"public function edit()\n {\n return view('scaffold::edit');\n }",
"public function editAction() {}",
"function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public static function form_fields(){\n\n \treturn [\n [\n \t'id'=> 'description',\n \t'name'=> 'description', \n \t'desc'=> 'Description', \n \t'val'=>\tnull, \n \t'type'=> 'text',\n \t'maxlength'=> 255,\n \t'required'=> 'required',\n ],\n\n [\n \t'id'=> 'rate',\n \t'name'=> 'rate', \n \t'desc'=> 'Discount Rate', \n \t'val'=>\tnull, \n \t'type'=> 'number',\n \t'min'=> 0,\n \t'max'=> 100,\n \t'step'=> '0.01',\n \t'required'=> 'required',\n ],\n\n [\n \t'id'=> 'stat',\n \t'name'=> 'stat', \n \t'desc'=> 'isActive', \n \t'val'=>1, \n \t'type'=> 'checkbox',\n ],\n ];\n\n }",
"protected function form()\n {\n return Admin::form(Industry::class, function (Form $form) {\n\n\n $form->text('name',\"名称\");\n $form->number('order_by', \"行业排序\")->value(9);\n $form->display('created_at', '创建时间');\n $form->display('updated_at', '最后修改时间');\n });\n }",
"public function getEdit(){\n return view(\"admin.product.edit\" );\n }",
"public function getAdmin(array $saved_fields, array $errors);",
"public function edit_admin_show($edit)\n\t{\n\t\t$sql=\"SELECT * FROM `create_admin` WHERE id = '$edit'\";\n\t\t$result=$this->db->query($sql);\n\t\t$data= $result->fetch_array();\n\t\techo \"<input class='id' type='text' name='id' value='$data[serial_id]'>\n <br><br>\n <input class='name' type='text' name='name' value='$data[name]'>\n <br><br>\n <input class='email' type='email' name='email' value='$data[email]'>\n <br><br>\n <input class='pass' type='password' name='pass' value='$data[password]'>\n <br><br>\n <select class='categore' name='categore'>\n <option value='$data[categore]' selected='selected'>$data[categore]</option>\n <option value='super-admin'>Super-Admin</option>\n <option value='admin'>Admin</option>\n <option value='sub-admin'>Sub-Admin</option>\n </select>\n \n <select class='stat' name='stat'>\n \t<option value='$data[stat]'>$data[stat]</option>\n <option value='1'>Active</option>\n <option value='0'>Inactive</option>\n </select>\n <br><br>\n <button type='submit' class='submit' name='update' >Update Admin</button>\";\n\t}",
"protected function form()\n {\n // return Admin::form(Campaign_setting_form::class, function (Form $form) {\n // });\n }",
"public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}",
"public function edit()\n {\n return view('admincp::edit');\n }",
"abstract public function fields(AdminRequest $request);",
"public function form()\n {\n \n return Admin::form(articleModel::class, function (Form $form) {\n $articlecats = articleCatModel::all()->toArray();\n $arr = array_pluck($articlecats, 'name', 'id');\n $form->select('cid','文章分类')->options($arr);\n $form->text('title','文章标题');\n// $form->textarea('content','文章内容');\n $form->editor('content','文章内容');\n $form->image('img','文章图片');\n $form->display('created_at', '创建时间');\n $form->display('updated_at', '更新时间');\n });\n }",
"public function getEditForm()\n {\n return $this->getForm($this->banner->getID())\n ->editMode(\n $this->getID(),\n [\n 'timeslots' => $this->getTimeslots(),\n 'effective_from' => CoreUtils::happyTime($this->getEffectiveFrom()),\n 'effective_to' => $this->getEffectiveTo() === null ? null :\n CoreUtils::happyTime($this->getEffectiveTo()),\n 'location' => $this->getLocation(),\n ]\n );\n }",
"protected function form()\n {\n return Admin::form(Article::class, function (Form $form) {\n\n $form->display('id', 'ID');\n\n $form->text('slug','slugen');\n $form->text('title','标题');\n $form->editor('body','介绍');\n $form->select('category_id','分类')->options(ArticleCategory::allSelectOptions());\n $form->number('sort','排序');\n $form->image('thumbnail','缩略图')->uniqueName()->resize(400,600);\n $form->multipleImage('images','图集')->uniqueName()->removable()->resize(400,600);\n $form->text('view','模板名称');\n $states = [\n 'on' => ['value' => '1', 'text' => '是', 'color' => 'primary'],\n 'off' => ['value' => '0', 'text' => '否', 'color' => 'default'],\n ];\n $form->switch('status','状态')->states($states)->default(0);\n $form->number('click','点击次数');\n\n $form->hidden('created_by');\n $form->hidden('updated_by');\n $form->saving(function (Form $form){\n if(empty($form->created_by)) {\n $form->created_by = Admin::user()->id;\n }\n $form->updated_by = Admin::user()->id;\n });\n\n $form->display('created_at', '创建时间');\n $form->display('updated_at', '更新时间');\n });\n }",
"public function edit() {\n\t\t\t\n\t\t}",
"static function custom_get_creatable_fields() {\n # use this functionality to get a list of all field in the table\n return self::default_get_updatable_fields();\n }",
"public function getCMSFields()\n {\n $fields = parent::getCMSFields();\n\n // Hide those fields because those values are not useful for standard users.\n $fields->removeByName('Location');\n $fields->removeByName('Region');\n $fields->removeByName('Bucket');\n $fields->removeByName('Key');\n $fields->removeByName('ETag');\n $fields->removeByName('Size');\n\n // Add a human friendly readonly size field\n $fields->addFieldToTab('Root.Main',\n ReadonlyField::create('FakeSize', 'Size', $this->SizeForHuman));\n\n // Display a few usefull bits of data in readonly mod.\n $fields->addFieldToTab('Root.Main',\n ReadonlyField::create('Type', 'Type'));\n $fields->addFieldToTab('Root.Main',\n DatetimeField_Readonly::create('LastModified', 'Last Modified'));\n\n\n return $fields;\n }",
"function edit_profile_field_form()\n {\n if ( ! Session::access('can_admin_members'))\n {\n return Cp::unauthorizedAccess();\n }\n\n $type = ($m_field_id = Request::input('m_field_id')) ? 'edit' : 'new';\n\n // Fetch language file\n // There are some lines in the publish administration language file\n // that we need.\n\n $total_fields = '';\n\n if ($type == 'new')\n {\n $total_fields = DB::table('member_fields')->count() + 1;\n }\n\n $query = DB::table('member_fields')\n ->where('m_field_id', $m_field_id)\n ->first();\n\n if (!$query) {\n\n $m_field_name='';\n $m_field_label='';\n $m_field_description='';\n $m_field_type='text';\n $m_field_list_items='';\n $m_field_ta_rows=8;\n $m_field_maxl='';\n $m_field_width='';\n $m_field_search='y';\n $m_field_required='n';\n $m_field_public='y';\n $m_field_reg='n';\n $m_field_order='';\n } else {\n foreach ($query as $key => $val) {\n $$key = $val;\n }\n }\n\n $r = <<<EOT\n\n <script type=\"text/javascript\">\n <!--\n\n function showhide_element(id)\n {\n if (id == 'text')\n {\n document.getElementById('text_block').style.display = \"block\";\n document.getElementById('textarea_block').style.display = \"none\";\n document.getElementById('select_block').style.display = \"none\";\n }\n else if (id == 'textarea')\n {\n document.getElementById('textarea_block').style.display = \"block\";\n document.getElementById('text_block').style.display = \"none\";\n document.getElementById('select_block').style.display = \"none\";\n }\n else\n {\n document.getElementById('select_block').style.display = \"block\";\n document.getElementById('text_block').style.display = \"none\";\n document.getElementById('textarea_block').style.display = \"none\";\n }\n }\n\n -->\n </script>\nEOT;\n\n $title = ($type == 'edit') ? 'members.edit_member_field' : 'members.create_member_field';\n\n $i = 0;\n\n // Form declaration\n\n $r .= Cp::formOpen(array('action' => 'C=Administration'.AMP.'M=members'.AMP.'P=update_profile_fields'.AMP.'U=1'));\n $r .= Cp::input_hidden('m_field_id', $m_field_id);\n $r .= Cp::input_hidden('cur_field_name', $m_field_name);\n\n $r .= Cp::table('tableBorder', '0', '10', '100%').\n '<tr>'.PHP_EOL.\n Cp::td('tableHeading', '', '2').__($title).'</td>'.PHP_EOL.\n '</tr>'.PHP_EOL;\n\n\n // ------------------------------------\n // Field name\n // ------------------------------------\n\n $r .= '<tr>'.PHP_EOL;\n $r .= Cp::tableCell('', Cp::quickSpan('defaultBold', Cp::required().NBS.__('members.fieldname')).Cp::quickDiv('littlePadding', __('members.fieldname_cont')), '40%');\n $r .= Cp::tableCell('', Cp::input_text('m_field_name', $m_field_name, '50', '60', 'input', '300px'), '60%');\n $r .= '</tr>'.PHP_EOL;\n\n // ------------------------------------\n // Field label\n // ------------------------------------\n\n $r .= '<tr>'.PHP_EOL;\n $r .= Cp::tableCell('', Cp::quickSpan('defaultBold', Cp::required().NBS.__('members.fieldlabel')).Cp::quickDiv('littlePadding', __('members.for_profile_page')), '40%');\n $r .= Cp::tableCell('', Cp::input_text('m_field_label', $m_field_label, '50', '60', 'input', '300px'), '60%');\n $r .= '</tr>'.PHP_EOL;\n\n // ------------------------------------\n // Field Description\n // ------------------------------------\n\n $r .= '<tr>'.PHP_EOL;\n $r .= Cp::tableCell('', Cp::quickSpan('defaultBold', __('members.field_description')).Cp::quickDiv('littlePadding', __('members.field_description_info')), '40%');\n $r .= Cp::tableCell('', Cp::input_textarea('m_field_description', $m_field_description, '4', 'textarea', '100%'), '60%');\n $r .= '</tr>'.PHP_EOL;\n\n // ------------------------------------\n // Field order\n // ------------------------------------\n\n if ($type == 'new')\n $m_field_order = $total_fields;\n\n $r .= '<tr>'.PHP_EOL;\n $r .= Cp::tableCell('', Cp::quickSpan('defaultBold', __('admin.field_order')), '40%');\n $r .= Cp::tableCell('', Cp::input_text('m_field_order', $m_field_order, '4', '3', 'input', '30px'), '60%');\n $r .= '</tr>'.PHP_EOL;\n\n // ------------------------------------\n // Field type\n // ------------------------------------\n\n $sel_1 = ''; $sel_2 = ''; $sel_3 = '';\n $text_js = ($type == 'edit') ? 'none' : 'block';\n $textarea_js = 'none';\n $select_js = 'none';\n $select_opt_js = 'none';\n\n switch ($m_field_type)\n {\n case 'text' : $sel_1 = 1; $text_js = 'block';\n break;\n case 'textarea' : $sel_2 = 1; $textarea_js = 'block';\n break;\n case 'select' : $sel_3 = 1; $select_js = 'block'; $select_opt_js = 'block';\n break;\n }\n\n // ------------------------------------\n // Create the pull-down menu\n // ------------------------------------\n\n $typemenu = \"<select name='m_field_type' class='select' onchange='showhide_element(this.options[this.selectedIndex].value);' >\".PHP_EOL;\n $typemenu .= Cp::input_select_option('text', __('admin.text_input'), $sel_1)\n .Cp::input_select_option('textarea', __('admin.textarea'), $sel_2)\n .Cp::input_select_option('select', __('admin.select_list'), $sel_3)\n .Cp::input_select_footer();\n\n\n // ------------------------------------\n // Field width\n // ------------------------------------\n\n if ($m_field_width == '') {\n $m_field_width = '100%';\n }\n\n $r .= '<tr>'.PHP_EOL;\n $r .= Cp::tableCell('', Cp::quickSpan('defaultBold', __('members.field_width')).Cp::quickDiv('littlePadding', __('members.field_width_cont')), '40%');\n $r .= Cp::tableCell('', Cp::input_text('m_field_width', $m_field_width, '8', '6', 'input', '60px'), '60%');\n $r .= '</tr>'.PHP_EOL;\n\n // ------------------------------------\n // Max-length Field\n // ------------------------------------\n\n if ($m_field_maxl == '') $m_field_maxl = '100';\n\n $typopts = '<div id=\"text_block\" style=\"display: '.$text_js.'; padding:0; margin:5px 0 0 0;\">';\n $typopts .= Cp::quickDiv('defaultBold', __('members.max_length')).Cp::quickDiv('littlePadding', Cp::input_text('m_field_maxl', $m_field_maxl, '4', '3', 'input', '30px'));\n $typopts .= '</div>'.PHP_EOL;\n\n // ------------------------------------\n // Textarea Row Field\n // ------------------------------------\n\n if ($m_field_ta_rows == '') $m_field_ta_rows = '10';\n\n $typopts .= '<div id=\"textarea_block\" style=\"display: '.$textarea_js.'; padding:0; margin:5px 0 0 0;\">';\n $typopts .= Cp::quickDiv('defaultBold', __('members.text_area_rows')).Cp::quickDiv('littlePadding', Cp::input_text('m_field_ta_rows', $m_field_ta_rows, '4', '3', 'input', '30px'));\n $typopts .= '</div>'.PHP_EOL;\n\n // ------------------------------------\n // Select List Field\n // ------------------------------------\n\n $typopts .= '<div id=\"select_block\" style=\"display: '.$select_js.'; padding:0; margin:5px 0 0 0;\">';\n $typopts .= Cp::quickDiv('defaultBold', __('members.pull_down_items')).Cp::quickDiv('default', __('members.field_list_instructions')).Cp::input_textarea('m_field_list_items', $m_field_list_items, 10, 'textarea', '400px');\n $typopts .= '</div>'.PHP_EOL;\n\n\n // ------------------------------------\n // Generate the above items\n // ------------------------------------\n\n $r .= '<tr>'.PHP_EOL;\n $r .= Cp::tableCell('', Cp::quickDiv('littlePadding', Cp::quickSpan('defaultBold', __('admin.field_type'))).$typemenu, '50%', 'top');\n $r .= Cp::tableCell('', $typopts, '50%', 'top');\n $r .= '</tr>'.PHP_EOL;\n\n // ------------------------------------\n // Is field required?\n // ------------------------------------\n\n if ($m_field_required == '') $m_field_required = 'n';\n\n $r .= '<tr>'.PHP_EOL;\n $r .= Cp::tableCell('', Cp::quickSpan('defaultBold', __('members.is_field_required')), '40%');\n $r .= Cp::tableCell('', __('cp.yes').' '.Cp::input_radio('m_field_required', 'y', ($m_field_required == 'y') ? 1 : '').' '.__('cp.no').' '.Cp::input_radio('m_field_required', 'n', ($m_field_required == 'n') ? 1 : ''), '60%');\n $r .= '</tr>'.PHP_EOL;\n\n\n // ------------------------------------\n // Is field public?\n // ------------------------------------\n\n if ($m_field_public == '') $m_field_public = 'y';\n\n $r .= '<tr>'.PHP_EOL;\n $r .= Cp::tableCell('', Cp::quickSpan('defaultBold', __('members.is_field_public')).Cp::quickDiv('littlePadding', __('members.is_field_public_cont')), '40%');\n $r .= Cp::tableCell('', __('cp.yes').' '.Cp::input_radio('m_field_public', 'y', ($m_field_public == 'y') ? 1 : '').' '.__('cp.no').' '.Cp::input_radio('m_field_public', 'n', ($m_field_public == 'n') ? 1 : ''), '60%');\n $r .= '</tr>'.PHP_EOL;\n\n // ------------------------------------\n // Is field visible in reg page?\n // ------------------------------------\n\n if ($m_field_reg == '') $m_field_reg = 'n';\n\n $r .= '<tr>'.PHP_EOL;\n $r .= Cp::tableCell('', Cp::quickSpan('defaultBold', __('members.is_field_reg')).Cp::quickDiv('littlePadding', __('members.is_field_public_cont')), '40%');\n $r .= Cp::tableCell('', __('cp.yes').' '.Cp::input_radio('m_field_reg', 'y', ($m_field_reg == 'y') ? 1 : '').' '.__('cp.no').' '.Cp::input_radio('m_field_reg', 'n', ($m_field_reg == 'n') ? 1 : ''), '60%');\n $r .= '</tr>'.PHP_EOL;\n\n\n $r .= '</table>'.PHP_EOL;\n\n $r .= Cp::div('littlePadding');\n $r .= Cp::required(1).BR.BR;\n\n if ($type == 'edit')\n $r .= Cp::input_submit(__('members.update'));\n else\n $r .= Cp::input_submit(__('cp.submit'));\n\n $r .= '</div>'.PHP_EOL;\n\n $r .= '</form>'.PHP_EOL;\n\n Cp::$title = __('members.edit_member_field');\n Cp::$crumb = Cp::anchor(BASE.'?C=Administration'.AMP.'area=members_and_groups', __('admin.members_and_groups')).\n Cp::breadcrumbItem(Cp::anchor(BASE.'?C=Administration'.AMP.'M=members'.AMP.'P=profile_fields', __('members.custom_member_fields'))).\n Cp::breadcrumbItem(__('members.edit_member_field'));\n Cp::$body = $r;\n }",
"public function fields()\n {\n return [\n Text::make('Name')\n ->value($this->model->name),\n ];\n }",
"function fields() {\n return array(\n 'title' => 'The title of the content',\n 'fieldname' => t('fieldname'),\n 'title' => t('title'),\n 'label' => t('Label'),\n 'data_type' => t('data type'),\n 'html_type' => t('html_type'),\n );\n }",
"protected function form()\n {\n return Admin::form(Headline::class, function (Form $form) {\n\n $form->display('id', 'ID');\n\n $form->text('title', 'Judul');\n $form->trumbowyg('excerpt','Summary');\n $form->image('image','Photo')->move('/headline');\n $form->trumbowyg('content','Content')->attribute(['id' => 'trumbowyg']);;\n\n //DPD use mutli select\n $form->select('daerah_id','DPD')->options(Daerah::all()->pluck('name', 'id')); \n\n $states = [\n 'on' => ['value' => 1, 'text' => 'enable', 'color' => 'success'],\n 'off' => ['value' => 0, 'text' => 'disable', 'color' => 'danger'],\n ];\n $form->text('uri','External Url');\n $form->switch('publish','Publish')->states($states);\n $form->hidden('author_id')->value(Admin::user()->id);\n $form->display('created_at', 'Created At');\n $form->display('updated_at', 'Updated At');\n });\n }",
"protected function getEditModule() {}",
"public function edit()\n\t{\n\t\t\n\t\t$sql = SqlQuery::getInstance();\n\t\t\n\t\t$tbl = new AbTable(\"SELECT u.first_name, u.last_name, u.zip, c.* FROM IBO_camp c JOIN user u ON u.id = c.user_id\",array('user_id'));\n\t\t\n\t\treturn $tbl->getHtml();\n\t\t\n\t\t\n\t}",
"public function _editField() {\n\t\t\n\t\t$args = $this->getAllArguments ();\n\t\t\n\t\tif (array_key_exists ( 'cid', $args )) {\n\t\t\t$field_id = $args ['cid'] [0];\n\t\t} else {\n\t\t\t$field_id = @$args [3] ? @$args [3] : $args [1];\n\t\t}\n\t\t\n\t\t$field = $this->getModel ( 'field' );\n\t\t$field->get ( ( int ) $field_id );\n\t\t\n\t\t$this->loadPluginModel ( 'fields' );\n\t\t\n\t\t$this->setView ( 'edit_field' );\n\t\n\t}",
"public function edit()\n {\n return view('commonmodule::edit');\n }",
"public function editSettings() {\n $name = $this->schema->name();\n $form = new Fragment($name);\n\n if ($this->schema->newgroup()) { // définit dans la vue fields.php\n $form->hidden('type');\n // pour un nouveau groupe, il faut que le groupe soit créé avec le bon type\n // pour un groupe existant, inutile : on a déjà le bon type dans le schéma\n }\n\n $form->input('name')\n ->attribute('class', 'name')\n ->label(__('Nom du groupe', 'docalist-biblio'))\n ->description(__(\"Le nom du groupe doit être unique (ni un nom de champ, ni le nom d'un autre groupe).\", 'docalist-biblio'));\n\n $form->input('label')\n ->attribute('id', $name . '-label')\n ->attribute('class', 'label regular-text')\n ->label(__('Titre du groupe', 'docalist-biblio'))\n ->description(__(\"C'est le titre qui sera affiché dans la barre de titre du groupe et dans les options de l'écran de saisie. Valeur par défaut : type de la notice\", 'docalist-biblio'));\n\n $form->input('capability')\n ->attribute('id', $name . '-capability')\n ->attribute('class', 'capability regular-text')\n ->label(__('Droit requis', 'docalist-biblio'))\n ->description(__(\"Droit requis pour afficher ce groupe de champs. Ce groupe (et tous les champs qu'il contient) sera masqué si l'utilisateur ne dispose pas du droit indiqué. Si vous laissez vide, aucun test ne sera effectué.\", 'docalist-biblio'));\n\n $form->textarea('description')\n ->attribute('id', $name . '-description')\n ->attribute('class', 'description large-text')\n ->attribute('rows', 2)\n ->label(__(\"Texte d'introduction\", 'docalist-biblio'))\n ->description(__(\"Ce texte sera affiché entre la barre de titre et le premier champ du groupe. Vous pouvez utiliser cette zone pour donner des consignes de saisie ou toute autre information utile aux utilisateurs.\", 'docalist-biblio'));\n\n $form->select('state')\n ->attribute('id', $name . '-state')\n ->attribute('class', 'state')\n ->label(__(\"Etat initial du groupe\", 'docalist-biblio'))\n ->description(__(\"Dans l'écran de saisie, chaque utilisateur peut choisir comment afficher chacun des groupes : il peut replier ou déplier un groupe ou utiliser les options de l'écran de saisie pour masquer ou afficher certains groupes. Ce paramètre indique comment le groupe sera affiché initiallement (pour un nouvel utilisateur).\", 'docalist-biblio'))\n ->options([\n '' => __('Ouvert', 'docalist-biblio'),\n 'collapsed' => __('Replié', 'docalist-biblio'),\n 'hidden' => __('Masqué', 'docalist-biblio'),\n ])\n ->firstOption(false);\n\n $form->button(__('Supprimer ce groupe', 'docalist-biblio'))\n ->attribute('class', 'delete-group button right');\n\n return $form;\n }",
"public function getCMSFields() {\n $fields = parent::getCMSFields();\n\n\n $fields->addFIeldTOTab('Root.Main',new TextField('Title','Image Title'));\n $fields->addFIeldTOTab('Root.Main',new TextareaField('Description','Photo Description (Max 500 Charachters)'));\n $fields->addFIeldTOTab('Root.Main',new UploadField('Image','Photo'));\n\n return $fields;\n }",
"public function showEdit()\n {\n\n }",
"public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }",
"function get_field_list()\r\n\t{\r\n\t\t$fields = array();\r\n\r\n\t\tif (Authority::can('edit', 'admin/item/definition'))\r\n\t\t{\r\n\t\t\t$id_definition = $this->input->post('id_item_definition');\r\n\r\n\t\t\t$fields = $this->extend_field_model->get_lang_list(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'parent' => 'item',\r\n\t\t\t\t\t'id_parent' => $id_definition\r\n\t\t\t\t),\r\n\t\t\t\tSettings::get_lang('default')\r\n\t\t\t);\r\n\r\n\t\t\t// Set type names\r\n\t\t\tforeach($fields as &$field)\r\n\t\t\t{\r\n\t\t\t\t$field['type_name'] = self::$_TYPE_NAMES[$field['type']];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//\r\n\t\t$this->template['id_item_definition'] = $id_definition;\r\n\t\t$this->template['fields'] = $fields;\r\n\r\n\t\t$this->output('item/definition/fields');\r\n\t}",
"protected function createComponentEditForm() {\r\n\t\t$form = new Form;\r\n\t\t$form->getElementPrototype()->class(\"formWide\");\r\n\t\t$options = array(0 => \"Default\", 1 => \"Odkaz na obsah\", 3 => \"Odkaz na položku menu\");\r\n\t\t// easy way how to create url slug\r\n\t\t$form->addText(\"title\", \"Název:\")\r\n\t\t\t\t->setAttribute('onchange', '\r\n\t\t\t\t\t\t\tvar nodiac = { \"á\": \"a\", \"č\": \"c\", \"ď\": \"d\", \"é\": \"e\", \"ě\": \"e\", \"í\": \"i\", \"ň\": \"n\", \"ó\": \"o\", \"ř\": \"r\", \"š\": \"s\", \"ť\": \"t\", \"ú\": \"u\", \"ů\": \"u\", \"ý\": \"y\", \"ž\": \"z\" };\r\n\t\t\t\t\t\t\ts = $(\"#frmeditForm-title\").val().toLowerCase();\r\n\t\t\t\t\t\t\tvar s2 = \"\";\r\n\t\t\t\t\t\t\tfor (var i=0; i < s.length; i++) {\r\n\t\t\t\t\t\t\t\ts2 += (typeof nodiac[s.charAt(i)] != \"undefined\" ? nodiac[s.charAt(i)] : s.charAt(i));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tresult=s2.replace(/[^a-z0-9_]+/g, \"-\").replace(/^-|-$/g, \"\");\r\n\t\t\t\t\t\t\t$(\"#frmeditForm-url\").val(result);\r\n\t\t\t\t\t\t');\r\n\t\t$form->addText(\"url\", \"url:\")->setAttribute(\"readonly\", \"readonly\");\r\n\t\tif (!$this->onlyTree) {\r\n\t\t\t$form->addSelect(\"target_type\", \"Cíl:\", $options);\r\n\t\t\t$content = $this->prepareContentSelectBox();\r\n\t\t\t$menuContent = $this->prepareMenuContentSelectBox();\r\n\t\t\t$form->addSelect(\"target_id\", \"Odkazovaný obsah:\", $content)->setPrompt(\"Pouze při zvolení výše\");\r\n\t\t\t$form->addSelect(\"target_menu\", \"Odk. položka menu:\", $menuContent)->setPrompt(\"Pouze při zvolení výše\");\r\n\t\t}\r\n\t\t$form->addHidden(\"parent_id\", $this->parent_id);\r\n\t\t$form->addHidden(\"edit_id\", $this->edit_id);\r\n\t\t//filling form\r\n\t\tif ($this->edit_id or $this->edit_id === \"0\") {\r\n\t\t\t$defFromDb = $this->closureModel->getItemById($this->edit_id);\r\n\t\t\t$defaults = new \\Nette\\ArrayHash;\r\n\t\t\tforeach ($defFromDb as $key => $value) {\r\n\t\t\t\t$defaults->$key = $value;\r\n\t\t\t}\r\n\t\t\tif ($this->edit_id === \"0\") {\r\n\t\t\t\t$form[\"title\"]->setDisabled();\r\n\t\t\t}\r\n\t\t\tif (!$this->onlyTree) {\r\n\t\t\t\t$t = $defaults->target;\r\n\t\t\t\tif (!Validators::isNumericInt($t)) {\r\n\t\t\t\t\t$menuItem = $this->checkTargetMenuItemExists($t);\r\n\t\t\t\t\tif ($menuItem) {\r\n\t\t\t\t\t\t$defaults->target_type = 3;\r\n\t\t\t\t\t\t$defaults->target_menu = $menuItem;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$contentId = $this->checkTargetContentExists($t);\r\n\t\t\t\t\t\t$defaults->target_type = 1;\r\n\t\t\t\t\t\t$defaults->target_id = $contentId;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$form[\"target_menu\"]->getControlPrototype()->addClass(\"formFieldInvisible\");\r\n\t\t\t\t} elseif ($t <= 0) {\r\n\t\t\t\t\t$defaults->target_type = 0;\r\n\t\t\t\t\t$form[\"target_menu\"]->getControlPrototype()->addClass(\"formFieldInvisible\");\r\n\t\t\t\t\t$form[\"target_id\"]->getControlPrototype()->addClass(\"formFieldInvisible\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$defaults->target = null;\r\n\t\t\t$form->setDefaults($defaults);\r\n\t\t}\r\n\r\n\t\t$form->addSubmit('save', 'Save')\r\n\t\t\t\t\t\t->setAttribute('onclick', '$(\"#frmeditForm-title\").trigger(\"change\")')\r\n\t\t\t\t->onClick[] = callback($this, 'editFormSubmitted');\r\n\t\t$form->setRenderer(new \\Kdyby\\BootstrapFormRenderer\\BootstrapRenderer());\r\n\t\treturn $form;\r\n\t}",
"public function editableProperties()\n\t{\n\t\treturn array(\"category\",\"name\");\n\t}",
"public function getFrontendFields();",
"public function instance_fields() { \n\n\t\t$fields['name'] \t= array('description'=>_('Instance Name'),'type'=>'textbox'); \n\t\t$fields['host'] \t= array('description'=>_('Hostname'),'type'=>'textbox'); \n\t\t$fields['port']\t\t= array('description'=>_('Port'),'type'=>'textbox'); \n\t\t$fields['password']\t= array('description'=>_('Password'),'type'=>'textbox'); \n\n\t\treturn $fields; \n\n\t}",
"protected function form()\n {\n return Admin::form(ExpertRecom::class, function (Form $form) {\n\n $form->display('expid', '讲师ID');\n $form->display('expert.real_name', '讲师名');\n $form->display('expert.wx_img_url','头像')->with(function ($url) {\n return $url ? \"<img width='80px' src='$url' />\" : '';\n });\n $form->display('expert.price_ask', '提问金额');\n $form->textarea('desc', '简介')->rows(5)->rules('required');\n $form->text('weight', '排序权值')->rules('required|numeric');\n\n });\n }",
"public function getCMSFields()\n {\n $commentField = $this->AllowHtml ? HTMLEditorField::class : TextareaField::class;\n $fields = new FieldList(\n $this\n ->obj('Created')\n ->scaffoldFormField($this->fieldLabel('Created'))\n ->performReadonlyTransformation(),\n TextField::create('Name', $this->fieldLabel('Name')),\n $commentField::create('Comment', $this->fieldLabel('Comment')),\n EmailField::create('Email', $this->fieldLabel('Email')),\n TextField::create('URL', $this->fieldLabel('URL')),\n FieldGroup::create(array(\n CheckboxField::create('Moderated', $this->fieldLabel('Moderated')),\n CheckboxField::create('IsSpam', $this->fieldLabel('IsSpam')),\n ))\n ->setTitle(_t(__CLASS__ . '.OPTIONS', 'Options'))\n ->setDescription(_t(\n __CLASS__ . '.OPTION_DESCRIPTION',\n 'Unmoderated and spam comments will not be displayed until approved'\n ))\n );\n\n // Show member name if given\n if (($author = $this->Author()) && $author->exists()) {\n $fields->insertAfter(\n 'Name',\n TextField::create('AuthorMember', $this->fieldLabel('Author'), $author->Title)\n ->performReadonlyTransformation()\n );\n }\n\n // Show parent comment if given\n if (($parent = $this->ParentComment()) && $parent->exists()) {\n $fields->push(new HeaderField(\n 'ParentComment_Title',\n _t(__CLASS__ . '.ParentComment_Title', 'This comment is a reply to the below')\n ));\n // Created date\n // FIXME - the method setName in DatetimeField is not chainable, hence\n // the lack of chaining here\n $createdField = $parent\n ->obj('Created')\n ->scaffoldFormField($parent->fieldLabel('Created'));\n $createdField->setName('ParentComment_Created');\n $createdField->setValue($parent->Created);\n $createdField->performReadonlyTransformation();\n $fields->push($createdField);\n\n // Name (could be member or string value)\n $fields->push(\n $parent\n ->obj('AuthorName')\n ->scaffoldFormField($parent->fieldLabel('AuthorName'))\n ->setName('ParentComment_AuthorName')\n ->setValue($parent->getAuthorName())\n ->performReadonlyTransformation()\n );\n\n // Comment body\n $fields->push(\n $parent\n ->obj('EscapedComment')\n ->scaffoldFormField($parent->fieldLabel(self::class))\n ->setName('ParentComment_EscapedComment')\n ->setValue($parent->Comment)\n ->performReadonlyTransformation()\n );\n }\n\n $this->extend('updateCMSFields', $fields);\n return $fields;\n }",
"public function edit() {\n }",
"public function getFormCustomFields(){\n\t}",
"public function fields(Request $request)\n {\n return [\n ID::make(__('ID'), 'id')->sortable(),\n\n //Avatar::make('Avatar')->squared()->disk('public'),\n Avatar::make(__('Avatar'), 'avatar')->onlyOnIndex(),\n AdvancedImage::make(__('Avatar'), 'avatar')->croppable(1 / 1)->resize(320)->disk('public')->path('users')->hideFromIndex(),\n\n Text::make(__('Name'), 'name')\n ->sortable()\n ->rules('required', 'max:255'),\n\n Text::make(__('Email'), 'email')\n ->sortable()\n ->rules('required', 'email', 'max:254')\n ->creationRules('unique:users,email')\n ->updateRules('unique:users,email,{{resourceId}}'),\n\n Password::make(__('Password'), 'password')\n ->onlyOnForms()\n ->creationRules('required', 'string', 'min:8')\n ->updateRules('nullable', 'string', 'min:8'),\n\n Text::make(__('Level'), 'level', function () {\n switch ($this->level) {\n case 0:\n return __('Root');\n break;\n case 1:\n return __('Agent');\n break;\n case 2:\n return __('Offcie');\n break;\n\n default:\n return '#NA';\n break;\n }\n })->onlyOnIndex(),\n Select::make(__('Level'), 'level')->options(function () {\n $options = [];\n $level = auth()->user()->level;\n if ($level == 0) {\n $options[0] = __('Root');\n $options[1] = __('Agent');\n }\n if ($level == 1) {\n $options[2] = __('Offcie');\n }\n return $options;\n })->creationRules('required')->onlyOnForms(),\n\n\n Boolean::make(__('Active'), 'active')->onlyOnDetail()->onlyOnForms()->withMeta([\"value\" => 1]),\n /*Text::make(__('Ref'), 'ref', function () {\n\n return ($this->parent) ? $this->parent->name : '-';\n })->onlyOnIndex(),*/\n BelongsTo::make(__('Ref'), 'main', User::class)->hideWhenCreating()->hideWhenUpdating(),\n BelongsToMany::make(__('Roles'), 'roles', Role::class),\n HasMany::make(__('Orders'), 'orders', Order::class),\n HasMany::make(__('Transactions'), 'transactions', Transaction::class),\n HasMany::make(__('Children'), 'children', User::class)->hideWhenCreating()->hideWhenUpdating(),\n\n\n ];\n }",
"public function getInputfields() {\n\n\t\t// get module getInputfields set config class\n \t$inputfields = parent::getInputfields();\n\n\t\t// get InputfieldText module\n \t$f = $this->modules->get('InputfieldText');\n \t$f->attr('name', 'findStr');\n \t$f->label = 'Find in text';\n\t\t$f->description = 'Add a word or pattern to find and replace within your text.';\n\n\t\t// add User role input to form config\n\t\t$inputfields->add($f);\n\n\n\t\t// get new InputfieldText module\n\t\t$f = $this->modules->get('InputfieldText');\n\t $f->attr('name', 'replaceStr');\n\t $f->label = 'Replace text';\n\t\t$f->description = 'text to show on the front end.';\n\n\t\t// add Page redirect input to form config\n\t $inputfields->add($f);\n\n\t\t// return module config inputs\n\t return $inputfields;\n \t}",
"public function getCMSFields()\n {\n $fields = parent::getCMSFields();\n $fields->replaceField('Country', new DropdownField('Country', 'based on a sale to ', EcommerceCountry::get_country_dropdown()));\n $fields->replaceField('Root.Main', new DropdownField('TaxType', 'Tax Type', singleton($this->ClassName)->dbObject('TaxType')->enumValues()));\n\n $fields->removeByName('DefaultCountry');\n $fields->addFieldToTab('Root.Debug', new ReadonlyField('DefaultCountryShown', 'Prices are based on sale to', $this->DefaultCountry));\n\n $fields->removeByName('DefaultRate');\n $fields->addFieldToTab('Root.Debug', new ReadonlyField('DefaultRateShown', 'Default rate', $this->DefaultRate));\n\n $fields->removeByName('CurrentRate');\n $fields->addFieldToTab('Root.Debug', new ReadonlyField('CurrentRateShown', 'Rate for current order', $this->CurrentRate));\n\n $fields->removeByName('RawTableValue');\n $fields->addFieldToTab('Root.Debug', new ReadonlyField('RawTableValueShown', 'Raw table value', $this->RawTableValue));\n\n $fields->removeByName('DebugString');\n $fields->addFieldToTab('Root.Debug', new ReadonlyField('DebugStringShown', 'Debug String', $this->DebugString));\n\n return $fields;\n }",
"public function edit()\n\t{\n\t\t//\n\t}",
"public function adminSettingsSubform () {\n $form = array();\n $this->adminSettingsPrintFriendlyForm($form);\n return $form;\n }",
"public function edit(Admin $admin) {\n\t\t//\n\t}",
"public function edit()\n {\n return view('common::edit');\n }",
"public function form_fields() {\n\t\treturn apply_filters( \"appthemes_{$this->box_id}_metabox_fields\", $this->form() );\n\t}",
"protected function form()\n {\n return Admin::form(Weapp::class, function (Form $form) {\n\n $form->display('id', 'ID');\n\n $form->display('created_at', 'Created At');\n $form->display('updated_at', 'Updated At');\n });\n }",
"public function edit()\n {\n return view('escrow::edit');\n }",
"public function getCMSFields() {\n\t\t$fields = parent::getCMSFields();\n\n\t\t// Hide these from editing\n\t\t$fields->removeByName('ParentID');\n\t\t$fields->removeByName('Sort');\n\n\t\t//Remove to re-add\n\t\t$fields->removeByName('Type');\n\n\t\t$content = $fields->dataFieldByName('Content');\n\t\t$numberToDisplay = $fields->dataFieldByName('NumberToDisplay');\n\t\t$html = $fields->dataFieldByName('HTML');\n\t\t$subtitle = $fields->dataFieldByName('SubTitle');\n\n\t\t// $fields->dataFieldByName('Width');\n\n\t\t$fields->replaceField('Width',\n\t\t\t$width = DropdownField::create('Width', 'Width', $this->getColumns())\n\t\t);\n\n\t\t$width->setDescription(\"Width of panel at desktop size\");\n\n\n\t\t$html->setRows(20);\n\n\t\t$fields->insertAfter(\n\t\t\t$link = LinkField::create('LinkID', 'Link'),\n\t\t\t'Content'\n\t\t);\n\n\t\t$image = $fields->dataFieldByName('Image');\n\t\t$image->setFolderName('Uploads/Small-Images');\n\n\t\t$fields->removeByName('Image');\n\n\t\t$fields->insertAfter(\n\t\t\t$type = OptionSetField::create(\n\t\t\t\t\"Type\", \"Type\",\n\t\t\t\t$this->dbObject('Type')->enumValues()\n\t\t\t), \"Width\"\n\t\t);\n\n\t\t$type->addExtraClass('inline-short-list');\n\n\t\t$fields->insertAfter($imageUpload = DisplayLogicWrapper::create($image), 'LinkID');\n\t\t$imageUpload->hideUnless(\"Type\")->isEqualTo(\"Content\")->orIf(\"Type\")->isEqualTo(\"Image\");\n\n\t\t$html->hideUnless(\"Type\")->isEqualTo(\"HTML\");\n\t\t$subtitle->hideUnless(\"Type\")->isEqualTo(\"HTML\");\n\n\t\t$link->hideUnless(\"Type\")->isEqualTo(\"Content\")->orIf(\"Type\")->isEqualTo(\"Image\");\n\n\t\t$numberToDisplay->hideUnless(\"Type\")->isEqualTo(\"News\");\n\n\t\t$content->hideUnless(\"Type\")->isEqualTo(\"Content\");\n\n\t\t// Archived\n\t\t$fields->removeByName('Archived');\n\t\t$fields->addFieldToTab('Root.Main', $group = new CompositeField(\n\t\t\t$label = new LabelField(\"LabelArchive\",\"Archive this feature?\"),\n\t\t\tnew CheckboxField('Archived', '')\n\t\t));\n\n\t\t$group->addExtraClass(\"special field\");\n\t\t$label->addExtraClass(\"left\");\n\n\t\treturn $fields;\n\t}",
"public function actionEdit()\n\t{\n\t\t$field = $this->_getFieldOrError($this->_input->filterSingle('field_id', XenForo_Input::STRING));\n\t\treturn $this->_getFieldAddEditResponse($field);\n\t}",
"protected function form()\n {\n return Admin::form(RoomModel::class, function (Form $form) {\n\n $form->display('id', 'ID');\n $form->text('roomType');\n $form->text('bedType');\n $form->text('roomPrice');\n $form->text('roomImage');\n\n $form->display('created_at', 'Created At');\n $form->display('updated_at', 'Updated At');\n });\n }",
"public function edit( )\r\n {\r\n //\r\n }",
"private function getFormAdminModel()\n {\n \tif (!$this->model_forms_admin)\n \t{\n \t\t$this->model_forms_admin = $this->getServiceLocator()->get(\"FrontFormAdmin\\Models\\FrontFormAdminModel\");\n \t}//end function\n\n \treturn $this->model_forms_admin;\n }",
"public function edit()\n {\n \n \n }",
"public function get_editor_fields() {\n return array('cloudpoodll' => get_string('pluginname', constants::M_COMPONENT));\n }",
"public function renderEditModalHTML()\n {\n $input_form = \"<div class=\\\"form-group\\\">\n <label for=\\\"{{label}}\\\">{{label}}</label>\n <input type=\\\"{{type}}\\\" class=\\\"form-control\\\" id=\\\"edit_input_{{label}}\\\" {{otherAttr}}>\n </div>\";\n $break_line = \"\\n\";\n\n $form_result = \"\";\n $columns = $this->getShowColumn();\n foreach ($columns as $name => $type) {\n $input_type = 'text';\n $other_attr = '';\n\n if ( in_array($name,self::DISABLED_COLUMNS)){\n $other_attr = $other_attr.' disabled';\n }\n\n if ($type == \"bigint\" OR $type == \"integer\"){\n $input_type = 'number';\n }elseif ($type == \"string\"){\n $input_type = 'text';\n }elseif ($type == \"datetime\"){\n $input_type = 'datetime-local';\n }\n\n $one_form = str_replace(\n [\n '{{label}}',\n '{{type}}',\n '{{otherAttr}}',\n ],\n [\n $name,\n $input_type,\n $other_attr,\n ],\n $input_form\n );\n $form_result = $form_result.$one_form.$break_line;\n }\n\n return $form_result;\n }",
"public function form()\n {\n $admin_user = Admin::user();\n $permissionModel = config('admin.database.permissions_model');\n $roleModel = config('admin.database.roles_model');\n\n $form = new Form(new $roleModel());\n\n $form->display('id', 'ID');\n\n $form->text('slug', trans('admin.slug'))->rules('required');\n $form->text('name', trans('admin.name'))->rules('required');\n $options = $permissionModel::all();\n if (!$admin_user->isRole('administrator')) {\n $options = $options->where('slug', '<>', '*');\n }\n $options = $options->pluck('name', 'id');\n\n $form->listbox('permissions', trans('admin.permissions'))->options($options);\n\n $form->display('created_at', trans('admin.created_at'));\n $form->display('updated_at', trans('admin.updated_at'));\n\n return $form;\n }",
"protected function getCreateFormFields()\n {\n return $this->formFields();\n }",
"public function edit()\n {\n \n }",
"public function edit()\n {\n \n }",
"public function edit()\n {\n \n }",
"protected function form()\n {\n return Admin::form(Article::class, function (Form $form) {\n\n $form->display('id', '文章id');\n $form->text('title', '标题');\n $form->text('author','作者')->value(config('admin.author'));\n $form->select('category_id', '类型')->options('/api/categories');\n $form->select('subject_id', '专题')->options('/api/subjects');\n $form->multipleSelect('tags')->options(Tag::all()->pluck('name', 'id'));\n $form->image('cover', '封面');\n $form->editor('body', '内容');\n $form->datetime('created_at');\n $form->datetime('updated_at');\n\n });\n }",
"public function renderEditRow()\n\t{\n\t\tglobal $Security, $CurrentLanguage, $Language;\n\n\t\t// Call Row Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// id\n\t\t$this->id->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->id->EditCustomAttributes = \"\";\n\t\t$this->id->EditValue = $this->id->CurrentValue;\n\t\t$this->id->ViewCustomAttributes = \"\";\n\n\t\t// fecha\n\t\t$this->fecha->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->fecha->EditCustomAttributes = \"\";\n\t\t$this->fecha->EditValue = FormatDateTime($this->fecha->CurrentValue, 8);\n\t\t$this->fecha->PlaceHolder = RemoveHtml($this->fecha->caption());\n\n\t\t// hora\n\t\t$this->hora->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->hora->EditCustomAttributes = \"\";\n\t\t$this->hora->EditValue = $this->hora->CurrentValue;\n\t\t$this->hora->PlaceHolder = RemoveHtml($this->hora->caption());\n\n\t\t// audio\n\t\t$this->audio->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->audio->EditCustomAttributes = \"\";\n\t\tif (!$this->audio->Raw)\n\t\t\t$this->audio->CurrentValue = HtmlDecode($this->audio->CurrentValue);\n\t\t$this->audio->EditValue = $this->audio->CurrentValue;\n\t\t$this->audio->PlaceHolder = RemoveHtml($this->audio->caption());\n\n\t\t// st\n\t\t$this->st->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->st->EditCustomAttributes = \"\";\n\t\tif (!$this->st->Raw)\n\t\t\t$this->st->CurrentValue = HtmlDecode($this->st->CurrentValue);\n\t\t$this->st->EditValue = $this->st->CurrentValue;\n\t\t$this->st->PlaceHolder = RemoveHtml($this->st->caption());\n\n\t\t// fechaHoraIni\n\t\t$this->fechaHoraIni->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->fechaHoraIni->EditCustomAttributes = \"\";\n\t\t$this->fechaHoraIni->EditValue = FormatDateTime($this->fechaHoraIni->CurrentValue, 8);\n\t\t$this->fechaHoraIni->PlaceHolder = RemoveHtml($this->fechaHoraIni->caption());\n\n\t\t// fechaHoraFin\n\t\t$this->fechaHoraFin->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->fechaHoraFin->EditCustomAttributes = \"\";\n\t\t$this->fechaHoraFin->EditValue = FormatDateTime($this->fechaHoraFin->CurrentValue, 8);\n\t\t$this->fechaHoraFin->PlaceHolder = RemoveHtml($this->fechaHoraFin->caption());\n\n\t\t// telefono\n\t\t$this->telefono->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->telefono->EditCustomAttributes = \"\";\n\t\tif (!$this->telefono->Raw)\n\t\t\t$this->telefono->CurrentValue = HtmlDecode($this->telefono->CurrentValue);\n\t\t$this->telefono->EditValue = $this->telefono->CurrentValue;\n\t\t$this->telefono->PlaceHolder = RemoveHtml($this->telefono->caption());\n\n\t\t// agente\n\t\t$this->agente->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->agente->EditCustomAttributes = \"\";\n\t\t$this->agente->EditValue = $this->agente->CurrentValue;\n\t\t$this->agente->PlaceHolder = RemoveHtml($this->agente->caption());\n\n\t\t// fechabo\n\t\t$this->fechabo->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->fechabo->EditCustomAttributes = \"\";\n\t\t$this->fechabo->EditValue = FormatDateTime($this->fechabo->CurrentValue, 8);\n\t\t$this->fechabo->PlaceHolder = RemoveHtml($this->fechabo->caption());\n\n\t\t// agentebo\n\t\t$this->agentebo->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->agentebo->EditCustomAttributes = \"\";\n\t\t$this->agentebo->EditValue = $this->agentebo->CurrentValue;\n\t\t$this->agentebo->PlaceHolder = RemoveHtml($this->agentebo->caption());\n\n\t\t// comentariosbo\n\t\t$this->comentariosbo->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->comentariosbo->EditCustomAttributes = \"\";\n\t\t$this->comentariosbo->EditValue = $this->comentariosbo->CurrentValue;\n\t\t$this->comentariosbo->PlaceHolder = RemoveHtml($this->comentariosbo->caption());\n\n\t\t// IP\n\t\t$this->IP->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->IP->EditCustomAttributes = \"\";\n\t\tif (!$this->IP->Raw)\n\t\t\t$this->IP->CurrentValue = HtmlDecode($this->IP->CurrentValue);\n\t\t$this->IP->EditValue = $this->IP->CurrentValue;\n\t\t$this->IP->PlaceHolder = RemoveHtml($this->IP->caption());\n\n\t\t// actual\n\t\t$this->actual->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->actual->EditCustomAttributes = \"\";\n\t\tif (!$this->actual->Raw)\n\t\t\t$this->actual->CurrentValue = HtmlDecode($this->actual->CurrentValue);\n\t\t$this->actual->EditValue = $this->actual->CurrentValue;\n\t\t$this->actual->PlaceHolder = RemoveHtml($this->actual->caption());\n\n\t\t// completado\n\t\t$this->completado->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->completado->EditCustomAttributes = \"\";\n\t\tif (!$this->completado->Raw)\n\t\t\t$this->completado->CurrentValue = HtmlDecode($this->completado->CurrentValue);\n\t\t$this->completado->EditValue = $this->completado->CurrentValue;\n\t\t$this->completado->PlaceHolder = RemoveHtml($this->completado->caption());\n\n\t\t// 2_1_R\n\t\t$this->_2_1_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_2_1_R->EditCustomAttributes = \"\";\n\t\t$this->_2_1_R->EditValue = $this->_2_1_R->CurrentValue;\n\t\t$this->_2_1_R->PlaceHolder = RemoveHtml($this->_2_1_R->caption());\n\n\t\t// 2_2_R\n\t\t$this->_2_2_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_2_2_R->EditCustomAttributes = \"\";\n\t\t$this->_2_2_R->EditValue = $this->_2_2_R->CurrentValue;\n\t\t$this->_2_2_R->PlaceHolder = RemoveHtml($this->_2_2_R->caption());\n\n\t\t// 2_3_R\n\t\t$this->_2_3_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_2_3_R->EditCustomAttributes = \"\";\n\t\t$this->_2_3_R->EditValue = $this->_2_3_R->CurrentValue;\n\t\t$this->_2_3_R->PlaceHolder = RemoveHtml($this->_2_3_R->caption());\n\n\t\t// 3_4_R\n\t\t$this->_3_4_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_3_4_R->EditCustomAttributes = \"\";\n\t\t$this->_3_4_R->EditValue = $this->_3_4_R->CurrentValue;\n\t\t$this->_3_4_R->PlaceHolder = RemoveHtml($this->_3_4_R->caption());\n\n\t\t// 4_5_R\n\t\t$this->_4_5_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_4_5_R->EditCustomAttributes = \"\";\n\t\t$this->_4_5_R->EditValue = $this->_4_5_R->CurrentValue;\n\t\t$this->_4_5_R->PlaceHolder = RemoveHtml($this->_4_5_R->caption());\n\n\t\t// 4_6_R\n\t\t$this->_4_6_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_4_6_R->EditCustomAttributes = \"\";\n\t\t$this->_4_6_R->EditValue = $this->_4_6_R->CurrentValue;\n\t\t$this->_4_6_R->PlaceHolder = RemoveHtml($this->_4_6_R->caption());\n\n\t\t// 4_7_R\n\t\t$this->_4_7_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_4_7_R->EditCustomAttributes = \"\";\n\t\t$this->_4_7_R->EditValue = $this->_4_7_R->CurrentValue;\n\t\t$this->_4_7_R->PlaceHolder = RemoveHtml($this->_4_7_R->caption());\n\n\t\t// 4_8_R\n\t\t$this->_4_8_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_4_8_R->EditCustomAttributes = \"\";\n\t\t$this->_4_8_R->EditValue = $this->_4_8_R->CurrentValue;\n\t\t$this->_4_8_R->PlaceHolder = RemoveHtml($this->_4_8_R->caption());\n\n\t\t// 5_9_R\n\t\t$this->_5_9_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_5_9_R->EditCustomAttributes = \"\";\n\t\t$this->_5_9_R->EditValue = $this->_5_9_R->CurrentValue;\n\t\t$this->_5_9_R->PlaceHolder = RemoveHtml($this->_5_9_R->caption());\n\n\t\t// 5_10_R\n\t\t$this->_5_10_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_5_10_R->EditCustomAttributes = \"\";\n\t\t$this->_5_10_R->EditValue = $this->_5_10_R->CurrentValue;\n\t\t$this->_5_10_R->PlaceHolder = RemoveHtml($this->_5_10_R->caption());\n\n\t\t// 5_11_R\n\t\t$this->_5_11_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_5_11_R->EditCustomAttributes = \"\";\n\t\t$this->_5_11_R->EditValue = $this->_5_11_R->CurrentValue;\n\t\t$this->_5_11_R->PlaceHolder = RemoveHtml($this->_5_11_R->caption());\n\n\t\t// 5_12_R\n\t\t$this->_5_12_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_5_12_R->EditCustomAttributes = \"\";\n\t\t$this->_5_12_R->EditValue = $this->_5_12_R->CurrentValue;\n\t\t$this->_5_12_R->PlaceHolder = RemoveHtml($this->_5_12_R->caption());\n\n\t\t// 5_13_R\n\t\t$this->_5_13_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_5_13_R->EditCustomAttributes = \"\";\n\t\t$this->_5_13_R->EditValue = $this->_5_13_R->CurrentValue;\n\t\t$this->_5_13_R->PlaceHolder = RemoveHtml($this->_5_13_R->caption());\n\n\t\t// 5_14_R\n\t\t$this->_5_14_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_5_14_R->EditCustomAttributes = \"\";\n\t\t$this->_5_14_R->EditValue = $this->_5_14_R->CurrentValue;\n\t\t$this->_5_14_R->PlaceHolder = RemoveHtml($this->_5_14_R->caption());\n\n\t\t// 5_51_R\n\t\t$this->_5_51_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_5_51_R->EditCustomAttributes = \"\";\n\t\t$this->_5_51_R->EditValue = $this->_5_51_R->CurrentValue;\n\t\t$this->_5_51_R->PlaceHolder = RemoveHtml($this->_5_51_R->caption());\n\n\t\t// 6_15_R\n\t\t$this->_6_15_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_6_15_R->EditCustomAttributes = \"\";\n\t\t$this->_6_15_R->EditValue = $this->_6_15_R->CurrentValue;\n\t\t$this->_6_15_R->PlaceHolder = RemoveHtml($this->_6_15_R->caption());\n\n\t\t// 6_16_R\n\t\t$this->_6_16_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_6_16_R->EditCustomAttributes = \"\";\n\t\t$this->_6_16_R->EditValue = $this->_6_16_R->CurrentValue;\n\t\t$this->_6_16_R->PlaceHolder = RemoveHtml($this->_6_16_R->caption());\n\n\t\t// 6_17_R\n\t\t$this->_6_17_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_6_17_R->EditCustomAttributes = \"\";\n\t\t$this->_6_17_R->EditValue = $this->_6_17_R->CurrentValue;\n\t\t$this->_6_17_R->PlaceHolder = RemoveHtml($this->_6_17_R->caption());\n\n\t\t// 6_18_R\n\t\t$this->_6_18_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_6_18_R->EditCustomAttributes = \"\";\n\t\t$this->_6_18_R->EditValue = $this->_6_18_R->CurrentValue;\n\t\t$this->_6_18_R->PlaceHolder = RemoveHtml($this->_6_18_R->caption());\n\n\t\t// 6_19_R\n\t\t$this->_6_19_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_6_19_R->EditCustomAttributes = \"\";\n\t\t$this->_6_19_R->EditValue = $this->_6_19_R->CurrentValue;\n\t\t$this->_6_19_R->PlaceHolder = RemoveHtml($this->_6_19_R->caption());\n\n\t\t// 6_20_R\n\t\t$this->_6_20_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_6_20_R->EditCustomAttributes = \"\";\n\t\t$this->_6_20_R->EditValue = $this->_6_20_R->CurrentValue;\n\t\t$this->_6_20_R->PlaceHolder = RemoveHtml($this->_6_20_R->caption());\n\n\t\t// 6_52_R\n\t\t$this->_6_52_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_6_52_R->EditCustomAttributes = \"\";\n\t\t$this->_6_52_R->EditValue = $this->_6_52_R->CurrentValue;\n\t\t$this->_6_52_R->PlaceHolder = RemoveHtml($this->_6_52_R->caption());\n\n\t\t// 7_21_R\n\t\t$this->_7_21_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_7_21_R->EditCustomAttributes = \"\";\n\t\t$this->_7_21_R->EditValue = $this->_7_21_R->CurrentValue;\n\t\t$this->_7_21_R->PlaceHolder = RemoveHtml($this->_7_21_R->caption());\n\n\t\t// 8_22_R\n\t\t$this->_8_22_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_8_22_R->EditCustomAttributes = \"\";\n\t\t$this->_8_22_R->EditValue = $this->_8_22_R->CurrentValue;\n\t\t$this->_8_22_R->PlaceHolder = RemoveHtml($this->_8_22_R->caption());\n\n\t\t// 8_23_R\n\t\t$this->_8_23_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_8_23_R->EditCustomAttributes = \"\";\n\t\t$this->_8_23_R->EditValue = $this->_8_23_R->CurrentValue;\n\t\t$this->_8_23_R->PlaceHolder = RemoveHtml($this->_8_23_R->caption());\n\n\t\t// 8_24_R\n\t\t$this->_8_24_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_8_24_R->EditCustomAttributes = \"\";\n\t\t$this->_8_24_R->EditValue = $this->_8_24_R->CurrentValue;\n\t\t$this->_8_24_R->PlaceHolder = RemoveHtml($this->_8_24_R->caption());\n\n\t\t// 8_25_R\n\t\t$this->_8_25_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_8_25_R->EditCustomAttributes = \"\";\n\t\t$this->_8_25_R->EditValue = $this->_8_25_R->CurrentValue;\n\t\t$this->_8_25_R->PlaceHolder = RemoveHtml($this->_8_25_R->caption());\n\n\t\t// 9_26_R\n\t\t$this->_9_26_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_26_R->EditCustomAttributes = \"\";\n\t\t$this->_9_26_R->EditValue = $this->_9_26_R->CurrentValue;\n\t\t$this->_9_26_R->PlaceHolder = RemoveHtml($this->_9_26_R->caption());\n\n\t\t// 9_27_R\n\t\t$this->_9_27_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_27_R->EditCustomAttributes = \"\";\n\t\t$this->_9_27_R->EditValue = $this->_9_27_R->CurrentValue;\n\t\t$this->_9_27_R->PlaceHolder = RemoveHtml($this->_9_27_R->caption());\n\n\t\t// 9_28_R\n\t\t$this->_9_28_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_28_R->EditCustomAttributes = \"\";\n\t\t$this->_9_28_R->EditValue = $this->_9_28_R->CurrentValue;\n\t\t$this->_9_28_R->PlaceHolder = RemoveHtml($this->_9_28_R->caption());\n\n\t\t// 9_29_R\n\t\t$this->_9_29_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_29_R->EditCustomAttributes = \"\";\n\t\t$this->_9_29_R->EditValue = $this->_9_29_R->CurrentValue;\n\t\t$this->_9_29_R->PlaceHolder = RemoveHtml($this->_9_29_R->caption());\n\n\t\t// 9_30_R\n\t\t$this->_9_30_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_30_R->EditCustomAttributes = \"\";\n\t\t$this->_9_30_R->EditValue = $this->_9_30_R->CurrentValue;\n\t\t$this->_9_30_R->PlaceHolder = RemoveHtml($this->_9_30_R->caption());\n\n\t\t// 9_31_R\n\t\t$this->_9_31_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_31_R->EditCustomAttributes = \"\";\n\t\t$this->_9_31_R->EditValue = $this->_9_31_R->CurrentValue;\n\t\t$this->_9_31_R->PlaceHolder = RemoveHtml($this->_9_31_R->caption());\n\n\t\t// 9_32_R\n\t\t$this->_9_32_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_32_R->EditCustomAttributes = \"\";\n\t\t$this->_9_32_R->EditValue = $this->_9_32_R->CurrentValue;\n\t\t$this->_9_32_R->PlaceHolder = RemoveHtml($this->_9_32_R->caption());\n\n\t\t// 9_33_R\n\t\t$this->_9_33_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_33_R->EditCustomAttributes = \"\";\n\t\t$this->_9_33_R->EditValue = $this->_9_33_R->CurrentValue;\n\t\t$this->_9_33_R->PlaceHolder = RemoveHtml($this->_9_33_R->caption());\n\n\t\t// 9_34_R\n\t\t$this->_9_34_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_34_R->EditCustomAttributes = \"\";\n\t\t$this->_9_34_R->EditValue = $this->_9_34_R->CurrentValue;\n\t\t$this->_9_34_R->PlaceHolder = RemoveHtml($this->_9_34_R->caption());\n\n\t\t// 9_35_R\n\t\t$this->_9_35_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_35_R->EditCustomAttributes = \"\";\n\t\t$this->_9_35_R->EditValue = $this->_9_35_R->CurrentValue;\n\t\t$this->_9_35_R->PlaceHolder = RemoveHtml($this->_9_35_R->caption());\n\n\t\t// 9_36_R\n\t\t$this->_9_36_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_36_R->EditCustomAttributes = \"\";\n\t\t$this->_9_36_R->EditValue = $this->_9_36_R->CurrentValue;\n\t\t$this->_9_36_R->PlaceHolder = RemoveHtml($this->_9_36_R->caption());\n\n\t\t// 9_37_R\n\t\t$this->_9_37_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_37_R->EditCustomAttributes = \"\";\n\t\t$this->_9_37_R->EditValue = $this->_9_37_R->CurrentValue;\n\t\t$this->_9_37_R->PlaceHolder = RemoveHtml($this->_9_37_R->caption());\n\n\t\t// 9_38_R\n\t\t$this->_9_38_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_38_R->EditCustomAttributes = \"\";\n\t\t$this->_9_38_R->EditValue = $this->_9_38_R->CurrentValue;\n\t\t$this->_9_38_R->PlaceHolder = RemoveHtml($this->_9_38_R->caption());\n\n\t\t// 9_39_R\n\t\t$this->_9_39_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_39_R->EditCustomAttributes = \"\";\n\t\t$this->_9_39_R->EditValue = $this->_9_39_R->CurrentValue;\n\t\t$this->_9_39_R->PlaceHolder = RemoveHtml($this->_9_39_R->caption());\n\n\t\t// 10_40_R\n\t\t$this->_10_40_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_10_40_R->EditCustomAttributes = \"\";\n\t\t$this->_10_40_R->EditValue = $this->_10_40_R->CurrentValue;\n\t\t$this->_10_40_R->PlaceHolder = RemoveHtml($this->_10_40_R->caption());\n\n\t\t// 10_41_R\n\t\t$this->_10_41_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_10_41_R->EditCustomAttributes = \"\";\n\t\t$this->_10_41_R->EditValue = $this->_10_41_R->CurrentValue;\n\t\t$this->_10_41_R->PlaceHolder = RemoveHtml($this->_10_41_R->caption());\n\n\t\t// 11_42_R\n\t\t$this->_11_42_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_11_42_R->EditCustomAttributes = \"\";\n\t\t$this->_11_42_R->EditValue = $this->_11_42_R->CurrentValue;\n\t\t$this->_11_42_R->PlaceHolder = RemoveHtml($this->_11_42_R->caption());\n\n\t\t// 11_43_R\n\t\t$this->_11_43_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_11_43_R->EditCustomAttributes = \"\";\n\t\t$this->_11_43_R->EditValue = $this->_11_43_R->CurrentValue;\n\t\t$this->_11_43_R->PlaceHolder = RemoveHtml($this->_11_43_R->caption());\n\n\t\t// 12_44_R\n\t\t$this->_12_44_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_44_R->EditCustomAttributes = \"\";\n\t\t$this->_12_44_R->EditValue = $this->_12_44_R->CurrentValue;\n\t\t$this->_12_44_R->PlaceHolder = RemoveHtml($this->_12_44_R->caption());\n\n\t\t// 12_45_R\n\t\t$this->_12_45_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_45_R->EditCustomAttributes = \"\";\n\t\t$this->_12_45_R->EditValue = $this->_12_45_R->CurrentValue;\n\t\t$this->_12_45_R->PlaceHolder = RemoveHtml($this->_12_45_R->caption());\n\n\t\t// 12_46_R\n\t\t$this->_12_46_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_46_R->EditCustomAttributes = \"\";\n\t\t$this->_12_46_R->EditValue = $this->_12_46_R->CurrentValue;\n\t\t$this->_12_46_R->PlaceHolder = RemoveHtml($this->_12_46_R->caption());\n\n\t\t// 12_47_R\n\t\t$this->_12_47_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_47_R->EditCustomAttributes = \"\";\n\t\t$this->_12_47_R->EditValue = $this->_12_47_R->CurrentValue;\n\t\t$this->_12_47_R->PlaceHolder = RemoveHtml($this->_12_47_R->caption());\n\n\t\t// 12_48_R\n\t\t$this->_12_48_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_48_R->EditCustomAttributes = \"\";\n\t\t$this->_12_48_R->EditValue = $this->_12_48_R->CurrentValue;\n\t\t$this->_12_48_R->PlaceHolder = RemoveHtml($this->_12_48_R->caption());\n\n\t\t// 12_49_R\n\t\t$this->_12_49_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_49_R->EditCustomAttributes = \"\";\n\t\t$this->_12_49_R->EditValue = $this->_12_49_R->CurrentValue;\n\t\t$this->_12_49_R->PlaceHolder = RemoveHtml($this->_12_49_R->caption());\n\n\t\t// 12_50_R\n\t\t$this->_12_50_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_50_R->EditCustomAttributes = \"\";\n\t\t$this->_12_50_R->EditValue = $this->_12_50_R->CurrentValue;\n\t\t$this->_12_50_R->PlaceHolder = RemoveHtml($this->_12_50_R->caption());\n\n\t\t// 1__R\n\t\t$this->_1__R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_1__R->EditCustomAttributes = \"\";\n\t\t$this->_1__R->EditValue = $this->_1__R->CurrentValue;\n\t\t$this->_1__R->PlaceHolder = RemoveHtml($this->_1__R->caption());\n\n\t\t// 13_54_R\n\t\t$this->_13_54_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_54_R->EditCustomAttributes = \"\";\n\t\t$this->_13_54_R->EditValue = $this->_13_54_R->CurrentValue;\n\t\t$this->_13_54_R->PlaceHolder = RemoveHtml($this->_13_54_R->caption());\n\n\t\t// 13_54_1_R\n\t\t$this->_13_54_1_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_54_1_R->EditCustomAttributes = \"\";\n\t\t$this->_13_54_1_R->EditValue = $this->_13_54_1_R->CurrentValue;\n\t\t$this->_13_54_1_R->PlaceHolder = RemoveHtml($this->_13_54_1_R->caption());\n\n\t\t// 13_54_2_R\n\t\t$this->_13_54_2_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_54_2_R->EditCustomAttributes = \"\";\n\t\t$this->_13_54_2_R->EditValue = $this->_13_54_2_R->CurrentValue;\n\t\t$this->_13_54_2_R->PlaceHolder = RemoveHtml($this->_13_54_2_R->caption());\n\n\t\t// 13_55_R\n\t\t$this->_13_55_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_55_R->EditCustomAttributes = \"\";\n\t\t$this->_13_55_R->EditValue = $this->_13_55_R->CurrentValue;\n\t\t$this->_13_55_R->PlaceHolder = RemoveHtml($this->_13_55_R->caption());\n\n\t\t// 13_55_1_R\n\t\t$this->_13_55_1_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_55_1_R->EditCustomAttributes = \"\";\n\t\t$this->_13_55_1_R->EditValue = $this->_13_55_1_R->CurrentValue;\n\t\t$this->_13_55_1_R->PlaceHolder = RemoveHtml($this->_13_55_1_R->caption());\n\n\t\t// 13_55_2_R\n\t\t$this->_13_55_2_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_55_2_R->EditCustomAttributes = \"\";\n\t\t$this->_13_55_2_R->EditValue = $this->_13_55_2_R->CurrentValue;\n\t\t$this->_13_55_2_R->PlaceHolder = RemoveHtml($this->_13_55_2_R->caption());\n\n\t\t// 13_56_R\n\t\t$this->_13_56_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_56_R->EditCustomAttributes = \"\";\n\t\t$this->_13_56_R->EditValue = $this->_13_56_R->CurrentValue;\n\t\t$this->_13_56_R->PlaceHolder = RemoveHtml($this->_13_56_R->caption());\n\n\t\t// 13_56_1_R\n\t\t$this->_13_56_1_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_56_1_R->EditCustomAttributes = \"\";\n\t\t$this->_13_56_1_R->EditValue = $this->_13_56_1_R->CurrentValue;\n\t\t$this->_13_56_1_R->PlaceHolder = RemoveHtml($this->_13_56_1_R->caption());\n\n\t\t// 13_56_2_R\n\t\t$this->_13_56_2_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_56_2_R->EditCustomAttributes = \"\";\n\t\t$this->_13_56_2_R->EditValue = $this->_13_56_2_R->CurrentValue;\n\t\t$this->_13_56_2_R->PlaceHolder = RemoveHtml($this->_13_56_2_R->caption());\n\n\t\t// 12_53_R\n\t\t$this->_12_53_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_53_R->EditCustomAttributes = \"\";\n\t\t$this->_12_53_R->EditValue = $this->_12_53_R->CurrentValue;\n\t\t$this->_12_53_R->PlaceHolder = RemoveHtml($this->_12_53_R->caption());\n\n\t\t// 12_53_1_R\n\t\t$this->_12_53_1_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_53_1_R->EditCustomAttributes = \"\";\n\t\t$this->_12_53_1_R->EditValue = $this->_12_53_1_R->CurrentValue;\n\t\t$this->_12_53_1_R->PlaceHolder = RemoveHtml($this->_12_53_1_R->caption());\n\n\t\t// 12_53_2_R\n\t\t$this->_12_53_2_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_53_2_R->EditCustomAttributes = \"\";\n\t\t$this->_12_53_2_R->EditValue = $this->_12_53_2_R->CurrentValue;\n\t\t$this->_12_53_2_R->PlaceHolder = RemoveHtml($this->_12_53_2_R->caption());\n\n\t\t// 12_53_3_R\n\t\t$this->_12_53_3_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_53_3_R->EditCustomAttributes = \"\";\n\t\t$this->_12_53_3_R->EditValue = $this->_12_53_3_R->CurrentValue;\n\t\t$this->_12_53_3_R->PlaceHolder = RemoveHtml($this->_12_53_3_R->caption());\n\n\t\t// 12_53_4_R\n\t\t$this->_12_53_4_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_53_4_R->EditCustomAttributes = \"\";\n\t\t$this->_12_53_4_R->EditValue = $this->_12_53_4_R->CurrentValue;\n\t\t$this->_12_53_4_R->PlaceHolder = RemoveHtml($this->_12_53_4_R->caption());\n\n\t\t// 12_53_5_R\n\t\t$this->_12_53_5_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_53_5_R->EditCustomAttributes = \"\";\n\t\t$this->_12_53_5_R->EditValue = $this->_12_53_5_R->CurrentValue;\n\t\t$this->_12_53_5_R->PlaceHolder = RemoveHtml($this->_12_53_5_R->caption());\n\n\t\t// 12_53_6_R\n\t\t$this->_12_53_6_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_53_6_R->EditCustomAttributes = \"\";\n\t\t$this->_12_53_6_R->EditValue = $this->_12_53_6_R->CurrentValue;\n\t\t$this->_12_53_6_R->PlaceHolder = RemoveHtml($this->_12_53_6_R->caption());\n\n\t\t// 13_57_R\n\t\t$this->_13_57_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_57_R->EditCustomAttributes = \"\";\n\t\t$this->_13_57_R->EditValue = $this->_13_57_R->CurrentValue;\n\t\t$this->_13_57_R->PlaceHolder = RemoveHtml($this->_13_57_R->caption());\n\n\t\t// 13_57_1_R\n\t\t$this->_13_57_1_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_57_1_R->EditCustomAttributes = \"\";\n\t\t$this->_13_57_1_R->EditValue = $this->_13_57_1_R->CurrentValue;\n\t\t$this->_13_57_1_R->PlaceHolder = RemoveHtml($this->_13_57_1_R->caption());\n\n\t\t// 13_57_2_R\n\t\t$this->_13_57_2_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_57_2_R->EditCustomAttributes = \"\";\n\t\t$this->_13_57_2_R->EditValue = $this->_13_57_2_R->CurrentValue;\n\t\t$this->_13_57_2_R->PlaceHolder = RemoveHtml($this->_13_57_2_R->caption());\n\n\t\t// 13_58_R\n\t\t$this->_13_58_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_58_R->EditCustomAttributes = \"\";\n\t\t$this->_13_58_R->EditValue = $this->_13_58_R->CurrentValue;\n\t\t$this->_13_58_R->PlaceHolder = RemoveHtml($this->_13_58_R->caption());\n\n\t\t// 13_58_1_R\n\t\t$this->_13_58_1_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_58_1_R->EditCustomAttributes = \"\";\n\t\t$this->_13_58_1_R->EditValue = $this->_13_58_1_R->CurrentValue;\n\t\t$this->_13_58_1_R->PlaceHolder = RemoveHtml($this->_13_58_1_R->caption());\n\n\t\t// 13_58_2_R\n\t\t$this->_13_58_2_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_58_2_R->EditCustomAttributes = \"\";\n\t\t$this->_13_58_2_R->EditValue = $this->_13_58_2_R->CurrentValue;\n\t\t$this->_13_58_2_R->PlaceHolder = RemoveHtml($this->_13_58_2_R->caption());\n\n\t\t// 13_59_R\n\t\t$this->_13_59_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_59_R->EditCustomAttributes = \"\";\n\t\t$this->_13_59_R->EditValue = $this->_13_59_R->CurrentValue;\n\t\t$this->_13_59_R->PlaceHolder = RemoveHtml($this->_13_59_R->caption());\n\n\t\t// 13_59_1_R\n\t\t$this->_13_59_1_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_59_1_R->EditCustomAttributes = \"\";\n\t\t$this->_13_59_1_R->EditValue = $this->_13_59_1_R->CurrentValue;\n\t\t$this->_13_59_1_R->PlaceHolder = RemoveHtml($this->_13_59_1_R->caption());\n\n\t\t// 13_59_2_R\n\t\t$this->_13_59_2_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_59_2_R->EditCustomAttributes = \"\";\n\t\t$this->_13_59_2_R->EditValue = $this->_13_59_2_R->CurrentValue;\n\t\t$this->_13_59_2_R->PlaceHolder = RemoveHtml($this->_13_59_2_R->caption());\n\n\t\t// 13_60_R\n\t\t$this->_13_60_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_60_R->EditCustomAttributes = \"\";\n\t\t$this->_13_60_R->EditValue = $this->_13_60_R->CurrentValue;\n\t\t$this->_13_60_R->PlaceHolder = RemoveHtml($this->_13_60_R->caption());\n\n\t\t// 12_53_7_R\n\t\t$this->_12_53_7_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_53_7_R->EditCustomAttributes = \"\";\n\t\t$this->_12_53_7_R->EditValue = $this->_12_53_7_R->CurrentValue;\n\t\t$this->_12_53_7_R->PlaceHolder = RemoveHtml($this->_12_53_7_R->caption());\n\n\t\t// 12_53_8_R\n\t\t$this->_12_53_8_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_53_8_R->EditCustomAttributes = \"\";\n\t\t$this->_12_53_8_R->EditValue = $this->_12_53_8_R->CurrentValue;\n\t\t$this->_12_53_8_R->PlaceHolder = RemoveHtml($this->_12_53_8_R->caption());\n\n\t\t// Call Row Rendered event\n\t\t$this->Row_Rendered();\n\t}",
"private function getFormAdminModel()\n\t{\n\t\tif (!$this->model_forms_admin)\n\t\t{\n\t\t\t$this->model_forms_admin = $this->getServiceLocator()->get(\"FrontFormAdmin\\Models\\FrontFormAdminModel\");\n\t\t}//end function\n\n\t\treturn $this->model_forms_admin;\n\t}",
"public function editAction()\n {\n parent::editAction();\n $this->_fillMappingsArray();\n $this->_fillAvailableProperties();\n }",
"public function modifyView() {\n $this->object = $this->object->readObject($this->id);\n $uiObjectName = $this->type.'_Ui';\n $uiObject = new $uiObjectName($this->object);\n $values = array_merge($this->object->valuesArray(), $this->values);\n return $uiObject->renderForm(array_merge(\n array('values'=>$values,\n 'action'=>url($this->type.'/modify', true),\n 'class'=>'formAdmin formAdminModify'),\n array('submit'=>array('save'=>__('save'),\n 'saveCheck'=>__('saveCheck')))));\n }",
"public function edit() {\n\n }",
"public function editAction()\r\n {\r\n }",
"protected function form()\n {\n $this->opt();\n $form = new Form(new ComDep);\n\n $form->text('alias', 'Alias');\n $form->text('name', 'Name');\n $form->select('company_id', 'Company')->options($this->optcom);\n $form->select('id_com_dep_admin', 'Company department admin')->options($this->optcomdep);\n $form->select('service_type_id', 'Service type')->options($this->optsertype);\n $form->textarea('info', 'Info');\n $form->textarea('info_for_vp_admin', 'Info for vp admin');\n $form->text('address', 'Address');\n $form->textarea('info_station', 'Info station');\n $form->text('telephone', 'Telephone');\n $form->text('e_mail', 'E mail');\n $form->text('class', 'Class');$form->saving(function (Form $form) {\n $form->model()->id_admin_add=Admin::user()->id;\n });\n\n return $form;\n }",
"public function edit()\n {\n return view('initializer::edit');\n }",
"public function get_edit(){\n\t\tif (Auth::check()){\n\t\t\t$customer_id = Auth::user()->customer_id;\n\n\t\t\t$customer_types = array('' => 'Select One','Buyer'=>'Buyer','Vendor'=>'Vendor');\n\n\t\t\t$countries = array('' => 'Select One') + \n\t\t\t\tCountry::lists('country_name', 'country_id');\n\n\t\t\t$titles = array('' => 'Select One','Mr.'=>'Mr.','Mrs.'=>'Mrs.','Ms.'=>'Ms.','Miss'=>'Miss','Master'=>'Master',\n\t\t\t\t'Rev.'=>'Rev. (Reverend)','Fr.'=>'Fr. (Father)','Dr.'=>'Dr. (Doctor)','Atty.'=>'Atty. (Attorney)',\n\t\t\t\t'Prof.'=>'Prof. (Professor)','Hon.'=>'Hon. (Honorable)','Pres.'=>'Pres. (President)',\n\t\t\t\t'Gov.'=>'Gov. (Governor)','Coach'=>'Coach','Ofc.'=>'Ofc. (Officer)');\n\n\t\t\t$this->layout->content = View::make('frontend.customers.edit')\n\t\t\t\t->with('title', 'Edit Customer')\n\t\t\t\t->with('customer', Customer::find($customer_id))\n\t\t\t\t->with('customer_type',$customer_types)\n\t\t\t\t->with('customer_countryId', $countries)\n\t\t\t\t->with('customer_title', $titles);\n\t\t}\n\t}",
"protected function form()\n {\n return Admin::form(Root::class, function (Form $form) {\n\n //$form->display('id', 'ID');\n $form->text('name','词根');\n $form->select('types')->options([0 => '前缀', 1 => '后缀', 2 => '词根']);\n $form->ckeditor('description','描述');\n\n $form->hasMany('rootcixing', function (Form\\NestedForm $form) {\n //$form->text('rootcixing.description',\"描叙\");\n $form->select('word_speech_id',\"词性\")->options(WordSpeech::all()->pluck('cixing', 'id'));\n\n });\n\n\n $form->display('created_at', 'Created At');\n $form->display('updated_at', 'Updated At');\n });\n }",
"protected function form()\n {\n return Admin::form(DC::class, function (Form $form) {\n\n $form->display('id', 'ID');\n $form->display('uid','用户')->with(function($val){\n return User::find($val)->name;\n });\n $form->display('uid','VIP')->with(function($val){\n return User::find($val)->vip >=\\Carbon\\Carbon::now() ? '是': '否';\n });\n $form->display('uid','手机号码')->with(function($val){\n return User::find($val)->mobile ;\n });\n $form->image('xybg','信用报告')->uniqueName();\n $form->image('xsz','行驶证')->uniqueName();\n $form->image('sfzz','身份证正面')->uniqueName();\n $form->image('sfzf','身份证反面')->uniqueName();\n $form->image('fcz','房产证')->uniqueName();\n $form->multipleImage('content','附加内容')->uniqueName()->removable();\n // $form->image('jsz','驾驶证')->uniqueName();\n $form->number('ll','借款利率')->rules('min:0');\n $form->currency('jkje','借款金额')->rules('required');\n $form->display('jkqx','借款期限');\n $form->display('dyxx','抵押信息');\n $form->display('hkfs','还款方式');\n $form->display('jkms','借款描述');\n $form->display('yjsr','月均收入');\n $form->display('njsr','年均收入');\n $form->display('hyzk','婚姻状况');\n $form->display('zgxl','最高学历');\n $form->display('address','居住地址');\n $form->select('status','状态')->options(['1'=>'通过','0'=>'未审核','-1'=>'未通过','2' => '投标完成']);\n $form->display('updated_at', '申请时间');\n });\n }",
"public function edit()\n {\n \n }",
"protected function form()\n {\n $form = new Form(new $this->currentModel);\n\n $form->tab('基本信息', function ($form) {\n\n //$form->display('id', 'ID');\n //$form->text('keyword', '关键词');\n $form->text('static_url', '静态地址')->help(\"如果输入:New-York-Downtown.html,则访问地址为:http://www.yinjispace.com/article/<span style='color:#F00;'>New-York-Downtown.html</span>\");\n $form->radio('article_status', '状态')->options(['0' => '草稿', '1' => '审核中', '2' => '已发布'])->default('0');\n $form->radio('display', '公开度')->options(['0' => '公开', '-1' => '保密'])->default('0');\n $form->datetime('release_time', '发布时间')->format('YYYY-MM-DD HH:mm:ss');\n // $form->datetime('created_at','发布时间')->format('YYYY-MM-DD HH:mm:ss');\n $form->multipleSelect('category_ids', '分类')->options(ArticleCategory::getSelectOptions());\n $form->multipleSelect('topic_ids', '专题')->options(Topic::getSelectOptions());\n $form->text('tag_ids', '标签(逗号分隔)');\n $form->text('view_num', '浏览数')->default(0);\n $form->text('like_num', '点赞数')->default(0);\n $form->text('favorite_num', '收藏数')->default(0);\n $form->text('vip_download', '下载地址');\n //$form->multipleSelect('designer_id', '设计师ID')->options(Designer::getSelectOptions());\n $form->multipleSelect('designer_id', '设计师')->options(function ($ids) {\n $designer = Designer::find($ids);\n if ($designer) {\n return $designer->pluck('title_cn', 'id');\n }\n\n })->ajax('/admin/article/get_designer_select_options');\n $form->text('article_source', '文章来源');\n $form->text('article_source_url', '文章来源URL');\n $form->image('custom_thum', '自定义封面')\n ->uniqueName()\n ->widen(880)\n ->move('public/photo/images/custom_thum/');\n $form->image('special_photo', '特色照片')\n ->uniqueName()\n ->widen(1920)\n ->move('public/photo/images/special_photo/');\n $form->text('seo_title', 'SEO标题');\n $form->text('seo_keyword', 'SEO关键词');\n $form->text('seo_desc', 'SEO描述');\n })->tab('中文', function ($form) {\n\n $form->text('title_designer_cn', '标题(设计师)');\n $form->text('title_name_cn', '标题(项目名称)');\n $form->text('title_intro_cn', '标题(项目介绍)');\n $form->text('description_cn', '自定义描述(中)');\n $form->text('location_cn', '地域(中)');\n $form->ckeditor('detail.content_cn', '正文(中)');\n\n })->tab('English', function ($form) {\n\n $form->text('title_designer_en', '标题(设计师)');\n $form->text('title_name_en', '标题(项目名称)');\n $form->text('title_intro_en', '标题(项目介绍)');\n $form->text('description_en', '自定义描述(英)');\n $form->text('location_en', '地域(英)');\n $form->ckeditor('detail.content_en', '正文(英)');\n\n });\n\n //保存前回调\n $form->saving(function (Form $form) {\n if (empty($form->model()->release_time)) {\n $form->release_time = date('Y-m-d H:i:s');\n }\n });\n\n $form->saved(function (Form $form) {\n $tags = explode(',', $form->tag_ids);\n foreach ($tags as $tag) {\n echo $tag;\n $ret = ArticleTag::firstOrCreate(['name_cn' => trim($tag)]);\n }\n\n });\n\n\n return $form;\n }",
"public function getCMSFields()\n {\n //declare var $fields\n $fields = parent::getCMSFields();\n //create Reviews Section GridField\n $fields->addFieldToTab('Root.Reviews', GridField::create(\n 'Reviews',\n 'Client Reviews',\n $this->Reviews(),\n GridFieldConfig_RecordEditor::create()\n ));\n\n return $fields;\n }",
"protected function form()\n {\n $grid = Admin::form(SiteModel::class, function(Form $form){\n // Displays the record id\n $form->display('id', 'ID');\n // Add an input box of type text\n $form->url('url', 'Site url')->rules('required');\n $form->text('name', 'Site name')->rules('required');\n $form->switch('official', 'Official?');\n // Add textarea for the describe field\n $form->textarea('describe', 'Description');\n // Add a switch field\n $form->switch('enable', 'Enabled?');\n $form->switch('searcheable', 'Searcheable?');\n $form->url('search_url', 'Search URL');\n $form->text('search_method', 'Search Method');\n $form->text('search_key', 'Search KEY');\n $form->text('search_example', 'Search Example');\n // Add a date and time selection box\n //$form->datetime('release_at', 'release time')->rules('required');\n // Display two time column \n $form->display('created_at', 'Created time');\n $form->display('updated_at', 'Updated time');\n });\n return $grid;\n }",
"public function edit()\n\t{\n\t\t\n\t}",
"protected function form()\n {\n return Admin::form(LivebcCourse::class, function (Form $form) {\n if(Auth::isLecturer()){\n $form->hidden('expid', '讲师ID')->default(Admin::user()->id);\n }else{\n $form->text('expid', '讲师ID')->rules('required')->default(0);\n }\n $form->text('name', '视频名称')->rules('required');\n $form->image('thumbnail', '缩略图')->uniqueName();\n $form->url('video_url', '视频地址')->rules('required');\n $form->radio('state','状态')->options(LivebcCourse::STATE)->default(LivebcCourse::STATE_ENABLE);\n $form->saved(function (Form $form) {\n if($form->model()->thumbnail && false === strpos($form->model()->thumbnail,'http')){\n $form->model()->thumbnail = config('filesystems.disks.admin.url') .'/'.$form->model()->thumbnail;\n }\n if(!$form->model()->timestamp){\n $form->model()->timestamp = date(\"Y-m-d H:i:s\",time());\n }\n $form->model()->save();\n });\n });\n }",
"public function actionEditField(){\n $model = CylFields::model()->findByAttributes(['field_id' => $_POST['id']]);\n $this->renderPartial('edit-field',array('model' => $model));\n }",
"protected function form()\n {\n return Admin::form(Classroom::class, function (Form $form) {\n\n $form->display('id', 'ID');\n\n $form->text('number', '编号')->placeholder('教室编号');\n $form->text('name', '名称')->placeholder('教室名称');\n $form->text('location', '地点')->placeholder('教室地点');\n $form->text('square', '面积')->placeholder('教室面积');\n $form->number('floor', '楼层')->placeholder('教室楼层');\n $form->radio('is_free', '是否空闲')->options([0 => '占用', 1 => '空闲',])->default(1);\n $form->text('building_name', '建筑物名称')->placeholder('教室所处建筑物名称');\n\n $form->display('created_at', '创建于');\n $form->display('updated_at', '更新于');\n });\n }",
"protected function form()\n {\n return Admin::form(MenuItem::class, function (Form $form) {\n $form->tools(function (Form\\Tools $tools) {\n $tools->disableListButton();\n });\n\n $form->hidden('company_id','品牌編號')->default(Session::get('company_id')); \n $form->hidden('store_id','店家編號')->default(Session::get('store_id'));\n\n $group_id = MenuItem::getGroupID(Session::get('menu_item_id'));\n\n $form->select('group_id', trans('idelivery.cuisine.group.name'))->options(\n CuisineGroup::where('company_id', Session::get('company_id'))\n ->where('store_id', Session::get('store_id'))\n ->orWhere(function ($query) {\n $query->where('company_id', '=', Session::get('company_id'))\n ->where('store_id', '=', 0);\n })\n ->pluck('group_name', 'id')\n )->default($group_id);\n\n $form->text('name', trans('idelivery.cuisine.item.name'))->rules('required|max:25')->placeholder('限25字');\n $form->textarea('intro', '簡介')->rows(3);\n $form->image('picture', '圖片')->uniqueName()->rules('max:900')\n ->move(env('ADMIN_UPLOAD_PATH', '') . 'store/image/menu_item/' . Session::get('store_id'));\n $form->divide();\n\n $unit = json_decode(MenuItem::getUnit(Session::get('company_id'), Session::get('store_id')), true);\n \n $new = false;\n if (request()->isMethod('POST')) {\n $new = true;\n }\n\n $options_list = array();\n\n if (!empty($unit)) {\n $unit_id_list = array();\n\n foreach ($unit as $row) {\n $unit_id_list[] = $row['id'];\n }\n\n $attr = json_decode(MenuItem::getAttr($unit_id_list), true);\n $i = 0;\n\n foreach ($unit as $unit_row) {\n $attr_arr = array();\n $attr_opt = array();\n $options = array();\n $default = 0;\n\n foreach ($attr as $val) {\n if ($unit_row['id'] == $val['unit_id']) {\n $attr_opt[$val['id']] = $val['attr_name'];\n\n if ($new == true) {\n if ($val['is_default'] == '1') {\n $default = $val['id'];\n }\n } else {\n $spec = json_decode(MenuItem::getSpecRelation(Session::get('menu_item_id')), true);\n if (!empty($spec)) {\n foreach ($spec as $spec_row) {\n if ( ! empty($spec_row['attribute'])) {\n foreach ($spec_row['attribute'] as $attr_row) {\n if ($val['id'] == $attr_row['id']) {\n if ($attr_row['selected'] == true) {\n $default = $attr_row['id'];\n }\n }\n }\n }\n }\n }\n }\n\n $attr_arr = array(\n 'id' => $val['id'],\n 'title' => $val['attr_name'],\n 'subtitle' => '',\n 'selected' => $val['is_default'] == '1' ? true : false,\n 'extra_price' => $val['extra_price']\n );\n\n $options[] = $attr_arr;\n }\n }\n\n $options_list[] = array(\n 'unit_id' => $unit_row['id'],\n 'unit_title' => $unit_row['unit_name'],\n 'is_multiple' => $unit_row['is_multiple'],\n 'required' => $unit_row['is_required'],\n 'attribute' => (empty($options)||$options == \"[]\") ? null : $options,\n );\n }\n }\n \n $form->multipleSelect('unit', trans('idelivery.cuisine.unit.title'))->options(\n CuisineUnit::where('company_id', Session::get('company_id'))\n ->where('store_id', Session::get('store_id'))\n ->orWhere(function ($query) {\n $query->where('company_id', '=', Session::get('company_id'))\n ->where('store_id', '=', 0);\n })\n ->pluck('unit_name', 'id')\n );\n\n $form->ignore('spec_relation');\n $form->divide();\n\n $form->hasMany('size', '份量價格', function (Form\\NestedForm $form) {\n $form->hidden('id','份量編號');\n $form->hidden('item_id','餐點編號')->default(Session::get('menu_item_id'));\n $form->text('size_name', '份量名稱')->rules('nullable');\n $form->number('price', '價格')->rules('required');\n $form->switch('is_selected', '預設選取')->states($this->selected_arr)->default(2);\n $form->switch('status', '份量狀態')->states($this->status_size_arr)->default(1);\n });\n\n $form->divide();\n $form->number('points', '獲得點數')->min(0);\n $form->switch('hidden', 'App隱藏')->states($this->hidden_arr);\n $form->switch('status', '狀態')->states($this->status_arr)->default(1); \n\n $form->saving(function (Form $form) {\n\n $sizes = $form->size;\n $is_price_null = false;\n $selected_cnt = 0;\n if (!empty($sizes)) {\n foreach ($sizes as $val) {\n if (empty($val['price'])) {\n $is_price_null = true;\n }\n\n if ($val['is_selected'] == 'on') {\n $selected_cnt = $selected_cnt + 1;\n }\n }\n } else {\n $is_price_null = true;\n }\n\n if ($is_price_null) {\n admin_toastr('份量價格不得為空!','warning');\n return back();\n }\n\n if ($selected_cnt == 0) {\n admin_toastr('份量預設選取不得全為否!','warning');\n return back();\n }\n\n if ($selected_cnt > 1) {\n admin_toastr('份量預設選取數量超過限制!','warning');\n return back();\n }\n\n });\n\n $form->saved(function (Form $form) use ($options_list) {\n\n $menu_item_unit = array();\n $unit_select = array();\n\n foreach ($options_list as $rows) {\n foreach ($form->unit as $key => $val) {\n if ($val == $rows['unit_id']) {\n $menu_item_unit[] = array(\n 'item_id' => $form->model()->id, \n 'unit_id' => $val\n );\n\n $unit_select[] = $rows;\n }\n }\n }\n\n MenuItem::addMenuItemUnit($form->model()->id, $menu_item_unit);\n\n if (!empty($unit_select)) {\n MenuItem::updateSpecRelation($form->model()->id, json_encode($unit_select));\n }\n\n Session::forget('menu_item_id');\n\n $size_ids = array();\n $size_names = array();\n \n foreach ($form->size as $row) {\n $size_ids[] = $row['id'];\n $size_names[] = $row['size_name'];\n }\n\n //不知為何沒有update size_name???\n MenuItem::updateSizeName($size_ids, $size_names);\n\n return redirect('/admin/store/set/cuisine_group');\n });\n\n });\n }",
"private function __listAdminUserFormFields() {\n\t\t$fields = array(\n\t\t\tarray(\n\t\t\t\t'name' => 'username',\n\t\t\t\t'label' => __('Username'),\n\t\t\t\t'required' => true\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'email',\n\t\t\t\t'label' => __('Email'),\n\t\t\t\t'required' => true\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'password',\n\t\t\t\t'label' => __('Password'),\n\t\t\t\t'type' => 'password',\n\t\t\t\t'required' => true\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'confirm_password',\n\t\t\t\t'label' => __('Confirm Password'),\n\t\t\t\t'type' => 'password',\n\t\t\t\t'required' => true\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'first_name',\n\t\t\t\t'label' => __('First Name'),\n\t\t\t\t'required' => true\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'last_name',\n\t\t\t\t'label' => __('Last Name'),\n\t\t\t\t'required' => true\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'timezone',\n\t\t\t\t'label' => __('Timezone'),\n\t\t\t\t'type' => 'select',\n\t\t\t\t'options' => $this->Timezone->get_timezone_list(),\n\t\t\t\t'required' => true\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'is_super_admin',\n\t\t\t\t'label' => __('Is Super Admin'),\n\t\t\t\t'type' => 'checkbox'\n\t\t\t)\n\t\t);\n\t\treturn $fields;\n\t}",
"public function fields(): array\n {\n return [\n ID::make(),\n DateTime::make('createdAt')->sortable()->readOnly()->hidden(),\n DateTime::make('updatedAt')->sortable()->readOnly()->hidden(),\n Str::make('slug'),\n Str::make('name'),\n ];\n }"
] | [
"0.72574854",
"0.68677145",
"0.68128055",
"0.66688",
"0.65923715",
"0.6541161",
"0.6525591",
"0.65046114",
"0.64924437",
"0.64828515",
"0.64383847",
"0.6436788",
"0.6422573",
"0.6408679",
"0.6376759",
"0.6352013",
"0.6341373",
"0.6341373",
"0.6334331",
"0.632933",
"0.63219815",
"0.63183635",
"0.6311039",
"0.630535",
"0.62820476",
"0.62804663",
"0.62749654",
"0.6273566",
"0.62724775",
"0.6239554",
"0.6210511",
"0.61958647",
"0.6195063",
"0.6194403",
"0.618744",
"0.61847055",
"0.61785054",
"0.6172498",
"0.6159075",
"0.6157811",
"0.61549014",
"0.61386514",
"0.61346895",
"0.61126196",
"0.61074185",
"0.6105859",
"0.61014795",
"0.61005414",
"0.60926473",
"0.60923636",
"0.60869414",
"0.60834384",
"0.6065748",
"0.6063946",
"0.6061967",
"0.6048825",
"0.60466254",
"0.60374415",
"0.603679",
"0.6035636",
"0.6029495",
"0.6029319",
"0.60268265",
"0.60211855",
"0.60210174",
"0.60094965",
"0.60055393",
"0.6004629",
"0.6004306",
"0.5993117",
"0.59922624",
"0.5990343",
"0.5989751",
"0.5987162",
"0.5986391",
"0.5986391",
"0.5986391",
"0.59837437",
"0.5983698",
"0.5983553",
"0.5981855",
"0.59729415",
"0.59724545",
"0.5972282",
"0.5970038",
"0.59693897",
"0.5963421",
"0.59627616",
"0.5962718",
"0.5960921",
"0.59566",
"0.5947499",
"0.59392446",
"0.5937963",
"0.5934188",
"0.5932189",
"0.593152",
"0.59295493",
"0.5928434",
"0.59282905"
] | 0.59651583 | 86 |
Create a new command instance. | public function __construct()
{
parent::__construct();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function newCommand() {\n return newinstance(Command::class, [], '{\n public static $wasRun= false;\n public function __construct() { self::$wasRun= false; }\n public function run() { self::$wasRun= true; }\n public function wasRun() { return self::$wasRun; }\n }');\n }",
"public function createCommand()\r\n\t{\r\n\t\t$obj = new DbCommand($this,$this->dbms);\r\n\t\treturn $obj;\r\n\t}",
"public function createCommand() {\n\t\treturn new UnboxedCommand( $this );\n\t}",
"protected function createCommand($args) {\n $command = new Command();\n $command->id = ifseta($args, 'id');\n $command->name = ifseta($args, 'name');\n $command->url = ifseta($args, 'url');\n $command->description = ifseta($args, 'description');\n $command->uses = ifseta($args, 'uses');\n $command->creationDate = ifseta($args, 'creation_date');\n $command->lastUseDate = ifseta($args, 'last_use_date');\n $command->goldenEggDate = ifseta($args, 'golden_egg_date');\n return $command;\n }",
"static public function create($cmd = null, $args = null)\n {\n return new self($cmd, $args);\n }",
"public function createCommand($kernel, string $commandName = null, string $commandDescription = null): Command;",
"public function makeCommand() \n {\n if($this->CrontabCommandObject === NULL)\n {\n $this->CrontabCommandObject = new \\root\\library\\Crontab\\CrontabCommand\\CrontabCommand();\n }\n \n return $this->CrontabCommandObject;\n }",
"public function testInstantiation()\n {\n $command = new CreateRule('dummy name');\n }",
"public function command(Command $command);",
"public function __construct($command)\n {\n $this->command = $command;\n }",
"public static function create(array $data)\n {\n $command = new static();\n $command->exchangeArray($data);\n return $command;\n }",
"protected function getCreateCommand()\n {\n $command = new IndexCreateCommand();\n $command->setContainer($this->getContainer());\n\n return $command;\n }",
"public function createCommand($string = '')\n {\n return $this->createStringable($string);\n }",
"public function createCommand($type) {\r\n $command = $this->xml->createElement('command');\r\n $command->setAttribute('xsi:type', $type);\r\n $command->setAttribute('xmlns', '');\r\n $this->xmlSchema($command);\r\n return $command;\r\n }",
"public function __construct()\n {\n // We will go ahead and set the name, description, and parameters on console\n // commands just to make things a little easier on the developer. This is\n // so they don't have to all be manually specified in the constructors.\n if (isset($this->signature)) {\n $this->configureUsingFluentDefinition();\n } else {\n parent::__construct($this->name);\n }\n\n // Once we have constructed the command, we'll set the description and other\n // related properties of the command. If a signature wasn't used to build\n // the command we'll set the arguments and the options on this command.\n $this->setDescription((string) $this->description);\n\n $this->setHelp((string) $this->help);\n\n $this->setHidden($this->isHidden());\n\n if (! isset($this->signature)) {\n $this->specifyParameters();\n }\n }",
"public function make(string $name, PreprocessorInterface $preprocessor = null): CommandInterface;",
"private function _getCommandByClassName($className)\n {\n return new $className;\n }",
"public function newCommand($regex, $callable) {\n $cmd = new Command();\n $cmd->regex = $regex;\n $cmd->callable = $callable;\n return $this->addCommand($cmd);\n }",
"public static function create($commandID, ...$args)\n {\n $arguments = func_get_args();\n\n return new static(array_shift($arguments), $arguments);\n }",
"private function __construct($command = null)\n {\n $this->command = $command;\n }",
"public static function factory(string $command, string $before = '', string $after = ''): self\n {\n return new self($command, $before, $after);\n }",
"public function getCommand() {}",
"protected function buildCommand()\n {\n $command = new Command(\\Tivie\\Command\\ESCAPE);\n $command\n ->chdir(realpath($this->repoDir))\n ->setCommand($this->gitDir)\n ->addArgument(new Argument('tag', null, null, false))\n ->addArgument(new Argument($this->tag, null, null, true));\n\n return $command;\n }",
"public function testCanBeInstantiated()\n {\n $command = $this->createInstance();\n $this->assertInstanceOf('\\\\Dhii\\\\ShellInterop\\\\CommandInterface', $command, 'Command must be an interoperable command');\n $this->assertInstanceOf('\\\\Dhii\\\\ShellCommandInterop\\\\ConfigurableCommandInterface', $command, 'Command must be a configurable command');\n $this->assertInstanceOf('\\\\Dhii\\\\ShellCommandInterop\\\\MutableCommandInterface', $command, 'Command must be a mutable command');\n }",
"public function getCommand();",
"protected function createCommand($name, array $parameters = [])\n {\n return new Fluent(\n array_merge(\n compact('name'),\n $parameters)\n );\n }",
"public function testCanPassCommandStringToConstructor()\n {\n $command = new Command('/bin/ls -l');\n\n $this->assertEquals('/bin/ls -l', $command->getExecCommand());\n }",
"public function makeCommandInstanceByType(...$args): CommandInterface\n {\n $commandType = array_shift($args);\n\n switch ($commandType) {\n case self::PROGRAM_READ_MODEL_FETCH_ONE_COMMAND:\n return $this->makeFetchOneCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_FIND_COMMAND:\n return $this->makeFindCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_FIND_LITE_COMMAND:\n return $this->makeFindLiteCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_CREATE_TASK_COMMAND:\n return $this->makeItemCreateTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_CREATE_COMMAND:\n return $this->makeItemCreateCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_UPDATE_TASK_COMMAND:\n return $this->makeItemUpdateTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_UPDATE_COMMAND:\n return $this->makeItemUpdateCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_DELETE_TASK_COMMAND:\n return $this->makeItemDeleteTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_DELETE_COMMAND:\n return $this->makeItemDeleteCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_ADD_ID_COMMAND:\n return $this->makeItemAddIdCommand(...$args);\n\n default:\n throw new FactoryException(sprintf('Command bus for type `%s` not found!', (string) $commandType));\n }\n }",
"public function __construct($cmd)\n {\n $this->cmd = $cmd;\n }",
"public function getCommand()\n {\n }",
"public function command($class)\n {\n $runnable = $this->resolveClass($class);\n\n if ( ! $runnable instanceof Command) {\n throw new InvalidArgumentException(get_class($runnable).' must be an instance of '.Command::class.'.');\n }\n\n $command = $runnable;\n\n if ($runnable instanceof Taggable) {\n $command = new Cached($command, $this);\n }\n\n if ($runnable instanceof Transactional) {\n $command = new Transaction($command, $this, $this->makeFromContainer(ConnectionInterface::class));\n }\n\n if ($runnable instanceof Eventable) {\n $command = new Evented($command, $this);\n }\n\n return $this->newBuilder($command);\n }",
"protected function createCommandFactory(): CommandFactory\n {\n return new CommandFactory([\n 'CLOSE' => Command\\CLOSE::class,\n ]);\n }",
"public static function register() {\n\n if ( !defined( 'WP_CLI' ) || !WP_CLI ) {\n return;\n }\n \n $instance = new static;\n if(empty( $instance->namespace )) {\n throw new \\Exception(\"Command namespace not defined\", 1);\n \n }\n\t\t\\WP_CLI::add_command( $instance->namespace, $instance, $instance->args ?? null );\n\t}",
"public function addCommand($command);",
"public function add(Command $command);",
"abstract protected function getCommand();",
"public function createCommand()\r\n\t{\r\n\t\t//start the string\r\n\t\t$command = '';\r\n\t\t\r\n\t\t//add the java command or the path to java\r\n\t\t$command .= $this->java_path;\r\n\t\t\r\n\t\t//add the class path\r\n\t\t$command .= ' -cp \"'. $this->stanford_path . $this->seperator . '*\" ';\r\n\t\t\r\n\t\t//add options\r\n\t\t$options = implode(' ', $this->java_options);\r\n\t\t$command .= '-'.$options;\r\n\t\t\r\n\t\t//add the call to the pipeline object\r\n\t\t$command .= ' edu.stanford.nlp.pipeline.StanfordCoreNLP ';\r\n\r\n\t\t//add the annotators\r\n\t\t$command .= '-annotators '. $this->listAnnotators();\r\n\t\t\r\n\t\t//add the input and output directors\r\n\t\t$command .= ' -file '. $this->tmp_file . ' -outputDirectory '. $this->tmp_path;\r\n\t\t\r\n\t\t//this is for testing purposes\r\n\t\t//$command .= ' -file '. $this->tmp_path .'\\\\nlp3F25.tmp' . ' -outputDirectory '. $this->tmp_path;\r\n\t\t\r\n\t\t//if using regexner add this to the command string\r\n\t\tif($this->annotators['regexner'] === true)\r\n\t\t{\r\n\t\t\t$command .=' -regexner.mapping '. $this->regexner_path . $this->seperator . $this->regexner_file;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn $command;\r\n\t}",
"protected function createCommand(string $name, array $parameters = []): Fluent\n {\n return new Fluent(array_merge(compact('name'), $parameters));\n }",
"public function __construct()\n {\n parent::__construct(static::NAME, static::VERSION);\n $this->add(new DefaultCommand());\n }",
"public function __construct()\n {\n parent::__construct();\n\n $this->command_name = config(\"custom-commands.command_name\");\n\n parent::__construct($this->signature = $this->command_name);\n\n $this->commands = (array) config(\"custom-commands.commands\");\n \n $this->table = config(\"custom-commands.table\");\n\n $this->row = config(\"custom-commands.row\");\n\n $this->changeEnv = (boolean) config(\"custom-commands.change_env\");\n\n }",
"protected function createCommandFile()\n {\n $command_file_full_path = $this->command_dir_path . DIRECTORY_SEPARATOR . $this->arg->getCommandFileName();\n\n // Check if the command already exists\n if (file_exists($command_file_full_path)) {\n throw new Exception('Command already exists.');\n }\n\n // Create the file for the new command\n $command_file = fopen($command_file_full_path, 'w');\n\n // TODO: Create Script Generator to generate the PHP scripts for the new command.\n\n fclose($command_file);\n\n $this->console->getOutput()->println('File created at: ' . $command_file_full_path);\n $this->console->getOutput()->success('Command ' . $this->arg->getSignature() . ' created successfully.');\n }",
"public static function create() {}",
"public static function create() {}",
"public static function create() {}",
"public static function create(InteropContainer $container)\n {\n $middleware = $container->get('cmd.middleware');\n return new CommandBusFactory($middleware);\n }",
"private function createCli() {\n $this->cli = new Cli();\n $this->commands = $this->commandParser->getAllCommands();\n\n foreach ($this->commands as $command) {\n if ($command->isDefault()) {\n $this->cli->command(\"*\");\n foreach ($command->getOptions() as $option) {\n $this->cli->opt($option->getName(), $option->getDescription(), $option->isRequired(), $option->getType());\n }\n foreach ($command->getArguments() as $argument) {\n if (!$argument->isVariadic())\n $this->cli->arg($argument->getName(), $argument->getDescription(), $argument->isRequired());\n }\n }\n if ($command->getName() != \"\") {\n $this->cli->command($command->getName())->description($command->getDescription());\n foreach ($command->getOptions() as $option) {\n $this->cli->opt($option->getName(), $option->getDescription(), $option->isRequired(), $option->getType());\n }\n foreach ($command->getArguments() as $argument) {\n if (!$argument->isVariadic())\n $this->cli->arg($argument->getName(), $argument->getDescription(), $argument->isRequired());\n }\n }\n }\n\n\n }",
"public function testInstantiation()\n {\n $this->assertInstanceOf('Contao\\ManagerBundle\\Command\\InstallWebDirCommand', $this->command);\n }",
"public function command(string $command): self\n {\n $this->addCommands[] = $command;\n\n return $this;\n }",
"public function create() {}",
"protected function createProcess($cmd)\n {\n return new Process(explode(' ', $cmd));\n }",
"public function create(){}",
"protected function getCommandFactory(): Command\\Factory\n {\n return new Command\\RedisFactory();\n }",
"public function __construct()\n {\n parent::__construct();\n\n $this->commandData = new CommandData($this, CommandData::$COMMAND_TYPE_API);\n }",
"public function testNewCommand() : void\n {\n $this->assertFalse($this->command->hasArguments());\n $this->assertEquals(\"\", $this->command->getArguments());\n }",
"protected function createCommandBuilder()\n\t{\n\t\treturn new CSqliteCommandBuilder($this);\n\t}",
"public function __construct($command, $config = [])\n {\n $this->command = $command;\n $this->_output = $this->getDefaultOutput();\n parent::__construct($config);\n }",
"public function __construct(){\n\n global $argv;\n\n if(!isset($argv[1])){\n echo 'You must supply a command!' . PHP_EOL;\n exit;\n }//if\n\n $args = $argv;\n\n $scriptName = array_shift($args);\n $method = array_shift($args);\n\n $method = explode('-',$method);\n foreach($method as $k => $v){\n if($k != 0){\n $method[$k] = ucwords($v);\n }//if\n }//foreach\n\n $method = implode('',$method);\n\n $resolved = false;\n\n if(method_exists($this,$method)){\n call_user_func(Array($this,$method), $args);\n $resolved = true;\n }//if\n else {\n foreach(static::$extendedCommands as $commandClass){\n if(method_exists($commandClass,$method)){\n call_user_func(Array($commandClass,$method), $args);\n $resolved = true;\n break;\n }//if\n }//foreach\n }//el\n\n if(!$resolved){\n echo \"`{$method}` is not a valid CLI command!\";\n }//if\n\n echo PHP_EOL;\n exit;\n\n }",
"public function forCommand($command)\n {\n $this->command = $command;\n $this->pipe = new NullPipe();\n $this->manager = new InteractiveProcessManager($this->userInteraction);\n\n return $this;\n }",
"public function __construct()\n {\n parent::__construct('pwman', '0.1.0');\n\n $getCommand = new Get();\n $this->add($getCommand);\n\n $setCommand = new Set();\n $this->add($setCommand);\n }",
"public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }",
"public function createCommand(?string $sql = null, array $params = []): Command;",
"public function __construct($command = NULL, $name = NULL)\n {\n $args = func_get_args();\n\n switch ($command) {\n case self::CONSTR_CMD_POPULATE_SYNCED_ARRAY:\n case self::CONSTR_CMD_POP_FROM_ARR:\n case self::CONSTR_CMD_POP_FROM_OBJ:\n case self::CONSTR_CMD_POP_FROM_DB:\n case self::CONSTR_CMD_NEW:\n $this->setup_name = $name;\n\n # shift off known args\n array_shift($args);\n array_shift($args);\n break;\n }\n\n switch ($command) {\n case self::CONSTR_CMD_POP_FROM_ARR:\n $this->applyArray($args[0]);\n break;\n case self::CONSTR_CMD_POP_FROM_OBJ:\n break;\n case self::CONSTR_CMD_POP_FROM_DB:\n break;\n case self::CONSTR_CMD_POPULATE_SYNCED_ARRAY:\n $this->applyArray($args[0]);\n $this->setAllLoaded();\n break;\n default:\n throw new OrmInputException('Guessing not supported, please explicitly specify construction type');\n self::constructGuess($args);\n }\n\n $this->ensureObjectInDb();\n }",
"public function generateCommands();",
"protected function newInstanceCommand($commandClass)\n {\n $class = new ReflectionClass($commandClass);\n\n return $class->newInstanceArgs($this->resolveCommandParameters($class));\n }",
"protected function buildCommand()\n {\n return $this->command;\n }",
"public function makeItemCreateCommand(string $processUuid, array $item): ItemCreateCommand\n {\n $processUuid = ProcessUuid::fromNative($processUuid);\n $uuid = Uuid::fromNative(null);\n $item = Item::fromNative($item);\n\n return new ItemCreateCommand($processUuid, $uuid, $item);\n }",
"public function __construct($commandName, $args = [], $description = '') {\n if (!$this->setName($commandName)) {\n $this->setName('--new-command');\n }\n $this->addArgs($args);\n\n if (!$this->setDescription($description)) {\n $this->setDescription('<NO DESCRIPTION>');\n }\n }",
"public function getCommand($name, array $args = array())\n {\n return parent::getCommand($name, $args)\n ->setRequestSerializer(RequestSerializer::getInstance());\n }",
"protected function buildCommand()\n {\n $command = new Command(\\Tivie\\Command\\DONT_ADD_SPACE_BEFORE_VALUE);\n $command\n ->chdir(realpath($this->repoDir))\n ->setCommand($this->gitDir)\n ->addArgument(new Argument('rev-parse'))\n ->addArgument(new Argument('HEAD'));\n\n return $command;\n }",
"protected function instantiateCommand(Request $request, $args)\n {\n $command = new DeletePackageCustomerCommand($args);\n\n $requestBody = $request->getParsedBody();\n\n $this->setCommandFields($command, $requestBody);\n\n return $command;\n }",
"public function createCommand($sql = null, $params = [])\n {\n $command = new Command([\n 'db' => $this,\n 'sql' => $sql,\n ]);\n\n return $command->bindValues($params);\n }",
"protected function setCommand($value) {\n\t\t$this->_command = trim($value);\n\t\treturn $this;\n\t}",
"public function setCommand($command)\n {\n $this->command = $command;\n\n return $this;\n }",
"public function buildCommand()\n {\n return parent::buildCommand();\n }",
"private function registerMakeModuleCommand()\n {\n $this->app->singleton('command.make.module', function($app) {\n return $app['Caffeinated\\Modules\\Console\\Generators\\MakeModuleCommand'];\n });\n\n $this->commands('command.make.module');\n }",
"public function __construct()\n {\n parent::__construct();\n\n $this->currentDirectory = getcwd();\n $this->baseIndentLevel = 0;\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\HelpCommand\", \"help\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\InitializePlanetCommand\", \"init\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PackAndPushUniToolCommand\", \"packpushuni\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PackLightPluginCommand\", \"packlightmap\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PushCommand\", \"push\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PushUniverseSnapshotCommand\", \"pushuni\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\UpdateSubscriberDependenciesCommand\", \"updsd\");\n\n }",
"public function getCommand(string $command);",
"protected function registerCommand(){\n\t\t$this->app->singleton('fakeid.command.setup', function ($app){\n\t\t\treturn new SetupCommand();\n\t\t});\n\n\t\t$this->commands('fakeid.command.setup');\n\t}",
"public function addCommand($command, $args = [], $data = [])\n {\n $item = new ScreenCommand();\n $item->screen_id = $this->id;\n $item->command = $command;\n $item->arguments = $args;\n $item->fill($data);\n $item->save();\n\n return $item;\n }",
"public function test_creating_command_from_container()\n {\n $now = new \\DateTime();\n $this->container->add('DateTime', $now);\n $command = 'Spekkionu\\DomainDispatcher\\Test\\Commands\\CommandWithConstructor';\n $result = $this->dispatcher->dispatch($command);\n $this->assertSame($now, $result);\n }",
"protected function createProcess(): Process\n {\n $command = [\n $this->settings['executable']\n ];\n\n $command[] = $this->from;\n $command[] = $this->to;\n\n // Set the margins if needed.\n if ($this->settings['marginsType'] !== self::MARGIN_TYPE_NO_MARGINS) {\n $command[] = '--marginsType=' . $this->settings['marginsType'];\n }\n\n // If we need to proxy with node we just need to prepend the $command with `node`.\n if ($this->settings['proxyWithNode']) {\n array_unshift($command, 'node');\n }\n\n // If there's no graphical environment we need to prepend the $command with `xvfb-run\n // --auto-servernum`.\n if (! $this->settings['graphicalEnvironment']) {\n array_unshift($command, '--auto-servernum');\n array_unshift($command, 'xvfb-run');\n }\n\n return new Process($command);\n }",
"private function registerCommand()\n {\n $this->app->singleton('command.shenma.push', function () {\n return new \\Larva\\Shenma\\Push\\Commands\\Push();\n });\n\n $this->app->singleton('command.shenma.push.retry', function () {\n return new \\Larva\\Shenma\\Push\\Commands\\PushRetry();\n });\n }",
"public function __construct(string $command, string $before = '', string $after = '')\n {\n $this->command = $command;\n $this->before = $before;\n $this->after = $after;\n }",
"public function generateCommand($singleCommandDefinition);",
"public function create() {\n }",
"public function create() {\n }",
"public function create() {\r\n }",
"public function create() {\n\n\t}",
"private function getImportCommand()\n {\n return new IndexImportCommand(self::getContainer());\n }",
"public function __construct($command)\n {\n $this->command = $command;\n\n $this->command->line('Installing Images: <info>✔</info>');\n }",
"public function __construct()\n {\n self::$instance =& $this;\n\n $commanddir = Config::main('directory');\n $excludes = Config::main('exclude');\n\n if(is_null($commanddir))\n die('Could not find commands directory. It should be specified in the main config.');\n\n //The directory where commands reside should be relative\n //to the directory with the clip executable.\n $dir = realpath(__DIR__.\"/{$commanddir}\");\n\n $cmdfiles = scandir($dir);\n //Loop through each file in the commands directory\n foreach($cmdfiles as $file)\n {\n //Assume that each file uses the standard '.php' file extension.\n $command = substr($file, 0, -4);\n\n //Ignore the unnecessary directories as commands and anything that\n //has been marked for exclusion then attempt to include the valid ones.\n if($file !== '.' && $file !== '..' && array_search($command, $excludes) === false && include(\"{$dir}/{$file}\"))\n {\n if(class_exists($command, false))\n {\n $obj = new $command;\n //Only load commands that use the clip command interface\n if($obj instanceof Command)\n $this->commands[strtolower($command)] = $obj;\n }\n }\n }\n }",
"public function __construct($action, $command = null) {\n parent::__construct($action, self::NAME);\n\n $fieldFactory = FieldFactory::getInstance();\n\n $commandField = $fieldFactory->createField(FieldFactory::TYPE_STRING, self::FIELD_COMMAND, $command);\n\n $this->addField($commandField);\n }",
"public function createCommand($db = null, $action = 'get')\n {\n if ($db === null) {\n $db = Yii::$app->get(Connection::getDriverName());\n }\n $this->addAction($action);\n $commandConfig = $db->getQueryBuilder()->build($this);\n\n return $db->createCommand($commandConfig);\n }",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();"
] | [
"0.8010746",
"0.7333379",
"0.72606754",
"0.7164165",
"0.716004",
"0.7137585",
"0.6748632",
"0.67234164",
"0.67178184",
"0.6697025",
"0.6677973",
"0.66454077",
"0.65622073",
"0.65437883",
"0.64838654",
"0.64696646",
"0.64292693",
"0.6382209",
"0.6378306",
"0.63773245",
"0.6315901",
"0.6248427",
"0.6241929",
"0.6194334",
"0.6081284",
"0.6075819",
"0.6069913",
"0.60685146",
"0.6055616",
"0.6027874",
"0.60132784",
"0.60118896",
"0.6011778",
"0.5969603",
"0.59618074",
"0.5954538",
"0.59404427",
"0.59388787",
"0.5929363",
"0.5910562",
"0.590651",
"0.589658",
"0.589658",
"0.589658",
"0.58692765",
"0.58665586",
"0.5866528",
"0.58663124",
"0.5852474",
"0.5852405",
"0.58442044",
"0.58391577",
"0.58154446",
"0.58055794",
"0.5795853",
"0.5780188",
"0.57653266",
"0.57640004",
"0.57584697",
"0.575748",
"0.5742612",
"0.5739361",
"0.5732979",
"0.572247",
"0.5701043",
"0.5686879",
"0.5685233",
"0.56819254",
"0.5675983",
"0.56670785",
"0.56606543",
"0.5659307",
"0.56567776",
"0.56534046",
"0.56343585",
"0.56290466",
"0.5626615",
"0.56255764",
"0.5608852",
"0.5608026",
"0.56063116",
"0.56026554",
"0.5599553",
"0.5599351",
"0.55640906",
"0.55640906",
"0.5561977",
"0.5559745",
"0.5555084",
"0.5551485",
"0.5544597",
"0.55397296",
"0.5529626",
"0.552908",
"0.552908",
"0.552908",
"0.552908",
"0.552908",
"0.552908",
"0.552908",
"0.552908"
] | 0.0 | -1 |
Execute the console command. | public function handle()
{
$crons = \App\Models\MailCron::where('send_date', '<=', Carbon::now())
->where('is_sent', false)
->get();
$this->line($crons->count().' MailCron ready.');
if($crons)
{
foreach ($crons as $cron)
{
$listes = MailHelper::mailFromLists(explode(',', $cron->lists), $cron->mail_template->isPublicity, $cron->mail_template, $cron->unique_send);
foreach ($listes as $mail=>$val)
{
$message = (new DefaultMail($val['user'], $cron->mail_template, $cron))->onQueue('low');
Mail::to($mail)
->queue($message);
}
$cron->is_sent = true;
$cron->lists_size = count($listes);
$cron->save();
}
}
$this->line('done.');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function handle()\n {\n\t\t$this->info('league fetching ..');\n $object = new XmlFeed();\n\t\t$object->fetchLeague($this->argument('sports_id'));\n\t\t$this->info('league saved');\n }",
"public function handle()\n {\n //get us the Converter class instance and call the convert() method on it.\n $this->info(\n \\Aregsar\\Converter\\ConverterFacade::convert($this->argument(\"currency\"))\n );\n }",
"public function handle()\n {\n $this->locale = $this->argument('locale');\n\n $this->loadGroupLines();\n\n $this->loadNameSpacedLines();\n\n $this->info('Complete');\n }",
"public function handle()\n {\n $this->importUser($this->argument('username'));\n $this->call('ldap:show-user', $this->arguments());\n }",
"public function handle() {\n $user = User::where('id', $this->argument('userId'))->first();\n $this->info($user->email);\n }",
"public function handle()\n {\n $translations = collect(json_decode(file_get_contents('https://raw.githubusercontent.com/getbible/Bibles/master/translations.json')))->flatten();\n switch($this->argument('action')) {\n case 'fetch':\n $this->fetchBibles($translations);\n break;\n case 'convert':\n $this->convertBibles($translations);\n break;\n }\n }",
"public function handle()\n {\n try {\n $evalstr = $this->evaluater->evaluate($this->argument('evalString'));\n $this->info($evalstr);\n } catch (ForbiddenSymbolsException $exception) {\n $this->error($exception->getMessage());\n } catch (IncorrectSymbolsException $exception) {\n $this->error($exception->getMessage());\n }\n }",
"public function handle()\n {\n\n $settings = Setting::fetch();\n $id = $this->argument('id');\n $this->scrape_game_data($id);\n }",
"public function handle()\n {\n // env('CALENDARINDEX_TOKEN', '6f2bd927201ba4b22bb57df08db0c517e51732de')\n $this->getData($this->argument('country'), $this->argument('region'));\n }",
"public function handle()\n {\n $email = $this->argument('email');\n $name = $this->argument('name');\n\n $this->info(\"starting to generate users details\");\n\n }",
"public function handle()\n {\n\t\t$this->info('Importing translations...');\n\n\t\t$this->manager->importTranslations(true);\n }",
"public function handle()\n {\n $user = null;\n\n if ($email = $this->option(\"email\", false)) {\n $user = $this->findByEmail($email);\n }\n\n if ($id = $this->option(\"id\", false)) {\n $user = $this->findById($id);\n }\n\n if (empty($user)) {\n $this->warn(\"User no found\");\n }\n else {\n $this->setRoleToUser($user);\n }\n }",
"public function handle()\n {\n $name = ucwords($this->argument('name'));\n $this->call('repository:contract', [ 'name' => $name ]);\n $this->call('repository:class', [ 'name' => $name, '--driver' => $this->option('driver') ]);\n }",
"public function handle()\n\t{\n\t\t// Superuser\n\t\tif( ! $this->option('no-superuser'))\n\t\t\t$this->call('setup:superuser');\n\n\t\t// Countries\n\t\tif( ! $this->option('no-countries'))\n\t\t\t$this->call('setup:countries', ['country' => array_filter(explode(',', $this->option('countries')))]);\n\n\t\t// Languages\n\t\tif( ! $this->option('no-languages'))\n\t\t\t$this->call('setup:languages', ['language' => array_filter(explode(',', $this->option('languages')))]);\n\n\t\t// Currencies\n\t\tif( ! $this->option('no-currencies'))\n\t\t\t$this->call('setup:currencies', ['currency' => array_filter(explode(',', $this->option('currencies')))]);\n\n\t\t// Clear cache\n\t\t$this->call('cache:clear');\n\t}",
"public function handle()\n\t{\n\t\t$name = $this->argument('name');\n\t\t\n\t\t$this->info(\"Searching eve api for {$name}\");\n\t\t$result = Corporation::searchEVEAPI($name);\n\n\t\t$this->info(\"results\");\n\t\tforeach($result as $corp)\n\t\t{\n\t\t\tprint $corp->name . \" \" . $corp->id . \"\\r\\n\";\n\t\t}\n\t}",
"public function handle()\n {\n $user = $this->argument('user');\n $this->info('Display this on the screen, user ' . $user);\n return 0;\n }",
"public function handle()\n {\n $this->userVectors->test($this->option('force'));\n }",
"public function handle()\n {\n $mapping = $this->formatMappingName((string)$this->argument('mapping'));\n \n $model = $this->option('model') ? $this->formatModelName($this->option('model')) : null;\n \n $this->filesystem->put(\n $this->buildMappingFilePath($mapping),\n $this->buildMapping(\n $this->getDefaultStub(),\n $mapping,\n $model\n )\n );\n \n $this->composer->dumpAutoloads();\n }",
"public function handle()\n {\n switch ($this->argument('type')) {\n case 'dns':\n $this->dnscheck->run($this->option('dry-run') ? true : false, $this->argument('domain'));\n break;\n case 'whois':\n $this->whoischeck->run($this->option('dry-run') ? true : false, $this->argument('domain'));\n break;\n }\n }",
"public function handle()\n {\n $option = $this->argument('option');\n\n if (! in_array($option, ['expired', 'all'])) {\n return $this->error('Invalid option supplied to command...');\n }\n\n $this->comment('Beginning pruning process...');\n\n $this->comment($this->pruneDatabase($option) . ' deleted from database...');\n\n $this->comment($this->pruneFiles($option) . ' deleted from files...');\n\n $this->info('Nonces pruned successfully!');\n }",
"public function handle()\n {\n $subscriptionUpdateService = new SubscriptionUpdateService();\n $subscriptionUpdateService->runUpdates();\n }",
"public function handle()\n\t{\n\t\t\n\t\t$source_directory = $this->argument( 'source_directory' );\n\t\t$target_directory = $this->argument( 'target_directory' );\n\t\t$template = (string) $this->option( 'template' );\n\n\t\t$statik = new \\App\\Statik\\Statik;\n\n\t\t$statik->generateHTMLFiles( $this, $source_directory, $target_directory, $template ) && $this->info( \"\\e[1;32mDONE!\" );\n\n\t}",
"public function handle()\n {\n if (!$this->argument('file')) {\n $this->info('Please specify file to call.');\n }\n\n $file = $this->argument('file');\n\n if (!$this->fileHandler->exists($file)) {\n $this->info('Wrong path or file not exist.');\n }\n\n $this->executeFile($file);\n }",
"public function handle()\n {\n $user = $this->argument('user');\n $this->scanner->setUserName($user);\n $this->scanner->scanUser();\n }",
"public function handle()\n {\n if ($this->argument('user')) {\n $userId = $this->argument('user');\n\n $this->info(\"Liquidate affiliate commission for user \" . $userId);\n\n $user = $this->userService->findById($userId);\n\n if ($user) {\n $this->walletService->liquidateUserBalance($user);\n } else {\n $this->error(\"User not found\");\n }\n\n $this->info(\"Done\");\n } else {\n $this->info(\"Liquidate all commissions\");\n\n $this->walletService->liquidateAllUsersBalance();\n\n $this->info(\"Done\");\n }\n }",
"public function handle()\n {\n $action = $this->choice('what action do you have on mind', [\n 'add-relation', 'remove-columns', 'column-type', 'rename-column'\n ]);\n switch ($action) {\n case 'add-relation':\n $this->addRelation();\n break;\n\n case 'remove-columns':\n $this->removeColumns();\n break;\n case 'column-type':\n $this->columnType();\n break;\n case 'rename-column':\n $this->renameColumn();\n break;\n default:\n $this->error('Unsupported action requested...');\n }\n $this->info('Command executed successfully');\n }",
"public function handle()\n {\n $arguments = $this->arguments();\n $storageDir = $arguments['storageDir'];\n $localStorageDir = $arguments['localStorageDir'];\n $url = $arguments['url'];\n $cmd = sprintf(\"./app/Console/Commands/ShellScripts/screen_shot.sh %s %s %s\", $storageDir, $localStorageDir, $url);\n\n while (true) {\n $result = shell_exec($cmd);\n print_r($result);\n sleep(3);\n }\n }",
"public function handle()\n {\n $city = $this->argument('city');\n\n $weatherService = new CurrentWeatherService();\n try {\n $weather = $weatherService->getByCity($city);\n } catch (WeatherException $e) {\n $this->error($e->getMessage());\n return;\n }\n\n $this->info('Weather for city '.$city);\n dump($weather->toArray());\n }",
"public function handle()\n {\n $this->getModels($this->argument('model'));\n $this->getLanguages($this->argument('locale'));\n $this->createMultiLanguageRecords();\n }",
"public function handle()\n {\n $this->processOptions();\n\n echo json_encode( $this->dateTimeRange ) . \"\\n\";\n\n $this->dispatch( new ProcessNewActionsJob(\n $this->dateTimeRange ,\n str_random( 16 ),\n $this->option('runtime-threshold')\n ) );\n }",
"public function handle()\n {\n $fightId = $this->argument('fight_id');\n $metricId = $this->argument('metric_id');\n //$strategyName = 'App\\\\'.$this->argument('metric_name');\n\n $metric = BossMetric::find($metricId);\n if ($metric === null) {\n $this->error(\"Error: no metric with id: $metricId found!\");\n return;\n }\n\n $fight = Fight::find($fightId);\n\n if ($fight === null) {\n $this->error(\"Error: no fight with id: $fightId found!\");\n return;\n }\n\n $strategy = $metric->getStrategy();\n $strategy->setFight($fight);\n $strategy->run();\n }",
"public function handle()\n {\n\t\t$this->call('vendor:publish');\n\t\t$this->call('migrate');\n\t\t$this->call('db:seed');\n\t\t$this->call('factotum:storage');\n\t\t$this->call('factotum:storage');\n }",
"public function handle()\n {\n $user_id = $this->argument('user') ?? null;\n\n if (is_null($user_id)) {\n $users = User::all();\n\n foreach ($users as $user) {\n $this->showUserBalance($user);\n }\n } else {\n $user = User::find($user_id);\n\n $this->showUserBalance($user);\n }\n }",
"public function handle()\n {\n $this->capsuleService->getAll();\n $this->line('Command Worked');\n }",
"public function handle()\n {\n $platform_wechat_id = $this->argument('id');\n $customer_id = $this->argument('customer_id');\n $this->info(\"Starting at \".date('Y-m-d H:i:s').\". Running initial for 【{$this->signature}】\");\n $this->getUserInfoList($platform_wechat_id,$customer_id);\n $this->info(\"End at \".date('Y-m-d H:i:s').\". over for 【{$this->signature}】\");\n }",
"public function handle()\n {\n $this->publishAssets();\n $this->call('twill:flush-manifest');\n $this->call('view:clear');\n }",
"public function handle()\n {\n \n $argument = $this->argument('data');\n \n $this->prepare( $argument );\n \n $this->make();\n \n $this->info( 'migration has been created : '. $this->fileName );\n \n }",
"public function handle()\n {\n chdir(resource_path('assets/ts'));\n $path = $this->argument(\"path\");\n if(isset($path))\n {\n Logger::info('execute '.$path);\n Command::executeRaw('tsc', [\"-p\", $path]);\n }else\n Logger::info('execute tsc');\n Command::executeRaw('tsc');\n }",
"public function handle()\n {\n $this->info('Starting date change command.');\n\n Word::where('language_id', 1)->update(array('created_at' => '1970-01-01 00:00:01'));\n Word::where('language_id', 2)->update(array('created_at' => '1970-01-01 00:00:01'));\n\n $this->info('Dates have been changed to 1970-01-01 00:00:01');\n }",
"public function handle()\n {\n $this->info($this->slugger->encode($this->argument('id')));\n }",
"public function handle()\n {\n $this->line(static::$logo);\n $this->line('Neat admin current version:' . Neat::version());\n\n $this->comment('');\n $this->comment('Available commands:');\n\n $this->listAvailableCommands();\n }",
"public function handle()\n {\n $this->revisions->updateListFiles();\n }",
"public function handle(): void\n {\n // Set argument\n $this->url = $this->argument(self::URL_ARGUMENT);\n\n // Handler takes care of computation\n (new CommandHandler($this))->compute();\n }",
"public function handle()\n {\n try\n {\n $filename = $this->argument('filename');\n Excel::import(new ObjectsImport, $filename);\n\n $this->info('Data import is now completed');\n }\n catch(Exception $ex)\n {\n $this->error($ex->getMessage());\n }\n }",
"public function handle() {\n $entity = $this->validateEntity($this->argument('entity'));\n $job = new DataProcessingJob($entity, str_random(16));\n $this->dispatch($job);\n }",
"public function handle()\n {\n $isProductionMode = 'prod' == $this->argument('mode');\n\n if ($isProductionMode) {\n if (!$this->confirm('Are you sure to run in production mode? Running this command may cause critical issues?')) {\n exit(1);\n }\n }\n\n $this->_recalculate($isProductionMode);\n }",
"public function handle()\n {\n if(!$this->verify()) {\n $rank = $this->createRankSuperAdmin();\n $user = $this->createUserSuperAdmin();\n $user->Ranks()->attach($rank);\n $this->line('Felicitaciones');\n } else {\n $this->error('No se puede ejecutar');\n }\n }",
"public function handle()\n {\n // Get CLI Input\n $user_id = $this->option(\"uid\");\n\n // User Products\n ( new CommandManager() )->showUserProducts( $user_id );\n }",
"public function handle()\n {\n $force = $this->option('force');\n\n if($this->option('without-bulk')){\n $this->withoutBulk = true;\n }\n\n if ($this->generateClass($force)){\n $this->info('Generating permissions for '.$this->modelBaseName.' finished');\n }\n }",
"public function handle()\n {\n $tournaments = Tournament::all()->toArray();\n foreach ($tournaments as $tournament) {\n $slug = $this->tournamentRepoObj->generateSlug($tournament['name'].Carbon::createFromFormat('d/m/Y', $tournament['start_date'])->year,'');\n DB::table('tournaments')\n ->where('id', $tournament['id'])\n ->update([\n 'slug' => $slug\n ]);\n }\n $this->info('Script executed.');\n }",
"public function handle()\n {\n $userId = $this->argument('user');\n\n /** @var User $user */\n $user = User::findOrFail($userId);\n\n // Get token.\n $info = (new Client())->auth();\n\n // Save to db.\n $user->access_token = $info['access_token'];\n $user->access_secret = $info['access_secret'];\n $user->save();\n\n $this->line(\"Saved access token and secret for user: {$user->email}\");\n }",
"public function handle()\n {\n $m = new MemberFromText;\n $m->train();\n $id = $m->predict($this->argument('text'));\n dump(Miembro::find($id)->toArray());\n }",
"public function handle()\n {\n $this->generator\n ->setConsole($this)\n ->run();\n }",
"public function handle()\n {\n $this->createController();\n $this->createServiceDir();\n\n exit;\n $args = [\n '--provider' => TestProvider::class\n ];\n $className = $this->argument('className');\n if (!$className) {\n $className = 'MethodsList';\n }\n $className = ucwords($className);\n $this->call('vendor:publish', $args);\n $this->info('Display this on the screen ' . $className);\n }",
"public function handle()\n {\n $this->createDirectories();\n\n $this->publishTests();\n\n $this->info('Authentication tests generated successfully.');\n }",
"public function handle()\n {\n $this->setDbConnection(\n $this->input->getOption('database') ?: config('ghost-database.default_connection')\n );\n\n $native = $this->input->getOption('native-import') ?: config('ghost-database.use_native_importer');\n\n $snapshot = $this->import($native);\n\n $this->info(\"Snapshot `{$snapshot->name}` loaded!\");\n }",
"public function handle()\n {\n $exec = $this->argument('exec');\n\n switch ($exec) {\n case 'download' :\n $this->download();\n break;\n\n case 'generate' :\n $this->generate();\n break;\n\n default :\n echo \"Choose 'download' or 'generate' for this command\";\n break;\n }\n }",
"public function handle()\n {\n $this->call('ziggy:generate', ['path' => './resources/js/ziggy-admin.js', '--group' => 'admin']);\n $this->call('ziggy:generate', ['path' => './resources/js/ziggy-frontend.js', '--group' => 'frontend']);\n $this->call(TranslationsGenerateCommand::class);\n }",
"public function handle()\n {\n $tenantName = $this->argument('tenant');\n\n $tenant = Tenant::where('name', $tenantName)->orWhere('subdomain', $tenantName)->first();\n\n if ($tenant) {\n $tenant->setActive();\n \\Artisan::call('tinker');\n } else {\n $this->error('Error: Tenant not found');\n }\n }",
"public function handle()\n {\n try {\n if (!empty($userId = $this->argument('user'))) {\n $user = User::find($userId);\n } else {\n $user = User::inRandomOrder()->first();\n }\n\n if (empty($user)) {\n throw new \\Exception('User not found');\n }\n\n echo JWTAuth::fromUser($user);\n } catch (\\Exception $e) {\n echo $e->getMessage();\n }\n\n }",
"public function handle()\n {\n $this->fetchAndSetToken();\n $imagesToDownload = $this->peekImages(WatchedApp::pluck('package_name'));\n $this->fetchImages($imagesToDownload);\n\n if ($this->option('dont-optimize')) {\n return;\n }\n\n $this->runOptimizeCommand();\n }",
"public function handle()\n {\n $this->setCryptIVFromUrl($this->argument('url'));\n\n $participant = URLParser::parseByName('santa.index', $this->argument('url'))->participant;\n if($participant) {\n $draw = $participant->draw;\n } else {\n $draw = URLParser::parseByName('organizer.index', $this->argument('url'))->draw;\n }\n\n $this->table(\n ['ID', 'Name', 'Email'],\n $draw->participants()->get(['id', 'name', 'email'])->toArray()\n );\n }",
"public function handle()\n {\n // if you are on the local environment\n if (!(app()->isLocal() || app()->runningUnitTests())) {\n $this->error('This command is only available on the local environment.');\n return;\n }\n\n $fqdn = $this->argument('fqdn');\n if ($tenant = Tenant::retrieveBy($fqdn)){\n $tenant->delete($fqdn);\n $this->info(\"Tenant {$fqdn} successfully deleted.\");\n }else {\n $this->error('This fqdn doesn\\'t exist.');\n }\n\n }",
"public function handle()\n {\n $user_from = $this->option('from');\n $user_to = $this->option('to');\n $sum = $this->option('sum');\n\n CreateTransaction::dispatch($this->usersRepository->getByID($user_from), $this->usersRepository->getByID($user_to), $sum, true);\n $this->transactionsRepository->getAll()->each(function ($transaction){\n \tExecuteTransaction::dispatch($transaction);\n });\n }",
"public function handle()\n {\n $this->warn('Starting Retrieve Data');\n\n PeopleService::retrieveData();\n\n $this->info('Retrieve Data Completed');\n }",
"public function handle()\n {\n \n $period = $this->option('period');\n \n switch ($period) {\n\n case 'half_month':\n $this->info('Grabing Half Month Income...');\n $this->halfMonth();\n break;\n\n case 'monthly':\n $this->info('Grabing Monthly Income...');\n $this->monthly();\n break;\n \n default:\n $this->info('Grabing Daily Income...');\n $this->daily();\n break;\n\n }\n\n \n }",
"public function handle()\n {\n $countryFiles = $this->getFiles();\n\n foreach ($countryFiles as $fileName) {\n $this->seed($fileName);\n }\n\n $this->info('End.');\n }",
"public function fire()\n {\n $entityName = $this->argument('entityName');\n $startEntityId = $this->argument('startEntityId');\n $endEntityId = $this->argument('endEntityId');\n $depth = $this->argument('depth');\n\n $this->fixturePath = $this->option('outputPath');\n\n $this->info(\"Generating fixtures for $entityName in {$this->fixturePath}...\");\n \n $this->generateFixtures($entityName, $startEntityId, $endEntityId, $depth);\n }",
"public function handle()\n {\n $check = PublishTraitsService::publishTraits();\n\n if ($check)\n {\n $this->info('All files have been published');\n }\n\n $this->info('Failed to publish');\n }",
"public function handle()\n {\n $user = User::where('username', $this->argument('user'))\n ->orWhere('email', $this->argument('user'))\n ->first();\n\n if ($user != null) {\n $user->assign('admin');\n $this->line(\"{$user->email} was successfully made an admin.\");\n } else {\n $this->line(\"No user found where username or email is '{$this->argument('user')}'\");\n }\n }",
"public function handle()\n {\n event( 'laraview:compile' );\n $this->checkForSelectedViewGeneration();\n\n app( RegisterBlueprint::class )\n ->console( $this )\n ->generate();\n }",
"public function handle()\n {\n $project = Project::with(['team.admins', 'team.members'])->findOrFail($this->option('project-id'));\n $user = User::findOrFail($this->option('user-id'));\n if ($this->option('admin')) {\n $project->team->admins()->syncWithoutDetaching($user);\n } else {\n $project->team->members()->syncWithoutDetaching($user);\n }\n return Command::SUCCESS;\n }",
"public function handle() {\n try {\n $this->roomService->loadRoomOccupations();\n Log::notice('untis:occupations executed successfully.');\n $this->line('Loaded room occupations from WebUntis.');\n } catch (Exception $e) {\n Log::error('Error loading room occupations.', ['exception' => $e]);\n $this->error('Error loading room occupations: ' . $e->getMessage());\n }\n }",
"public function handle()\n {\n $this->loadIxList();\n $this->loadIxMembersList();\n $this->updateIxInfo();\n $this->updateIxMembersInfo();\n }",
"public function handle()\n {\n $this->call('vendor:publish', [\n '--provider' => \"Qoraiche\\MailEclipse\\MailEclipseServiceProvider\",\n ]);\n }",
"public function handle()\n\t{\n\t\tif ($this->option('dev')) {\n\t\t\tsystem('php '.base_path('.deploy/deploy-dev.php'));\n\t\t} else {\n\t\t\tsystem('php '.base_path('.deploy/deploy.php'));\n\t\t}\n\t}",
"public function handle(Command $command);",
"public function handle(Command $command);",
"public function handle()\n {\n $date_from = $this->argument('date_from');\n\t\t$date_to = $this->argument('date_to');\n\t\tif(!$date_from) {\n\t\t\t$date_from = Carbon::today()->subDays(5);\n\t\t}\n\t\tif(!$date_to) {\n\t\t\t$date_to = Carbon::yesterday();\n\t\t}\n\t\tStats::computeMembers($this->argument('venue_id'), $date_from, $date_to);\n }",
"public function handle()\n {\n switch ($this->argument('type')){\n case 'fih':\n $scrapper = new Scrappers\\FederationScrapper();\n $scrapper->get($this->option('level'));\n print $scrapper->message();\n break;\n }\n }",
"public function handle()\n {\n Log::info(\"seed:dash Command is working fine!\");\n $this->info('Dashboard Database seeding completed successfully.');\n }",
"public function handle()\n {\n $originalId = $this->argument('original_id');\n\n $status = true;\n if ($this->option('status') === 'false') {\n $status = false;\n }\n\n if ($video = Video::where('original_id', $originalId)->first()) {\n $video->dmca_claim = $status;\n $video->save();\n\n $this->info('Video\\'s dmca_claim set to: ' . json_encode($status));\n return ;\n }\n\n $this->error('No video found with original_id of: ' . $originalId);\n return;\n }",
"public function handle()\n {\n $this->call('config:clear');\n\n $this->call('config:update');\n\n $this->info('Configuration cached successfully!');\n }",
"public function handle()\n {\n //\n $modelName = $this->argument('model');\n $column = $this->argument('column');\n $this->generateMutation($modelName, $column);\n\n }",
"public function handle()\n {\n $filePath = 'public/' . $this->argument('fileName');\n $count = $this->argument('count');\n \n $fileData = array_slice(file($filePath), 0, $count);\n $this->info(implode('', $fileData));\n }",
"public function handle()\n {\n $email = $this->argument('email');\n\n Mail::to($email)->send(new SendMailable('Test Mail'));\n\n if (Mail::failures()) {\n $this->info('Email failed to send');\n } else {\n $this->info('Email successfully sent');\n }\n }",
"public function handle()\n {\n $this->call('route:trans:clear');\n\n $this->cacheRoutesPerLocale();\n\n $this->info('Routes cached successfully for all locales!');\n }",
"public function handle()\n {\n $this->info('Welcome to command for Bantenprov\\WilayahIndonesia package');\n }",
"public function handle()\n {\n if($this->hasOption('no_dump') && $this->option('no_dump')){\n $this->composer_dump = false;\n }\n $this->readyDatas();\n $this->datas['startSymbol']='{{';\n $this->datas['endSymbol']='}}';\n $this->create();\n }",
"public function handle()\n {\n $repository = new OglasiCrawlerRepository();\n $ads = $repository->getAds();\n $repository->saveAds($ads);\n\n echo 'Ads were successfully retrieved' . PHP_EOL;\n }",
"public function handle()\n {\n $this->makeDir($this->basePath . $this->kebabPlural());\n\n $this->exportViews();\n\n $this->info('Resource views generated successfully.');\n }",
"public function handle()\n {\n $movies = \\App\\Models\\Movie::whereNull('meta')->take(40)->orderBy('id')->get();\n $movies->each(function($movie){ sleep(1); $movie->getMeta(); });\n return Command::SUCCESS;\n }",
"public function handle()\n {\n $this->packageGenerator->setConsole($this)\n ->setPackage($this->argument('package'))\n ->setType('shipping')\n ->setForce($this->option('force'))\n ->generate();\n }",
"public function handle()\n {\n $test = $this->argument('test');\n\n $dir = config('speed-test.dir');\n\n $className = ucfirst(\\Str::camel($test));\n\n $namespace = config('speed-test.namespace');\n\n $class = class_entity($className)\n ->namespace($namespace);\n\n $class->method('speed1')\n ->line($this->option('line'))->doc(function ($doc) use ($className) {\n /** @var DocumentorEntity $doc */\n $doc->tagCustom('times', $this->option('times'));\n $doc->description($this->option('description') ?: \"{$className} Speed 1\");\n });\n\n if (! is_dir($dir)) {\n mkdir($dir, 0777, 1);\n }\n\n file_put_contents(\n $dir.'/'.$className.'.php',\n $class->wrap('php')\n );\n\n $this->info('Speed created!');\n\n return 0;\n }",
"public function handle()\n {\n $message = $this->GenerateRandomUser($this->argument('count'));\n $this->info($message);\n }",
"public function handle()\n {\n $host = Cache::get('executingHost', null);\n $this->info(\"Host: ${host}\");\n\n if ($host === null) {\n $this->info('実行するホストが選択されていません');\n return;\n }\n\n if (Schema::hasTable('companies') && Company::count() !== 0) {\n $this->info('マイグレーションが既に1回以上実行されています');\n return;\n }\n\n $should_execute = $host === $this->argument('executingHost');\n\n if ($should_execute) {\n Artisan::call('migrate:fresh', ['--seed' => true]);\n $this->info('マイグレーションが完了しました');\n\n Cache::forget('executingHost');\n } else {\n $this->info('別ホストにてマイグレーションが行われます');\n }\n }",
"public function handle()\n {\n // Configuration...\n $this->callSilent('vendor:publish', ['--tag' => 'model-login-config']);\n\n // Migrations\n $this->callSilent('vendor:publish', ['--tag' => 'model-login-migrations']);\n\n $this->info('Model Login resources published.');\n }",
"public function handle()\n {\n if ($this->validation()) {\n $money = $this->argument('money');\n Cache::increment('amount', $money);\n }\n }",
"public function handle()\n {\n $this->info('Publishing stuff..');\n\n $this->publishFiles();\n\n $this->info('Setup complete. Enjoy!');\n }",
"public function handle()\n {\n $this->publishConfig();\n $this->publishClassStub();\n $this->generateAndStoreKey();\n\n $this->info('Use the details below for your \"Lead delivery options\" in Google Ads.');\n $this->info('Webhook URL: ' . route('GoogleAdsLeadExtensionController@index'));\n $this->info('Key: ' . $this->generated_key);\n }",
"public function handle()\n {\n $opts = $this->options();\n $args = $this->arguments();\n #print_r($opts);\n #print_r($args);\n\n # Redundant as argument validation handled by Laravel\n #\n if (!isset($args['destination'])) {\n printf(\"Usage: php artisan %s\\n\", $this->signature);\n exit(1);\n }\n\n # Default to normal message type\n #\n if (!isset($opts['type'])) {\n $opts['type'] = 'normal';\n }\n\n $uac = new UserApiController();\n\n if ($opts['type'] == 'normal') {\n if (!isset($opts['message'])) {\n printf(\"Usage: php artisan %s\\n\\n\", $this->signature);\n printf(\"ERROR: Message must be specified for type 'normal'\\n\");\n exit(1);\n }\n $result = $uac->sendSms(\n $args['destination'],\n $opts['message'],\n $opts['route']\n );\n }\n else if ($opts['type'] == 'otp') {\n $result = $uac->sendVerificationSms(\n $args['destination'],\n '<code>',\n '<name>',\n $opts['route'],\n '<appName>'\n );\n }\n\n if ($result === true) {\n printf(\"INFO: SMS message to %s sent successfully (%s)\\n\",\n $args['destination'], $opts['type']);\n }\n else {\n printf(\"INFO: SMS message to %s failed to send (%s)\\n\", \n $args['destination'], $opts['type']);\n printf(\"ERROR: %s\\n\", $result);\n }\n\n return;\n }"
] | [
"0.6469962",
"0.6463639",
"0.64271367",
"0.635053",
"0.63190264",
"0.62747604",
"0.6261977",
"0.6261908",
"0.6235821",
"0.62248456",
"0.62217945",
"0.6214421",
"0.6193356",
"0.61916095",
"0.6183878",
"0.6177804",
"0.61763877",
"0.6172579",
"0.61497146",
"0.6148907",
"0.61484164",
"0.6146793",
"0.6139144",
"0.61347336",
"0.6131662",
"0.61164206",
"0.61144686",
"0.61109483",
"0.61082935",
"0.6105106",
"0.6103338",
"0.6102162",
"0.61020017",
"0.60962653",
"0.6095482",
"0.6091584",
"0.60885274",
"0.6083864",
"0.6082142",
"0.6077832",
"0.60766655",
"0.607472",
"0.60739267",
"0.607275",
"0.60699606",
"0.6069931",
"0.6068753",
"0.6067665",
"0.6061175",
"0.60599935",
"0.6059836",
"0.605693",
"0.60499364",
"0.60418284",
"0.6039709",
"0.6031963",
"0.6031549",
"0.6027515",
"0.60255647",
"0.60208166",
"0.6018581",
"0.60179937",
"0.6014668",
"0.60145515",
"0.60141796",
"0.6011772",
"0.6008498",
"0.6007883",
"0.60072047",
"0.6006732",
"0.60039204",
"0.6001778",
"0.6000803",
"0.59996396",
"0.5999325",
"0.5992452",
"0.5987503",
"0.5987503",
"0.5987477",
"0.5986996",
"0.59853584",
"0.5983282",
"0.59804505",
"0.5976757",
"0.5976542",
"0.5973796",
"0.5969228",
"0.5968169",
"0.59655035",
"0.59642595",
"0.59635514",
"0.59619296",
"0.5960217",
"0.5955025",
"0.5954439",
"0.59528315",
"0.59513766",
"0.5947869",
"0.59456027",
"0.5945575",
"0.5945031"
] | 0.0 | -1 |
check for input type | function SetCharSet($vCharSet) {
if (is_array($vCharSet)) {
$this->aCharSet = $vCharSet;
} else {
if ($vCharSet != '') {
// split items on commas
$aCharSet = explode(',', $vCharSet);
// initialise array
$this->aCharSet = array();
// loop through items
foreach ($aCharSet as $sCurrentItem) {
// a range should have 3 characters, otherwise is normal character
if (strlen($sCurrentItem) == 3) {
// split on range character
$aRange = explode('-', $sCurrentItem);
// check for valid range
if (count($aRange) == 2 && $aRange[0] < $aRange[1]) {
// create array of characters from range
$aRange = range($aRange[0], $aRange[1]);
// add to charset array
$this->aCharSet = array_merge($this->aCharSet, $aRange);
}
} else {
$this->aCharSet[] = $sCurrentItem;
}
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function check_type()\n {\n $regex = \"/^int$|^bool$|^string$/\";\n\n $result = preg_match($regex, $this->token);\n\n if($result == 0 or $result == FALSE)\n {\n fwrite(STDERR, \"Error, expecting <type> function parameter! Line: \");\n fwrite(STDERR, $this->lineCount);\n fwrite(STDERR, \"\\n\");\n exit(23);\n } \n }",
"function isType($input) {\n\treturn ((strcmp($input, 'dynamic') == 0) || (strcmp($input, 'static') == 0));\n}",
"function validate_input($input_data, $input_type) {\n $output_data = trim($input_data);\n $output_data = stripslashes($output_data);\n $output_data = htmlspecialchars($output_data);\n if($input_type == 'text') {\n // not sure what to do here; \n }\n if($input_type == 'number') {\n if(!is_numeric($output_data)) {\n return false;\n }\n }\n return $output_data;\n}",
"function __checkType($type = null) {\n\t\t$valid = false;\n \tforeach($this->allowedTypes as $allowedType) {\n \t\tif(strtolower($type) == strtolower($allowedType)){\n \t\t$valid = true;\n \t\t}\n \t}\n\t\tif(!$valid) {\n\t\t\t$this->Session->setFlash('You tried to upload an invalid type! Please upload your pictures in jpeg, gif, or png format!');\n\t\t\t$this->redirect(Controller::referer('/'));\n\t\t}\n\t}",
"function is($type);",
"protected function checkType(&$inMessage = '') {\n\t\t$isValid = true;\n\t\tif ( !is_string($this->_Type) && $this->_Type !== '' ) {\n\t\t\t$inMessage .= \"{$this->_Type} is not a valid value for Type\";\n\t\t\t$isValid = false;\n\t\t}\t\t\n\t\tif ( $isValid && $this->_Type != '' && !in_array($this->_Type, array(self::TYPE_SOURCE, self::TYPE_THUMBNAIL, self::TYPE_FILE, self::TYPE_CCA)) ) {\n\t\t\t$inMessage .= \"Type must be one of TYPE_SOURCE, TYPE_THUMBNAIL, TYPE_FILE\";\n\t\t\t$isValid = false;\n\t\t}\t\t\n\t\treturn $isValid;\n\t}",
"function is_valid_type($type){\n\t\treturn in_array($type, $this->valid_types);\n\t}",
"private function _isValidType($type) {\n return in_array($type, array('select', 'checkboxes', 'checkbox', 'radios',\n 'radio', 'textfield', 'textarea', 'file', 'submit', 'reset',\n 'hidden', 'fieldset', 'markup', 'button', 'password'));\n }",
"function isTextType($type)\n{\n return($type == \"string\" or $type == \"varchar\" or $type == \"tinytext\" or $type == \"password\" or\n $type == \"set\" or $type == \"enum\" or $type == \"char\" or $type == \"file\" or isTextAreaType($type));\n}",
"function check( $value, $type='text' )\n {\n return Pgg_Validate::is( $value, $type );\n }",
"abstract protected function getValidType(): string;",
"public function checkType() {\n\t\t//Because the DB gave us a string for the card type, we must\n\t\t//ensure that they are strings and compare accordingly.\n\t\tif (strcmp($this->getTypeAsStr(), \"aspect\")==0) {\n\t\t\t$this->boostInfo = 0;\n\t\t\t$this->magnitude = 0;\n\t\t}\n\t}",
"private function validate($value,$type) {\n\t\tswitch($type) {\n\t\t\tcase \"varchar\":\n\t\t\t\treturn self::is_alphanum($value);\n\t\t\t\tbreak;\n\t\t\tcase \"int\":\n\t\t\t\treturn self::is_num($value);\n\t\t\t\tbreak;\n\t\t\tcase \"binary\":\n\t\t\t\treturn self::is_binary($value);\n\t\t\t\tbreak;\n\t\t\tcase \"alpha\":\n\t\t\t\treturn self::is_alpha($value);\n\t\t\t\tbreak;\n\t\t\tcase \"signed\":\n\t\t\t\treturn self::is_signed($value);\n\t\t\t\tbreak;\n\t\t\tcase \"file\":\n\t\t\t\treturn true;\n\t\t\t\tbreak;\n\t\t\tcase \"alpha\":\n\t\t\t\treturn self::is_alpha($value);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t\t\tbreak;\n\t\t}\n\t}",
"function getType($input)\r\n {\r\n if (is_numeric(str_replace(\" \", \"\", trim($input)))) {\r\n return \"number\";\r\n } elseif (strpos($input, \"+\") !== false) {\r\n return \"number\";\r\n } elseif (is_string($input) && !empty($input)) {\r\n return \"name\";\r\n } elseif ($input == '') {\r\n return \"empty\";\r\n }\r\n }",
"protected function validateType($type) {\n switch (strtolower($type)) {\n case 'string':\n return 'string';\n break;\n\n case 'url':\n return 'url';\n break;\n\n case 'file':\n return 'file';\n break;\n\n default:\n return FALSE;\n break;\n }\n }",
"public function validateType()\n {\n $validTalkTypes = $this->getOption('types');\n\n if (empty($this->_cleanData['type']) || !isset($this->_cleanData['type'])) {\n $this->_addErrorMessage(\"You must choose what type of talk you are submitting\");\n\n return false;\n }\n\n if (!isset($validTalkTypes[$this->_cleanData['type']])) {\n $this->_addErrorMessage(\"You did not choose a valid talk type\");\n\n return false;\n }\n\n return true;\n }",
"private function isValidType($type){\n $lowercased = strtolower($type);\n //check if something is in array\n return in_array($lowercased, $this->allowedTypes);\n }",
"function validateInput($type, &$error, $options_arr) {\n if (!filter_var($_POST[$type], FILTER_VALIDATE_INT, $options_arr)) {\n $error = \"* Invalid ${type}\";\n return false;\n } else {\n return true;\n }\n }",
"function validate ($type, $value)\n {\n \n if($type == \"link\") {\n return filter_var($value, FILTER_VALIDATE_URL);\n }\n if($type == \"picture\") {\n $ext = substr($value, strlen($value) - 4, 4);\n if($ext != \".png\" && $ext != \".jpg\" && $ext != \".gif\") return false;\n else return true;\n }\n if($type == \"int\") {\n return is_numeric($value);\n }\n if($type == \"string\") {\n return true;\n }\n if($type == \"date\") {\n if($value instanceof DateTime) return true;\n else return false;\n }\n }",
"public function vehicle_type_check(){\n\t\t\t\n\t\t\t$str1 = $this->input->post('vehicle_type');\n\t\t\t\n\t\t\tif ($str1 == '' || $str1 == '0')\n\t\t\t{\n\t\t\t\t$this->form_validation->set_message('vehicle_type_check', 'Please select a vehicle type');\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}",
"function checkType ($value, $type) {\n\tswitch ($type) {\n\t\tcase STRING : $r = is_string ($value); break;\n\t\tcase BOOL : $r = is_bool ($value); break;\n\t\tcase NUMERIC : $r = is_int ($value); break;\n\t\tcase REAL : $r = (is_real ($value) or is_int ($value)); break;\n\t\tdefault : return new Error ('TYPE_NOT_RECOGNIZED'); \n\t}\n\t\n\tif ($r === true) {\n\t\treturn true;\n\t} else {\n\t\treturn new Error ('TYPE_MISMATCH_VALUE', $type, $value);\n\t}\n}",
"public function isType($type){\n \n // canary...\n if(!$this->hasType()){ return false; }//if\n \n return ($this->field_map['type'] === $type);\n \n }",
"function isNumericType($type)\n{\n return(eregi('int',$type) or $type==\"real\" or $type==\"float\" or $type==\"double\" or $type==\"decimal\");\n}",
"protected function validateType($value)\n {\n }",
"function accept($data,$type=NULL){\n if(is_object($data) and get_class($data)===get_class($this)) return TRUE;\n if(is_null($type)) $type = $this->get_type($data,FALSE,FALSE);\n else if(is_int($type)) $type = def(self::$types,$type,'null');\n $acc = def($this->accept,$type,0);\n if($acc<2) return $acc==1;\n $mth = 'check_' . $type;\n return $this->$mth($data);\n }",
"private function _valid_data_type($type=NULL){\n\t\tif(!empty($type)){\n\t\t\tif ($type == Minematic_Connector_Model_Config::DATA_TYPE_ALL ||\n\t\t\t\t$type == Minematic_Connector_Model_Config::DATA_TYPE_ITEMS || \n\t\t\t\t$type == Minematic_Connector_Model_Config::DATA_TYPE_USERS || \n\t\t\t\t$type == Minematic_Connector_Model_Config::DATA_TYPE_EVENTS){\n\t\t\t\t\n\t\t\t\treturn TRUE;\n\t\t\t} else {\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn TRUE;\n\t}",
"public function type($type);",
"public function accepts( $type );",
"private function defineInputType()\n {\n\n $input = '';\n\n switch ($this->type) {\n case 'integer':\n $input = 'number';\n break;\n case 'datetime':\n $input = 'datetime';\n break;\n case 'date':\n $input = 'date';\n break;\n case 'text':\n $input = 'textarea';\n break;\n case 'float':\n $input = 'decimal';\n break;\n case 'decimal':\n $input = 'decimal';\n break;\n case 'string':\n $input = 'text';\n break;\n case 'combo':\n $input = 'select';\n break;\n case 'hidden':\n $input = 'hidden';\n $this->notnull = false;\n break;\n case 'checkbox':\n $input = 'checkbox';\n break;\n\n }\n\n $this->input = $input;\n }",
"public function typeIsValid()\n {\n if (!$this->scan_attributes) {\n return false;\n }\n\n return !is_null($this->scan_attributes->template_type);\n }",
"function is_field_type($name)\n {\n }",
"public function supports($type);",
"function isDateType($type)\n{\n return($type == \"date\" or $type == \"year\" or isTimeType($type));\n}",
"function checkType($type){\n\n $allowed = array('jpg', 'jpeg', 'png');\n $fileExt = explode('/', $type);\n $fileExt = strtolower(end($fileExt));\n return in_array($fileExt, $allowed) ? true : false ;\n\n }",
"public function check()\n {\n return ctype_digit($this->value);\n }",
"function cleanInput($infoUser, $type)\r\n {\r\n switch($type)\r\n {\r\n case 0:\r\n $error = filter_var($infoUser, FILTER_SANITIZE_FULL_SPECIAL_CHARS);\r\n $error = filter_var($error, FILTER_DEFAULT);\r\n break;\r\n\r\n case 1:\r\n $error = filter_var($infoUser, FILTER_SANITIZE_EMAIL);\r\n $error = filter_var($error, FILTER_VALIDATE_EMAIL);\r\n break;\r\n\r\n case 2:\r\n\r\n\r\n //$error = filter_var($infoUser, FILTER_SANITIZE_NUMBER_INT);\r\n if (filter_var($infoUser, FILTER_VALIDATE_INT) === 0 || !filter_var($infoUser, FILTER_VALIDATE_INT) === false) {\r\n $error = filter_var($infoUser, FILTER_VALIDATE_INT);\r\n } else {\r\n echo(\"Integer is not valid\");\r\n }\r\n break;\r\n\r\n case 3:\r\n $error = filter_var($infoUser, FILTER_SANITIZE_FULL_SPECIAL_CHARS);\r\n $error = filter_var($error, FILTER_DEFAULT);\r\n break;\r\n\r\n\r\n }\r\n return $error;\r\n\r\n }",
"public static function validate_type($type) { \n\n\t\tswitch($type) { \n\t\t\tcase 'rpc':\n\t\t\tcase 'interface':\n\t\t\tcase 'network':\n\t\t\t\treturn $type;\n\t\t\tbreak;\n\t\t\tcase 'xml-rpc':\n\t\t\t\treturn 'rpc';\n\t\t\tbreak; \n\t\t\tdefault: \n\t\t\t\treturn 'stream';\n\t\t\tbreak;\n\t\t} // end switch\n\n\t}",
"private static function checkIfTypeDefinedByNumberIsProper(int $inputDataType) : bool {\n // if passed int is in array of available types return true\n return in_array(\n $inputDataType,\n array_values(Data::INPUT_DATA_TYPES_ALIASES)\n );\n }",
"private static function isType($arg, $type) {\n\t\tswitch ($type) {\n\t\t\tcase self::TYPE_INTEGER: return is_int($arg);\n\t\t\tcase self::TYPE_BOOLEAN: return is_bool($arg);\n\t\t\tcase self::TYPE_FLOAT: return is_float($arg);\n\t\t\tcase self::TYPE_STRING: return is_string($arg);\n\t\t\tdefault:\n\t\t\t\tif (is_object($arg) && get_class($arg) === $type) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t}\n\t\tthrow new \\Scrivo\\SystemException(\"No such argument type\");\n\t}",
"public function validDataTypes();",
"public function validType($key, $type, &$data) {\n\n\n if(!is_bool($data) && !is_array($data) && is_string($data) && !strlen($data)) return false;\n\n // database conversion types\n $type = preg_replace('/\\(.*/','',$type);\n\n switch (strtolower($type)) {\n case \"varbinary\": case \"varchar\": case \"char\": case \"string\": return is_string($data);\n case \"text\": case \"txt\": return is_string($data);\n case \"integer\": if(strval(intval($data))===strval($data)) $data=intval($data);return is_integer($data);\n case \"decimal\": case \"float\": if(floatval($data)!=0 || $data===\"0\" || $data === 0) $data=floatval($data);return is_float($data);\n case \"bit\": if(strval(intval($data))===strval($data)) $data=intval($data);return ($data==0 || $data==1);\n case \"model\": return is_array($data) && !empty($data);\n case \"json\": if(is_array($data)) $data = json_encode($data);return is_string($data) && is_array(json_decode($data,true));\n case \"name\": return $this->validateName($key,$data);\n case \"ip\": return filter_var($data,FILTER_VALIDATE_IP);\n case \"url\": return filter_var($data,FILTER_VALIDATE_URL);\n case \"email\": return is_string($data) && $this->validateEmail($key,\"email\",$data);\n case \"emails\": return is_array($data) && $this->validateEmail($key,\"email\",$data);\n case \"phone\": return is_string($data);\n case \"zip\": return is_string($data);\n case \"keyname\": return is_string($data);\n case \"key\": return is_string($data);\n case \"date\": return $this->validateDate($data);\n case \"datetime\": return $this->validateDateTime($data);\n case \"datetimeiso\": return $this->validateDateTimeISO($data);\n case \"currency\": return is_numeric($data);\n case \"boolean\": if(!is_bool($data) && ($data=='true' || $data=='false')) $data = ($data == 'true');return is_bool($data);\n case \"array\": return is_array($data);\n case \"list\": return is_array($data);\n case \"array_to_string\": if(is_array($data)) $data=implode(\",\",$data);return is_string($data);\n default: return false;\n }\n }",
"private function checkType(&$type): void\n {\n if ( ! is_string($type)) {\n throw new InvalidTwitterCardException(\n 'The Twitter card type must be a string value, [' . gettype($type) . '] was given.'\n );\n }\n\n $type = strtolower(trim($type));\n\n if ( ! in_array($type, $this->types())) {\n throw new InvalidTwitterCardException(\"The Twitter card type [$type] is not supported.\");\n }\n }",
"public static function isApplicable($input);",
"function validateTypeOfFile($type){\n\t$arrFile = ['image/png', 'image/jpg', 'image/jpeg', 'image/gif'];\n\tif(in_array($type, $arrFile)){\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n}",
"private static function validate_type( $object_type ) {\n\t\tif ( ! in_array( $object_type, array( 'post', 'term' ), true ) ) {\n\t\t\tthrow WPSEO_Invalid_Argument_Exception::invalid_type( $object_type );\n\t\t}\n\t}",
"function isTimeType($type)\n{\n return($type == \"datetime\" or $type == \"time\" or $type == \"timestamp\");\n}",
"function __validate($val=false, $type=false) {\n\t\tif(!$val || !$type) return false;\n\t\t$val = trim($val);\n\t\tswitch($type) {\n\t\t\tcase 'numeric':\n\t\t\t\tif(is_numeric($val)) return true;\n\t\t\t\tbreak;\n\t\t\tcase 'exists':\n\t\t\t\tif($val && $val != '' && $val !== '') return true;\n\t\t\t\tbreak;\n\t\t\tcase 'email':\n\t\t\t\tif(!ereg(\"^[^@]{1,64}@[^@]{1,255}$\", $val)) return false;\n\t\t\t\tif(!eregi(\"^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,4})$\", $val)) return false;\n\t\t\t\treturn true;\n\t\t\t\tbreak;\n\t\t\tcase 'password':\n\t\t\t\tif(preg_match(\"/^[a-zA-Z0-9_-]{8,20}$/i\", $val)) return true;\n\t\t\t\tbreak;\n\t\t\tcase 'bool':\n\t\t\t\tif($val === true || $val === false) return true;\n\t\t\t\tbreak;\n\t\t}\n\t\treturn false;\n\t}",
"public static function is_string_or_stringable($input)\n {\n }",
"public function testTypeCorrect()\n {\n $validator=new Validator();\n $result=$validator->type(\"2\");\n $this->assertTrue($result[0]);\n }",
"function acf_is_field_type($name = '')\n{\n}",
"function checkType($instruction)\n{ // INSTRUKCE S JEDNIM ARGUMENTEM\n if (count($instruction) == 2)\n {\n // kontrola int\n if (preg_match('/^int@.*$/', strtolower($instruction[1])))\n {\n if ((preg_match('/^int@[-+]?\\d+$/', ($instruction[1]))))\n {\n $first_arg = \"int\";\n paramsValidateOne($instruction, $first_arg);\n $instruction[1] = ltrim(($instruction[1]),\"int@\");\n echo \" <arg1 type=\\\"int\\\">{$instruction[1]}</arg1>\\n\";\n }\n else\n {\n Err();\n }\n }\n // kontrola bool\n else if (preg_match('/^bool@.*$/', strtolower($instruction[1])))\n {\n if (preg_match('/^bool@true$/', ($instruction[1])))\n {\n $first_arg = \"bool_t\";\n paramsValidateOne($instruction, $first_arg);\n echo \" <arg1 type=\\\"bool\\\">true</arg1>\\n\";\n }\n else if (preg_match('/^bool@false$/', ($instruction[1])))\n {\n $first_arg = \"bool_f\";\n paramsValidateOne($instruction, $first_arg);\n echo \" <arg1 type=\\\"bool\\\">false</arg1>\\n\";\n }\n else\n {\n Err();\n }\n }\n // kontrola string\n else if (preg_match('/^string@.*$/', strtolower($instruction[1])))\n {\n if (preg_match('/^^string@(([a-zA-Z\\x{0021}\\x{0022}\\x{0024}-\\x{005B}\\x{005D}-\\x{FFFF}])|(\\\\\\\\[0-9][0-9][0-9]))*$/', ($instruction[1])))\n {\n $first_arg = \"string\";\n paramsValidateOne($instruction, $first_arg);\n $instruction[1] = substr(($instruction[1]),7);\n $instruction[1] = preg_replace('/&/', \"&\", $instruction[1]);\n $instruction[1] = preg_replace('/</', \"<\", $instruction[1]);\n $instruction[1] = preg_replace('/>/', \">\", $instruction[1]);\n echo \" <arg1 type=\\\"string\\\">{$instruction[1]}</arg1>\\n\";\n }\n else if (preg_match('/^string@[^\\u0000-\\u007F]+/', ($instruction[1])))\n {\n $first_arg = \"string\";\n paramsValidateOne($instruction, $first_arg);\n echo \" <arg1 type=\\\"string\\\">{$instruction[1]}</arg1>\\n\";\n }\n else\n {\n Err();\n }\n }\n // kontrola type\n else if (preg_match('/^(int|bool|string)$/', ($instruction[1])))\n {\n $first_arg = \"type\";\n paramsValidateOne($instruction, $first_arg);\n echo \" <arg1 type=\\\"type\\\">{$instruction[1]}</arg1>\\n\";\n }\n // kontrola var\n else if ((preg_match('/^(GF|LF|TF)@.*$/', strtoupper($instruction[1]))))\n {\n if (preg_match('/^(GF|LF|TF)@([[:alpha:]]|(_|-|\\$|&|\\?|!|%|\\*))([[:alnum:]]|(_|-|\\$|&|\\?|!|%|\\*))*/', ($instruction[1])))\n {\n $first_arg = \"var\";\n paramsValidateOne($instruction, $first_arg);\n $instruction[1] = preg_replace('/&/', \"&\", $instruction[1]);\n $instruction[1] = preg_replace('/</', \"<\", $instruction[1]);\n $instruction[1] = preg_replace('/>/', \">\", $instruction[1]);\n echo \" <arg1 type=\\\"var\\\">{$instruction[1]}</arg1>\\n\";\n }\n else\n {\n Err();\n }\n }\n // kontrola nil\n else if (preg_match('/^nil@.*$/', strtolower($instruction[1])))\n {\n if (preg_match('/^nil@nil$/', ($instruction[1])))\n {\n $first_arg = \"nil\";\n paramsValidateOne($instruction, $first_arg);\n $instruction[1] = substr(($instruction[1]),4);\n echo \" <arg1 type=\\\"nil\\\">{$instruction[1]}</arg1>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^nil$/', strtolower($instruction[1])))\n {\n Err();\n }\n // ostatni ...@neco filtrovat jako chybu\n else if (preg_match('/[[:alnum:]]@.*$/', ($instruction[1])))\n {\n Err();\n }\n // kontrola label\n else if (preg_match('/^([[:alpha:]]|(_|-|\\$|&|%|\\*))((_|-|\\$|&|%|\\*)|[[:alnum:]])*/', ($instruction[1])))\n {\n $first_arg = \"label\";\n paramsValidateOne($instruction, $first_arg);\n echo \" <arg1 type=\\\"label\\\">{$instruction[1]}</arg1>\\n\";\n }\n else\n {\n Err();\n }\n }\n\n else if (count($instruction) == 3)\n { // INSTRUKCE S DVEMA ARGUMENTY\n //////////////////////////////////// prvni argument instrukce /////////////////////////////////////////////////////\n if (preg_match('/^int@.*$/', strtolower($instruction[1])))\n {\n if ((preg_match('/^int@[-+]?\\d+$/', ($instruction[1]))))\n {\n $first_arg = \"int\";\n $instruction[1] = ltrim(($instruction[1]),\"int@\");\n echo \" <arg1 type=\\\"int\\\">{$instruction[1]}</arg1>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^bool@.*$/', strtolower($instruction[1])))\n {\n if (preg_match('/^bool@true$/', ($instruction[1])))\n {\n $first_arg = \"bool_t\";\n echo \" <arg1 type=\\\"bool\\\">true</arg1>\\n\";\n }\n else if (preg_match('/^bool@false$/', ($instruction[1])))\n {\n $first_arg = \"bool_f\";\n echo \" <arg1 type=\\\"bool\\\">false</arg1>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^string@.*$/', strtolower($instruction[1])))\n {\n if (preg_match('/^^string@(([a-zA-Z\\x{0021}\\x{0022}\\x{0024}-\\x{005B}\\x{005D}-\\x{FFFF}])|(\\\\\\\\[0-9][0-9][0-9]))*$/', ($instruction[1])))\n {\n $first_arg = \"string\";\n $instruction[1] = substr(($instruction[1]),7);\n $instruction[1] = preg_replace('/&/', \"&\", $instruction[1]);\n $instruction[1] = preg_replace('/</', \"<\", $instruction[1]);\n $instruction[1] = preg_replace('/>/', \">\", $instruction[1]);\n echo \" <arg1 type=\\\"string\\\">{$instruction[1]}</arg1>\\n\";\n }\n else if (preg_match('/^string@[^\\u0000-\\u007F]+/', ($instruction[1])))\n {\n $first_arg = \"string\";\n echo \" <arg1 type=\\\"string\\\">{$instruction[1]}</arg1>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^(int|bool|string)$/', ($instruction[1])))\n {\n $first_arg = \"type\";\n echo \" <arg1 type=\\\"type\\\">{$instruction[1]}</arg1>\\n\";\n }\n else if ((preg_match('/^(GF|LF|TF)@.*$/', strtoupper($instruction[1]))))\n {\n if (preg_match('/^(GF|LF|TF)@([[:alpha:]]|(_|-|\\$|&|\\?|!|%|\\*))([[:alnum:]]|(_|-|\\$|&|\\?|!|%|\\*))*/', ($instruction[1])))\n {\n $first_arg = \"var\";\n $instruction[1] = preg_replace('/&/', \"&\", $instruction[1]);\n $instruction[1] = preg_replace('/</', \"<\", $instruction[1]);\n $instruction[1] = preg_replace('/>/', \">\", $instruction[1]);\n echo \" <arg1 type=\\\"var\\\">{$instruction[1]}</arg1>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^nil@.*$/', strtolower($instruction[1])))\n {\n if (preg_match('/^nil@nil$/', ($instruction[1])))\n {\n $first_arg = \"nil\";\n $instruction[1] = substr(($instruction[1]),4);\n echo \" <arg1 type=\\\"nil\\\">{$instruction[1]}</arg1>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^nil$/', strtolower($instruction[1])))\n {\n Err();\n }\n else if (preg_match('/[[:alnum:]]@.*$/', ($instruction[1])))\n {\n Err();\n }\n else if (preg_match('/^([[:alpha:]]|(_|-|\\$|&|%|\\*))((_|-|\\$|&|%|\\*)|[[:alnum:]])*/', ($instruction[1])))\n {\n $first_arg = \"label\";\n echo \" <arg1 type=\\\"label\\\">{$instruction[1]}</arg1>\\n\";\n }\n else\n {\n Err();\n }\n //////////////////////////////////// druhy argument instrukce /////////////////////////////////////////////////////\n if (preg_match('/^int@.*$/', strtolower($instruction[2])))\n {\n if ((preg_match('/^int@[-+]?\\d+$/', ($instruction[2]))))\n {\n $sec_arg = \"int\";\n paramsValidateTwo($instruction, $first_arg, $sec_arg);\n $instruction[2] = ltrim(($instruction[2]),\"int@\");\n echo \" <arg2 type=\\\"int\\\">{$instruction[2]}</arg2>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^bool@.*$/', strtolower($instruction[2])))\n {\n if (preg_match('/^bool@true$/', ($instruction[2])))\n {\n $sec_arg = \"bool_t\";\n paramsValidateTwo($instruction, $first_arg, $sec_arg);\n echo \" <arg2 type=\\\"bool\\\">true</arg2>\\n\";\n }\n else if (preg_match('/^bool@false$/', ($instruction[2])))\n {\n $sec_arg = \"bool_f\";\n paramsValidateTwo($instruction, $first_arg, $sec_arg);\n echo \" <arg2 type=\\\"bool\\\">false</arg2>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^string@.*$/', strtolower($instruction[2])))\n {\n if (preg_match('/^^string@(([a-zA-Z\\x{0021}\\x{0022}\\x{0024}-\\x{005B}\\x{005D}-\\x{FFFF}])|(\\\\\\\\[0-9][0-9][0-9]))*$/', ($instruction[2])))\n {\n $sec_arg = \"string\";\n paramsValidateTwo($instruction, $first_arg, $sec_arg);\n $instruction[2] = substr(($instruction[2]),7);\n $instruction[2] = preg_replace('/&/', \"&\", $instruction[2]);\n $instruction[2] = preg_replace('/</', \"<\", $instruction[2]);\n $instruction[2] = preg_replace('/>/', \">\", $instruction[2]);\n echo \" <arg2 type=\\\"string\\\">{$instruction[2]}</arg2>\\n\";\n }\n else if (preg_match('/^string@[^\\u0000-\\u007F]+/', ($instruction[2])))\n {\n $sec_arg = \"string\";\n paramsValidateTwo($instruction, $first_arg, $sec_arg);\n echo \" <arg2 type=\\\"string\\\">{$instruction[2]}</arg2>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^(int|bool|string)$/', ($instruction[2])))\n {\n $sec_arg = \"type\";\n paramsValidateTwo($instruction, $first_arg, $sec_arg);\n echo \" <arg2 type=\\\"type\\\">{$instruction[2]}</arg2>\\n\";\n }\n else if ((preg_match('/^(GF|LF|TF)@.*$/', strtoupper($instruction[2]))))\n {\n if (preg_match('/^(GF|LF|TF)@([[:alpha:]]|(_|-|\\$|&|\\?|!|%|\\*))([[:alnum:]]|(_|-|\\$|&|\\?|!|%|\\*))*/', ($instruction[2])))\n {\n $sec_arg = \"var\";\n paramsValidateTwo($instruction, $first_arg, $sec_arg);\n $instruction[2] = preg_replace('/&/', \"&\", $instruction[2]);\n $instruction[2] = preg_replace('/</', \"<\", $instruction[2]);\n $instruction[2] = preg_replace('/>/', \">\", $instruction[2]);\n echo \" <arg2 type=\\\"var\\\">{$instruction[2]}</arg2>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^nil@.*$/', strtolower($instruction[2])))\n {\n if (preg_match('/^nil@nil$/', ($instruction[2])))\n {\n $sec_arg = \"nil\";\n paramsValidateTwo($instruction, $first_arg, $sec_arg);\n $instruction[2] = substr(($instruction[2]),4);\n echo \" <arg2 type=\\\"nil\\\">{$instruction[2]}</arg2>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^nil$/', strtolower($instruction[2])))\n {\n Err();\n }\n else if (preg_match('/[[:alnum:]]@.*$/', ($instruction[2])))\n {\n Err();\n }\n else if (preg_match('/^([[:alpha:]]|(_|-|\\$|&|%|\\*))((_|-|\\$|&|%|\\*)|[[:alnum:]])*/', ($instruction[2])))\n {\n $sec_arg = \"label\";\n paramsValidateTwo($instruction, $first_arg, $sec_arg);\n echo \" <arg2 type=\\\"label\\\">{$instruction[2]}</arg2>\\n\";\n }\n else\n {\n Err();\n }\n\n }\n\n else if (count($instruction) == 4)\n { // INSTRUKCE S TREMI ARGUMENTY\n //////////////////////////////////// prvni argument instrukce /////////////////////////////////////////////////////\n if (preg_match('/^int@.*$/', strtolower($instruction[1])))\n {\n if ((preg_match('/^int@[-+]?\\d+$/', ($instruction[1]))))\n {\n $first_arg = \"int\";\n $instruction[1] = ltrim(($instruction[1]),\"int@\");\n echo \" <arg1 type=\\\"int\\\">{$instruction[1]}</arg1>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^bool@.*$/', strtolower($instruction[1])))\n {\n if (preg_match('/^bool@true$/', ($instruction[1])))\n {\n $first_arg = \"bool_t\";\n echo \" <arg1 type=\\\"bool\\\">true</arg1>\\n\";\n }\n else if (preg_match('/^bool@false$/', ($instruction[1])))\n {\n $first_arg = \"bool_f\";\n echo \" <arg1 type=\\\"bool\\\">false</arg1>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^string@.*$/', strtolower($instruction[1])))\n {\n if (preg_match('/^^string@(([a-zA-Z\\x{0021}\\x{0022}\\x{0024}-\\x{005B}\\x{005D}-\\x{FFFF}])|(\\\\\\\\[0-9][0-9][0-9]))*$/', ($instruction[1])))\n {\n $first_arg = \"string\";\n $instruction[1] = substr(($instruction[1]),7);\n $instruction[1] = preg_replace('/&/', \"&\", $instruction[1]);\n $instruction[1] = preg_replace('/</', \"<\", $instruction[1]);\n $instruction[1] = preg_replace('/>/', \">\", $instruction[1]);\n echo \" <arg1 type=\\\"string\\\">{$instruction[1]}</arg1>\\n\";\n }\n else if (preg_match('/^string@[^\\u0000-\\u007F]+/', ($instruction[1])))\n {\n $first_arg = \"string\";\n echo \" <arg1 type=\\\"string\\\">{$instruction[1]}</arg1>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^(int|bool|string)$/', ($instruction[1])))\n {\n $first_arg = \"type\";\n echo \" <arg1 type=\\\"type\\\">{$instruction[1]}</arg1>\\n\";\n }\n else if ((preg_match('/^(GF|LF|TF)@.*$/', strtoupper($instruction[1]))))\n {\n if (preg_match('/^(GF|LF|TF)@([[:alpha:]]|(_|-|\\$|&|\\?|!|%|\\*))([[:alnum:]]|(_|-|\\$|&|\\?|!|%|\\*))*/', ($instruction[1])))\n {\n $first_arg = \"var\";\n $instruction[1] = preg_replace('/&/', \"&\", $instruction[1]);\n $instruction[1] = preg_replace('/</', \"<\", $instruction[1]);\n $instruction[1] = preg_replace('/>/', \">\", $instruction[1]);\n echo \" <arg1 type=\\\"var\\\">{$instruction[1]}</arg1>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^nil@.*$/', strtolower($instruction[1])))\n {\n if (preg_match('/^nil@nil$/', ($instruction[1])))\n {\n $first_arg = \"nil\";\n $instruction[1] = substr(($instruction[1]),4);\n echo \" <arg1 type=\\\"nil\\\">{$instruction[1]}</arg1>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^nil$/', strtolower($instruction[1])))\n {\n Err();\n }\n else if (preg_match('/[[:alnum:]]@.*$/', ($instruction[1])))\n {\n Err();\n }\n else if (preg_match('/^([[:alpha:]]|(_|-|\\$|&|%|\\*))((_|-|\\$|&|%|\\*)|[[:alnum:]])*/', ($instruction[1])))\n {\n $first_arg = \"label\";\n echo \" <arg1 type=\\\"label\\\">{$instruction[1]}</arg1>\\n\";\n }\n else\n {\n Err();\n }\n //////////////////////////////////// druhy argument instrukce /////////////////////////////////////////////////////\n if (preg_match('/^int@.*$/', strtolower($instruction[2])))\n {\n if ((preg_match('/^int@[-+]?\\d+$/', ($instruction[2]))))\n {\n $sec_arg = \"int\";\n $instruction[2] = ltrim(($instruction[2]),\"int@\");\n echo \" <arg2 type=\\\"int\\\">{$instruction[2]}</arg2>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^bool@.*$/', strtolower($instruction[2])))\n {\n if (preg_match('/^bool@true$/', ($instruction[2])))\n {\n $sec_arg = \"bool_t\";\n echo \" <arg2 type=\\\"bool\\\">true</arg2>\\n\";\n }\n else if (preg_match('/^bool@false$/', ($instruction[2])))\n {\n $sec_arg = \"bool_f\";\n echo \" <arg2 type=\\\"bool\\\">false</arg2>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^string@.*$/', strtolower($instruction[2])))\n {\n if (preg_match('/^^string@(([a-zA-Z\\x{0021}\\x{0022}\\x{0024}-\\x{005B}\\x{005D}-\\x{FFFF}])|(\\\\\\\\[0-9][0-9][0-9]))*$/', ($instruction[2])))\n {\n $sec_arg = \"string\";\n $instruction[2] = substr(($instruction[2]),7);\n $instruction[2] = preg_replace('/&/', \"&\", $instruction[2]);\n $instruction[2] = preg_replace('/</', \"<\", $instruction[2]);\n $instruction[2] = preg_replace('/>/', \">\", $instruction[2]);\n echo \" <arg2 type=\\\"string\\\">{$instruction[2]}</arg2>\\n\";\n }\n else if (preg_match('/^string@[^\\u0000-\\u007F]+/', ($instruction[2])))\n {\n $sec_arg = \"string\";\n echo \" <arg2 type=\\\"string\\\">{$instruction[2]}</arg2>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^(int|bool|string)$/', ($instruction[2])))\n {\n $sec_arg = \"type\";\n echo \" <arg2 type=\\\"type\\\">{$instruction[2]}</arg2>\\n\";\n }\n else if ((preg_match('/^(GF|LF|TF)@.*$/', strtoupper($instruction[2]))))\n {\n if (preg_match('/^(GF|LF|TF)@([[:alpha:]]|(_|-|\\$|&|\\?|!|%|\\*))([[:alnum:]]|(_|-|\\$|&|\\?|!|%|\\*))*/', ($instruction[2])))\n {\n $sec_arg = \"var\";\n $instruction[2] = preg_replace('/&/', \"&\", $instruction[2]);\n $instruction[2] = preg_replace('/</', \"<\", $instruction[2]);\n $instruction[2] = preg_replace('/>/', \">\", $instruction[2]);\n echo \" <arg2 type=\\\"var\\\">{$instruction[2]}</arg2>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^nil@.*$/', strtolower($instruction[2])))\n {\n if (preg_match('/^nil@nil$/', ($instruction[2])))\n {\n $sec_arg = \"nil\";\n $instruction[2] = substr(($instruction[2]),4);\n echo \" <arg2 type=\\\"nil\\\">{$instruction[2]}</arg2>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^nil$/', strtolower($instruction[2])))\n {\n Err();\n }\n else if (preg_match('/[[:alnum:]]@.*$/', ($instruction[2])))\n {\n Err();\n }\n else if (preg_match('/^([[:alpha:]]|(_|-|\\$|&|%|\\*))((_|-|\\$|&|%|\\*)|[[:alnum:]])*/', ($instruction[2])))\n {\n $sec_arg = \"label\";\n echo \" <arg2 type=\\\"label\\\">{$instruction[2]}</arg2>\\n\";\n }\n else\n {\n Err();\n }\n //////////////////////////////////// treti argument instrukce /////////////////////////////////////////////////////\n if (preg_match('/^int@.*$/', strtolower($instruction[3])))\n {\n if ((preg_match('/^int@[-+]?\\d+$/', ($instruction[3]))))\n {\n $th_arg = \"int\";\n paramsValidateThree($instruction, $first_arg, $sec_arg, $th_arg);\n $instruction[3] = ltrim(($instruction[3]),\"int@\");\n echo \" <arg3 type=\\\"int\\\">{$instruction[3]}</arg3>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^bool@.*$/', strtolower($instruction[3])))\n {\n if (preg_match('/^bool@true$/', ($instruction[3])))\n {\n $th_arg = \"bool_t\";\n paramsValidateThree($instruction, $first_arg, $sec_arg, $th_arg);\n echo \" <arg3 type=\\\"bool\\\">true</arg3>\\n\";\n }\n else if (preg_match('/^bool@false$/', ($instruction[3])))\n {\n $th_arg = \"bool_f\";\n paramsValidateThree($instruction, $first_arg, $sec_arg, $th_arg);\n echo \" <arg3 type=\\\"bool\\\">false</arg3>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^string@.*$/', strtolower($instruction[3])))\n {\n if (preg_match('/^^string@(([a-zA-Z\\x{0021}\\x{0022}\\x{0024}-\\x{005B}\\x{005D}-\\x{FFFF}])|(\\\\\\\\[0-9][0-9][0-9]))*$/', ($instruction[3])))\n {\n $th_arg = \"string\";\n paramsValidateThree($instruction, $first_arg, $sec_arg, $th_arg);\n $instruction[3] = substr(($instruction[3]),7);\n $instruction[3] = preg_replace('/&/', \"&\", $instruction[3]);\n $instruction[3] = preg_replace('/</', \"<\", $instruction[3]);\n $instruction[3] = preg_replace('/>/', \">\", $instruction[3]);\n echo \" <arg3 type=\\\"string\\\">{$instruction[3]}</arg3>\\n\";\n }\n else if (preg_match('/^string@[^\\u0000-\\u007F]+/', ($instruction[3])))\n {\n $th_arg = \"string\";\n paramsValidateThree($instruction, $first_arg, $sec_arg, $th_arg);\n echo \" <arg3 type=\\\"string\\\">{$instruction[3]}</arg3>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^(int|bool|string)$/', ($instruction[3])))\n {\n $th_arg = \"type\";\n paramsValidateThree($instruction, $first_arg, $sec_arg, $th_arg);\n echo \" <arg3 type=\\\"type\\\">{$instruction[3]}</arg3>\\n\";\n }\n else if ((preg_match('/^(GF|LF|TF)@.*$/', strtoupper($instruction[3]))))\n {\n if (preg_match('/^(GF|LF|TF)@([[:alpha:]]|(_|-|\\$|&|\\?|!|%|\\*))([[:alnum:]]|(_|-|\\$|&|\\?|!|%|\\*))*/', ($instruction[3])))\n {\n $th_arg = \"var\";\n paramsValidateThree($instruction, $first_arg, $sec_arg, $th_arg);\n $instruction[3] = preg_replace('/&/', \"&\", $instruction[3]);\n $instruction[3] = preg_replace('/</', \"<\", $instruction[3]);\n $instruction[3] = preg_replace('/>/', \">\", $instruction[3]);\n echo \" <arg3 type=\\\"var\\\">{$instruction[3]}</arg3>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^nil@.*$/', strtolower($instruction[3])))\n {\n if (preg_match('/^nil@nil$/', ($instruction[3])))\n {\n $th_arg = \"nil\";\n paramsValidateThree($instruction, $first_arg, $sec_arg, $th_arg);\n $instruction[3] = substr(($instruction[3]),4);\n echo \" <arg3 type=\\\"nil\\\">{$instruction[3]}</arg3>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^nil$/', strtolower($instruction[3])))\n {\n Err();\n }\n else if (preg_match('/[[:alnum:]]@.*$/', ($instruction[3])))\n {\n Err();\n }\n else if (preg_match('/^([[:alpha:]]|(_|-|\\$|&|%|\\*))((_|-|\\$|&|%|\\*)|[[:alnum:]])*/', ($instruction[3])))\n {\n $th_arg = \"label\";\n paramsValidateThree($instruction, $first_arg, $sec_arg, $th_arg);\n echo \" <arg3 type=\\\"label\\\">{$instruction[3]}</arg3>\\n\";\n }\n else\n {\n Err();\n }\n\n }\n\n}",
"function validate($element,$type)\n {\n if(empty($element)||!isset($element))\n {\n $test = false;\n }\n else\n {\n switch($type)\n {\n case 'university':\n {\n if ($element === 'MDU'|| $element === 'IP') \n $test = TRUE;\n else\n return FALSE;\n }\n break;\n case 'course':\n {\n if($element === 'B. Tech.')\n $test = TRUE;\n else\n return FALSE;\n }\n break;\n case 'stream':\n {\n if ($element === 'CSE'||$element === 'ECS')\n $test = TRUE;\n else\n return FALSE;\n }\n break;\n case 'semester':\n {\n if ($element >= 1 && $element <= 8) \n $test = TRUE;\n else\n return FALSE;\n }\n break;\n }\n }\n if($test)\n return TRUE;\n else\n return FALSE;\n }",
"function is_type_int($typ)\n{\n\t$ints = @array(\"int\",\"serial\",\"bigserial\",\"oid\",\"float\",\"numeric\",\"real\",\"double\",\"smallint\");//\"date\",\"time\"\n\t$typ = @strtolower($typ);\n\tforeach ($ints as $v){\n\t\t$pos = @strpos($typ,$v);\n\t\tif ($pos!==false && !$pos) return 1;\n\t}\n}",
"public function testIsValidType()\n {\n $this->assertFalse(\n Method::invoke($this->type, 'isValidType', $this, 'test'),\n 'The value should not be valid.'\n );\n\n $this->assertTrue(\n Method::invoke($this->type, 'isValidType', $this, 1.23),\n 'The value should be valid.'\n );\n }",
"protected function _is_valid_type($type) {\n\t\t$types_array = explode(',', self::types_array);\n\t\tif (in_array($type, $types_array)) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}",
"function is($type)\n {\n return $this->factory->is($type);\n }",
"static function is( $value, $type='text' )\n {\n $method = 'is' . ucwords( $type );\n if( method_exists( 'Pgg_Validate', $method ) ) {\n return self::$method( $value );\n }\n return $value;\n }",
"function validarInput( $text , $tipo){\r\n\t\tif ($tipo=='string' ){\r\n\t\t\tif ($text!='' && strlen($text) != 0){\r\n\t\t\t\t$valido=true;\r\n\t\t\t}else{\r\n\t\t\t\t$valido=false;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif (esEntero($text) && strlen($text) != 0){\r\n\t\t\t\t$valido=true;\r\n\t\t\t}else{\r\n\t\t\t\t$valido=false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $valido;\r\n\t}",
"function validate_input($input, $input_type=NULL){\n\t\n\tswitch($input_type){\n\t\tcase 'first_name':\n\t\t\treturn preg_match('/^[A-Z\\'.-]{2,20}$/i', $input);\n\t\t\tbreak;\n\t\tcase 'last_name':\n\t\t\treturn preg_match('/^[A-Z\\'.-]{2,40}$/i', $input);\n\t\t\tbreak;\n\t\tcase 'email':\n\t\t\treturn preg_match('/^[\\w.-]+@[\\w.-]+\\.[A-Za-z]{2,8}$/', $input);\n\t\t\tbreak;\n\t\tcase 'password':\n\t\t\treturn preg_match('/^\\w{4,20}$/', $input);\n\t\t\tbreak;\n\t\tcase 'profile_link':\n\t\t\treturn preg_match('/^[a-z0-9_.-]{4,100}$/', $input);\n\t\t\tbreak;\n\t\tcase 'location':\n\t\t\treturn preg_match('|^[A-Z /\\',.-]{2,40}$|i', $input);\n\t\t\tbreak;\n\t\tcase 'group_name':\n\t\t\treturn preg_match('/^[A-Z0-9 \\'.)(&-]{2,100}$/i', $input);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn preg_match('|^[\\w /\\',.)(:+?&-=]+$|', $input);\n\t\t\tbreak;\n\t}\n\treturn;\n}",
"public static function isValidType(String $type){\n return array_key_exists(strtoupper($type), self::userTypes());\n }",
"function reqType($data, $type = \"string\") {\n\t\tif (!settype($data, $type))\n\t\t\tstop(3, \"Type Mismatch! \\\"$data\\\" is not a $type\", 400);\n\t\t\n\t\treturn $data;\n\t}",
"public static function validateType()\n\t{\n\t\treturn array(\n\t\t\tarray(__CLASS__, 'checkType')\n\t\t);\n\t}",
"private static function _isValidValue($type, $value){\n $value = self::_sanitizeValue($type, $value);\n if ($value != null){\n $nativeType = self::_getNativeType($type);\n if ($nativeType == 'ascii'){\n if (isset(self::$_extendedTypes[$type]['validate'])){\n if (!preg_match(self::$_extendedTypes[$type]['validate'], $value)){\n return false;\n }\n }\n }\n return true;\n }\n return false;\n }",
"abstract public function type();",
"abstract public function type();",
"public function validData($data, $type = \"\"){\n switch ($type){\n case 'ug':\n case \"ul\"://user-login. no russian 4-30 characters\n preg_match('/[A-Za-z0-9\\)\\(_\\-]{4,30}/u', $data, $arr);\n return strlen($data) == strlen($arr[0]) ? $arr[0]\n : false;\n break;\n case \"un\": //user-name/surname rus+eng 2-30\n preg_match('/[А-Яа-яA-Za-z0-9\\)\\(_\\-]{2,30}/u', $data, $arr);\n return strlen($data) == strlen($arr[0]) ? $arr[0]\n : false;\n break;\n case \"up\": //user=password\n preg_match('/[\\w]{6,16}/u', $data, $arr);\n return strlen($data) == strlen($arr[0]) ? md5($arr[0])\n : false;\n break;\n case \"ue\": //user-email\n return filter_var($data, FILTER_VALIDATE_EMAIL) ? $data\n : false;\n break;\n case \"dt\": //date &year &month &day\n preg_match('/(\\d{4})\\.(\\d{1,2})\\.(\\d{1,2})/', $data, $arr);\n return checkdate($arr[2], $arr[3], $arr[1]) ? $arr[0]\n : false;\n break;\n case \"ph\": //phone 0-9{3} 0-9{7}\n preg_match('/\\d{3}-\\d{7}/', $data, $arr);\n return !empty($arr) ? $arr[0]\n : false;\n break;\n case \"gr\": //user-name/surname rus+eng 2-30\n preg_match('/[А-Яа-яA-Za-z0-9\\)\\(_\\-]{2,30}/u', $data, $arr);\n return strlen($data) == strlen($arr[0]) ? $arr[0]\n : false;\n break;\n default:\n return false;\n break;\n }\n }",
"abstract protected function post_type();",
"function checkimagetype($imagetype){\n\n\t\t$filetype = array(\n\t\t 'image/bmp', \n\t\t 'image/gif', \n\t\t 'image/icon', \n\t\t 'image/jpeg',\n\t\t 'image/jpg', \n\t\t 'image/png', \n\t\t 'image/tiff', \n\t\t );\n if( in_array($imagetype,$filetype))\n\t\t\treturn true;\n\t\telse \n\t\t\treturn 0;\n\n}",
"public function isTypeSupported(string $type) : bool;",
"function validateInput($val, $type) {\n if ($type === 'post') {\n $validInput = mysqli_real_escape_string($GLOBALS['con'], trim($_POST[$val]));\n } else {\n $validInput = mysqli_real_escape_string($GLOBALS['con'], trim($_GET[$val]));\n }\n if (empty($validInput)) {\n return false;\n } else {\n return $validInput;\n }\n }",
"protected function checkType($type)\n {\n return $type === 'application/x-shockwave-flash' ||\n substr_compare($type, 'audio/', 0, 6) === 0;\n }",
"static function validate ($type, $v)\n {\n if (is_null ($v) || $v === '')\n return true;\n\n switch ($type) {\n\n case type::binding:\n return is_string ($v);\n\n case type::any:\n case type::bool: // Any value can be typecast to boolean.\n return true;\n\n case type::data:\n return is_array ($v) || is_object ($v)\n || $v instanceof \\Traversable\n || (is_string ($v) && strpos ($v, '{') !== false);\n\n case type::id:\n return !!preg_match ('#^[\\w\\-]+$#', $v);\n\n case type::content:\n return $v instanceof Metadata || is_string ($v); // Note: content props can be specified in attribute syntax.\n\n case type::metadata:\n return $v instanceof Metadata;\n\n case type::collection:\n return is_array ($v);\n\n case type::number:\n return is_numeric ($v);\n\n case type::string:\n return is_scalar ($v) || (is_object ($v) && method_exists ($v, '__toString'));\n }\n return false;\n }",
"public function hasType(){\n return !empty($this->type);\n }",
"public function supports(string $type): bool;",
"static function isType($type)\n {\n try {\n return call_user_func_array('PHPUnit_Framework_Assert::isType', func_get_args());\n } catch (\\Exception $e) {\n self::callSlack($e, debug_backtrace()[1]);\n }\n }",
"private function isTypeValid($param)\n {\n return is_array($param) || is_string($param) || is_null($param);\n }",
"abstract public function checkValueType($arg_value);",
"public function validate($input);",
"public static function validate_type($type) {\n\n\t\tswitch ($type) {\n\t\t\tcase 'album':\n\t\t\tcase 'artist':\n\t\t\tcase 'video':\n\t\t\t\treturn $type;\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn 'album';\n\t\t\tbreak;\n\t\t}\n\n\t}",
"function _checkAllowedEntryType($entry) {\n\t\treturn in_array($entry, $this->allowedEntryTypes);\n\t}",
"protected function _check($data)\n {\n if ($this->_count != 0) {\n $this->_type($data);\n } elseif (is_array($data)) {\n $this->_type($data);\n }\n }",
"public function hasType($name);",
"function check_type_code($type_code){\n\t\t\tif($this->db->get_where('type',array('code' => $type_code))->num_rows() > 0){\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"public function setTypes(){\n $this->var = false;\n $this->symb = false;\n $this->label = false;\n $type = '';\n \n //Ulozi postupne do jednotlivych promennych jestli dany argument odpovida nejakemu danemu vzoru a pote v podminkach rozhodneme typ argumentu (ktery na konci funkce ulozime do typu) a take jestli je argument var, symb, label nebo type\n $var = preg_match(\"/^(TF|LF|GF)@((\\p{L}|-|[_$&%*!?])(\\p{L}|-|[_$&%*!?]|[0-9])*)$/u\", $this->arg);\n $int = preg_match(\"/^int@([\\+\\-])?([0-9])*$/u\", $this->arg);\n $bool = preg_match(\"/^bool@(true|false)$/u\", $this->arg);\n $string = preg_match(\"/^string@(\\p{L}|[^(\\w\\\\\\)]|\\d|[_]|\\\\\\\\([0-9][0-9][0-9]))*$/u\", $this->arg);\n $nil = preg_match(\"/^nil@nil$/u\", $this->arg);\n $label = preg_match(\"/^((\\p{L}|[_$&%*!?])(\\p{L}|-|[_$&%*!?]|[0-9])*)$/u\", $this->arg);\n if($var){\n $type = \"var\";\n $this->var = true;\n $this->symb = true;\n }\n if($int){\n $type = \"int\";\n $this->symb = true;\n }\n if($bool){\n $type = \"bool\";\n $this->symb = true;\n }\n if($string){\n $type = \"string\";\n $this->symb = true;\n }\n if($nil){\n $type = \"nil\";\n $this->symb = true;\n }\n if($label){\n if(preg_match(\"/^(int|bool|string)$/u\", $this->arg)){\n $this->type_type = true;\n }\n $type = \"label\";\n $this->label = true; \n }\n if(!($var||$int||$bool||$string||$nil||$label)){\n fwrite(STDERR, \"CHYBA \".ERROR_23.\" - spatny argument\\n\");\n exit(ERROR_23);\n }\n $this->setType($type);\n }",
"abstract protected function getType();",
"protected function doTypeCheck()\n {\n if (isset($this->type_validators[$this->is_type])) {\n $result = (new Callback($this->type_validators[$this->is_type], [$this->value]))->call();\n } else {\n switch ($this->is_type) {\n case 'array': $result = is_array($this->value); break;\n case 'bool': $result = is_bool($this->value); break;\n case 'float': $result = is_float($this->value); break;\n case 'int': $result = is_int($this->value); break;\n case 'string': $result = is_string($this->value); break;\n case 'callable': $result = is_callable($this->value); break;\n case 'object': $result = is_object($this->value); break;\n }\n }\n\n if (!isset($result)) {\n throw new \\RuntimeException('No validator found for type ' . $this->is_type);\n } else if (!$result) {\n if ($this->throws === null) {\n throw new \\InvalidArgumentException(' did not pass the \"' . $this->is_type . '\" validator');\n } else {\n throw (new Callback($this->throws))->call();\n }\n }\n }",
"public function is($type, $givenElt = NULL)\n {\n $rsp = new Response();\n\n if($type === \"word\" && (isset($_POST['word']) || !empty($givenElt)))\n {\n $word = isset($_POST['word']) ? $_POST['word'] : $givenElt;\n return $this->isWordBan($word);\n }\n \n if($type === \"email\" && (isset($_POST['email']) || !empty($givenElt)))\n {\n $email = isset($_POST['email']) ? $_POST['email'] : $givenElt;\n return $this->isEmailBan($email);\n }\n \n $rsp->setFailure(400, \"Your request couldn't be executed. Check for wrong argument or missing values.\")\n ->send();\n }",
"function is_type( $type ) {\n\t\tif (is_array($type) && in_array($this->product_type, $type)) return true;\n\t\telseif ($this->product_type==$type) return true;\n\t\treturn false;\n\t}",
"function isSupportedType($type, $src_file) {\n if ($type !== \"jpg\" && $type !== \"jpeg\" && $type !== \"png\") {\n return zmgToolboxPlugin::registerError($src_file, 'GD 1.x: Source file is not an image or image type is not supported.');\n }\n return true;\n }",
"private function is_valid_post_type() {\n\t\t\n\t\t/**\n\t\t * Includes our array of post types\n\t\t */\n\t\tinclude_once( 'q-and-a-post-types.php' );\n\t\t\n\t\treturn ! empty( $_POST['post_type'] ) && ( in_array( get_current_screen()->post_type, $q_and_a_post_types ) );\n\t}",
"public function type();",
"public function type();",
"public function type();",
"public function type();",
"#[Pure]\n public static function mbHttpInput(?string $type): array|string|false\n {\n return mb_http_input($type);\n }",
"private function isAllowedType(string $type): bool\n {\n return in_array($type, Reduction::ALLOWED_TYPES, true);\n }",
"public function isValidDataType(string $type): bool\r\n {\r\n return in_array($type, static::DATA_TYPES);\r\n }",
"function isTextAreaType($type)\n{\n return($type==\"tinyblob\" or $type==\"blob\" or $type==\"mediumblob\" or $type==\"longblob\"\n or $type==\"tinytext\" or $type==\"text\" or $type==\"mediumtext\" or $type==\"longtext\");\n}",
"function getArgType($arg) {\n switch (gettype($arg)) {\n case 'double': return SQLITE3_FLOAT;\n case 'integer': return SQLITE3_INTEGER;\n case 'boolean': return SQLITE3_INTEGER;\n case 'NULL': return SQLITE3_NULL;\n case 'string': return SQLITE3_TEXT;\n case 'string': return SQLITE3_TEXT;\n default: \n $type_error = 'Argument is of invalid type '.gettype($arg);\n $this->register_error($type_error);\n $this->show_errors ? trigger_error($type_error,E_USER_WARNING) : null;\n return false;\n }\n }",
"public function isAllowedType()\n {\n $extension = $this->getFile()->guessExtension();\n if (in_array($extension, $this->allowedTypes)) {\n return true;\n } else {\n return false;\n }\n }",
"function CheckFlowType($flowtype) {\n $flow_type_array = array (\"absence\", \"overtime\", \"cancel_absence\");\n if (! in_array(strtolower($flowtype), $flow_type_array)) {\n trigger_error(\"<font color='red'>Programming Error: Unknow Workflow Type, Must be 'absence' or 'overtime'. Current Workflow Type is \" . $flowtype . \"</font>\", E_USER_ERROR);\n }\n }"
] | [
"0.7686497",
"0.73949987",
"0.69352216",
"0.68818086",
"0.6846116",
"0.6759536",
"0.67099124",
"0.6659094",
"0.6635325",
"0.6606951",
"0.6571913",
"0.65334177",
"0.6527752",
"0.6495026",
"0.64497083",
"0.64381236",
"0.6433638",
"0.64216983",
"0.63896525",
"0.6374931",
"0.63650763",
"0.6307595",
"0.6246328",
"0.6228054",
"0.6220322",
"0.6213779",
"0.6194733",
"0.6189509",
"0.61845154",
"0.6174695",
"0.6153397",
"0.61393875",
"0.6139177",
"0.61117595",
"0.60993814",
"0.6097165",
"0.609694",
"0.60724247",
"0.6058571",
"0.6050918",
"0.60420793",
"0.60259235",
"0.6019747",
"0.6006196",
"0.5993218",
"0.59784526",
"0.5973046",
"0.59699774",
"0.5968768",
"0.5965505",
"0.5955584",
"0.59503305",
"0.59411645",
"0.59373033",
"0.5935887",
"0.5921579",
"0.5912797",
"0.590106",
"0.5900296",
"0.5897141",
"0.5895285",
"0.5891246",
"0.58840656",
"0.5879291",
"0.5879291",
"0.5843214",
"0.583842",
"0.5837979",
"0.5828229",
"0.58218795",
"0.5814289",
"0.5807291",
"0.58024395",
"0.57994956",
"0.57915735",
"0.5790629",
"0.5787458",
"0.57654667",
"0.5764351",
"0.5764094",
"0.5761105",
"0.57598525",
"0.57580304",
"0.5750637",
"0.5747395",
"0.5745699",
"0.574013",
"0.5718632",
"0.5706719",
"0.5702848",
"0.5696639",
"0.5696639",
"0.5696639",
"0.5696639",
"0.5684121",
"0.5669815",
"0.565957",
"0.5655606",
"0.5654134",
"0.5652256",
"0.56521463"
] | 0.0 | -1 |
check for valid file type | function SetFileType($sFileType) {
if (in_array($sFileType, array('gif', 'png', 'jpeg'))) {
$this->sFileType = $sFileType;
} else {
$this->sFileType = 'jpeg';
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function validateTypeOfFile($type){\n\t$arrFile = ['image/png', 'image/jpg', 'image/jpeg', 'image/gif'];\n\tif(in_array($type, $arrFile)){\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n}",
"private function checkMimeType()\n {\n $allowedTypes = $this->getSetting('allowed_upload_types', true);\n if (is_string($allowedTypes) && strlen($allowedTypes)) {\n $allowedTypes = str_replace(' ', '', $allowedTypes);\n $allowedTypes = explode(',', $allowedTypes);\n }\n if (is_array($allowedTypes)) {\n if (!in_array($this->file->getMimeType(), $allowedTypes)) {\n throw new FileException('File type is not allowed');\n }\n }\n }",
"public function mimeTypeValid()\n\t{\n\t\tif (!in_array($this->files['type'], $this->mime_types)) {\n\t\t\tthrow new Exception(\"Invalid file Extension\",6);\n\t\t}\n\t}",
"protected function _validateMimeType()\n\t{\n\t\t$this->_fileType = \\MimeType\\MimeType::getType($this->getFilePath());\n\n\t\tif (!in_array($this->_fileType, $this->_allowedMimeType)) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"function check_file_type($source)\n{\n $file_info = check_mime_type($source);\n\n switch ($file_info) {\n case 'application/pdf':\n return true;\n break;\n\n case 'application/msword':\n return true;\n break;\n\n case 'application/rtf':\n return true;\n break;\n case 'application/vnd.ms-excel':\n return true;\n break;\n\n case 'application/vnd.ms-powerpoint':\n return true;\n break;\n\n case 'application/vnd.oasis.opendocument.text':\n return true;\n break;\n\n case 'application/vnd.oasis.opendocument.spreadsheet':\n return true;\n break;\n \n case 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet':\n return true;\n break;\n\n case 'application/vnd.openxmlformats-officedocument.wordprocessingml.document':\n return true;\n break;\n \n case 'image/gif':\n return true;\n break;\n\n case 'image/jpeg':\n return true;\n break;\n\n case 'image/png':\n return true;\n break;\n\n case 'image/wbmp':\n return true;\n break;\n\n default:\n return false;\n break;\n }\n}",
"function checkType($type){\n\n $allowed = array('jpg', 'jpeg', 'png');\n $fileExt = explode('/', $type);\n $fileExt = strtolower(end($fileExt));\n return in_array($fileExt, $allowed) ? true : false ;\n\n }",
"private function checkSupportedFile($file_type) {\n return true;\n\n\n }",
"function validateMimeType($file_name){\r\n // array of acceptable MIME types\r\n $mime_types = [\r\n 'image/png',\r\n 'image/jpeg'\r\n ];\r\n \r\n // determines MIME type\r\n $type = mime_content_type($file_name);\r\n \r\n // check if MIME type is in array of acceptable types\r\n return in_array($type, $mime_types, true);\r\n}",
"public function checkFileType($fileType){\n \t\tif ($fileType == \"application/octet-stream\"){\n \t\t\treturn true;\n \t\t}else{\n \t\t\treturn false;\n \t\t}\n \t}",
"public function checkFormatAllowed() {\n\t\t$imageFileType = pathinfo(basename($this->value[\"name\"]),PATHINFO_EXTENSION);\n\t\tif((($this->extension == \"\") && ($imageFileType == \"jpg\" || $imageFileType == \"png\" || $imageFileType == \"jpeg\"\n\t\t|| $imageFileType == \"gif\")) || ($this->extension == \"pdf\" && $imageFileType == \"pdf\" )) {\n\t\t return true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public function extens(){\n $this->typefl = pathinfo($this->filename, PATHINFO_EXTENSION);\n\n if(!in_array($this->typefl, $this->type)){\n echo \"Wrong extension!!!\";\n return false;\n }\n else{\n return true;\n }\n }",
"function fileChecker($nome_file){\n \n // controllo che sia stato inviato un file altrimenti restituisco false\n if(empty($_FILES['file'])){\n return false;\n }\n \n // memorizzo l'estensione\n $ext = trim(strtolower(end($nome_file)));\n \n // verifico che sia stato inviato un file contente un foto i formati disponibili sono jpg png jpeg\n if(!preg_match(VALID_FILE_FORMAT, $ext)){\n return false;\n }\n \n return true;\n}",
"private function isFileValid(): bool\n {\n return FileHelper::isExpectedExtensions($this->getPath(), $this->getFileExtensions());\n }",
"public function checkMimeType()\n {\n if (empty($this->mediaRealType) && empty($this->allowUnknownTypes)) {\n $this->setErrors(\\XoopsLocale::E_FILE_TYPE_REJECTED);\n return false;\n }\n\n if ((!empty($this->allowedMimeTypes)\n && !in_array($this->mediaRealType, $this->allowedMimeTypes))\n || (!empty($this->deniedMimeTypes)\n && in_array($this->mediaRealType, $this->deniedMimeTypes))\n ) {\n $this->setErrors(sprintf(\\XoopsLocale::EF_FILE_MIME_TYPE_NOT_ALLOWED, $this->mediaType));\n return false;\n }\n return true;\n }",
"function __checkType($type = null) {\n\t\t$valid = false;\n \tforeach($this->allowedTypes as $allowedType) {\n \t\tif(strtolower($type) == strtolower($allowedType)){\n \t\t$valid = true;\n \t\t}\n \t}\n\t\tif(!$valid) {\n\t\t\t$this->Session->setFlash('You tried to upload an invalid type! Please upload your pictures in jpeg, gif, or png format!');\n\t\t\t$this->redirect(Controller::referer('/'));\n\t\t}\n\t}",
"function check_upload($file) {\n if (preg_match(\":^application/vnd.bdoc-:\", $file[\"type\"])) {\n $file[\"format\"] = \"bdoc\";\n } else if ($file[\"type\"] === \"application/x-ddoc\") {\n $file[\"format\"] = \"ddoc\";\n } else {\n return FALSE;\n }\n\n return is_uploaded_file($file[\"tmp_name\"]);\n}",
"public function extensionValid() \n\t{\n\t\tif (!in_array($this->extension_of_file, $this->file_types)) //{\n\t\t\tthrow new Exception(\"Invalid file Extension\",5);\n\t\t//}\n\t}",
"private function isValidImageType(string $file)\r\n {\r\n return in_array(pathinfo($file, PATHINFO_EXTENSION), $this->supported);\r\n }",
"protected function isFile() {}",
"public function isValidType( $ext=null ){\n global $VALID_FILES;\n if (!$ext)\n $ext = $this->ext; \n return (in_array( $ext, $VALID_FILES )); \n }",
"function isFileType($files) {\n $allowedExts = array(\"jpg\", \"jpeg\", \"gif\", \"png\", \"doc\", \"docx\", \"txt\", \"rtf\", \"pdf\", \"xls\", \"xlsx\", \"ppt\", \"pptx\");\n $temp = explode(\".\", $files);\n $extension = end($temp);\n if (in_array($extension, $allowedExts))\n return true;\n else\n return false;\n}",
"public function isFile();",
"function check_mime_type($source)\n{\n $mime_types = array(\n // images\n 'png' => 'image/png',\n 'jpe' => 'image/jpeg',\n 'jpeg' => 'image/jpeg',\n 'jpg' => 'image/jpeg',\n 'gif' => 'image/gif',\n 'bmp' => 'image/bmp',\n 'ico' => 'image/vnd.microsoft.icon',\n 'tiff' => 'image/tiff',\n 'tif' => 'image/tiff',\n 'svg' => 'image/svg+xml',\n 'svgz' => 'image/svg+xml',\n // adobe\n 'pdf' => 'application/pdf',\n // ms office\n 'doc' => 'application/msword',\n 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n 'rtf' => 'application/rtf',\n 'xls' => 'application/vnd.ms-excel',\n 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n 'ppt' => 'application/vnd.ms-powerpoint',\n // open office\n 'odt' => 'application/vnd.oasis.opendocument.text',\n 'ods' => 'application/vnd.oasis.opendocument.spreadsheet',\n );\n $arrext = explode('.', $source['name']);\n $jml = count($arrext) - 1;\n $ext = $arrext[$jml];\n $ext = strtolower($ext);\n //$ext = strtolower(array_pop(explode(\".\", $source['name'])));\n if (array_key_exists($ext, $mime_types)) {\n return $mime_types[$ext];\n } elseif (function_exists('finfo_open')) {\n $finfo = finfo_open(FILEINFO_MIME);\n $mimetype = finfo_file($finfo, $source['tmp_name']);\n finfo_close($finfo);\n return $mimetype;\n } else {\n return false;\n }\n}",
"private function checkSourceMimeType()\n {\n $fileMimeType = $this->getMimeTypeOfSource();\n if (is_null($fileMimeType)) {\n throw new InvalidImageTypeException('Image type could not be detected');\n } elseif ($fileMimeType === false) {\n throw new InvalidImageTypeException('File seems not to be an image.');\n } elseif (!in_array($fileMimeType, self::$allowedMimeTypes)) {\n throw new InvalidImageTypeException('Unsupported mime type: ' . $fileMimeType);\n }\n }",
"function testFileTypes()\r\n {\r\n $nautilus = $this->nautilus->uploadDir('/tmp');\r\n $image = array('name' => $this->testingImage,\r\n 'type' => 'image/jpeg',\r\n 'size' => 542,\r\n 'tmp_name' => $this->testingImage,\r\n 'error' => 0\r\n );\r\n\r\n /* should not accept gif*/\r\n $nautilus->fileTypes(array('gif'));\r\n $this->setExpectedException('Image\\ImageException',' This is not allowed file type!\r\n Please only upload ( gif ) file types');\r\n $upload = $nautilus->upload($image,'nautilus_test_image');\r\n\r\n\r\n /* should not accept png*/\r\n $nautilus->fileTypes(array('png'));\r\n $this->setExpectedException('Image\\ImageException',' This is not allowed file type!\r\n Please only upload ( png ) file types');\r\n $upload = $nautilus->upload($image,'nautilus_test_image');\r\n\r\n /* shouldn't accept this file */\r\n $nautilus->fileTypes(array('exe'));\r\n $this->setExpectedException('Image\\ImageException',' This is not allowed file type!\r\n Please only upload ( exe ) file types');\r\n $upload = $nautilus->upload($image,'nautilus_test_image');\r\n\r\n /* example file is actually jpeg, not jpg */\r\n $nautilus->fileTypes(array('png', 'jpeg'));\r\n $upload = $nautilus->upload($image,'nautilus_test_image');\r\n $this->assertEquals('uploads/nautilus_test_image.jpeg',$upload);\r\n }",
"function validateFile($file){\n\n $check = getimagesize($file[\"tmp_name\"]);\n if($check !== false) {\n $err = \"File is an image - \" . $check[\"mime\"] . \".\";\n $uploadOk = 1;\n } else {\n $err = \"File is not an image.\";\n $uploadOk = 0;\n }\n// Allow certain file formats\nif($file[\"type\"] != \"jpg\" && $file[\"type\"] != \"png\" && $file[\"type\"] != \"jpeg\"\n&& $file[\"type\"] != \"gif\" ) {\n $err = \"Sorry, only JPG, JPEG, PNG & GIF files are allowed.\";\n $uploadOk = 0;\n}\n return ($uploadOk==1)? true : false;\n}",
"function testFileTypes()\n {\n $bulletproof = $this->bulletproof->uploadDir('/tmp');\n $image = array('name' => $this->testingImage,\n 'type' => 'image/jpeg',\n 'size' => 542,\n 'tmp_name' => $this->testingImage,\n 'error' => 0\n );\n\n /* should not accept gif*/\n $bulletproof->fileTypes(array('gif'));\n $this->setExpectedException('ImageUploader\\ImageUploaderException',' This is not allowed file type!\n Please only upload ( gif ) file types');\n $upload = $bulletproof->upload($image,'bulletproof_test_image');\n\n\n /* should not accept png*/\n $bulletproof->fileTypes(array('png'));\n $this->setExpectedException('ImageUploader\\ImageUploaderException',' This is not allowed file type!\n Please only upload ( png ) file types');\n $upload = $bulletproof->upload($image,'bulletproof_test_image');\n\n /* shouldn't accept this file */\n $bulletproof->fileTypes(array('exe'));\n $this->setExpectedException('ImageUploader\\ImageUploaderException',' This is not allowed file type!\n Please only upload ( exe ) file types');\n $upload = $bulletproof->upload($image,'bulletproof_test_image');\n\n /* example file is actually jpeg, not jpg */\n $bulletproof->fileTypes(array('png', 'jpeg'));\n $upload = $bulletproof->upload($image,'bulletproof_test_image');\n $this->assertEquals('uploads/bulletproof_test_image.jpeg',$upload);\n }",
"function file_tester($file){\n if (htmlentities($file['filename']['type']) == 'text/plain')\n return true;\n else {\n echo \"Please submit correct file type (.txt)\";\n return false;\n }\n}",
"public function checkImageType()\n {\n if (empty($this->checkImageType)) {\n return true;\n }\n\n if (('image' == substr($this->mediaType, 0, strpos($this->mediaType, '/')))\n || (!empty($this->mediaRealType)\n && 'image' == substr($this->mediaRealType, 0, strpos($this->mediaRealType, '/')))\n ) {\n if (!@getimagesize($this->mediaTmpName)) {\n $this->setErrors(\\XoopsLocale::E_INVALID_IMAGE_FILE);\n return false;\n }\n }\n return true;\n }",
"public function validateExtensionplan(){\n $allowed = array('jpeg', 'jpg', 'png');\n $filename = $this->getplanFloor('name');\n $ext = pathinfo($filename, PATHINFO_EXTENSION);\n if(!in_array($ext,$allowed)) {\n return false;\n } else {\n return true;\n }\n }",
"public function isValid($file_key)\n\t{\n\t\treturn App_File_Utils::check_type($this->_type, $_FILES[$file_key]['tmp_name']);\n\t}",
"function validateFileMime(&$model, $fieldData, $fieldName, $allowedMimes = array()) {\n if (empty($fieldData[$fieldName]['tmp_name'])) return true;\n \n $availableMimes = assetMimes();\n \n foreach (!empty($allowedMimes) ? $allowedMimes : array() as $type) {\n if ($type == '*') return true;\n \n # check fileinfo first\n $fileinfo = assetMimeType($fieldData[$fieldName]['tmp_name']);\n if ((!$fileinfo) && (in_array($fileinfo, $availableMimes[$type]))) return true; \n \n # check browser provided mime-type second\n if (in_array($fieldData[$fieldName]['type'], $availableMimes[$type])) return true;\n }\n \n return false;\n }",
"protected function checkType($file) {\n if (in_array($file['type'], $this->_permitted)) {\n return true;\n } else {\n if (!empty($file['type'])) {\n $this->_messages[] = '4' . $file['name'] . ' is not a permitted file type.';\n }\n return false;\n }\n }",
"function checkimagetype($imagetype){\n\n\t\t$filetype = array(\n\t\t 'image/bmp', \n\t\t 'image/gif', \n\t\t 'image/icon', \n\t\t 'image/jpeg',\n\t\t 'image/jpg', \n\t\t 'image/png', \n\t\t 'image/tiff', \n\t\t );\n if( in_array($imagetype,$filetype))\n\t\t\treturn true;\n\t\telse \n\t\t\treturn 0;\n\n}",
"function check_file_extension($ext, $allowed) {\nif (in_array($ext, $allowed)) {\nreturn true;\n}else {\necho \"Only .txt file allow to be uploaded\";\n}\n}",
"function check_file_is_audio( $tmp ) \n{\n $allowed = array(\n 'audio/mpeg', 'audio/x-mpeg', 'audio/mpeg3', 'audio/x-mpeg-3', 'audio/aiff', \n 'audio/mid', 'audio/x-aiff', 'audio/x-mpequrl','audio/midi', 'audio/x-mid', \n 'audio/x-midi','audio/wav','audio/x-wav','audio/xm','audio/x-aac','audio/basic',\n 'audio/flac','audio/mp4','audio/x-matroska','audio/ogg','audio/s3m','audio/x-ms-wax',\n 'audio/xm'\n );\n \n // check REAL MIME type\n $finfo = finfo_open(FILEINFO_MIME_TYPE);\n $type = finfo_file($finfo, $tmp );\n finfo_close($finfo);\n \n // check to see if REAL MIME type is inside $allowed array\n if( in_array($type, $allowed) ) {\n return $type;\n } else {\n return false;\n }\n}",
"function isFileId($type) {\n\tif (strlen($type) >= 7) {\n\t\tif (substr($type, -7) === \"file_id\") {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}",
"public function isFile() : bool;",
"private function isValidStaticTypeFile(): bool\n {\n return $this->oHttpRequest->getExists('t') &&\n in_array($this->oHttpRequest->get('t'), self::ASSET_FILES_ACCEPTED, true);\n }",
"function checkFileType( $file_types, $currentFileType )\n{\n $aFiles = explode( ',', $file_types ) ; # create aFiles file type array:\n for ( $x=0; $x<count($aFiles); $x++ )\n {\n if ( $aFiles[$x] == $currentFileType ) { return TRUE ; }\n }\n return FALSE ; # no match found, return false!\n}",
"function check_image_type($ftype)\n{\n$ext = strtolower(end(explode('.',$ftype)));\n$img_array = array('jpeg','jpg','gif','png');\n\n//\tif($ftype == \"image/jpeg\" || $ftype == \"image/jpg\" || $ftype == \"image/gif\" || $ftype == \"image/png\" )\n\tif(in_array($ext,$img_array))\n\t\treturn 1;\n\t\telse\n\t\t\treturn 0;\n}",
"function file_is_valid_image($path)\n {\n }",
"function isSupportedType($type, $src_file) {\n if ($type !== \"jpg\" && $type !== \"jpeg\" && $type !== \"png\") {\n return zmgToolboxPlugin::registerError($src_file, 'GD 1.x: Source file is not an image or image type is not supported.');\n }\n return true;\n }",
"function availableFileTypes($ext) {\n //checking file type extension\n switch ($ext) {\n //checking txt extention\n case \"txt\":\n $type[0] = \"text/plain\";\n break;\n\n //checking xml extention\n case \"xml\":\n $type[0] = \"text/xml\";\n $type[1] = \"application/xml\";\n break;\n\n //checking csv extention\n case \"csv\":\n $type[0] = \"text/x-comma-separated-values\";\n $type[1] = \"application/octet-stream\";\n $type[2] = \"text/plain\";\n break;\n\n //checking zip extention\n case \"zip\":\n $type[0] = \"application/zip\";\n break;\n\n //checking tar extention\n case \"tar\":\n $type[0] = \"application/x-gzip\";\n break;\n\n //checking ctar extention\n case \"ctar\":\n $type[0] = \"application/x-compressed-tar\";\n break;\n\n //checking pdf extention\n case \"pdf\":\n $type[0] = \"application/pdf\";\n break;\n\n //checking doc extention\n case \"doc\":\n $type[0] = \"application/msword\";\n $type[1] = \"application/octet-stream\";\n break;\n\n //checking xls extention\n case \"xls\":\n $type[0] = \"application/vnd.ms-excel\";\n $type[1] = \"application/vnd.oasis.opendocument.spreadsheet\";\n break;\n\n //checking ppt extention\n case \"ppt\":\n $type[0] = \"application/vnd.ms-powerpoint\";\n break;\n\n //checking jpg extention\n case \"jpg\":\n $type[0] = \"image/jpg\";\n $type[1] = \"image/jpeg\";\n $type[2] = \"image/pjpeg\";\n break;\n\n //checking gif extention\n case \"gif\":\n $type[0] = \"image/gif\";\n break;\n\n //checking png extention\n case \"png\":\n $type[0] = \"image/png\";\n break;\n\n //checking bmp extention\n case \"bmp\":\n $type[0] = \"image/bmp\";\n break;\n\n //checking icon extention\n case \"icon\":\n $type[0] = \"image/x-ico\";\n break;\n\n //checking tfontt extention\n case \"font\":\n $type[0] = \"application/x-font-ttf\";\n break;\n }\n\n return $type;\n }",
"function checkFileType($imageFileType)\n{\n\n if ($imageFileType == \"c\"||$imageFileType==\"C\"){\n echo \"C file detected!\";\n return 1;\n }\n if ($imageFileType ==\"py\"||$imageFileType==\"PY\"){\n echo \"Python file detected!\";\n return 2;\n\n }\n else{\n echo \"File is not allowed\";\n return 0;\n\n }\n}",
"public function checkIsFile($path);",
"public function is_file_valid($ext){\r\n\t\t$rslt = false;\r\n\r\n\t\tif($ext == '.doc' || $ext == '.DOC' || $ext == '.docx' || $ext == '.DOCX' || $ext == '.xls' || $ext == '.XLS' || $ext == '.xlsx' || $ext == '.XLSX' || $ext == '.ppt' || $ext == '.PPT' || $ext == '.pptx' || $ext == '.PPTX' || $ext == '.pdf' || $ext == '.PDF' || $ext == '.jpg' || $ext == '.JPG' || $ext == '.png' || $ext == '.PNG' || $ext == '.csv' || $ext == '.CSV' || $ext == '.gif' || $ext == '.GIF' || $ext == '.zip' || $ext == '.ZIP') {\r\n\r\n\t\t\t$rslt = true;\r\n\t\t}\r\n\r\n\t\treturn $rslt;\r\n\r\n\t}",
"public function file_check($str){\n \t$allowed_mime_type_arr = array('application/pdf');\n \tif(isset($_FILES['file']['name']) && $_FILES['file']['name']!=\"\"){\n \t\t$mime = get_mime_by_extension($_FILES['file']['name']);\n \t\tif(in_array($mime, $allowed_mime_type_arr)){\n \t\t\treturn true;\n \t\t}else{\n \t\t\t$this->form_validation->set_message('file_check', 'Extension File Hanya Boleh PDF');\n \t\t\treturn false;\n \t\t}\n \t}else{\n \t\t// $this->form_validation->set_message('file_check', 'Silahkan Pilih File PDF nya.');\n \t\t// return false;\n \t\treturn true;\n \t}\n }",
"function isKnownMimeType($filename, $filetype)\n\t{\n\t $filetype = MimeTypeHandler::filename2ObjType($format, $filename);\n\t if ($format == '') {\n\t return false;\n\t }\n\t else {\n\t return $format;\n\t }\n\t}",
"public function isAllowedType()\n {\n $extension = $this->getFile()->guessExtension();\n if (in_array($extension, $this->allowedTypes)) {\n return true;\n } else {\n return false;\n }\n }",
"function accouk_is_valid_text_file($path) {\n\n // Use finfo to detect mime type\n $finfo = finfo_open(FILEINFO_MIME_TYPE);\n $mime = finfo_file($finfo, $path);\n finfo_close($finfo);\n if($mime !== \"text/plain\") return false;\n\n // Check file extension\n $filename_length = strlen($path);\n if(substr($path, $filename_length-4, $filename_length) !== \".txt\") return false;\n\n return true;\n}",
"public function isAllowedMIMEType()\n {\n if (!empty($this->allowed_upload_mime_type)) {\n if (!is_array($this->allowed_upload_mime_type)) {\n NUCLEUS_Exceptions::catcher(MIME_TYPE_LIST_ERROR);\n return false;\n }\n else {\n if (!in_array($this->_file_info['type'], $this->allowed_upload_mime_type)) {\n NUCLEUS_Exceptions::catcher(UPLOAD_MIME_TYPE_DENIED);\n return false;\n }\n }\n }\n\n return true;\n }",
"public function wrongTypeFile()\n {\n return 'This type of file is not allowed';\n }",
"function isImageType($tempFileName)\n{\n\t$isImage = true;\n\t\n\t// Check if image file is actual image type\n $check = exif_imagetype($tempFileName);\n\t\n if ($check === false) \n\t{\n $isImage = false;\n\t}\n\t\n\treturn $isImage;\n}",
"function wp_check_filetype($filename, $mimes = null) {\n\t$mimes = is_array($mimes) ? $mimes : apply_filters('upload_mimes', array(\n\t\t'jpg|jpeg|jpe' => 'image/jpeg',\n\t\t'gif' => 'image/gif',\n\t\t'png' => 'image/png',\n\t\t'bmp' => 'image/bmp',\n\t\t'tif|tiff' => 'image/tiff',\n\t\t'ico' => 'image/x-icon',\n\t\t'asf|asx|wax|wmv|wmx' => 'video/asf',\n\t\t'avi' => 'video/avi',\n\t\t'mov|qt' => 'video/quicktime',\n\t\t'mpeg|mpg|mpe' => 'video/mpeg',\n\t\t'txt|c|cc|h' => 'text/plain',\n\t\t'rtx' => 'text/richtext',\n\t\t'css' => 'text/css',\n\t\t'htm|html' => 'text/html',\n\t\t'php|php3|' => 'application/php',\n\t\t'mp3|mp4' => 'audio/mpeg',\n\t\t'ra|ram' => 'audio/x-realaudio',\n\t\t'wav' => 'audio/wav',\n\t\t'ogg' => 'audio/ogg',\n\t\t'mid|midi' => 'audio/midi',\n\t\t'wma' => 'audio/wma',\n\t\t'rtf' => 'application/rtf',\n\t\t'js' => 'application/javascript',\n\t\t'pdf' => 'application/pdf',\n\t\t'doc' => 'application/msword',\n\t\t'pot|pps|ppt' => 'application/vnd.ms-powerpoint',\n\t\t'wri' => 'application/vnd.ms-write',\n\t\t'xla|xls|xlt|xlw' => 'application/vnd.ms-excel',\n\t\t'mdb' => 'application/vnd.ms-access',\n\t\t'mpp' => 'application/vnd.ms-project',\n\t\t'swf' => 'application/x-shockwave-flash',\n\t\t'class' => 'application/java',\n\t\t'tar' => 'application/x-tar',\n\t\t'zip' => 'application/zip',\n\t\t'gz|gzip' => 'application/x-gzip',\n\t\t'exe' => 'application/x-msdownload',\n\t\t// openoffice formats\n\t\t'odt' => 'application/vnd.oasis.opendocument.text',\n\t\t'odp' => 'application/vnd.oasis.opendocument.presentation',\n\t\t'ods' => 'application/vnd.oasis.opendocument.spreadsheet',\n\t\t'odg' => 'application/vnd.oasis.opendocument.graphics',\n\t\t'odc' => 'application/vnd.oasis.opendocument.chart',\n\t\t'odb' => 'application/vnd.oasis.opendocument.database',\n\t\t'odf' => 'application/vnd.oasis.opendocument.formula',\n\n\t));\n\n\t$type = false;\n\t$ext = false;\n\n\tforeach ($mimes as $ext_preg => $mime_match) {\n\t\t$ext_preg = '!\\.(' . $ext_preg . ')$!i';\n\t\tif (preg_match($ext_preg, $filename, $ext_matches)) {\n\t\t\t$type = $mime_match;\n\t\t\t$ext = $ext_matches[1];\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn compact('ext', 'type');\n}",
"public function file_check($str)\n {\n\n\n\n echo \"sadasd : \";\n print_r($str);\n print_r($_FILES);\n\n die();\n\n $allowed_mime_type_arr = array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/png', 'image/x-png', 'svg');\n $mime = get_mime_by_extension($_FILES['file']['name']);\n if (isset($_FILES['file']['name']) && $_FILES['file']['name'] != \"\") {\n if (in_array($mime, $allowed_mime_type_arr)) {\n return true;\n } else {\n $this->form_validation->set_message('file_check', 'por favor selecciona solamente gif/jpg/png file.');\n return false;\n }\n } else {\n $this->form_validation->set_message('file_check', 'Selecciona un archivo.');\n return false;\n }\n }",
"public function file_check($str)\n {\n $allowed_mime_types = array('text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'application/x-csv', 'text/x-csv', 'text/csv', 'application/csv', 'application/excel', 'application/vnd.msexcel', 'text/plain');\n if (isset($_FILES['file']['name']) && $_FILES['file']['name'] != \"\") {\n $mime = get_mime_by_extension($_FILES['file']['name']);\n $fileAr = explode('.', $_FILES['file']['name']);\n $ext = end($fileAr);\n if (($ext == 'csv') && in_array($mime, $allowed_mime_types)) {\n return true;\n } else {\n $this->form_validation->set_message('file_check', 'Please select only CSV file to upload.');\n return false;\n }\n } else {\n $this->form_validation->set_message('file_check', 'Please select a CSV file to upload.');\n return false;\n }\n }",
"function isOfType($data, $types) {\r\n\t\t// Multiple types\r\n\t\tif (!is_array($types)) $types = array($types);\r\n\r\n\t\t// Fails if not in the list of allowed extensions\r\n\t\tif (!in_array($data['ext'], $types)) {\r\n\t\t\t$this->uploadValidationError = sprintf(__d('caracole_documents', 'This file extension, %1$s, is not allowed.', true), $data['ext']);\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\r\n\t}",
"public function isFile(): bool;",
"function checkMimeType($params = array(), $options = array()) {\n\t\tif ($this->isUploadedFile($params)) {\n\t\t\t// Only validate mime type if a file was uploaded at all\n\t\t\t$val = array_shift($params);\n\t\t\tforeach ($options['allowed_mime_types'] as $extensions) {\n\t\t\t\tif ((!is_array($extensions) && $extensions == '*') ||\n\t\t\t\t\t(is_array($extensions) && in_array($val['type'], $extensions))) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public function checkFileValidation($string) {\n $file_mimes = array('text/x-comma-separated-values',\n 'text/comma-separated-values',\n 'application/octet-stream',\n 'application/vnd.ms-excel',\n 'application/x-csv',\n 'text/x-csv',\n 'text/csv',\n 'application/csv',\n 'application/excel',\n 'application/vnd.msexcel',\n 'text/plain',\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'\n );\n if (isset($_FILES['fileURL']['name'])) {\n $arr_file = explode('.', $_FILES['fileURL']['name']);\n $extension = end($arr_file);\n if (($extension == 'xlsx' || $extension == 'xls' || $extension == 'csv') && in_array($_FILES['fileURL']['type'], $file_mimes)) {\n return true;\n } else {\n $this->form_validation->set_message('checkFileValidation', 'Please choose correct file.');\n return false;\n }\n } else {\n $this->form_validation->set_message('checkFileValidation', 'Please choose a file.');\n return false;\n }\n }",
"function check_upload_mimes($mimes)\n {\n }",
"function testCompatible(){\n\t\tif($this->$imageAsset[\"type\"] == \"image/jpeg\" || $_FILES[\"image_upload_box\"][\"type\"] == \"image/pjpeg\"){\t\n\t\t\t$this->imgType = 'jpg';\n\t\t}\t\t\n\t\t// if uploaded image was GIF\n\t\tif($this->$imageAsset[\"type\"] == \"image/gif\"){\t\n\t\t\t$this->imgType = 'gif';\n\t\t}\t\n\t\t// if uploaded image was PNG\n\t\tif($this->$imageAsset[\"type\"] == \"image/x-png\"){\n\t\t\t$this->imgType = 'png';\n\t\t}\n\t\telse {\n\t\t\t$this->imgType = 'invalid';\n\t\t}\n\t\t\n\t}",
"public function isAllowedExtension()\n {\n if (!empty($this->allowed_upload_file_ext)) {\n if (!is_array($this->allowed_upload_file_ext)) {\n NUCLEUS_Exceptions::catcher(FILE_TYPE_LIST_ERROR);\n return false;\n }\n else {\n if (!in_array($this->_file_info['ext'], $this->allowed_upload_file_ext)) {\n NUCLEUS_Exceptions::catcher(UPLOAD_FILE_TYPE_DENIED);\n return false;\n }\n }\n }\n\n return true;\n }",
"function isValidFile($fileArray)\n{\n\t# Creating image type array\n\t$imgTypeArr = array('jpg','gif','png','jpeg');\n\t\n\t# image size variable\n\t$fileSize\t= $fileArray['file']['size']; \n\t\n\t# image type variable\n\t$fileType\t= $fileArray['file']['name']; \n\t\n\t# Creating Image extension variable and converting to lowercase\n\t\t$imageExt\t= strtolower(substr($fileType, strrpos($fileType, '.') + 1));\n\t\n\t# Checking weather file type is image and size is less then OR equal to 2 MB\n\tif(in_array($imageExt,$imgTypeArr) && $fileSize <= '2090000'){\n\t\treturn TRUE;\n\t}else{\n\t\treturn FALSE;\n\t}\n}",
"private function checkUploadFileMIME($file)\n {\n $flag = 0;\n $file_array = explode(\".\", $file [\"name\"]);\n $file_extension = strtolower(array_pop($file_array));\n\n // 2.through the binary content to detect the file\n switch ($file_extension) {\n case \"xls\" :\n // 2003 excel\n $fh = fopen($file [\"tmp_name\"], \"rb\");\n $bin = fread($fh, 8);\n fclose($fh);\n $strinfo = @unpack(\"C8chars\", $bin);\n $typecode = \"\";\n foreach ($strinfo as $num) {\n $typecode .= dechex($num);\n }\n if ($typecode == \"d0cf11e0a1b11ae1\") {\n $flag = 1;\n }\n break;\n case \"xlsx\" :\n // 2007 excel\n $fh = fopen($file [\"tmp_name\"], \"rb\");\n $bin = fread($fh, 4);\n fclose($fh);\n $strinfo = @unpack(\"C4chars\", $bin);\n $typecode = \"\";\n foreach ($strinfo as $num) {\n $typecode .= dechex($num);\n }\n echo $typecode . 'test';\n if ($typecode == \"504b34\") {\n $flag = 1;\n }\n break;\n }\n // 3.return the flag\n return $flag;\n }",
"function validateCompile($file, $type, $folder, $require_type){\n\tif($type=='application/sql' && $require_type==$type){\n\t\tif(!is_array($file) || !$folder){\n\t\t\treturn false;\n\t\t}\t\n\t}elseif($type=='application/zip' && $require_type==$type){\n\t\tif(!is_array($file) || !$folder){\n\t\t\treturn false;\n\t\t}\t\n\t}else{\n\t\treturn false;\n\t}\t\n\treturn true;\n}",
"function check_image_type($source_pic)\n{\n $image_info = check_mime_type($source_pic);\n\n switch ($image_info) {\n case 'image/gif':\n return true;\n break;\n\n case 'image/jpeg':\n return true;\n break;\n\n case 'image/png':\n return true;\n break;\n\n case 'image/wbmp':\n return true;\n break;\n\n default:\n return false;\n break;\n }\n}",
"abstract protected function validateFile() : object;",
"public function checkCorrectFile( $sName, $is = 'jpg|jpeg|png|gif' ){\n\t\treturn preg_match( '/('.$is.')/i', $this->throwExtOfFile( $sName ) );\n\t}",
"protected function validateMimetype($mime) {\n if (preg_match('#^[-\\w]+/[-\\w\\.+]+$#', $mime)) {\n return TRUE;\n }\n else {\n return FALSE;\n }\n }",
"function validate_picture_file($path) {\n $acceptableTypes = array(IMAGETYPE_JPEG, IMAGETYPE_PNG, IMAGETYPE_GIF);\n $detectedType = exif_imagetype($path); // WARNING: This will only work if the\n // EXIF extension is enabled.\n return in_array($detectedType, $acceptableTypes);\n}",
"public function checkMineType(array $file_data) {\n if (null != $this->_filterType) { //defined filter by Type\n $ext = explode(',', $this->_filterType);\n $mime = array();\n $mime = array();\n for ($i = 0; $i < sizeof($ext); ++$i) {\n $ext[$i] = strtolower(ltrim(trim($ext[$i]), '.'));\n $mime[$ext[$i]] = $this->_allowedMimeType[$ext[$i]];\n }\n } else {\n $mime = $this->_allowedMimeType;\n }\n $ext = $this->getExtension($file_data['name'], false);\n $expectMimeType = $this->getMimeTypeByExtension($ext, $mime);\n\n $fileMimeType = $this->_getUploadedFileMimeType($file_data);\n\n if (is_array($expectMimeType)) {\n if (!in_array($fileMimeType, $expectMimeType)) {\n $this->_error[] = 'Mime (' .$ext .'-' .$fileMimeType .') type does not allow';\n return false;\n }\n } elseif (is_string($expectMimeType)) {\n if ($expectMimeType != $fileMimeType) {\n $this->_error[] = 'Mime (' .$ext .'-' .$fileMimeType .') type does not allow';\n return false;\n }\n } elseif (false == $expectMimeType) {\n $this->_error[] = 'Mime (' .$ext .'-' .$fileMimeType .') type does not allow';\n return false;\n }\n\n return true;\n }",
"public function isImage(){\n if($this->imageFileType != \"jpg\" && $this->imageFileType != \"png\" && $this->imageFileType != \"jpeg\"\n && $this->imageFileType != \"gif\" ) {\n echo \"Sorry, only JPG, JPEG, PNG & GIF files are allowed.<br>\";\n $this->uploadOk = 0;\n }\n return $this->uploadOk;\n }",
"public function validateFileTypes($inputType, $outputType)\n {\n try{\n if(! in_array($inputType, $this->allowedInputTypes))\n {\n throw new \\Exception($inputType.' is not a valid Input file type');\n }\n\n if(! in_array($outputType, $this->allowedOutputTypes))\n {\n throw new \\Exception($outputType.' is not a valid Output file type');\n }\n\n return true;\n\n }catch(\\Exception $e){\n echo \"ERROR: \".$e->getMessage();\n return false;\n }\n }",
"function isValidDocument($docFormat, $document){\n $name = $document['name'];\n $ext = explode('.', $name);\n $ext = '.' . $ext[1];\n\n if($ext == $docFormat){\n if($document['error'] === 0){\n return true;\n }\n else{\n echo \"error uploading document\";\n return false;\n }\n }\n else{\n echo \"doc type does not match documents true extension\";\n }\n }",
"function checkimage($img)\r\n{\r\n $imageMimeTypes = array(\r\n 'image/png',\r\n 'image/gif',\r\n 'image/jpeg');\r\n\r\n $img = mime_content_type($img);\r\n $imgcheck = false;\r\n if (in_array ($img, $imageMimeTypes))\r\n {\r\n $imgcheck = true;\r\n }\r\n return $imgcheck;\r\n}",
"public function checkFile($filename){\n $ext = substr($filename, strrpos($filename, '.') + 1);\n if($ext==\"jpg\"||$ext==\"png\"||$ext==\"svg\"||$ext==\"jpeg\"){\n return true;\n }else{\n return false;\n }\n }",
"public function hasInvalidAttachmentType($array, $allowed_types) : bool\n {\n $basename = basename($array['file']['name']);\n $pathinfo = pathinfo($basename); //pdf\n $file_type = $pathinfo['extension'];\n return (in_array($file_type, $allowed_types)) ? false : true && $this->setError(true);\n //return $file_type;\n }",
"function checkFilePhoto(string $name)\n{\n if (!($_FILES[$name]['type'] == 'image/png') && !($_FILES[$name]['type'] == 'image/jpeg') && !($_FILES[$name]['type'] == 'image/gif')) {\n return 'Некорректный формат фото';\n }\n}",
"public abstract function isMime();",
"function is_image($path)\n{\n\t$controle_type_mime_autorises = ['image/gif', 'image/jpeg', 'image/pjpeg', 'image/png'];\n\t$fichier_mime_type = mime_content_type($path);\n\t//echo $fichier_mime_type;\n\n\tif(in_array($fichier_mime_type, $controle_type_mime_autorises)){\n\t return TRUE;\n\t}else{\n\t return FALSE;\n\t}\n}",
"public function testGetMimeType()\n {\n $validator = new File\\MimeType('image/gif');\n $this->assertEquals('image/gif', $validator->getMimeType());\n\n $validator = new File\\MimeType(['image/gif', 'video', 'text/test']);\n $this->assertEquals('image/gif,video,text/test', $validator->getMimeType());\n\n $validator = new File\\MimeType(['image/gif', 'video', 'text/test']);\n $this->assertEquals(['image/gif', 'video', 'text/test'], $validator->getMimeType(true));\n }",
"public function isFileNameType() {\r\n return $this->config['filenametype'];\r\n }",
"function validateFile($fieldname)\n{\n $error = '';\n if (!empty($_FILES[$fieldname]['error'])) {\n switch ($_FILES[$fieldname]['error']) {\n case '1':\n $error = 'Upload maximum file is 4 MB.';\n break;\n case '2':\n $error = 'File is too big, please upload with smaller size.';\n break;\n case '3':\n $error = 'File uploaded, but only halef of file.';\n break;\n case '4':\n $error = 'There is no File to upload';\n break;\n case '6':\n $error = 'Temporary folder not exists, Please try again.';\n break;\n case '7':\n $error = 'Failed to record File into disk.';\n break;\n case '8':\n $error = 'Upload file has been stop by extension.';\n break;\n case '999':\n default:\n $error = 'No error code avaiable';\n }\n } elseif (empty($_FILES[$fieldname]['tmp_name']) || $_FILES[$fieldname]['tmp_name'] == 'none') {\n $error = 'There is no File to upload.';\n } elseif ($_FILES[$fieldname]['size'] > FILE_UPLOAD_MAX_SIZE) {\n $error = 'Upload maximum file is '.number_format(FILE_UPLOAD_MAX_SIZE/1024,2).' MB.';\n } else {\n //$get_ext = substr($_FILES[$fieldname]['name'],strlen($_FILES[$fieldname]['name'])-3,3);\t\n $cekfileformat = check_file_type($_FILES[$fieldname]);\n if (!$cekfileformat) {\n $error = 'Upload File only allow (jpg, gif, png, pdf, doc, xls, xlsx, docx)';\n }\n }\n\n return $error;\n}",
"function file_is_image($filename) {\n return in_array(get_file_extension($filename), get_image_file_types());\n }",
"public function typeOfFile($path);",
"public function isFile()\n {\n return ( $this->fileStructure->type == self::IS_FILE );\n }",
"function verifyMimeType( $pFile ) {\n\t\t$mime = NULL;\n\t\tif( file_exists( $pFile ) ) {\n\t\t\tif( function_exists( 'finfo_open' ) ) {\n\t\t\t\tif( is_windows() && defined( 'PHP_MAGIC_PATH' ) && is_readable( PHP_MAGIC_PATH )) {\n\t\t\t\t\t$finfo = finfo_open( FILEINFO_MIME, PHP_MAGIC_PATH );\n\t\t\t\t} else {\n\t\t\t\t\t$finfo = finfo_open( FILEINFO_MIME );\n\t\t\t\t}\n\t\t\t\t$mime = finfo_file( $finfo, $pFile );\n\t\t\t\tfinfo_close( $finfo );\n\t\t\t} else {\n\t\t\t\tif( function_enabled( \"escapeshellarg\" ) && function_enabled( \"exec\" )) {\n\t\t\t\t\t$mime = exec( trim( 'file -bi ' . escapeshellarg( $pFile )));\n\t\t\t\t}\n\t\t\t}\n\t\t\tif( empty( $mime ) ) {\n\t\t\t\t$mime = $this->lookupMimeType( substr( $pFile, strrpos( $pFile, '.' ) + 1 ) );\n\t\t\t}\n\t\t\tif( $len = strpos( $mime, ';' )) {\n\t\t\t\t$mime = substr( $mime, 0, $len );\n\t\t\t}\n\t\t}\n\t\treturn $mime;\n\t}",
"function _file_get_type($file) {\n $ext = file_ext($file);\n if (preg_match(\"/$ext/i\", get_setting(\"image_ext\")))\n return IMAGE;\n if (preg_match(\"/$ext/i\", get_setting(\"audio_ext\")))\n return AUDIO;\n if (preg_match(\"/$ext/i\", get_setting(\"video_ext\")))\n return VIDEO;\n if (preg_match(\"/$ext/i\", get_setting(\"document_ext\")))\n return DOCUMENT;\n if (preg_match(\"/$ext/i\", get_setting(\"archive_ext\")))\n return ARCHIVE;\n }",
"public function checkIfValidMimeType($mimeType)\r\n {\r\n $acceptedMimeTypes = array(\r\n \"image/jpg\",\r\n \"image/jpeg\",\r\n \"image/png\",\r\n );\r\n\r\n if(in_array($mimeType, $acceptedMimeTypes)){\r\n return true;\r\n }\r\n\r\n return false;\r\n }",
"function validateFileType($postVar, $value, $error) {\n $errorMsg = \"\";\n //checking if the $value variable is isset or not\n if (isset($value)) {\n $found = strpos($value, ',');\n if ($found === false) {\n $options[0] = $value;\n } else {\n $options = explode(\",\", $value);\n }\n }\n\n //checking if the $postVar['name'] value in an array or not\n if (is_array($postVar['name'])) {\n $totalFiles = count($postVar['name']);\n\n for ($i = 0; $i < $totalFiles; $i++) {\n if ($postVar['name'][$i]) {\n $fileTypeMatch = 0;\n foreach ($options as $id => $type) {\n $typeArray = $this->availableFileTypes($type);\n if (in_array($postVar['type'][$i], $typeArray)) {\n $fileTypeMatch = 1;\n }\n if ($fileTypeMatch)\n break;\n }\n\n if (!$fileTypeMatch) {\n $errorMsg .= $error . \" (\" . $postVar['name'][$i] . \")<br>\";\n }\n }\n }\n //if not array then go here\n } else {\n if ($postVar['name']) {\n $fileTypeMatch = 0;\n foreach ($options as $id => $type) {\n $typeArray = $this->availableFileTypes($type);\n if (in_array($postVar['type'], $typeArray)) {\n $fileTypeMatch = 1;\n }\n if ($fileTypeMatch)\n break;\n }\n\n if (!$fileTypeMatch) {\n $errorMsg .= $error . \" (\" . $postVar['name'] . \")<br>\";\n }\n }\n }\n\n return $errorMsg;\n }",
"protected function is_valid_image_file($file_path) {\n \treturn false;\n }",
"protected function validateOwner()\n {\n $value = $this->owner->getValue();\n if (!isset($value['error']) || UPLOAD_ERR_NO_FILE == $value['error']) {\n return true;\n }\n $mime = $this->getConfig();\n return is_array($mime)? in_array($value['type'], $mime):\n $value['type'] == $mime;\n }",
"public function checkExtensions()\r\n\t{\r\n\t\treturn (strcasecmp(pathinfo($this->targetFile, PATHINFO_EXTENSION), pathinfo($this->referenceFile, PATHINFO_EXTENSION)) === 0);\r\n\t}",
"function validate_file($file, $allowed_files = array())\n {\n }",
"public function test_listUnsupportedFileTypes() {\n\n }",
"function is_file_an_image($filepath)\n{\n\t$a = getimagesize($filepath);\n\t$image_type = $a[2];\n\t \n\tif(in_array($image_type , array(IMAGETYPE_GIF , IMAGETYPE_JPEG ,IMAGETYPE_PNG , IMAGETYPE_BMP)))\n\t{\n\t return true;\n\t}\n\treturn false;\n}",
"static function validFile($name,$size,$arrayFileType){\n \n $valid = true;\n \n// //extraer el ultimo componente de la ruta(se busca el nombre del archivo)\n// $file = $dir . basename($_FILES[$name]['name']);\n //Extraer tipo de extencion del archivo y convertirlo en minuscula\n// $valFileType = strtolower(pathinfo($file,PATHINFO_EXTENSION));\n //Extraer el tamaño del archivo\n// $valsize = getimagesize($_FILES[$name][\"tmp_name\"]);\n \n // Extenciones permitidas\n //Extraer tipo de extencion del archivo y convertirlo en minuscula\n $valFileType = strtolower(pathinfo($_FILES[$name]['name'],PATHINFO_EXTENSION)); \n $true=0;\n// var_dump(count($arrayFileType));\n for($i=0; $i<=count($arrayFileType)-1; $i++){\n \n if($valFileType==$arrayFileType[$i]){\n $true=$true+1;\n } \n $stringFileType .=$arrayFileType[$i].\" \";\n \n }\n \n if($true==0){\n $valid = false;\n $msg.=\"Solo se permiten extensiones \".$stringFileType.\". \"; \n }\n \n //tamaño permitido\n if ($_FILES[$name][\"size\"] > $size) {\n $valid = false;\n $msg.=\"Operacion fallida, este archivo no puede ser mayor a \".($size/100000).\"MB. \"; \n } \n \n \n if($msg!=\"\"){\n// $msg = \"Debe darse un valor al campo: \".$msg ;\n utilities::alert($msg); \n }\n \n \n \n return ($valid); \n }",
"public function validate() {\n\t\t\n\t\tif(!is_dir($this->path)) {\n\t\t\tthrow new Exception('The path provided does not exist', '400');\n\t\t}\n\t\t\n\t\tif(!is_writeable($this->path)) {\n\t\t\tthrow new Exception('The path provided is not writeable', '400');\n\t\t}\n\t\t\n\t\tif(file_exists($this->path . $this->filename)) {\n\t\t\t\n\t\t\tif($this->allow_overwrite === false && $this->rename_if_exists === false) {\n\t\t\t\tthrow new Exception('The file ' . $this->filename . ' already exists', '400');\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tif($this->checkExtension() === false) {\n\t\t\tthrow new Exception('The file has an invalid extension', '400');\n\t\t}\n\t\t\n\t\treturn true;\n\t\t\n\t}",
"protected function checkType($type)\n {\n return $type === 'application/x-shockwave-flash' ||\n substr_compare($type, 'audio/', 0, 6) === 0;\n }"
] | [
"0.8156095",
"0.80034846",
"0.7971962",
"0.777223",
"0.77308893",
"0.7683842",
"0.7584927",
"0.7584441",
"0.75220793",
"0.7380893",
"0.7368405",
"0.7320937",
"0.7306792",
"0.7294118",
"0.72917086",
"0.72585684",
"0.7215459",
"0.707977",
"0.7074101",
"0.70148873",
"0.7013331",
"0.6968128",
"0.69623613",
"0.69614846",
"0.6957101",
"0.6952621",
"0.69244474",
"0.69196063",
"0.6918429",
"0.68940467",
"0.68885773",
"0.6886191",
"0.68640536",
"0.68400085",
"0.683993",
"0.68351036",
"0.6818788",
"0.68178564",
"0.6796085",
"0.67913026",
"0.6785746",
"0.6764801",
"0.6762039",
"0.67284286",
"0.67222655",
"0.67215484",
"0.6720566",
"0.67126924",
"0.67118853",
"0.67083895",
"0.67078286",
"0.66909397",
"0.6690496",
"0.6670835",
"0.6670243",
"0.66657925",
"0.66423225",
"0.6637581",
"0.6608949",
"0.6606852",
"0.6603642",
"0.6570239",
"0.656811",
"0.65679485",
"0.6560937",
"0.65445185",
"0.6541174",
"0.6539728",
"0.65294003",
"0.64892703",
"0.6465151",
"0.64533603",
"0.64454347",
"0.6444966",
"0.64435166",
"0.64313626",
"0.6431031",
"0.64206386",
"0.640635",
"0.64013046",
"0.639898",
"0.6388621",
"0.6386323",
"0.6386203",
"0.6385308",
"0.6384714",
"0.6366345",
"0.63630027",
"0.63537985",
"0.6306429",
"0.62927955",
"0.62907124",
"0.6279795",
"0.62792",
"0.6277211",
"0.62771124",
"0.6272953",
"0.62714946",
"0.6269951",
"0.6266902",
"0.62613386"
] | 0.0 | -1 |
allocate owner text colour | function DrawOwnerText() {
$iBlack = imagecolorallocate($this->oImage, 0, 0, 0);
// get height of selected font
$iOwnerTextHeight = imagefontheight(2);
// calculate overall height
$iLineHeight = $this->iHeight - $iOwnerTextHeight - 4;
// draw line above text to separate from CAPTCHA
imageline($this->oImage, 0, $iLineHeight, $this->iWidth, $iLineHeight, $iBlack);
// write owner text
imagestring($this->oImage, 2, 3, $this->iHeight - $iOwnerTextHeight - 3, $this->sOwnerText, $iBlack);
// reduce available height for drawing CAPTCHA
$this->iHeight = $this->iHeight - $iOwnerTextHeight - 5;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function set_font_color()\n {\n $this->font_color = imagecolorallocate(\n $this->img,\n L_FONT_COLOR_R,\n L_FONT_COLOR_G,\n L_FONT_COLOR_B\n );\n }",
"private function ensureTextColorsAreGenerated(): void\n\t{\n\t\tif ($this->generatedTextColors)\n\t\t\treturn;\n\n\t\t// TODO(Bas): Implement this!\n\n\t\t$this->textColorBody = null;\n\t\t$this->textColorTitle = null;\n\n\t\t$this->generatedTextColors = true;\n\t}",
"function __construct($aowner=null)\r\n {\r\n //Calls inherited constructor\r\n parent::__construct($aowner);\r\n\r\n $this->Width=35;\r\n $this->Height=20;\r\n\r\n $this->_type = \"color\";\r\n }",
"public static function color(string $text, string $color = null, int $decoration = 0, string $bgColor = null) {}",
"function header_textcolor()\n {\n }",
"private function buildText($textRunNode) {\n\t\t// populate the text, do we need this?\t\t\n // $this->text = (string)$node->children(\"a\", TRUE)->t;\n // echo \" --- style \" .\n\n foreach($textRunNode->children(\"a\", TRUE) as $childNode) {\n\t if($childNode->getName() === \"t\") {\n\t // we have text\n\t $this->text = (string)$childNode; \n\t\t\t} else if($childNode->getName() === \"rPr\") {\n\t\t\t\t// we have properties\n\t\t\t $attributes = $childNode->attributes();\n\t\t\t if((string)$attributes->b === '1') {\n\t\t\t $this->isBolded = true;\n\t\t }\n\t\t\t if((string)$attributes->i === '1') {\n\t $this->isItalics = true;\n\t\t }\n\t\t\t if((string)$attributes->u === 'sng') {\n\t\t\t $this->isUnderlined = true;\n\t\t\t $this->underlineType = Text::ONE_LINE;\n\t\t\t }\n\t\t\t if((string)$attributes->u === 'dbl') {\n\t\t\t $this->isUnderlined = true;\n\t\t\t $this->underlineType = Text::TWO_LINES;\n\t\t\t }\n\t\t\t if((string)$attributes->strike === 'sngStrike') {\n\t\t\t\t $this->Strikethrough = true;\n\t\t\t }\n\t\t\t if(isset($attributes->lang)) {\n\t\t\t $this->language = (string)$attributes->lang;\n\t\t\t }\n\t\t\t foreach($childNode->children(\"a\", TRUE) as $node2) {\n\t\t\t if((string)$node2->getName() === \"solidFill\") {\n\t\t\t $this->fillStyle = Text::SOLID;\n\t\t\t\t\t\t \n\t foreach($node2->children(\"a\", TRUE) as $node3) {\n\t $attr = $node3->attributes();\n\t \n\t if($node3->getName() === \"schemeClr\") {\n\t echo \"Scheme colour: \" . $attr->val . \" \";\n\t // TODO: insert logic to handle colours from scheme\n\t // ideally the actual colour should be added from\n\t // the theme, but that means processing the \n\t // \n\t\t\t\t\t\t\t} else if($node3->getName() === \"srgbClr\") {\n\t\t\t $this->colour = (string)$attr->val;\n\t\t\t\t\t\t\t}\n\t }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n }\n\t}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"function drawStyle()\r\n\t{\r\n\t}",
"public function mombo_main_headings_color() {\n \n \n }",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"function getCaptionFontColor() {\n\t//Return a hex color code without #\n\t//FFC30C - Yellow Color\n return \"666666\";\n}",
"public function textColorProvider()\n {\n return [[\"#fff\"], [\"#000\"]];\n }",
"public function textColorProvider()\n {\n return [[\"#fff\"], [\"#000\"]];\n }",
"public function color()\n {\n }",
"public function addFollText($banertext, $color, $pos)\n {\n\n if (empty($banertext) || $pos == 'leaderboard-thai' || $pos == 'leaderboard-medicine'\n || $pos == 'leaderboard-digimon') {\n return Image::canvas(728, 90);\n }\n\n if ($pos == 'leaderboard-car') {\n\n if (strstr($banertext, '.')) {\n $position = strpos($banertext, '.');\n $firstHalf = substr($banertext, 0, $position + 1);\n $secondHalf = substr($banertext, $position + 1);\n } else if (strstr($banertext, ' ') && str_word_count($banertext) >= 3) {\n $c = str_word_count($banertext, 1);\n $firstHalf = $c[0] . ' ' . $c[1];\n $length = strlen($firstHalf);\n $secondHalf = substr($banertext, $length + 1);\n } else {\n $firstHalf = $banertext;\n $secondHalf = null;\n }\n\n\n return Image::canvas(728, 90)->text($firstHalf, 364, 51, function ($font) use ($color) {\n $font->file(public_path('fonts/TitilliumWeb-Regular.ttf'));\n $font->color($color);\n $font->align('center');\n $font->valign('middle');\n $font->size(15);\n })->text($secondHalf, 364, 71, function ($font) use ($color) {\n $font->file(public_path('fonts/TitilliumWeb-Regular.ttf'));\n $font->color($color);\n $font->align('center');\n $font->valign('middle');\n $font->size(15);\n });\n\n } else if ($pos == 'leaderboard-airplane') {\n\n return Image::canvas(728, 90)->text($banertext, 150, 74, function ($font) use ($color) {\n $font->file(public_path('fonts/MyriadProItalic.ttf'));\n $font->color($color);\n $font->align('left');\n $font->valign('middle');\n $font->size(13);\n });\n\n } else if ($pos == 'leaderboard-get-around') {\n\n /**\n * leaderboard-get-around banner type\n */\n\n return Image::canvas(728, 90)->text($banertext, 590, 45, function ($font) use ($color) {\n $font->file(public_path('fonts/Oswald-Bold.ttf'));\n $font->color($color);\n $font->align('center');\n $font->valign('middle');\n $font->size(12);\n });\n }\n else if ($pos == 'leaderboard-iphone7') {\n\n /**\n * leaderboard-iphone banner type\n */\n\n return Image::canvas(728, 90)->text($banertext, 363, 68, function ($font) use ($color) {\n $font->file(public_path('fonts/Roboto-BoldItalic.ttf'));\n $font->color($color);\n $font->align('center');\n $font->valign('middle');\n $font->size(37);\n });\n\n }\n else if($pos == 'leaderboard-antivirus'){\n\n /**\n * leaderboard-antivirus banner type\n */\n\n if(str_word_count($banertext) >= 2 ){\n $c = str_word_count($banertext, 1);\n $firstHalf = $c[0]. ' ' .$c[1];\n $length = strlen($firstHalf);\n $secondHalf = substr($banertext, $length+1);\n }\n else {\n $firstHalf = $banertext;\n $secondHalf = null;\n }\n\n return Image::canvas(728, 90)->text($firstHalf, 63, 46, function ($font) use ($color) {\n $font->file(public_path('fonts/Roboto-Regular.ttf'));\n $font->color($color);\n $font->align('left');\n $font->valign('middle');\n $font->size(21);\n })->text($secondHalf, 93, 72, function ($font) use ($color) {\n $font->file(public_path('fonts/Roboto-Regular.ttf'));\n $font->color($color);\n $font->align('left');\n $font->valign('middle');\n $font->size(25);\n });\n }\n\n else if ($pos == 'leaderboard-iphone-blue') {\n\n /**\n * leaderboard-iphone-blue banner type\n */\n\n return Image::canvas(728, 90)->text($banertext, 460, 45, function ($font) use ($color) {\n $font->file(public_path('fonts/Arimo-Bold.ttf'));\n $font->color($color);\n $font->align('center');\n $font->valign('middle');\n $font->size(50);\n });\n\n }\n else if ($pos == 'leaderboard-jewels') {\n\n /**\n * leaderboard jewels follow text\n */\n\n\n return Image::canvas(728, 90)->text($banertext, 547, 76, function ($font) use ($color) {\n $font->file(public_path('fonts/RobotoCondensed-Regular.ttf'));\n $font->color($color);\n $font->align('center');\n $font->valign('middle');\n $font->size(12.5);\n });\n\n }\n else if ($pos == 'leaderboard-seminar') {\n\n /**\n * UI seminar follow text\n */\n $points3 = array(\n 317, 0, // D\n 404, 90, // C\n 398, 90, // Point B\n 312, 0 // Point A\n );\n $points2 = array(\n 303, 0, // D\n 390, 90, // C\n 384, 90, // Point B\n 298, 0 // Point A\n );\n $points = array(\n 289, 0, // D\n 376, 90, // C\n 370, 90, // Point B\n 284, 0 // Point A\n );\n\n\n $line = Image::canvas(728, 90)\n ->polygon($points, function ($draw) use ($color) {\n $draw->background($color);\n })\n ->polygon($points2, function ($draw) use ($color) {\n $draw->background($color);\n })\n ->polygon($points3, function ($draw) use ($color) {\n $draw->background($color);\n });\n\n return Image::canvas(728, 90)->text($banertext, 708, 45, function ($font) use ($color) {\n $font->file(public_path('fonts/CopperplateGothicBold.ttf'));\n $font->color($color);\n $font->align('right');\n $font->valign('middle');\n $font->size(21);\n })->insert($line);\n\n }\n else if ($pos == 'leaderboard-shopping') {\n\n /**\n * leaderboard shopping follow text\n */\n\n if(str_word_count($banertext) >= 6 ){\n $c = str_word_count($banertext, 1);\n $firstHalf = $c[0]. ' ' .$c[1] . ' ' .$c[2];\n $secondHalf = $c[3]. ' ' .$c[4] . ' ' .$c[5]. ' ' .$c[6];\n $length = strlen($firstHalf) + strlen($secondHalf)+2;\n $third = substr($banertext, $length);\n\n }\n else if (str_word_count($banertext) <= 3){\n $firstHalf = null;\n $secondHalf = $banertext;\n $third = null;\n }\n else if (str_word_count($banertext) > 3 && str_word_count($banertext) < 6){\n $position = strpos($banertext, ' ');\n\n $firstHalf = substr($banertext, 0, $position);\n $secondString = substr($banertext, $position);\n\n $secondPosition = strpos($secondString, ' ', 1);\n\n $secondHalf = substr($secondString, 0, $secondPosition);\n $third = substr($secondString, $secondPosition);\n }\n\n return Image::canvas(728, 90)->text($firstHalf, 505, 32, function ($font) use ($color) {\n $font->file(public_path('fonts/ACaslonPro-Italic.otf'));\n $font->color($color);\n $font->align('center');\n $font->valign('middle');\n $font->size(12);\n })->text($secondHalf, 505, 46, function ($font) use ($color) {\n $font->file(public_path('fonts/ACaslonPro-Italic.otf'));\n $font->color($color);\n $font->align('center');\n $font->valign('middle');\n $font->size(12);\n })->text($third, 500, 60, function ($font) use ($color) {\n $font->file(public_path('fonts/ACaslonPro-Italic.otf'));\n $font->color($color);\n $font->align('center');\n $font->valign('middle');\n $font->size(12);\n });\n\n }\n }",
"function clsText($pCont, $pFsize, $pFname=false, $pXpos='L', $pYpos=NULL) {\n $this->content = $pCont;\n $this->font = (strlen($pFname)) ? $pFname : \"../fonts/Helvetica\";\n $this->fontSize = ($pFsize) ? $pFsize : 10;\n $this->xpos = (strlen($pXpos) > 0) ? $pXpos : 30;\n $this->ypos = $pYpos;\n }",
"public function getTextColor() {}",
"public function getTextColor() {}",
"public function setColor() {\n\t\t$cnt = func_num_args();\n\t\tif ($cnt == 0) {\n\t\t\t$this->Color = new TColor(255,100,255);\n\t\t}\telse\n\t\tif ($cnt == 1) {\n\t\t\tlist ($sender) = func_get_args();\n\t\t\tif ($sender instanceof TColor) {\n\t\t\t\t$this->Color = new TColor(\n\t\t\t\t$sender->getRed (),\n\t\t\t\t$sender->getGreen(),\n\t\t\t\t$sender->getBlue ());\n\t\t\t}\telse\n\t\t\tif (is_string($sender)) {\n\t\t\t\t// todo: string\n\t\t\t}\n\t\t}\telse\n\t\tif ($cnt == 3) {\n\t\t\tlist($a1,$a2,$a3) = func_get_args();\n\t\t\t$this->Color = new TColor($a1,$a2,$a3);\n\t\t}\n\t}",
"public function getAppearanceTextColorSpace() {}",
"function imagettfstroketext($image, $size, $angle, $x, $y, $textcolor, $strokecolor, $fontfile, $text, $px) {\n\t\tfor ($c1 = ($x-abs($px)); $c1 <= ($x+abs($px)); $c1++)\n\t\t\tfor ($c2 = ($y-abs($px)); $c2 <= ($y+abs($px)); $c2++)\n\t\t\t\t$bg = imagettftext($image, $size, $angle, $c1, $c2, $strokecolor, $fontfile, $text);\n\t\treturn imagettftext($image, $size, $angle, $x, $y, $textcolor, $fontfile, $text);\n\t}",
"public function getAppearanceTextColor() {}",
"function __construct($name, $text = \"\") {\r\n\t\t$this->name = $name;\r\n\t\t$this->text = $text;\r\n\t\t$this->fontFile = 'fonts/Verdana.ttf';\r\n\t\t$this->fontSize = 40;\r\n\t\t$this->angle = 0;\r\n\t\t$this->textX = null;\r\n\t\t$this->textY = null;\r\n\t\t$this->colorR = 0;\r\n\t\t$this->colorG = 0;\r\n\t\t$this->colorB = 0;\r\n\t}",
"function imagettfstroketext(&$image, $size, $angle, $x, $y, &$textcolor, &$strokecolor, $fontfile, $text, $px) {\n \n for($c1 = ($x-abs($px)); $c1 <= ($x+abs($px)); $c1++)\n for($c2 = ($y-abs($px)); $c2 <= ($y+abs($px)); $c2++)\n $bg = imagettftext($image, $size, $angle, $c1, $c2, $strokecolor, $fontfile, $text);\n \n return imagettftext($image, $size, $angle, $x, $y, $textcolor, $fontfile, $text);\n }",
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"public function addText($banertext, $txtColor, $pos)\n {\n\n if (empty($banertext) || $pos == 'leaderboard-thai' || $pos == 'leaderboard-digimon') {\n return Image::canvas(728, 90);\n }\n\n if ($pos == 'leaderboard-car') {\n\n /**\n * leaderboard-car banner type\n */\n\n return Image::canvas(728, 90)->text($banertext, 364, 27, function ($font) use ($txtColor) {\n $font->file(public_path('fonts/TitilliumWeb-Bold.ttf'));\n $font->color($txtColor);\n $font->align('center');\n $font->valign('middle');\n $font->size(28);\n });\n\n } else if ($pos == 'leaderboard-airplane') {\n\n /**\n * leaderboard-airplane banner type\n */\n\n return Image::canvas(728, 90)->text($banertext, 18, 41, function ($font) use ($txtColor) {\n $font->file(public_path('fonts/Myriad_Pro_Semibold_italic.ttf'));\n $font->color($txtColor);\n $font->align('left');\n $font->valign('middle');\n $font->size(39);\n });\n } else if ($pos == 'leaderboard-get-around') {\n\n /**\n * leaderboard-get-around banner type\n */\n\n if (str_word_count($banertext) >= 2) {\n $position = strpos($banertext, ' ');\n $firstHalf = substr($banertext, 0, $position);\n $length = strlen($firstHalf);\n $secondHalf = substr($banertext, $length + 1);\n } else {\n $firstHalf = $banertext;\n $secondHalf = null;\n }\n\n $line = Image::canvas(183, 3, $txtColor);\n\n return Image::canvas(728, 90)->text($firstHalf, 364, 25, function ($font) use ($txtColor) {\n $font->file(public_path('fonts/Merriweather-Bold.ttf'));\n $font->color($txtColor);\n $font->align('center');\n $font->valign('middle');\n $font->size(40);\n })->text($secondHalf, 364, 65, function ($font) use ($txtColor) {\n $font->file(public_path('fonts/Merriweather-Bold.ttf'));\n $font->color($txtColor);\n $font->align('center');\n $font->valign('middle');\n $font->size(40);\n })->insert($line, 'left', 44, 35);\n } else if ($pos == 'leaderboard-iphone7') {\n\n /**\n * leaderboard-iphone banner type\n */\n\n return Image::canvas(728, 90)->text($banertext, 363, 23, function ($font) use ($txtColor) {\n $font->file(public_path('fonts/Roboto-BoldItalic.ttf'));\n $font->color($txtColor);\n $font->align('center');\n $font->valign('middle');\n $font->size(32);\n });\n\n }\n else if ($pos == 'leaderboard-antivirus') {\n\n /**\n * leaderboard-iphone banner type\n */\n\n return Image::canvas(728, 90)->text($banertext, 78, 17, function ($font) use ($txtColor) {\n $font->file(public_path('fonts/Roboto-Bold.ttf'));\n $font->color($txtColor);\n $font->align('left');\n $font->valign('middle');\n $font->size(25);\n });\n\n }\n\n else if ($pos == 'leaderboard-iphone-blue') {\n\n /**\n * leaderboard-iphone-blue banner type\n */\n\n return Image::canvas(728, 90)->text($banertext, 36, 45, function ($font) use ($txtColor) {\n $font->file(public_path('fonts/Arimo-Regular.ttf'));\n $font->color($txtColor);\n $font->align('left');\n $font->valign('middle');\n $font->size(36);\n });\n\n }\n else if ($pos == 'leaderboard-medicine') {\n\n /**\n * leaderboard-medicine banner type\n */\n\n return Image::canvas(728, 90)\n ->text($banertext, 355, 34, function ($font) use ($txtColor) {\n $font->file(public_path('fonts/Myriad-Pro-Bold-Italic.ttf'));\n $font->color($txtColor);\n $font->align('center');\n $font->valign('middle');\n $font->size(46);\n });\n\n }\n else if ($pos == 'leaderboard-jewels') {\n\n /**\n * Jewels leaderboard main banner text\n */\n\n $position = strpos($banertext, ' ');\n $firstHalf = substr($banertext, 0, $position);\n $secondHalf = substr($banertext, $position + 1);\n\n $line = Image::canvas(152, 2, $txtColor);\n\n return Image::canvas(728, 90)->text($firstHalf, 544, 23, function ($font) use ($txtColor) {\n $font->file(public_path('fonts/BodoniMTCondensedItalic.ttf'));\n $font->color($txtColor);\n $font->align('center');\n $font->valign('middle');\n $font->size(34);\n })->text($secondHalf, 546, 50, function ($font) use ($txtColor) {\n $font->file(public_path('fonts/BodoniMTCondensedItalic.ttf'));\n $font->color($txtColor);\n $font->align('center');\n $font->valign('middle');\n $font->size(34);\n })->insert($line, 'bottom-right', 107, 23);\n\n }\n else if ($pos == 'leaderboard-seminar') {\n\n /**\n * UI seminar banner type\n */\n if(str_word_count($banertext) >= 2 ){\n $c = str_word_count($banertext, 1);\n $first = $c[0];\n $second = $c[1];\n $length = strlen($c[0].$c[1]);\n $third = substr($banertext, $length+2);\n }\n else {\n $first = null;\n $second = $banertext;\n $third = null;\n }\n\n return Image::canvas(728, 90)->text($first, 80, 15, function ($font) use ($txtColor) {\n $font->file(public_path('fonts/GillSansUltraBold.ttf'));\n $font->color($txtColor);\n $font->align('left');\n $font->valign('middle');\n $font->size(20.5);\n })->text($second, 80, 43, function ($font) use ($txtColor) {\n $font->file(public_path('fonts/GillSansUltraBold.ttf'));\n $font->color($txtColor);\n $font->align('left');\n $font->valign('middle');\n $font->size(20.5);\n })->text($third, 80, 71, function ($font) use ($txtColor) {\n $font->file(public_path('fonts/GillSansUltraBold.ttf'));\n $font->color($txtColor);\n $font->align('left');\n $font->valign('middle');\n $font->size(20.5);\n });\n\n }\n else if ($pos == 'leaderboard-shopping') {\n\n /**\n * shopping banner text\n */\n\n return Image::canvas(728, 90)->text($banertext, 18, 70, function ($font) use ($txtColor) {\n $font->file(public_path('fonts/BodoniMT-Bold.ttf'));\n $font->color($txtColor);\n $font->align('left');\n $font->valign('middle');\n $font->angle(10);\n $font->size(68);\n });\n\n }\n\n }",
"public static function info($text) {\n self::colorPrint(self::YELLOW, $text);\n }",
"protected function green($text)\n {\n if ($this->isCli()) {\n return \"\\033[0;32m\".$text.\"\\033[0m\";\n }\n return '</td><td><span style=\"color: #2ecc71\">'.$text.'</span>';\n }",
"protected function _drawText()\n {\n $x = $this->_width*0.05;\n $y = $this->_height*0.96;\n\n $text_color=ImageColorAllocate($this->_image, 0x00, 0x00, 0x00);\n\n $fontsize = $this->scale*7;\n $kerning = $fontsize*1;\n\n for($i=0;$i<strlen($this->number);$i++)\n {\n imagettftext($this->_image, $fontsize, 0, $x, $y, $text_color, $this->font, $this->number[$i]);\n if($i==0 || $i==6)\n $x += $kerning*0.5;\n $x += $kerning;\n }\n }",
"public function colour();",
"function DrawCharacters() {\n for ($i = 0; $i < strlen($this->sCode); $i++) {\n // select random font\n $sCurrentFont = $this->aFonts[array_rand($this->aFonts)];\n \n // select random colour\n if ($this->bUseColour) {\n //$iTextColour = imagecolorallocate($this->oImage, rand(0, 100), rand(0, 100), rand(0, 100));\n //hardcoding red color for easier identification, random colors resulted in difficult to read chars\n $iTextColour = imagecolorallocate($this->oImage, 255,0,0);\n \n if ($this->bCharShadow) {\n // shadow colour\n $iShadowColour = imagecolorallocate($this->oImage, rand(0, 100), rand(0, 100), rand(0, 100));\n }\n } else {\n $iRandColour = rand(0, 100);\n $iTextColour = imagecolorallocate($this->oImage, $iRandColour, $iRandColour, $iRandColour);\n \n if ($this->bCharShadow) {\n // shadow colour\n $iRandColour = rand(0, 100);\n $iShadowColour = imagecolorallocate($this->oImage, $iRandColour, $iRandColour, $iRandColour);\n }\n }\n \n // select random font size\n $iFontSize = rand($this->iMinFontSize, $this->iMaxFontSize);\n \n // select random angle\n $iAngle = rand(-30, 30);\n \n // get dimensions of character in selected font and text size\n $aCharDetails = imageftbbox($iFontSize, $iAngle, $sCurrentFont, $this->sCode[$i], array());\n \n // calculate character starting coordinates\n $iX = $this->iSpacing / 4 + $i * $this->iSpacing;\n $iCharHeight = $aCharDetails[2] - $aCharDetails[5];\n $iY = $this->iHeight / 2 + $iCharHeight / 4; \n \n // write text to image\n imagefttext($this->oImage, $iFontSize, $iAngle, $iX, $iY, $iTextColour, $sCurrentFont, $this->sCode[$i], array());\n \n if ($this->bCharShadow) {\n $iOffsetAngle = rand(-30, 30);\n \n $iRandOffsetX = rand(-5, 5);\n $iRandOffsetY = rand(-5, 5);\n \n imagefttext($this->oImage, $iFontSize, $iOffsetAngle, $iX + $iRandOffsetX, $iY + $iRandOffsetY, $iShadowColour, $sCurrentFont, $this->sCode[$i], array());\n }\n }\n }",
"public function setTextColor($color) {}",
"public function blue($text): string;",
"function SetAuthorFont() {\r\n $this->SetFont(\"Arial\", \"BI\", 10);\r\n $this->SetTextColor(0, 0, 0);\r\n }",
"public function __construct()\n {\n $this->foregroundColors[ self::BLACK_NAME ] = self::BLACK_FOREGROUND_COLOR;\n $this->foregroundColors[ self::DARK_GRAY_NAME ] = self::DARK_GRAY_FOREGROUND_COLOR;\n $this->foregroundColors[ self::BLUE_NAME ] = self::BLUE_FOREGROUND_COLOR;\n $this->foregroundColors[ self::LIGHT_BLUE_NAME ] = self::LIGHT_BLUE_FOREGROUND_COLOR;\n $this->foregroundColors[ self::GREEN_NAME ] = self::GREEN_FOREGROUND_COLOR;\n $this->foregroundColors[ self::LIGHT_GREEN_NAME ] = self::LIGHT_GREEN_FOREGROUND_COLOR;\n $this->foregroundColors[ self::CYAN_NAME ] = self::CYAN_FOREGROUND_COLOR;\n $this->foregroundColors[ self::LIGHT_CYAN_NAME ] = self::LIGHT_CYAN_FOREGROUND_COLOR;\n $this->foregroundColors[ self::RED_NAME ] = self::RED_FOREGROUND_COLOR;\n $this->foregroundColors[ self::LIGHT_RED_NAME ] = self::LIGHT_RED_FOREGROUND_COLOR;\n $this->foregroundColors[ self::PURPLE_NAME ] = self::PURPLE_FOREGROUND_COLOR;\n $this->foregroundColors[ self::LIGHT_PURPLE_NAME ] = self::LIGHT_PURPLE_FOREGROUND_COLOR;\n $this->foregroundColors[ self::BROWN_NAME ] = self::BROWN_FOREGROUND_COLOR;\n $this->foregroundColors[ self::YELLOW_NAME ] = self::YELLOW_FOREGROUND_COLOR;\n $this->foregroundColors[ self::LIGHT_GRAY_NAME ] = self::LIGHT_GRAY_FOREGROUND_COLOR;\n $this->foregroundColors[ self::WHITE_NAME ] = self::WHITE_FOREGROUND_COLOR;\n\n $this->backgroundColors[ self::BLACK_NAME ] = self::BLACK_BACKGROUND_COLOR;\n $this->backgroundColors[ self::RED_NAME ] = self::RED_BACKGROUND_COLOR;\n $this->backgroundColors[ self::GREEN_NAME ] = self::GREEN_BACKGROUND_COLOR;\n $this->backgroundColors[ self::YELLOW_NAME ] = self::YELLOW_BACKGROUND_COLOR;\n $this->backgroundColors[ self::BLUE_NAME ] = self::BLUE_BACKGROUND_COLOR;\n $this->backgroundColors[ self::MAGENTA_NAME ] = self::MAGENTA_BACKGROUND_COLOR;\n $this->backgroundColors[ self::CYAN_NAME ] = self::CYAN_BACKGROUND_COLOR;\n $this->backgroundColors[ self::LIGHT_GRAY_NAME ] = self::LIGHT_GRAY_BACKGROUND_COLOR;\n }",
"function imagettfstroketext(&$image, $size, $angle, $x, $y, &$textcolor, &$strokecolor, $fontfile, $text, $px) {\n\t\tfor($c1 = ($x-abs($px)); $c1 <= ($x+abs($px)); $c1++)\n\t\t\tfor($c2 = ($y-abs($px)); $c2 <= ($y+abs($px)); $c2++)\n\t\t\t\t$bg = imagettftext($image, $size, $angle, $c1, $c2, $strokecolor, $fontfile, $text);\n\t\treturn imagettftext($image, $size, $angle, $x, $y, $textcolor, $fontfile, $text);\n\t}",
"function __construct($aowner=null)\r\n {\r\n //Calls inherited constructor\r\n parent::__construct($aowner);\r\n\r\n $this->Width=65;\r\n $this->Height=65;\r\n $this->_pen=new Pen();\r\n $this->_pen->_control=$this;\r\n $this->_brush=new Brush();\r\n $this->_brush->_control=$this;\r\n\r\n }",
"abstract public function register_style();",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"function imagettfstroketext(&$image, $size, $angle, $x, $y, &$textcolor, &$strokecolor, $fontfile, $text, $px)\n{\n for($c1 = ($x-abs($px)); $c1 <= ($x+abs($px)); $c1++)\n for($c2 = ($y-abs($px)); $c2 <= ($y+abs($px)); $c2++)\n $bg = imagettftext($image, $size, $angle, $c1, $c2, $strokecolor, $fontfile, $text);\n\n return imagettftext($image, $size, $angle, $x, $y, $textcolor, $fontfile, $text);\n}",
"public function green($text): string;",
"public function red($text): string;",
"public function addButton($text, $color, $btcolor, $type)\n {\n\n if (empty($text) || $type == 'leaderboard-get-around' || $type == 'leaderboard-jewels'\n || $type == 'leaderboard-seminar') {\n return Image::canvas(182, 34);\n }\n\n if ($type == 'leaderboard-car') {\n\n return Image::canvas(728, 90)\n ->rectangle(523, 28, 707, 63, function ($draw) use ($btcolor) {\n $draw->background($btcolor);\n })\n ->text($text, 616, 52, function ($font) use ($color) {\n $font->file(public_path('fonts/TitilliumWeb-Regular.ttf'));\n $font->size(14);\n $font->color($color);\n $font->align('center');\n });\n\n } else if ($type == 'leaderboard-airplane') {\n\n $btn = Image::canvas(122, 90, $btcolor)\n ->opacity(50)\n ->text($text, 61, 51, function ($font) use ($color) {\n $font->file(public_path('fonts/MyriadProSemibold.ttf'));\n $font->size(14);\n $font->color($color);\n $font->align('center');\n });\n\n return Image::canvas(728, 90)->insert($btn, 'right');\n\n }\n\n else if ($type == 'leaderboard-iphone7') {\n\n if (str_word_count($text) >= 2) {\n $position = strpos($text, ' ');\n $firstHalf = substr($text, 0, $position);\n $length = strlen($firstHalf);\n $secondHalf = substr($text, $length + 1);\n }\n else{\n $firstHalf = $text;\n $secondHalf = null;\n }\n\n $btn = Image::canvas(140, 90, $btcolor)\n ->text($firstHalf, 70, 40, function ($font) use ($color) {\n $font->file(public_path('fonts/Roboto-BoldItalic.ttf'));\n $font->size(22);\n $font->color($color);\n $font->align('center');\n })\n ->text($secondHalf, 70, 70, function ($font) use ($color) {\n $font->file(public_path('fonts/Roboto-BoldItalic.ttf'));\n $font->size(30);\n $font->color($color);\n $font->align('center');\n });\n\n return Image::canvas(728, 90)->insert($btn, 'right');\n\n }\n\n else if($type == 'leaderboard-antivirus'){\n\n if (str_word_count($text) >= 1) {\n $position = strpos($text, ' ');\n $firstHalf = substr($text, 0, $position);\n $length = strlen($firstHalf);\n $secondHalf = substr($text, $length);\n }\n else if (str_word_count($text) == 0){\n $firstHalf = $text;\n $secondHalf = null;\n }\n\n /** what if there is no word in last input field? :) */\n\n return Image::canvas(728, 90)\n ->circle(50, 355, 35, function ($draw) use ($btcolor){\n $draw->background($btcolor);\n })->text(' > ', 355, 35, function ($font) use ($color){\n $font->file(public_path('fonts/PTM55FT.ttf'));\n $font->color($color);\n $font->size(50);\n $font->align('center');\n $font->valign('middle');\n })\n ->text('CLICK HERE', 355, 75, function ($font) use ($btcolor){\n $font->file(public_path('fonts/Roboto-Bold.ttf'));\n $font->color($btcolor);\n $font->size(16);\n $font->align('center');\n $font->valign('middle');\n })\n ->circle(160, 655, 90, function ($draw) use ($btcolor){\n $draw->background($btcolor);\n })\n ->text($secondHalf, 680, 82, function ($font) use ($color) {\n $font->file(public_path('fonts/Lato-Bold.ttf'));\n $font->size(26);\n $font->color($color);\n $font->align('center');\n $font->valign('bottom');\n })\n ->text($firstHalf, 640, 40, function ($font) use ($color) {\n $font->file(public_path('fonts/Roboto-Regular.ttf'));\n $font->size(40);\n $font->color($color);\n $font->align('center');\n $font->valign('middle');\n $font->angle(20);\n });\n\n }\n else if ($type == 'leaderboard-iphone-blue') {\n\n /**\n * leaderboard-iphone-blue banner type\n */\n\n // define polygon points\n $points = array(\n 693, 21, // Point 2 (x, y)E top right\n 710, 45, // Point 3 (x, y)D krak\n 693, 72, // Point 4 (x, y)C bottom right\n 576, 72, // Point 5 (x, y)B bottom left\n 576, 21 // Point 6 (x, y)A top left\n );\n\n return Image::canvas(728, 90)->polygon($points, function ($draw) use ($color) {\n $draw->border(2, $color);\n })->text($text, 638, 46, function ($font) use ($color) {\n $font->file(public_path('fonts/Arimo-Bold.ttf'));\n $font->color($color);\n $font->align('center');\n $font->valign('middle');\n $font->size(28);\n });\n\n }\n else if ($type == 'leaderboard-thai') {\n\n /**\n * leaderboard-thai banner type\n */\n\n if(str_word_count($text) >= 5 ){\n $c = str_word_count($text, 1);\n $firstHalf = $c[0]. ' ' .$c[1] . ' ' .$c[2];\n $secondHalf = substr($text, strlen($firstHalf), strpos($firstHalf,' '));\n\n $length = strlen($firstHalf) + strlen($secondHalf);\n $third = substr($text, $length);\n\n } else if (str_word_count($text) <= 2){\n $firstHalf = null;\n $secondHalf = $text;\n $third = null;\n }\n else if (str_word_count($text) > 2 && str_word_count($text) < 5){\n $position = strpos($text, ' ');\n\n $firstHalf = substr($text, 0, $position);\n $secondString = substr($text, $position);\n\n $secondPosition = strpos($secondString, ' ', 1);\n\n $secondHalf = substr($secondString, 0, $secondPosition);\n $third = substr($secondString, $secondPosition);\n }\n\n return Image::canvas(728, 90)\n ->circle(90, 525, 45, function ($draw) use ($btcolor){\n $draw->background($btcolor);\n })\n ->opacity(90)\n ->text($firstHalf, 527, 32, function ($font) use ($color) {\n $font->file(public_path('fonts/BodoniMTCondensedBoldItalic.ttf'));\n $font->color($color);\n $font->align('center');\n $font->valign('middle');\n $font->size(24);\n })\n ->text($secondHalf, 527, 45, function ($font) use ($color) {\n $font->file(public_path('fonts/BodoniMTCondensedBoldItalic.ttf'));\n $font->color($color);\n $font->align('center');\n $font->valign('middle');\n $font->size(21);\n })\n ->text($third, 527, 62, function ($font) use ($color) {\n $font->file(public_path('fonts/BodoniMTCondensedBoldItalic.ttf'));\n $font->color($color);\n $font->align('center');\n $font->valign('middle');\n $font->size(25);\n });\n }\n else if ($type == 'leaderboard-medicine') {\n\n /**\n * leaderboard-medicine button type\n */\n\n return Image::canvas(728, 90)\n ->rectangle(420, 56, 700, 90, function ($draw) use ($btcolor) {\n $draw->background($btcolor);\n })\n ->opacity(50)\n ->text($text, 560, 72, function ($font) use ($color) {\n $font->file(public_path('fonts/Myriad-Pro-Bold-Italic.ttf'));\n $font->color($color);\n $font->align('center');\n $font->valign('middle');\n $font->size(33);\n });\n\n }\n else if ($type == 'leaderboard-digimon') {\n\n /**\n * leaderboard-digimon button type\n */\n\n return Image::canvas(728, 90)\n ->rectangle(593, 1, 726, 88, function ($draw) use ($btcolor) {\n $draw->border(3, $btcolor);\n })\n ->text($text, 660, 48, function ($font) use ($color) {\n $font->file(public_path('fonts/CenturyGothicBold.ttf'));\n $font->color($color);\n $font->align('center');\n $font->valign('middle');\n $font->size(32);\n });\n\n }\n else if ($type == 'leaderboard-shopping') {\n\n /**\n * leaderboard-shopping button type\n */\n\n // define polygon points\n $points = array(\n 296, 26, // H\n 396, 26, // G\n 398, 27, // F\n 398, 67, //E\n 396, 68, //D\n 296, 68, // C\n 294, 67, //B\n 294, 27 //A\n );\n\n return Image::canvas(728, 90)\n ->polygon($points, function ($draw) use ($color) {\n $draw->border(3, $color);\n })\n ->text($text, 349, 47, function ($font) use ($color) {\n $font->file(public_path('fonts/BookAntiquaBoldItalic.ttf'));\n $font->color($color);\n $font->align('center');\n $font->valign('middle');\n $font->size(16);\n });\n\n\n }\n }",
"function print_emoji_styles()\n {\n }",
"function setTitleStyle($font = '', $size = 15, $col = 0x000000)\n {\n $size = intval($size);\n if ($size < 0) {\n $size = 0;\n }\n\n $this->title_font = $font;\n $this->title_font_size = $size;\n $this->title_col = $this->hexcol($col);\n }",
"function setTitleStyle($font = '', $size = 15, $col = 0x000000)\n {\n $size = intval($size);\n if ($size < 0) {\n $size = 0;\n }\n\n $this->title_font = $font;\n $this->title_font_size = $size;\n $this->title_col = $this->hexcol($col);\n }",
"public function __construct() {\n\t\t\t$this->foreground_colors['black'] = '0;30';\n\t\t\t$this->foreground_colors['dark_gray'] = '1;30';\n\t\t\t$this->foreground_colors['blue'] = '0;34';\n\t\t\t$this->foreground_colors['light_blue'] = '1;34';\n\t\t\t$this->foreground_colors['green'] = '0;32';\n\t\t\t$this->foreground_colors['light_green'] = '1;32';\n\t\t\t$this->foreground_colors['cyan'] = '0;36';\n\t\t\t$this->foreground_colors['light_cyan'] = '1;36';\n\t\t\t$this->foreground_colors['red'] = '0;31';\n\t\t\t$this->foreground_colors['light_red'] = '1;31';\n\t\t\t$this->foreground_colors['purple'] = '0;35';\n\t\t\t$this->foreground_colors['light_purple'] = '1;35';\n\t\t\t$this->foreground_colors['brown'] = '0;33';\n\t\t\t$this->foreground_colors['yellow'] = '1;33';\n\t\t\t$this->foreground_colors['light_gray'] = '0;37';\n\t\t\t$this->foreground_colors['white'] = '1;37';\n \n\t\t\t$this->background_colors['black'] = '40';\n\t\t\t$this->background_colors['red'] = '41';\n\t\t\t$this->background_colors['green'] = '42';\n\t\t\t$this->background_colors['yellow'] = '43';\n\t\t\t$this->background_colors['blue'] = '44';\n\t\t\t$this->background_colors['magenta'] = '45';\n\t\t\t$this->background_colors['cyan'] = '46';\n\t\t\t$this->background_colors['light_gray'] = '47';\n\t\t}",
"function SetTextColor($r,$g=-1,$b=-1)\n\t\t{\n\t\t\tif(($r==0 and $g==0 and $b==0) or $g==-1)\t\n\t\t\t\t$this->TextColor=sprintf('%.3f g',$r/255);\n\t\t\telse \n\t\t\t\t$this->TextColor=sprintf('%.3f %.3f %.3f rg',$r/255,$g/255,$b/255);\n\t\t\t$this->ColorFlag = ($this->FillColor != $this->TextColor);\n\t\t}",
"function prepareStyle($showLearning, $mode_trans, $textsize, $ann_exists): void\n{\n do_text_text_style($showLearning, $mode_trans, $textsize, $ann_exists);\n}",
"private function decorateUnicode()\n {\n $suite_caption = self::SUIT;\n $number_caption = self::NUMBER;\n foreach($this->set as $single_card){\n $single_card->unicode = 'ǰ' . Repository::$s_parts[ $single_card->$suite_caption ] . Repository::$n_parts[ $single_card->$number_caption ] . ';' ;\n $single_card->color = in_array($single_card->$suite_caption, ['hearts', 'diamonds']) ? 'red' : 'black';\n }\n }",
"function imageText($text, $font_file, $font_size = 12, $color = '#000000', $position = 'center', $x_offset = 0, $y_offset = 0, $stroke_color = null, $stroke_size = null, $alignment = null, $letter_spacing = 0) {\r\n $this->imageText = array(\"text\"=>$text, \"font_file\"=>$font_file, \"font_size\" =>$font_size, \"color\" => $color, \"position\" => $position, \"x_offset\" => $x_offset, \"y_offset\" => $y_offset, \"stroke_color\" => $stroke_color, \"stroke_size\" => $stroke_size, \"alignment\" => $alignment, \"letter_spacing\" => $letter_spacing);\r\n return $this;\r\n }",
"public function __construct() {\n\t\t$this->foreground_colors['black'] = '0;30';\n\t\t$this->foreground_colors['dark_gray'] = '1;30';\n\t\t$this->foreground_colors['blue'] = '0;34';\n\t\t$this->foreground_colors['light_blue'] = '1;34';\n\t\t$this->foreground_colors['green'] = '0;32';\n\t\t$this->foreground_colors['light_green'] = '1;32';\n\t\t$this->foreground_colors['cyan'] = '0;36';\n\t\t$this->foreground_colors['light_cyan'] = '1;36';\n\t\t$this->foreground_colors['red'] = '0;31';\n\t\t$this->foreground_colors['light_red'] = '1;31';\n\t\t$this->foreground_colors['purple'] = '0;35';\n\t\t$this->foreground_colors['light_purple'] = '1;35';\n\t\t$this->foreground_colors['brown'] = '0;33';\n\t\t$this->foreground_colors['yellow'] = '1;33';\n\t\t$this->foreground_colors['light_gray'] = '0;37';\n\t\t$this->foreground_colors['white'] = '1;37';\n \n\t\t$this->background_colors['black'] = '40';\n\t\t$this->background_colors['red'] = '41';\n\t\t$this->background_colors['green'] = '42';\n\t\t$this->background_colors['yellow'] = '43';\n\t\t$this->background_colors['blue'] = '44';\n\t\t$this->background_colors['magenta'] = '45';\n\t\t$this->background_colors['cyan'] = '46';\n\t\t$this->background_colors['light_gray'] = '47';\n\t\t}",
"protected function red($text)\n {\n if ($this->isCli()) {\n return \"\\033[0;31m\".$text.\"\\033[0m\";\n }\n return '</td><td><span style=\"color: #e74c3c\">'.$text.'</span>';\n }",
"public function __construct() {\n\t\t$this->foreground_colors['black'] = '0;30';\n\t\t$this->foreground_colors['dark_gray'] = '1;30';\n\t\t$this->foreground_colors['blue'] = '0;34';\n\t\t$this->foreground_colors['light_blue'] = '1;34';\n\t\t$this->foreground_colors['green'] = '0;32';\n\t\t$this->foreground_colors['light_green'] = '1;32';\n\t\t$this->foreground_colors['cyan'] = '0;36';\n\t\t$this->foreground_colors['light_cyan'] = '1;36';\n\t\t$this->foreground_colors['red'] = '0;31';\n\t\t$this->foreground_colors['light_red'] = '1;31';\n\t\t$this->foreground_colors['purple'] = '0;35';\n\t\t$this->foreground_colors['light_purple'] = '1;35';\n\t\t$this->foreground_colors['brown'] = '0;33';\n\t\t$this->foreground_colors['yellow'] = '1;33';\n\t\t$this->foreground_colors['light_gray'] = '0;37';\n\t\t$this->foreground_colors['white'] = '1;37';\n\n\t\t$this->background_colors['black'] = '40';\n\t\t$this->background_colors['red'] = '41';\n\t\t$this->background_colors['green'] = '42';\n\t\t$this->background_colors['yellow'] = '43';\n\t\t$this->background_colors['blue'] = '44';\n\t\t$this->background_colors['magenta'] = '45';\n\t\t$this->background_colors['cyan'] = '46';\n\t\t$this->background_colors['light_gray'] = '47';\n\t}",
"function SetChordsFont() {\r\n $this->SetFont(\"Arial\", \"B\", 14);\r\n $this->SetTextColor(0, 0, 255);\r\n }",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"function wpvideocoach_get_introduction_text_color()\r\n{\r\n\tglobal $wpvideocoach_introduction_text_color;\r\n\tif(empty($wpvideocoach_introduction_text_color)){\r\n\t\t$wpvideocoach_introduction_text_color = '#000';\r\n\t}\r\n\treturn $wpvideocoach_introduction_text_color;\r\n}",
"protected function addColor(\n /*# string */ $text,\n array $definition\n )/*# : string */ {\n $fgColor = $definition[0] ?: '';\n $bgColor = $definition[1] ?: '';\n $deColor = $definition[2] ?: '';\n $prefix = $fgColor . $bgColor . $deColor;\n $suffix = $prefix ? self::DECO_END : '';\n return $prefix . $text . $suffix;\n }",
"public function apply(string $colorName, $text) : string;",
"public static function colorPrint($color, $text) {\n print $color . $text . self::WHITE . \"\\n\";\n }",
"function Shaded_box($text, $font = '', $fontstyle = 'B', $szfont = '', $width = '70%', $style = 'DF', $radius = 2.5, $fill = '#FFFFFF', $color = '#000000', $pad = 2)\n\t{\n\t\tif (!$font) {\n\t\t\t$font = $this->mpdf->default_font;\n\t\t}\n\t\tif (!$szfont) {\n\t\t\t$szfont = $this->mpdf->default_font_size * 1.8;\n\t\t}\n\n\t\t$text = ' ' . $text . ' ';\n\t\t$this->mpdf->SetFont($font, $fontstyle, $szfont, false);\n\n\t\t$text = $this->mpdf->purify_utf8_text($text);\n\n\t\tif ($this->mpdf->text_input_as_HTML) {\n\t\t\t$text = $this->mpdf->all_entities_to_utf8($text);\n\t\t}\n\n\t\tif ($this->mpdf->usingCoreFont) {\n\t\t\t$text = mb_convert_encoding($text, $this->mpdf->mb_enc, 'UTF-8');\n\t\t}\n\n\n\t\t// DIRECTIONALITY\n\t\tif (preg_match('/([' . $this->mpdf->pregRTLchars . '])/u', $text)) {\n\t\t\t$this->mpdf->biDirectional = true;\n\t\t} // *RTL*\n\n\t\t$textvar = 0;\n\t\t$save_OTLtags = $this->mpdf->OTLtags;\n\t\t$this->mpdf->OTLtags = [];\n\n\t\tif ($this->mpdf->useKerning) {\n\t\t\tif ($this->mpdf->CurrentFont['haskernGPOS']) {\n\t\t\t\t$this->mpdf->OTLtags['Plus'] .= ' kern';\n\t\t\t} else {\n\t\t\t\t$textvar |= TextVars::FC_KERNING;\n\t\t\t}\n\t\t}\n\t\t// Use OTL OpenType Table Layout - GSUB & GPOS\n\t\tif (!empty($this->mpdf->CurrentFont['useOTL'])) {\n\t\t\t$text = $this->otl->applyOTL($text, $this->mpdf->CurrentFont['useOTL']);\n\t\t\t$OTLdata = $this->otl->OTLdata;\n\t\t}\n\t\t$this->mpdf->OTLtags = $save_OTLtags;\n\n\t\t$this->mpdf->magic_reverse_dir($text, $this->mpdf->directionality, $OTLdata);\n\n\t\tif (!$width) {\n\t\t\t$width = $this->mpdf->pgwidth;\n\t\t} else {\n\t\t\t$width = $this->sizeConverter->convert($width, $this->mpdf->pgwidth);\n\t\t}\n\t\t$midpt = $this->mpdf->lMargin + ($this->mpdf->pgwidth / 2);\n\t\t$r1 = $midpt - ($width / 2); //($this->mpdf->w / 2) - 40;\n\t\t$r2 = $r1 + $width; //$r1 + 80;\n\t\t$y1 = $this->mpdf->y;\n\n\t\t$loop = 0;\n\n\t\twhile ($loop === 0) {\n\t\t\t$this->mpdf->SetFont($font, $fontstyle, $szfont, false);\n\t\t\t$sz = $this->mpdf->GetStringWidth($text, true, $OTLdata, $textvar);\n\t\t\tif (($r1 + $sz) > $r2) {\n\t\t\t\t$szfont --;\n\t\t\t} else {\n\t\t\t\t$loop ++;\n\t\t\t}\n\t\t}\n\t\t$this->mpdf->SetFont($font, $fontstyle, $szfont, true, true);\n\n\t\t$y2 = $this->mpdf->FontSize + ($pad * 2);\n\n\t\t$this->mpdf->SetLineWidth(0.1);\n\t\t$fc = $this->colorConverter->convert($fill, $this->mpdf->PDFAXwarnings);\n\t\t$tc = $this->colorConverter->convert($color, $this->mpdf->PDFAXwarnings);\n\t\t$this->mpdf->SetFColor($fc);\n\t\t$this->mpdf->SetTColor($tc);\n\t\t$this->mpdf->RoundedRect($r1, $y1, $r2 - $r1, $y2, $radius, $style);\n\t\t$this->mpdf->SetX($r1);\n\t\t$this->mpdf->Cell($r2 - $r1, $y2, $text, 0, 1, 'C', 0, '', 0, 0, 0, 'M', 0, false, $OTLdata, $textvar);\n\t\t$this->mpdf->SetY($y1 + $y2 + 2); // +2 = mm margin below shaded box\n\t\t$this->mpdf->Reset();\n\t}",
"protected function forceFont()\r\n {\r\n echo \"$this->_canvas.setFont(\\\"\" . $this->_font->Family . \"\\\", \\\"\" . $this->_font->Size . \"\\\", \\\"\" . $this->_font->Style . \"\\\");\\n\";\r\n if ($this->_font->Color != '') echo \"$this->_canvas.setColor(\\\"\" . $this->_font->Color . \"\\\");\\n\";\r\n }",
"function get_header_textcolor()\n {\n }",
"function boja($color)\n{\n $text = 'Neki tekst';\n echo \"<p style='color:$color'>$text</p>\";\n \n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"public function __construct() {\n $this->foreground_colors['black'] = '0;30';\n $this->foreground_colors['dark_gray'] = '1;30';\n $this->foreground_colors['blue'] = '0;34';\n $this->foreground_colors['light_blue'] = '1;34';\n $this->foreground_colors['green'] = '0;32';\n $this->foreground_colors['light_green'] = '1;32';\n $this->foreground_colors['cyan'] = '0;36';\n $this->foreground_colors['light_cyan'] = '1;36';\n $this->foreground_colors['red'] = '0;31';\n $this->foreground_colors['light_red'] = '1;31';\n $this->foreground_colors['purple'] = '0;35';\n $this->foreground_colors['light_purple'] = '1;35';\n $this->foreground_colors['brown'] = '0;33';\n $this->foreground_colors['yellow'] = '1;33';\n $this->foreground_colors['light_gray'] = '0;37';\n $this->foreground_colors['white'] = '1;37';\n\n $this->background_colors['black'] = '40';\n $this->background_colors['red'] = '41';\n $this->background_colors['green'] = '42';\n $this->background_colors['yellow'] = '43';\n $this->background_colors['blue'] = '44';\n $this->background_colors['magenta'] = '45';\n $this->background_colors['cyan'] = '46';\n $this->background_colors['light_gray'] = '47';\n }",
"public function yellow($text): string;",
"public function formatGraphics() {\n }",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"protected function generateGraphic() {}",
"public function useFont($name, $size, $color = null);",
"function __construct($aowner=null)\r\n {\r\n //Calls inherited constructor\r\n parent::__construct($aowner);\r\n\r\n $this->_pen=new Pen();\r\n $this->_pen->_control=$this;\r\n }",
"function drawSimpleRow($color, $text) {\r\n\t\t\t\techo(\"<tr align = 'center' bgcolor = '$color'>\");\r\n\t\t\t\t\techo(\"<td colspan = '8'>$text</td>\");\r\n\t\t\t\techo(\"</tr>\");\r\n\t\t\t}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"function SimpleText($text, $style=\"\") {\n\t\tif (false) {\n\t\t\t/*\n\t\t\t * FIXME: this is fundamentally broken, because\n\t\t\t * it creates a new CCE connection for every\n\t\t\t * SimpleText object created\n\t\t\t */\n\t\t\tinclude(\"uifc/Stylist.php\");\n\t\t\tinclude(\"ServerScriptHelper.php\");\n\t\t\t$crackaddict = new ServerScriptHelper();\n\t\t\t$stylist = $crackaddict->getStylist();\n\t\t\t$this->style = $stylist->getStyle(\"SimpleText\"); // try this\n\t\t\t\n\t\t\tif($this->style->getPropertyNumber()) { \n\t\t\t\t$this->style = $stylist->getStyle(\"Page\"); // default\n\t\t\t}\n\t\t\t\t\n\t\t} else {\n\t\t\t$this->style = $style;\n\t\t}\t\t\n\t\t$this->text = $text;\n\t}",
"function ento_cdn_bootstrap_colorize_text_alter(&$texts) {\n $texts['matches'][t('Log in')] = 'primary';\n $texts['matches'][t('Enviar Contraseña')] = 'primary';\n\n // This would also match the string above, however the class returned would\n // also be the one above; \"matches\" takes precedence over \"contains\".\n $texts['contains'][t('Unique')] = 'notice';\n\n // Remove matching for strings that contain \"apply\":\n unset($texts['contains'][t('Apply')]);\n\n // Change the class that matches \"Rebuild\" (originally \"warning\"):\n $texts['contains'][t('Rebuild')] = 'success';\n}",
"public static function printAsHTML( $text ) {\n /*\n ESC[x;yH\tmove to x,y\n ESC[2J\tclear\n ESC[0J\tline clear\n ESC[0m\tnormal mode\n ESC[1m\tbold\n ESC[4m\tunderbar\n ESC[5m\tblink\n ESC[7m\tcolor reverse\n */\n $control = self::getControlCode(); \n $result = \"\";\n $lines = explode(\"\\n\", $text);\n $tags = array();\n foreach ( $lines as $line ) {\n $tmpLine = $line;\n $length = mb_strlen($line);\n for ( $i = 0; $i < $length; $i++ ) {\n $result = array();\n if ( preg_match('/<([\\/]*[a-zA-Z0-9\\=\"\\' ]+)>/', $tmpLine, $result, 0, $i) ) {\n $code = strtolower($result[1]);\n $content = $code;\n $offset = mb_strpos($tmpLine, '<'.$code.'>', $i);\n $i = $offset - 1;\n $colors = \"\";\n if ( $offset === false ) break;\n //FONT?\n if ( mb_strpos($code, 'font') === 0 ) {\n if ( mb_strpos($code, 'bgcolor') !== false ) {\n preg_match('/bgcolor\\=[\"|\\']([a-zA-Z]+)[\"|\\']/', $code, $result2);\n $bgKey = $result2[1];\n $color = isset(self::$bgColorMap[$bgKey]) ? self::$bgColorMap[$bgKey] : null;\n if ($color) {\n $color = $control . '[' . $color;\n }\n $colors = $color;\n $code = str_replace('bgcolor', '', $code);\n $tags['font'][] = $color;\n }\n if ( mb_strpos($code, 'color') !== false ) {\n preg_match('/color\\=[\"|\\']([a-zA-Z]+)[\"|\\']/', $code, $result2);\n $coKey = $result2[1];\n $color = isset(self::$colorMap[$coKey]) ? self::$colorMap[$coKey] : null;\n if ($color) {\n $color = $control . '[' . $color;\n }\n $colors .= $color;\n $tags['font'][] = $color;\n }\n $tmpLine = mb_substr($tmpLine, 0, $offset) . $colors . mb_substr($tmpLine, $offset + mb_strlen('<>' . $content));\n }\n //B?\n else if ( $code === 'b' || $code === 'strong' ) {\n $tmpLine = mb_substr($tmpLine, 0, $offset) . $control . '[1m' . mb_substr($tmpLine, $offset + mb_strlen('<>' . $code));\n $tmpLine = str_replace('<' . $code . '>', '', $tmpLine);\n $tags['b'][] = $control . '[1m';\n }\n //U?\n else if ( $code === 'u' ) {\n $tmpLine = mb_substr($tmpLine, 0, $offset) . $control . '[4m' . mb_substr($tmpLine, $offset + mb_strlen('<>' . $code));\n $tmpLine = str_replace('<' . $code . '>', '', $tmpLine);\n $tags['u'][] = $control . '[4m';\n }\n //BLINK?\n else if ( $code === 'blink' ) {\n $tmpLine = mb_substr($tmpLine, 0, $offset) . $control . '[5m' . mb_substr($tmpLine, $offset + mb_strlen('<>' . $code));\n $tmpLine = str_replace('<' . $code . '>', '', $tmpLine);\n $tags['blink'][] = $control . '[5m';\n }\n //REVERSE? (No exists html tags for color reversal, it's be temporary tag)\n else if ( $code === 'r' || $code === 'reverse' ) {\n $tmpLine = mb_substr($tmpLine, 0, $offset) . $control . '[7m' . mb_substr($tmpLine, $offset + mb_strlen('<>' . $code));\n $tmpLine = str_replace('<' . $code . '>', '', $tmpLine);\n $tags['reverse'][] = $control . '[7m';\n }\n //tag close.\n else if ( $code === '/font' ) {\n $next = \"\";\n unset($tags['font']);\n foreach ( $tags as $tag => $vals) {\n foreach ( $vals as $val ) {\n $next .= $val;\n }\n }\n $tmpLine = mb_substr($tmpLine, 0, $offset) . $control . '[0m' . $next . mb_substr($tmpLine, $offset + mb_strlen('<>' . $code));\n $tmpLine = str_replace('<' . $code . '>', '', $tmpLine);\n }\n else if ( $code === '/b' || $code === '/strong' ) {\n $next = \"\";\n unset($tags['b']);\n foreach ( $tags as $tag => $vals) {\n foreach ( $vals as $val ) {\n $next .= $val;\n }\n }\n $tmpLine = mb_substr($tmpLine, 0, $offset) . $control . '[0m' . $next . mb_substr($tmpLine, $offset + mb_strlen('<>' . $code));\n $tmpLine = str_replace('<' . $code . '>', '', $tmpLine);\n }\n else if ( $code === '/u' ) {\n $next = \"\";\n unset($tags['u']);\n foreach ( $tags as $tag => $vals) {\n foreach ( $vals as $val ) {\n $next .= $val;\n }\n }\n $tmpLine = mb_substr($tmpLine, 0, $offset) . $control . '[0m' . $next . mb_substr($tmpLine, $offset + mb_strlen('<>' . $code));\n $tmpLine = str_replace('<' . $code . '>', '', $tmpLine);\n }\n else if ( $code === '/blink' ) {\n $next = \"\";\n unset($tags['blink']);\n foreach ( $tags as $tag => $vals) {\n foreach ( $vals as $val ) {\n $next .= $val;\n }\n }\n $tmpLine = mb_substr($tmpLine, 0, $offset) . $control . '[0m' . $next . mb_substr($tmpLine, $offset + mb_strlen('<>' . $code));\n $tmpLine = str_replace('<' . $code . '>', '', $tmpLine);\n }\n else if ( $code === '/r' || $code === '/reverse' ) {\n $next = \"\";\n unset($tags['reverse']);\n foreach ( $tags as $tag => $vals) {\n foreach ( $vals as $val ) {\n $next .= $val;\n }\n }\n $tmpLine = mb_substr($tmpLine, 0, $offset) . $control . '[0m' . $next . mb_substr($tmpLine, $offset + mb_strlen('<>' . $code));\n $tmpLine = str_replace('<' . $code . '>', '', $tmpLine);\n }\n else {\n $i = $offset + mb_strlen('<>' . $code) - 1;\n }\n }\n $length = mb_strlen($tmpLine);\n }\n $result = $tmpLine;\n }\n echo $result . $control . \"[0m\\n\";\n }",
"public static function color()\n {\n return null;\n }",
"public static function color()\n {\n return null;\n }",
"function DrawCharacters() {\n// $log = new LOG();\n// $log->err(strlen($this->sCode));\n for ($i = 0; $i < $this->iNumChars; $i++) {\n // select random font\n $sCurrentFont = $this->aFonts[array_rand($this->aFonts)];\n\n // select random colour\n if ($this->bUseColour) {\n $iTextColour = imagecolorallocate($this->oImage, rand(0, 100), rand(0, 100), rand(0, 100));\n } else {\n $iRandColour = rand(0, 100);\n $iTextColour = imagecolorallocate($this->oImage, $iRandColour, $iRandColour, $iRandColour);\n }\n\n // select random font size\n $iFontSize = rand($this->iMinFontSize, $this->iMaxFontSize);\n\n // select random angle\n $iAngle = rand(-30, 30);\n if ($this->chinese) {\n $code = $this->sCode[$i * 3] . $this->sCode[$i * 3 + 1] . $this->sCode[$i * 3 + 2];\n } else\n $code = $this->sCode[$i];\n\n\n // get dimensions of character in selected font and text size\n $aCharDetails = imageftbbox($iFontSize, $iAngle, $sCurrentFont, $code, array());\n\n // calculate character starting cochrinates\n $iX = $this->iSpacing / 8 + $i * $this->iSpacing;\n $iCharHeight = $aCharDetails[2] - $aCharDetails[5];\n $iY = $this->iHeight / 2 + $iCharHeight / 4;\n\n // write text to image\n imagefttext($this->oImage, $iFontSize, $iAngle, $iX, $iY, $iTextColour, $sCurrentFont, $code, array());\n }\n }",
"function updateFontColor($p_text_id, $p_font_color) {\n $con = open_connection();\n mysqli_query($con, \"UPDATE text SET color = '\". $p_font_color .\"' WHERE text_id = '\". $p_text_id .\"'\");\n mysqli_close($con);\n }",
"static function white($text) {\n\t\treturn $text;\n\t\t//echo (self::$colorize) ? \"\\033[37m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"private function establish_display_settings() {\n\t\t$this->background = \"background-color: $this->color_primary\";\n\t\t$this->border = \"border: 1px solid $this->color_accent\";\n\t\t$this->href = $this->generate_follow_link();\n\n\t}",
"function RawText ($textString, $textColor=\"black\", $bgcolor='', $fontsize='', $fontWeight =\"normal\"){\n\t\t$this->tag =\"<span style='color: $textColor; background-colo: $bgcolor; font-size: $fontsize; font-weight: $fontWeight'>\";\n\t\t$this->tag .=\"$textString\";\n\t\t$this ->tag .= \"</span>\";\n\t\treturn $this->tag;\n\t}",
"public function setTextTitleColor($arrColor)\r\n\t{\r\n\t\t$this->textTitleColor = $arrColor;\r\n\t}",
"abstract protected function getTextBoundings( $size, ezcGraphFontOptions $font, $text );",
"public function getColor()\n {\n return\"Yellow\";\n }",
"function string() {\n $styles = [];\n if ($this->fg !== null) {\n $styles []= $this->fg;\n }\n\n if ($this->bg !== null) {\n $styles []= $this->bg;\n }\n\n $styles = array_merge($styles, $this->format);\n\n if (empty($styles)) {\n return $this->str;\n } else {\n $escape = \"\\e[\" . join(';', $styles) . 'm';\n return $escape . $this->str . \"\\e[\" . self::ANSI_OFF . 'm';\n }\n }",
"public function initialize() {\n // default values\n $this->setText('__notext__');\n $this->setTextFont(array(\n 'family' => 'monospace',\n 'style' => 0,\n 'name' => 'Courier'\n ));\n $this->setHeight(0.8);\n $this->setPosition(array(0, 0));\n $this->setTextColor('#000000');\n\n // default flags\n $this->setAlignment(0);\n }",
"function bgColor() {\n\t$color = dechex(rand(0x000000, 0xDDDDDD));\n\treturn \"#{$color}\";\n}",
"private function draw_text($img, $text, $x, $c, $h) {\n\t\timagerectangle($img, $x, 0, $x, $h, $c);\n\t\tif ($x > 0) {\n\t\t\timagettftext($img, 8, 0, $x+2, 12, $c, \"./DejaVuSans.ttf\", $text);\n\t\t}\n\t}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"protected function setTextFont($size = 12)\n\t{\n\t\tfor($i=0;$i<$this->copies;$i++){\n\t\t\t$this->_getPdf()->pages[$i]->setFont(Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_HELVETICA), $size);\n\t\t\t$this->_getPdf()->pages[$i]->setFillColor(new Zend_Pdf_Color_GrayScale(0));\n\t\t}\n\t}",
"public function createDefaultColorCode(){\n\t\n\t\tif(!$this->isColorCode(\"default\", \"b2dfee\")){\n\t\t\t$sql = \"INSERT INTO sy_color_codes (name, color, text) VALUES(?,?,?)\";\n\t\t\t$this->runRequest($sql, array(\"default\", \"b2dfee\", \"000000\"));\n\t\t}\n\t}",
"function draw_boxes2 ($image, $colorid=0, $offset=0) {\r\n \r\n $color[0]= imagecolorallocate($image, 0, 0, 0);\r\n $color[1]= imagecolorallocate($image, 255, 0, 0);\r\n $color[2]= imagecolorallocate($image, 0, 255, 0);\r\n $color[3]= imagecolorallocate($image, 0, 0, 255);\r\n $color[4]= imagecolorallocate($image, 255, 255, 0);\r\n \r\n $linecolor=$color[$colorid];\r\n \r\n foreach($this->text_blocks as $text_block) {\r\n imageline ( $image , $text_block->ordered['x1'] -$offset, $text_block->ordered['y1'] -$offset, $text_block->ordered['x2'] +$offset, $text_block->ordered['y2'] -$offset, $linecolor);\r\n imageline ( $image , $text_block->ordered['x2'] +$offset, $text_block->ordered['y2'] -$offset, $text_block->ordered['x3'] +$offset, $text_block->ordered['y3']+$offset , $linecolor);\r\n imageline ( $image , $text_block->ordered['x3'] +$offset, $text_block->ordered['y3'] +$offset, $text_block->ordered['x4'] -$offset, $text_block->ordered['y4']+$offset , $linecolor);\r\n imageline ( $image , $text_block->ordered['x4'] -$offset, $text_block->ordered['y4'] +$offset, $text_block->ordered['x1'] -$offset, $text_block->ordered['y1']-$offset , $linecolor);\r\n }\r\n $this->image_drawn=$image;\r\n }",
"function fontStyles()\r\n {\r\n /*\r\n if ($this->_control!=null)\r\n {\r\n if ($this->_control->ParentFont)\r\n {\r\n $parent=$this->_control->Parent;\r\n if ($parent!=null) return($parent->Font->readFontString());\r\n }\r\n }\r\n */\r\n\r\n $textalign=\"\";\r\n switch($this->_align)\r\n {\r\n case taLeft: $textalign=\"text-align: left;\"; break;\r\n case taRight: $textalign=\"text-align: right;\"; break;\r\n case taCenter: $textalign=\"text-align: center;\"; break;\r\n case taJustify: $textalign=\"text-align: justify;\"; break;\r\n }\r\n\r\n $fontstyle=\"\";\r\n switch($this->_style)\r\n {\r\n case fsNormal: $fontstyle=\"font-style: normal;\"; break;\r\n case fsItalic: $fontstyle=\"font-style: italic;\"; break;\r\n case fsOblique: $fontstyle=\"font-style: oblique;\"; break;\r\n }\r\n\r\n // changed to fix RAID#282144\r\n $fontvariant=\"\";\r\n switch($this->_variant)\r\n {\r\n case vaNormal: $fontvariant=\"font-variant: normal;\"; break;\r\n case vaSmallCaps: $fontvariant=\"font-variant: small-caps;\"; break;\r\n }\r\n\r\n $texttransform=\"\";\r\n switch($this->_case)\r\n {\r\n case caCapitalize: $texttransform=\"text-transform: capitalize;\"; break;\r\n case caUpperCase: $texttransform=\"text-transform: uppercase;\"; break;\r\n case caLowerCase: $texttransform=\"text-transform: lowercase;\"; break;\r\n case caNone: $texttransform=\"text-transform: none;\"; break;\r\n }\r\n\r\n $color=\"\";\r\n if ($this->_color!=\"\") $color=\"color: $this->_color;\";\r\n\r\n $lineheight=\"\";\r\n if ($this->_lineheight!=\"\") $lineheight=\"line-height: $this->_lineheight;\";\r\n\r\n $fontweight=\"\";\r\n if ($this->_weight!=\"\") $fontweight=\"font-weight: $this->_weight;\";\r\n\r\n return \" $color$fontweight$textalign$fontstyle$lineheight$fontvariant$texttransform \";\r\n }",
"function draw_stat($text)\n{\n\tpf(htmlspecialchars($text));\n}",
"public static function style_set() {\n\t\t global $I2_USER;\n\t\t if (self::$style == NULL) {\n\t\t\t if (isset($I2_USER)) {\n\t\t\t\t\t self::$style = ($I2_USER->style);\n\t\t\t }\n\t\t\t else {\n\t\t\t\t\t self::$style = 'default';\n\t\t\t }\n\t\t\t d('Style set to '.self::$style,7);\n\t\t }\n\t }"
] | [
"0.5992768",
"0.5886941",
"0.5779626",
"0.5661228",
"0.560895",
"0.54850966",
"0.54833686",
"0.5404708",
"0.5398954",
"0.53505725",
"0.5341132",
"0.5335624",
"0.5335624",
"0.5335211",
"0.53264046",
"0.5320125",
"0.53138155",
"0.53117156",
"0.52555186",
"0.5244608",
"0.52118725",
"0.51980835",
"0.5191021",
"0.5184857",
"0.51299936",
"0.5129979",
"0.51253605",
"0.5124614",
"0.51235366",
"0.51221246",
"0.5108635",
"0.50991356",
"0.50949496",
"0.50884783",
"0.50835145",
"0.508318",
"0.5078286",
"0.5067738",
"0.5065333",
"0.5060136",
"0.5060085",
"0.5052931",
"0.50460434",
"0.504446",
"0.50392175",
"0.50392175",
"0.50332314",
"0.502782",
"0.5027648",
"0.50206715",
"0.50042164",
"0.5002957",
"0.4999945",
"0.49950954",
"0.49820855",
"0.49694672",
"0.49629098",
"0.49607122",
"0.4948267",
"0.49454954",
"0.4941752",
"0.4935084",
"0.4933197",
"0.49122754",
"0.49107307",
"0.49099573",
"0.4900745",
"0.4897529",
"0.4883819",
"0.48801622",
"0.48623127",
"0.4859265",
"0.48571703",
"0.48416343",
"0.48241025",
"0.48214504",
"0.48133025",
"0.48102754",
"0.48076984",
"0.48076984",
"0.48070645",
"0.4790874",
"0.47864518",
"0.47817737",
"0.4776118",
"0.47734272",
"0.47580558",
"0.47532952",
"0.47505867",
"0.47460815",
"0.47403127",
"0.47397393",
"0.47386825",
"0.4732102",
"0.472883",
"0.47260374",
"0.4723338",
"0.47214082",
"0.471856",
"0.4714994"
] | 0.6814784 | 0 |
loop through and write out selected number of characters | function DrawCharacters() {
for ($i = 0; $i < strlen($this->sCode); $i++) {
// select random font
$sCurrentFont = $this->aFonts[array_rand($this->aFonts)];
// select random colour
if ($this->bUseColour) {
//$iTextColour = imagecolorallocate($this->oImage, rand(0, 100), rand(0, 100), rand(0, 100));
//hardcoding red color for easier identification, random colors resulted in difficult to read chars
$iTextColour = imagecolorallocate($this->oImage, 255,0,0);
if ($this->bCharShadow) {
// shadow colour
$iShadowColour = imagecolorallocate($this->oImage, rand(0, 100), rand(0, 100), rand(0, 100));
}
} else {
$iRandColour = rand(0, 100);
$iTextColour = imagecolorallocate($this->oImage, $iRandColour, $iRandColour, $iRandColour);
if ($this->bCharShadow) {
// shadow colour
$iRandColour = rand(0, 100);
$iShadowColour = imagecolorallocate($this->oImage, $iRandColour, $iRandColour, $iRandColour);
}
}
// select random font size
$iFontSize = rand($this->iMinFontSize, $this->iMaxFontSize);
// select random angle
$iAngle = rand(-30, 30);
// get dimensions of character in selected font and text size
$aCharDetails = imageftbbox($iFontSize, $iAngle, $sCurrentFont, $this->sCode[$i], array());
// calculate character starting coordinates
$iX = $this->iSpacing / 4 + $i * $this->iSpacing;
$iCharHeight = $aCharDetails[2] - $aCharDetails[5];
$iY = $this->iHeight / 2 + $iCharHeight / 4;
// write text to image
imagefttext($this->oImage, $iFontSize, $iAngle, $iX, $iY, $iTextColour, $sCurrentFont, $this->sCode[$i], array());
if ($this->bCharShadow) {
$iOffsetAngle = rand(-30, 30);
$iRandOffsetX = rand(-5, 5);
$iRandOffsetY = rand(-5, 5);
imagefttext($this->oImage, $iFontSize, $iOffsetAngle, $iX + $iRandOffsetX, $iY + $iRandOffsetY, $iShadowColour, $sCurrentFont, $this->sCode[$i], array());
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function ReturnCharToFile($count) {\n\t\twhile($count) {\n\t\t\tif ($this->positionInFile > 0)\n\t\t\t\t$this->positionInFile--;\n\t\t\t$count--;\n\t\t}\n\t}",
"function character_limiter($str, $n = 500, $end_char = '…')\n {\n if (strlen($str) < $n)\n {\n return $str;\n }\n $str = strip_tags($str);\n $str = preg_replace(\"/\\s+/\", ' ', str_replace(array(\"\\r\\n\", \"\\r\", \"\\n\"), ' ', $str));\n\n if (strlen($str) <= $n)\n {\n return $str;\n }\n\n $out = \"\";\n foreach (explode(' ', trim($str)) as $val)\n {\n $out .= $val.' ';\n\n if (strlen($out) >= $n)\n {\n $out = trim($out);\n return (strlen($out) == strlen($str)) ? $out : $out.$end_char;\n }\n }\n }",
"function character_limiter($str, $n = 500, $end_char = '…')\r\n\t{\r\n\t\tif (mb_strlen($str) < $n)\r\n\t\t{\r\n\t\t\treturn $str;\r\n\t\t}\r\n\r\n\t\t// a bit complicated, but faster than preg_replace with \\s+\r\n\t\t$str = preg_replace('/ {2,}/', ' ', str_replace(array(\"\\r\", \"\\n\", \"\\t\", \"\\x0B\", \"\\x0C\"), ' ', $str));\r\n\r\n\t\tif (mb_strlen($str) <= $n)\r\n\t\t{\r\n\t\t\treturn $str;\r\n\t\t}\r\n\r\n\t\t$out = '';\r\n\t\tforeach (explode(' ', trim($str)) as $val)\r\n\t\t{\r\n\t\t\t$out .= $val.' ';\r\n\r\n\t\t\tif (mb_strlen($out) >= $n)\r\n\t\t\t{\r\n\t\t\t\t$out = trim($out);\r\n\t\t\t\treturn (mb_strlen($out) === mb_strlen($str)) ? $out : $out.$end_char;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"function print_content_char_limit($content,$char_limit , $end_string){\n echo substr($content, 0,$char_limit).$end_string;\n}",
"function loop_write($file, $txt, $num){\n\n for ($x=1;$x<=$num;$x++){\n fwrite($file,$txt);\n }\n\n}",
"function tach_chu_hien_thi($content){\r\n $mang = explode(\" \", $content);\r\n $str = \"\";\r\n $sochu = sizeof($mang);\r\n if($sochu < 10){\r\n for($j = 0; $j < sizeof($mang); $j++){\r\n $str = $str.\" \".$mang[$j];\r\n }\r\n }else{\r\n for($j = 0; $j < 15; $j++){\r\n $str = $str.\" \".$mang[$j];\r\n }\r\n }\r\n return $str;\r\n}",
"function printMultipleTimes($times, $str = \"*\"){\r\n for($j = 1; $j <= $times; $j++){\r\n echo($str);\r\n }\r\n }",
"function capya_string($len){\n $str='';\n for($i=1; $i<=$len; $i++) {\n $ord=rand(50, 90);\n if((($ord >= 50) && ($ord <= 57)) || (($ord >= 65) && ($ord<= 90))) $str.=chr($ord);\n else $str.=capya_string(1);\n }\n return $str;\n}",
"function generateSerials ($numberOfChars,$lengthOfSerial) {\n\n\n$tokens = \"0123456789ABCDEFGHIJKLMNOPQRSTUVWZY\";\n$serial = \"\";\n\nfor ($i = 0; $i < $lengthOfSerial; $i++) { \n \n for ($j = 0; $j < $numberOfChars; $j++) { \n \n $serial .= $tokens[rand(0,10)];\n \n }\n\n// append dash\n if ($i < $lengthOfSerial - 1) { \n $serial .= \"-\"; \n }\n \n}\n\n//let's return the value\n return $serial;\n\n}",
"public function charsWhile($bytes, $max = null);",
"public function write($string, $start = 0) {}",
"function customPrint($input)\n{\n\n\tfor($i=0;$i<$input;$i=$i+2)\n\t{\n\t\techo $i.\" \";\n\t}\n}",
"function char_at_position($n) {\r\n\tif ($n >= 0 and $n <= 25) {\r\n\t\treturn chr($n + 65);\r\n\t}\r\n\telse if ($n >= 26 and $n <= 51) {\r\n\t\treturn chr($n + 71);\r\n\t}\r\n\telse {\r\n\t\treturn false;\r\n\t}\r\n}",
"abstract public function increaseLength($length = 100);",
"function chunk($ch, $str) {\r\n print($str);\r\n return strlen($str);\r\n }",
"public function setCharStartLength($start,$length);",
"function sampling($chars, $size, $combinations = array()) {\n\t# of combinations is the same as the set of characters\n\tif (empty($combinations)) {\n\t\t$combinations = $chars;\n\t}\n\n\t# we're done if we're at size 1\n\tif ($size == 1) {\n\t\treturn $combinations;\n\t}\n\n\t# initialise array to put new values in\n\t$new_combinations = array();\n\n\t# loop through existing combinations and character set to create strings\n\tforeach ($combinations as $combination) {\n\t\tforeach ($chars as $char) {\n\t\t\t$new_combinations[] = $combination . $char;\n\t\t}\n\t}\n\n\t# call same function again for the next iteration\n\treturn sampling($chars, $size - 1, $new_combinations);\n}",
"function DrawCharacters() {\n// $log = new LOG();\n// $log->err(strlen($this->sCode));\n for ($i = 0; $i < $this->iNumChars; $i++) {\n // select random font\n $sCurrentFont = $this->aFonts[array_rand($this->aFonts)];\n\n // select random colour\n if ($this->bUseColour) {\n $iTextColour = imagecolorallocate($this->oImage, rand(0, 100), rand(0, 100), rand(0, 100));\n } else {\n $iRandColour = rand(0, 100);\n $iTextColour = imagecolorallocate($this->oImage, $iRandColour, $iRandColour, $iRandColour);\n }\n\n // select random font size\n $iFontSize = rand($this->iMinFontSize, $this->iMaxFontSize);\n\n // select random angle\n $iAngle = rand(-30, 30);\n if ($this->chinese) {\n $code = $this->sCode[$i * 3] . $this->sCode[$i * 3 + 1] . $this->sCode[$i * 3 + 2];\n } else\n $code = $this->sCode[$i];\n\n\n // get dimensions of character in selected font and text size\n $aCharDetails = imageftbbox($iFontSize, $iAngle, $sCurrentFont, $code, array());\n\n // calculate character starting cochrinates\n $iX = $this->iSpacing / 8 + $i * $this->iSpacing;\n $iCharHeight = $aCharDetails[2] - $aCharDetails[5];\n $iY = $this->iHeight / 2 + $iCharHeight / 4;\n\n // write text to image\n imagefttext($this->oImage, $iFontSize, $iAngle, $iX, $iY, $iTextColour, $sCurrentFont, $code, array());\n }\n }",
"private static function buildControlCharacters()\n {\n for ($i = 0; $i <= 19; ++$i) {\n if ($i != 9 && $i != 10 && $i != 13) {\n $find = '_x' . sprintf('%04s', strtoupper(dechex($i))) . '_';\n $replace = chr($i);\n self::$controlCharacters[$find] = $replace;\n }\n }\n }",
"private static function buildControlCharacters()\n {\n for ($i = 0; $i <= 31; ++$i) {\n if ($i != 9 && $i != 10 && $i != 13) {\n $find = '_x' . sprintf('%04s', strtoupper(dechex($i))) . '_';\n $replace = chr($i);\n self::$controlCharacters[$find] = $replace;\n }\n }\n }",
"function getCharacters();",
"function setCharacters($characters);",
"function getmixedno($totalchar)\n{\n\t$abc= array(\"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\", \"I\", \"J\", \"K\", \"L\", \"M\", \"N\", \"P\", \"Q\", \"R\", \"S\", \"T\", \"U\", \"V\", \"W\", \"X\", \"Y\", \"Z\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\");\n\t$mixedno = \"\";\n\tfor($i=1; $i<=$totalchar; $i++)\n\t{\n\t\t$mixedno .= $abc[rand(0,33)];\n\t}\n\treturn $mixedno;\n}",
"function capCharacters($input,$numberCap) {\n\tif (strlen($input) <= $numberCap) {\n\t\treturn $input;\n\t} else {\n\t\t$output = substr($input,0,$numberCap) . '...';\n\t\treturn $output;\n\t}\n}",
"public function chars()\n {\n // init\n $chars = array();\n $l = $this->length();\n\n for ($i = 0; $i < $l; $i++) {\n $chars[] = $this->at($i)->str;\n }\n\n return $chars;\n }",
"function p3_ex1() {\n for ($i = 0; $i <= 10; $i++)\n $return .= $i.' ';\n \n return $return;\n}",
"function space1_6(&$fp) {\n\n fwrite($fp, chr(27).\"2\");\n }",
"public function remainingChars();",
"private function createString($length)\n {\n $password = '';\n for ($i = 0; $i <= $length; $i += 1) {\n $password .= $i;\n }\n return $password;\n\n }",
"public function applyWidth() {\n $curTarget = $this->width;\n $start = 0;\n $arrayByLine = array();\n $arrayByLineIndex = 0;\n $arraytoPrint = array();\n $temp = \"\";\n $localArray = $this->originalArray;\n \n for ($i = 0; $i < count($this->originalArray); $i++) {\n \n $val = strlen($temp) + strlen($localArray[$i]) + 1; \n \n if (strlen($temp) + strlen($localArray[$i]) + 1 <= $this->width) {\n if (strlen($temp) == 0) {\n $temp = $temp.$localArray[$i];\n } else {\n $temp = $temp.\" \".$localArray[$i];\n }\n } else {\n\n $arrayByLine[$arrayByLineIndex] = $temp;\n $arrayByLineIndex++;\n $i--;\n $temp = \"\";\n }\n \n if ($i == count($this->originalArray) - 1) {\n $arrayByLine[$arrayByLineIndex] = $temp;\n }\n }\n \n $this->textToPrint = $arrayByLine;\n }",
"public function limitLetters($text){\n\n\t\t$length = strlen($text);\n\t\t\n\t\t$res = \"\";\n\n\t\tif($length < 108){\n\n\t\t\t$res = $text;\n\t\n\t\t}else{\n\n\t\t\t$res = substr($text, 0, 108);\n\t\t\n\t\t}\n\n\t\treturn $res . ' ...';\n\t}",
"public function EncodedLen($n){ \n return $n * 2 ;\n }",
"public function getCharLength();",
"function repetir($caracteres,$repeticiones=1){\n for ($i=0; $i < $repeticiones; $i++) { \n echo $caracteres;\n }\n}",
"function GetShorteningForLargeText($strValue, $cNumberOfChars)\n{\n\t$ret = runner_substr($strValue, 0, $cNumberOfChars );\n\t\t\n\treturn runner_htmlspecialchars($ret);\n}",
"public function setNumGlyphs($value) {}",
"public function consume_range($chars)\n {\n }",
"function encodeString($input_string)\n{\n $count = 0;\n $temp_str = '';\n $str_length = strlen($input_string);\n \n for($i=0;$i<$str_length;$i++)\n {\n $limit = 1;\n \n $curr = substr($input_string, $i, $limit); \n $next = substr($input_string, $i+1, $limit); \n \n //comparing current character with the next character\n if($curr == $next)\n {\n $count++;\n }\n else{\n $cnt = $count + 1;\n if($cnt != 1)\n {\n $temp_str .= $input_string[$i].$cnt; \n }\n else{\n $temp_str .= $input_string[$i];\n }\n \n $count = 0;\n }\n }\n \n return $temp_str;\n}",
"function mb_count_chars($input) {\r\n\t\t$l = mb_strlen($input);\r\n\t\t$unique = array();\r\n\t\tfor($i = 0; $i < $l; $i++) {\r\n\t\t\t$char = mb_substr($input, $i, 1);\r\n\t\t\tif(!array_key_exists($char, $unique))\r\n\t\t\t\t$unique[$char] = 0;\r\n\t\t\t$unique[$char]++;\r\n\t\t}\r\n\t\treturn $unique;\r\n\t}",
"function chunk($ch, $str) {\n print($str);\n ob_flush();\n flush();\n return strlen($str);\n}",
"function length($read, $count)\n{\n global $end;\n \n if (strlen($read) > 80) {\n echo \"\\e[0;31m Erreur : \\e[0;34m ligne $count : \\e[0;31m Ligne de plus de 80 caractères. \\e[0;m\\n\";\n $end += 1;\n }\n}",
"function randomChars($lenghts=null) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyz';\n $string = null;\n for ($p = 0; $p < $lenghts; $p++) {\n $string .= $characters[mt_rand(0, strlen($characters)-1)];\n }\n return $string;\n\n }",
"public function getNChar($number = 200, $i = null)\n {\n $wiki_api = sprintf($this->base_api . 'action=query&prop=extracts&exchars=%d&pageids=%s', intval($number), $this->getId());\n $json_wapi = json_decode(file_get_contents($wiki_api), true);\n\n return $this->get_list_or_item($json_wapi['query']['pages'], 'extract', $i);\n }",
"function limitar($sString, $iLimite) {\n\n if ( strlen($sString) > $iLimite ) {\n $sString = mb_substr($sString, 0, $iLimite - 3) . '...';\n } else {\n $sString = mb_substr($sString, 0, $iLimite);\n }\n\n return $sString;\n}",
"private function truncateChars($string = '', $limit = 0) {\n for($i = 0; $i <= $limit AND $i < strlen($string); $i++){\n $output .= $string[$i];\n }\n return (string)trim($output);\n }",
"public function getNumChars()\n {\n return count($this->getChrArray());\n }",
"public static function chars()\n {\n return self::choose(0, 255)->fmap('chr');\n }",
"public function addLetters() {\n\n for ($i=0; $i <$this->letterPorsion ; $i++) {\n $this->password = $this->password.substr($this->str, rand(0, strlen($this->str) - 1), 1);\n }\n }",
"function _gzipGetFourChars($Val){\n\t\t$out = '';\n\t\tfor ($i = 0; $i < 4; $i ++) { \n\t\t $out .= chr($Val % 256); \n\t\t $Val = floor($Val / 256); \n\t } \n\t return $out;\n\t\n\t}",
"function _putsCharLeftToRigth(&$pdf, $x, $y, $data, $distance, $align='R') {\n $step = 0;\n for ($i = strlen($data)-1; $i >= 0; $i--) {\n $element = mb_substr($data, $i, 1,'utf-8');\n $pdf->SetXY($x-$step, $y);\n $pdf->MultiCell(10, 5, $element, 0, $align);\n $step += $distance;\n }\n }",
"static function writeStringLength(?string $str): string {\n if($str === null) {\n // \\xFB (251)\n return \"\\xFB\";\n }\n \n $length = \\strlen($str);\n if($length <= 250) {\n return static::writeInt1($length).$str;\n }\n \n if($length <= 0xFFFF) { // max 2^16: \\xFC (252)\n return \"\\xFC\".static::writeInt2($length).$str;\n }\n \n if($length <= 0xFFFFFF) { // max 2^24: \\xFD (253)\n return \"\\xFD\".static::writeInt3($length).$str;\n }\n \n return \"\\xFE\".static::writeInt8($length).$str; // max 2^64: \\xFE (254)\n }",
"public function limitChars($string, $check_len, $upto, $ret = false) {\n\n $string = ucfirst(strip_tags($string));\n\n\n\n\n\n if (strlen($string) > $check_len) {\n\n\n\n $temp = substr($string, 0, $upto);\n\n $temp.=\"...\";\n\n if ($ret)\n return $temp;\n else\n echo $temp;\n }\n\n else {\n\n if ($ret)\n return $string;\n else\n echo $string;\n }\n }",
"function pattern($n){\n\tfor($i=1; $i<=$n; $i++){\n\t\tfor($j=1; $j<=$i; $j++){\n\t\t\techo $j.' ';\n\t\t}\n\t\techo \"\\n\";\n\t}\n}",
"public function testManySpecialCharacter ()\n {\n // Function parameters\n $length = 10;\n $minPasswordRequirements = [\n 'min' => 10,\n 'special' => 6,\n 'digit' => 1,\n 'upper' => 1,\n ];\n // Helper\n $securityHelper = new SecurityHelper(new Security()); // Empty security (it does not matter)\n // Check password correctness\n $ok = true;\n for ($i = 0; $i < self::ITERATIONS; $i++) {\n $password = $securityHelper->generatePassword($length, $minPasswordRequirements);\n $result = preg_match('/\\A(?=(.*\\d){1})(?=(?:[^A-Z]*[A-Z]){1})(?=(?:[0-9a-zA-Z]*[!#$%&*+,-.:;<=>?@_~]){6})[0-9a-zA-Z!#$%&*+,-.:;<=>?@_~]{10,}\\z/', $password);\n if ($result === 0) {\n $ok = false;\n break;\n }\n }\n $this->assertTrue($ok);\n }",
"function string_repeat_char( $p_character, $p_repeats ) {\r\n\treturn str_pad( '', $p_repeats, $p_character );\r\n}",
"public static function chars($extended = false)\n {\n while (true) {\n yield chr(mt_rand(0, 128 * (1 + $extended) - 1));\n }\n }",
"function GenerateWord() {\n $nb = rand(3, 10);\n $w = '';\n for ($i = 1; $i <= $nb; $i++)\n $w .= chr(rand(ord('a'), ord('z')));\n return $w;\n }",
"function _char_limit($str, $length, $minword = 3)\n {\n $sub = '';\n $len = 0;\n \n foreach (explode(' ', $str) as $word)\n {\n $part = (($sub != '') ? ' ' : '') . $word;\n $sub .= $part;\n $len += strlen($part);\n \n if (strlen($word) > $minword && strlen($sub) >= $length)\n {\n break;\n }\n }\n \n return $sub . (($len < strlen($str)) ? '...' : '');\n\n }",
"function php02($n_caracteres_crypt,$coord,$dato_crypt){\n\t$n_caracteres = strlen($dato_crypt);\n\t$texto_crypt = php01($n_caracteres_crypt);\n\t$texto_n = '';\n\tfor($i = 0; $i < strlen($texto_crypt); $i++){\n\t\twhile ( $i == $coord){\n\t\t\tfor($j = 0; $j < strlen($dato_crypt); $j++){\n\t\t\t\t$texto_n = $texto_n . $dato_crypt[$j];\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\t\t$texto_n = $texto_n . $texto_crypt[$i];\n\t}\n\treturn $texto_n;\n}",
"function getChaine($long = 8){\n $chaine = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\n $str = '';\n for($u = 1; $u <= $long; $u++) {\n $nb = strlen($chaine);\n $nb = mt_rand(0,($nb-1));\n $str .= $chaine[$nb];\n }\n return $str;\n}",
"function trim_output($str,$maxlength='250',$rep='...'){\n $ret=chunk_split($str,60);\n\n if(strlen($ret) > $maxlength){\n $ret=substr($ret,0,$maxlength).$rep; \n }\n return $ret; \n}",
"function trim_output($str,$maxlength='250',$rep='...'){\n $ret=chunk_split($str,60);\n\n if(strlen($ret) > $maxlength){\n $ret=substr($ret,0,$maxlength).$rep; \n }\n return $ret; \n}",
"function ks_acf_character_limit_markup($field) {\n $class_list = explode(' ', $field['wrapper']['class']);\n \n if (!in_array('no-char-count', $class_list) && $field['maxlength']) { ?>\n <p class=\"ks-char-count\"><span class=\"ks-char-count__current\"><?php echo strlen(iconv('utf-8', 'utf-16le', str_replace(PHP_EOL, ' ', $field['value']))) / 2; ?></span>/<?php echo $field['maxlength']; ?> characters</p>\n <?php }\n}",
"function word_wrap_txt($string, $length){\n\t\t\n\t\t$line = '';\n\t\t$i = 0;\n\t\t\n\t\t$outputStringArray = str_split($string, $length);\n\t\t\n\t\t$noOFLines = count($outputStringArray) + 1;\n\t\t\n\t\tif (count($outputStringArray) == 1){\n\t\t\t\n\t\t\t$line .= \"\\t\".$outputStringArray[0].\"\\t\";\n\t\t\t\n\t\t\t$i++;\n\t\t\t\n\t\t}else{\n\t\t\t\n\t\t\tforeach ($outputStringArray as $outputString){\n\t\t\t\t//,\"/t |\"\n\t\t\t\tif ($noOFLines == $i){\n\t\t\t\t\t\n\t\t\t\t\t$line .= '|'.\"\\t\".$outputString.\"\\t\".'|';\n\t\t\t\t\t$line .= $i;\n\t\t\t\t\t\n\t\t\t\t\t$i++;\n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\t\n\t\t\t\t\tif ($i != 0){\n\t\t\t\t\t\t$line .= \"\\t\".' '.\"\\t\".'|';\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$line .= '|'.\"\\t\".$outputString.\"\\t\".'|'.\"\\n\";\n\t\t\t\t\t//$line .= $i;\n\t\t\t\t\t\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn $line;\n\t\t\n\t}",
"function generate_word($num_consonants)\r\n\t{\r\n\t\t$output = \"\"; // Return variable\r\n\t\t$vowels = array('a', 'e', 'i', 'o', 'u');\r\n\t\t\r\n\t\tfor($i = 0; $i < $num_consonants; $i++)\r\n\t\t{\r\n\t\t\t// Pick a random character and a vowel\r\n\t\t\t$char = 98;\r\n\t\t\tdo\r\n\t\t\t{\r\n\t\t\t\t$char = rand(98, 122); // b - z\r\n\t\t\t}\r\n\t\t\twhile($char == 101 || $char == 105 || $char == 111 || $char == 117);\r\n\t\t\t$vowel_selector = rand(0, 4);\r\n\t\t\t\r\n\t\t\t// At this point, we've got char and a vowel\r\n\t\t\t// Now we decide which one goes first\r\n\t\t\t$toss = rand(0, 1);\r\n\t\t\tif ($toss == 1)\r\n\t\t\t{\r\n\t\t\t\t$output = $output . chr($char) . $vowels[$vowel_selector];\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$output = $output . $vowels[$vowel_selector] . chr($char);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $output;\r\n\t}",
"function index2Letter(int $index): string\n{\n return chr(ord('a') + $index);\n}",
"public function testRandomChars()\n {\n $numChars = rand(20, 40);\n\n $chars = $this->randomChars($numChars);\n $this->assertEquals($numChars, strlen($chars));\n }",
"function voyage_mikado_blog_lists_number_of_chars() {\n\n $number_of_chars = array();\n\n if(voyage_mikado_options()->getOptionValue('standard_number_of_chars')) {\n $number_of_chars['standard'] = voyage_mikado_options()->getOptionValue('standard_number_of_chars');\n }\n if(voyage_mikado_options()->getOptionValue('masonry_number_of_chars')) {\n $number_of_chars['masonry'] = voyage_mikado_options()->getOptionValue('masonry_number_of_chars');\n }\n if(voyage_mikado_options()->getOptionValue('masonry_number_of_chars')) {\n $number_of_chars['masonry-full-width'] = voyage_mikado_options()->getOptionValue('masonry_number_of_chars');\n }\n if(voyage_mikado_options()->getOptionValue('split_column_number_of_chars')) {\n $number_of_chars['split-column'] = voyage_mikado_options()->getOptionValue('split_column_number_of_chars');\n }\n\n return $number_of_chars;\n\n }",
"function line_break($length = 40)\n{\n $output = \"\";\n for($i = 0; $i < $length; $i++) {\n $output .= '-';\n }\n return $output;\n}",
"function genString($len) {\n global $alphabet;\n\n $finale = \"\";\n \n for ($curChar = 0; $curChar < $len; $curChar++)\n $finale .= $alphabet[rand(0, (strlen($alphabet) - 1))];\n\n return $finale;\n}",
"function bump($x) {\n return (substr_count($x, 'n') > 15 ) ? \" Car Deat\" : \"woohoo!\";\n\n }",
"function add3dots($string, $repl, $limit) \r\n{\r\n if(strlen($string) > $limit) \r\n {\r\n return substr($string, 0, $limit) . $repl; \r\n }\r\n else \r\n {\r\n return $string;\r\n }\r\n}",
"function createPwd($characters) {\n $possible = '23456789bcdfghjkmnpqrstvwxyz';\n $code = '';\n $i = 0;\n while ($i < $characters) {\n $code .= substr($possible, mt_rand(0, strlen($possible)-1), 1);\n $i++;\n }\n return $code;\n}",
"function space1_8(&$fp) {\n\n fwrite($fp, chr(27).\"0\");\n }",
"public function getCharacters() { return $this->Characters; }",
"public function charsUntil($bytes, $max = null);",
"function getChar($index){\r\n //TODO must by modified for more than 22 chars\r\n $p__chars = array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','r','s','t','u','v','w');\r\n return ($p__chars[$index]);\r\n }",
"function characterAtk($atks = null) {\n if (count($atks) > 0) {\n\n $content = '\n <div class=\"charbottom\">';\n $countatk = 1;\n foreach ($atks as $atk) {\n if ($atk -> getTyp() == 'p') {\n $atkTyp = 'Physical';\n } elseif ($atk -> getTyp() == 'm') {\n $atkTyp = 'Magical';\n } elseif ($atk -> getTyp() == 'a') {\n $atkTyp = 'Special';\n }\n ($countatk % 5 == 0) ? $addclass = 'skillright' : $addclass = '';\n $content .= '<a href=\"#\" rel=\"' . $atk -> getId() . '\" class=\"skill ' . $addclass . '\" title=\"' . $atk -> getName() . '\"><img src=\"' . getAtkImag($atk -> getId()) . '\" /></a>\n <span class=\"skilltext\"><b>' . $atk -> getName() . '</b><br />Damage ' . $atk -> getDmgPt() . '<br />' . $atkTyp . '</span>';\n $countatk++;\n }\n $content .= '</div>';\n } else {\n $content = '\n <div class=\"charbottom\"><p style=\"height:50px\">There aren\\'t any Skills learned!</p></div>';\n }\n echo $content;\n}",
"private function generate()\n {\n $output = '';\n $length = strlen($this->str);\n\n\n for ($i = 1; $i < 5; $i++) {\n // get random char\n $char = $this->str[rand(0, $length - 1)];\n $output .= $char;\n\n // get font size\n $fontSize = ($this->level > 1) ? rand(20, 48) : 28;\n imagettftext($this->imageResource, $fontSize, rand(-35, 35), 35 * $i, 55, imagecolorallocate($this->imageResource, rand(0, 240), rand(0, 240), rand(0, 240)), $this->font, $char);\n }\n\n $this->code = ($this->caseSensitive) ? $output : strtolower($output);\n }",
"function random_password($length){\r\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\r\n //Create blank string\r\n $password = '';\r\n //Get the index of the last character in our $characters string\r\n $characterListLength = mb_strlen($characters, '8bit') - 1;\r\n //Loop from 1 to the length that was specified\r\n foreach(range(1,$length) as $i){\r\n $password .=$characters[rand(0,$characterListLength)];\r\n }\r\n return $password;\r\n}",
"public function getNumGlyphs() {}",
"public function getNumGlyphs() {}",
"function substrwords($text,$maxchar){\n\tif (strlen($text) > $maxchar) { \n\t\t$words = explode(\" \", $text); \n\t\t$output = ''; \n\t\t$i = 0; \n\t\twhile (true) { \n\t\t\t$length = (strlen($output) + strlen($words[$i]));\n\t\t\tif ($length > $maxchar) { \n\t\t\t\tbreak; \n\t\t\t} else { \n\t\t\t\t$output = $output . \" \" . $words[$i]; \n\t\t\t\t++$i; \n\t\t\t} \n\t\t}\n\t} else { \n\t\t$output = $text;\n\t}\n\t return $output;\n}",
"protected static function setChars(int $chars)\n {\n if ($chars < 4)\n static::$chars = 4;\n\n else if ($chars > 10)\n static::$chars = 10;\n\n else static::$chars = $chars;\n }",
"function GenerateWord()\n{\n $nb=rand(3,10);\n $w='';\n for($i=1;$i<=$nb;$i++)\n $w.=chr(rand(ord('a'),ord('z')));\n return $w;\n}",
"function str_generate($length, $chars)\n {\n return substr(str_shuffle(str_repeat($chars, $length)), 0, $length);\n }",
"function generateCode($characters) {\n\t$possible = '23456789bcdfghjkmnpqrstvwxyz';\n\t$code = '';\n\t$i = 0;\n\twhile ($i < $characters) { \n\t\t$code .= substr($possible, mt_rand(0, strlen($possible)-1), 1);\n\t\t$i++;\n\t}\n\treturn $code;\n}",
"function digest($text, $chars) {\n\t\t$text = strip_tags($text);\n\t\tif (strlen($text) > $chars) {\n\t\t\treturn substr($text, 0, $chars-3);\n\t\t} else {\n\t\t\treturn $text;\n\t\t}\n\t}",
"function su($s, $max=0)\n\t\t{\n\t\t\t$ret = self::values($s);\n\t\t\t$r = trim(strip_tags($ret[0]));\n\n\t\t\tif($max && (strlen($r) > $max))\n\t\t\t{\n\t\t\t\tif($max < 4)\n\t\t\t\t\treturn mb_substr($r, $max);\n\t\t\t\telse\n\t\t\t\t\treturn mb_substr($r, $max-3).'...';\n\t\t\t}\n\n\t\t\tif($r == '')\n\t\t\t\t$r = '<i>no value</i>';\n\t\t\n\t\t\treturn $r;\n\t\t}",
"function reduce_string_by_chars($string, $max_chars)\n{\n\tif(strlen($string) > $max_chars){\n\t\t$string = substr($string, 0, $max_chars).\"..\";\n\t}\n\t\n\treturn $string;\n}",
"public function stow();",
"private function _genCode(){\n\t\t$str = \"1 2 3 4 6 7 8 9 a b c d e f g h k m n P t\";\n\t\t\n\t\t$temp = explode(\" \", $str);\n\t\t$c1 = $temp[rand(1, 20)];\n\t\t$c2 = $temp[rand(1, 11)];\n\t\t$c3 = $temp[rand(1, 13)];\n\t\t$c4 = $temp[rand(1, 20)];\n\t\t$c5 = $temp[rand(1, 18)];\n\t\t$c6 = $temp[rand(1, 20)];\n\t\t\n\t\t$chars = $c1.$c2.$c3.$c4.$c5.$c6;\n\t\t\n\t\treturn strtolower($chars);\n\t}",
"private static function pidigits($n)\r\n {\r\n $i = 0;\r\n $pidigit = array(array(1, 0, 0, 1), array(0, 0, 0, 0));\r\n\r\n while($n)\r\n {\r\n if($n < 10)\r\n {\r\n printf(\"%s%s\\t:%d\\n\", Pidigit_Next($pidigit, $n), str_repeat(' ', 10 - $n), $i + $n);\r\n break;\r\n }\r\n else\r\n {\r\n printf(\"%s\\t:%d\\n\", Pidigit_Next($pidigit, 10), $i += 10);\r\n }\r\n $n -= 10;\r\n }\r\n }",
"static function limit_content($str, $length)\n {\n $str = strip_tags($str);\n $str = str_replace('[/', '[', $str);\n $str = strip_shortcodes($str);\n $str = explode(\" \", $str);\n return implode(\" \", array_slice($str, 0, $length));\n }",
"public function characters($user, $server);",
"function generateRandomString($n) { \n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; \n $randomString = ''; \n\n for ($i = 0; $i < $n; $i++) { \n $index = rand(0, strlen($characters) - 1); \n $randomString .= $characters[$index]; \n } \n\n return $randomString; \n}",
"function generateRandomString($n) { \n\t\t$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; \n\t\t$randomString = '';\n \n\t\tfor ($i = 0; $i < $n; $i++) { \n\t\t\t$index = rand(0, strlen($characters) - 1); \n\t\t\t$randomString .= $characters[$index]; \n\t\t} \n \n \treturn $randomString; \n\t}",
"public static function getString($count, $chars = self::CHARSET_ALNUM) {\n $max = strlen($chars);\n $result = '';\n for ($i = 0; $i < $count; $i++)\n $result .= $chars[mt_rand(0, $max - 1)];\n return $result;\n }",
"function repeatString(String $s, int $N):String{\n $l = strlen($s);\n $i=0;\n while($i < $N-$l){\n $s.=$s[$i++];\n }\n return $s;\n}",
"public function getTextLength();"
] | [
"0.5881861",
"0.56282127",
"0.56104153",
"0.55842954",
"0.5264408",
"0.52381617",
"0.5193707",
"0.51872975",
"0.51722974",
"0.5139457",
"0.5137791",
"0.51100826",
"0.5099583",
"0.5097539",
"0.5094522",
"0.50930166",
"0.5076203",
"0.5065623",
"0.50632703",
"0.5024385",
"0.5021631",
"0.5012262",
"0.5006492",
"0.4996529",
"0.4992302",
"0.49820602",
"0.49810895",
"0.4979993",
"0.4969832",
"0.49437755",
"0.49375755",
"0.49081331",
"0.48915502",
"0.48912525",
"0.48880905",
"0.48751467",
"0.48694643",
"0.4845853",
"0.48406258",
"0.48281828",
"0.48192772",
"0.48188522",
"0.48092657",
"0.48036188",
"0.47779912",
"0.4773961",
"0.47689015",
"0.47684526",
"0.47595572",
"0.4759216",
"0.475323",
"0.47472087",
"0.4739804",
"0.4735369",
"0.47327575",
"0.4728796",
"0.47167233",
"0.4714569",
"0.4710848",
"0.4702174",
"0.46912122",
"0.46912122",
"0.46882164",
"0.46838707",
"0.46725976",
"0.46637952",
"0.46599367",
"0.46597853",
"0.465975",
"0.46517098",
"0.4647561",
"0.46447763",
"0.46446204",
"0.4636758",
"0.4636639",
"0.4624694",
"0.46243873",
"0.4610061",
"0.46067163",
"0.46061355",
"0.46009496",
"0.46009496",
"0.4599758",
"0.45955187",
"0.45927906",
"0.45813954",
"0.4578273",
"0.45723698",
"0.4570486",
"0.45696524",
"0.45683807",
"0.45668793",
"0.4566415",
"0.45645827",
"0.4563205",
"0.45612454",
"0.45544475",
"0.4552856",
"0.45518863",
"0.45492965"
] | 0.495122 | 29 |
check for required gd functions | function Create($sFilename = '') {
if (!function_exists('imagecreate') || !function_exists("image$this->sFileType") || ($this->vBackgroundImages != '' && !function_exists('imagecreatetruecolor'))) {
return false;
}
// get background image if specified and copy to CAPTCHA
if (is_array($this->vBackgroundImages) || $this->vBackgroundImages != '') {
// create new image
$this->oImage = imagecreatetruecolor($this->iWidth, $this->iHeight);
// create background image
if (is_array($this->vBackgroundImages)) {
$iRandImage = array_rand($this->vBackgroundImages);
$oBackgroundImage = imagecreatefromjpeg($this->vBackgroundImages[$iRandImage]);
} else {
$oBackgroundImage = imagecreatefromjpeg($this->vBackgroundImages);
}
// copy background image
imagecopy($this->oImage, $oBackgroundImage, 0, 0, 0, 0, $this->iWidth, $this->iHeight);
// free memory used to create background image
imagedestroy($oBackgroundImage);
} else {
// create new image
$this->oImage = imagecreate($this->iWidth, $this->iHeight);
}
// allocate white background colour
imagecolorallocate($this->oImage, 0, 0, 0);
// check for owner text
if ($this->sOwnerText != '') {
$this->DrawOwnerText();
}
// check for background image before drawing lines
if (!is_array($this->vBackgroundImages) && $this->vBackgroundImages == '') {
$this->DrawLines();
}
$this->GenerateCode();
$this->DrawCharacters();
// write out image to file or browser
$this->WriteFile($sFilename);
// free memory used in creating image
imagedestroy($this->oImage);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function check() {\n\n // check for a valid GD lib installation \n if(!function_exists('gd_info')) raise('GD Lib is not installed');\n\n }",
"protected function checkGdLibJpgSupport() {}",
"protected function checkGdLibPngSupport() {}",
"private function checkGDLibrary(){\n\t//Check for GD support\n\t\treturn extension_loaded('gd');\n\t}",
"function gdInstalled() {\r\n return function_exists( 'gd_info' );\r\n}",
"function gd_support(){\n \t\treturn in_array($this->getGDType(), we_image_edit::supported_image_types());\n \t}",
"function is_gd_image($image)\n {\n }",
"function gd_support(){\n\t\treturn in_array($this->getGDType(), we_base_imageEdit::supported_image_types());\n\t}",
"protected function checkGdLibGifSupport() {}",
"public static function GDSupported() {\n\t\treturn \\function_exists('gd_info');\n\t}",
"function gd_loaded()\r\n{\r\n\tif ( ! extension_loaded('gd'))\r\n\t{\r\n\t\tif ( ! @dl('gd.so'))\r\n\t\t\treturn FALSE;\r\n\t}\r\n\treturn TRUE;\r\n}",
"public function has_gd_extension() {\n\n return extension_loaded( 'gd' ) && function_exists( 'gd_info' );\n\n }",
"function checkGDSupport() {\n if (extension_loaded(\"gd\")) {\n $arrGdInfo = gd_info();\n\n preg_match(\"/[\\d\\.]+/\", $arrGdInfo['GD Version'], $matches);\n if (!empty($matches[0])) {\n return $matches[0];\n }\n }\n return false;\n }",
"public static function gdAvailable()\n {\n return extension_loaded('gd');\n }",
"function _testGD() {\r\n $gd = array();\r\n $GDfuncList = get_extension_funcs('gd');\r\n ob_start();\r\n @phpinfo(INFO_MODULES);\r\n $output=ob_get_contents();\r\n ob_end_clean();\r\n $matches[1]='';\r\n if (preg_match(\"/GD Version[ \\t]*(<[^>]+>[ \\t]*)+([^<>]+)/s\",$output,$matches)) {\r\n $gdversion = $matches[2];\r\n }\r\n if ($GDfuncList) {\r\n if (in_array('imagegd2', $GDfuncList)) {\r\n $gd['gd2'] = $gdversion;\r\n } else {\r\n $gd['gd1'] = $gdversion;\r\n }\r\n }\r\n return $gd;\r\n }",
"function autoDetect() {\n $GDfuncList = get_extension_funcs('gd');\n ob_start();\n @phpinfo(INFO_MODULES);\n $output = ob_get_contents();\n ob_end_clean();\n $matches[1] = '';\n if (preg_match(\"/GD Version[ \\t]*(<[^>]+>[ \\t]*)+([^<>]+)/s\", $output, $matches)) {\n $gdversion = $matches[2];\n }\n $res = false;\n if ($GDfuncList) {\n if (!in_array('imagegd2', $GDfuncList)) {\n zmgToolboxPlugin::registerError('GD 1.x', $gdversion . ' ' . T_('is available.'));\n $res = true;\n }\n }\n if (!$res) {\n zmgToolboxPlugin::registerError('GD 1.x', T_('could not be detected on your system.'));\n }\n }",
"protected function checkGdLibFreeTypeSupport() {}",
"public static function check()\n {\n if ( ! function_exists('gd_info'))\n {\n //throw new Exception('GD is either not installed or not enabled, check your configuration');\n }\n\n if (defined('GD_BUNDLED'))\n {\n // Get the version via a constant, available in PHP 5.\n Image_GD::$_bundled = GD_BUNDLED;\n }\n else\n {\n // Get the version information\n $info = gd_info();\n\n // Extract the bundled status\n Image_GD::$_bundled = (bool) preg_match('/\\bbundled\\b/i', $info['GD Version']);\n }\n\n if (defined('GD_VERSION'))\n {\n // Get the version via a constant, available in PHP 5.2.4+\n $version = GD_VERSION;\n }\n else\n {\n // Get the version information\n $info = gd_info();\n\n // Extract the version number\n preg_match('/\\d+\\.\\d+(?:\\.\\d+)?/', $info['GD Version'], $matches);\n\n // Get the major version\n $version = $matches[0];\n }\n\n if ( ! version_compare($version, '2.0.1', '>='))\n {\n // throw new Exception('Image_GD requires GD version :required or greater, you have :version',\n // array('required' => '2.0.1', ':version' => $version));\n }\n\n return Image_GD::$_checked = TRUE;\n }",
"protected function checkGdLibTrueColorSupport() {}",
"function GDEnabled()\n\t{\n\t\tstatic $gd_enabled = null;\n\n\t\tif (is_null($gd_enabled)) {\n\t\t\t$gd_enabled =\tfunction_exists('imagecreate')\n\t\t\t\t\t\t\t&& (\tfunction_exists('imagegif')\n\t\t\t\t\t\t\t\t\t|| function_exists('imagepng')\n\t\t\t\t\t\t\t\t\t|| function_exists('imagejpeg'));\n\t\t}\n\n\t\treturn $gd_enabled;\n\t}",
"public function isGDLibLoaded()\n {\n return extension_loaded('gd') && function_exists('gd_info');\n }",
"public static function checkGdLibrary($generateMessage = true)\n\t{\n\t \tif(!(extension_loaded('gd') && function_exists('gd_info')))\n\t \t{\n\t \t\tif($generateMessage)\n\t \t\t{\n\t \t\t\tJFactory::getApplication()->enqueueMessage(JText::_('COM_FORM2CONTENT_GDI_NOT_INSTALLED'), 'warning');\n\t \t\t}\n\t \t\t\n\t \t\treturn false;\n\t \t}\n\t \t\n\t \treturn true;\n\t}",
"public static function isAvailable()\n {\n return Image::isAvailable('gd');\n }",
"public function checkOperationality()\n {\n if (!extension_loaded('gd')) {\n throw new SystemRequirementsNotMetException('Required Gd extension is not available.');\n }\n\n if (!function_exists('imagewebp')) {\n throw new SystemRequirementsNotMetException(\n 'Gd has been compiled without webp support.'\n );\n }\n }",
"private function islibraryLoaded(): bool\n {\n if (!extension_loaded('gd') && !extension_loaded('gd2')) {\n return false;\n }\n\n return true;\n }",
"public function checkConvertability()\n {\n $mimeType = $this->getMimeTypeOfSource();\n switch ($mimeType) {\n case 'image/png':\n if (!function_exists('imagecreatefrompng')) {\n throw new SystemRequirementsNotMetException(\n 'Gd has been compiled without PNG support and can therefore not convert this PNG image.'\n );\n }\n break;\n\n case 'image/jpeg':\n if (!function_exists('imagecreatefromjpeg')) {\n throw new SystemRequirementsNotMetException(\n 'Gd has been compiled without Jpeg support and can therefore not convert this jpeg image.'\n );\n }\n }\n }",
"private function checkImagickLibrary(){\n\t\t//Check for Imagick support\n\t\treturn class_exists('Imagick');\n\t}",
"function gd_version_check($user_ver = 0)\n\t{\n\t\tif (! extension_loaded('gd'))\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\n\t\tstatic $gd_ver = 0;\n\t\t// Just accept the specified setting if it's 1.\n\t\tif ($user_ver == 1) \n\t\t{\n\t\t\t$gd_ver = 1;\n\t\t \treturn 1; \n\t\t}\n\t\t// Use the static variable if function was called previously.\n\t\tif ($user_ver !=2 && $gd_ver > 0 ) \n\t\t{ \n\t\t\treturn $gd_ver;\n\t\t}\n\t\t// Use the gd_info() function if possible.\n\t\tif (function_exists('gd_info')) \n\t\t{\n\t\t\t$ver_info = gd_info();\n\t\t\tpreg_match('/\\d/', $ver_info['GD Version'], $match);\n\t\t\t$gd_ver = $match[0];\n\t\t\treturn $match[0];\n\t\t}\n\t\t// If phpinfo() is disabled use a specified / fail-safe choice...\n\t\tif (preg_match('/phpinfo/', ini_get('disable_functions'))) \n\t\t{\n\t\t\tif ($user_ver == 2) \n\t\t\t{\n\t\t\t\t$gd_ver = 2;\n\t\t\t\treturn 2;\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\t$gd_ver = 1;\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}\n\t\t// ...otherwise use phpinfo().\n\t\tob_start();\n\t\tphpinfo(INFO_MODULES);\n\t\t$info = ob_get_contents();\n\t\tob_end_clean();\n\t\t$info = stristr($info, 'gd version');\n\t\tpreg_match('/\\d/', $info, $match);\n\t\t$gd_ver = $match[0];\n\t\treturn $match[0];\n\t}",
"public function isGd()\n {\n return $this->isResourceGd($this->resource);\n }",
"public function testCheckConvertability2()\r\n {\r\n global $pretend;\r\n\r\n $gd = $this->createGd('test.png');\r\n self::resetPretending();\r\n\r\n $pretend['functionsExisting'] = ['imagecreatefrompng'];\r\n $gd->checkConvertability();\r\n $pretend['functionsExisting'] = [];\r\n }",
"function checkImg(){\n global $postpath;\n return getimagesize($postpath) !== false;\n }",
"function gdVersion($user_ver = 0)\n{\n if (! extension_loaded('gd')) { return; }\n static $gd_ver = 0;\n // Just accept the specified setting if it's 1.\n if ($user_ver == 1) { $gd_ver = 1; return 1; }\n // Use the static variable if function was called previously.\n if ($user_ver !=2 && $gd_ver > 0 ) { return $gd_ver; }\n // Use the gd_info() function if possible.\n if (function_exists('gd_info')) {\n $ver_info = gd_info();\n preg_match('/\\d/', $ver_info['GD Version'], $match);\n $gd_ver = $match[0];\n return $match[0];\n }\n // If phpinfo() is disabled use a specified / fail-safe choice...\n if (preg_match('/phpinfo/', ini_get('disable_functions'))) {\n if ($user_ver == 2) {\n $gd_ver = 2;\n return 2;\n } else {\n $gd_ver = 1;\n return 1;\n }\n }\n // ...otherwise use phpinfo().\n ob_start();\n phpinfo(8);\n $info = ob_get_contents();\n ob_end_clean();\n $info = stristr($info, 'gd version');\n preg_match('/\\d/', $info, $match);\n $gd_ver = $match[0];\n return $match[0];\n}",
"public function testCheckConvertability1()\r\n {\r\n global $pretend;\r\n\r\n $gd = $this->createGd('test.png');\r\n self::resetPretending();\r\n\r\n $pretend['functionsNotExisting'] = ['imagecreatefrompng'];\r\n $this->expectException(SystemRequirementsNotMetException::class);\r\n $gd->checkConvertability();\r\n $pretend['functionsNotExisting'] = [];\r\n }",
"public function checkOperationality()\n {\n if (!extension_loaded('Gmagick')) {\n throw new SystemRequirementsNotMetException('Required Gmagick extension is not available.');\n }\n\n if (!class_exists('Gmagick')) {\n throw new SystemRequirementsNotMetException(\n 'Gmagick is installed, but not correctly. The class Gmagick is not available'\n );\n }\n\n $im = new \\Gmagick($this->source);\n\n if (!in_array('WEBP', $im->queryformats())) {\n throw new SystemRequirementsNotMetException('Gmagick was compiled without WebP support.');\n }\n }",
"private function isAvailableImageLibrary()\n {\n return ($this->isAvailableGD() || $this->isAvailableImageLibrary()) ? true : false;\n }",
"function isSupportedType($type, $src_file) {\n if ($type !== \"jpg\" && $type !== \"jpeg\" && $type !== \"png\") {\n return zmgToolboxPlugin::registerError($src_file, 'GD 1.x: Source file is not an image or image type is not supported.');\n }\n return true;\n }",
"function logonscreener_requirements() {\n if (version_compare(PHP_VERSION, '5.2.1') < 0) {\n logonscreener_log('Your PHP is too old. Go get the latest.');\n exit;\n }\n if (!function_exists('imagegd2') && (!function_exists('dl') || !@dl('php_gd2.dll'))) {\n logonscreener_log('GD is disabled.');\n }\n}",
"protected function verifyFormatCompatiblity()\n {\n $gdInfo = gd_info();\n\n switch ($this->format) {\n case 'GIF':\n $isCompatible = $gdInfo['GIF Create Support'];\n break;\n case 'JPG':\n case 'JPEG':\n $isCompatible = (isset($gdInfo['JPG Support']) || isset($gdInfo['JPEG Support'])) ? true : false;\n $this->format = 'JPEG';\n break;\n case 'PNG':\n case 'XBM':\n case 'XPM':\n case 'WBMP':\n $isCompatible = $gdInfo[$this->format . ' Support'];\n break;\n default:\n $isCompatible = false;\n break;\n }\n\n if (!$isCompatible) {\n $isCompatible = $gdInfo['JPEG Support'];\n\n if (!$isCompatible) {\n throw $this->triggerError(sprintf('Your GD installation does not support \"%s\" image types!', $this->format));\n }\n }\n }",
"public static function imagickAvailable()\n {\n return extension_loaded('imagick');\n }",
"public function isValidImage()\n\t{\n\t\t$src = $this->source_path;\n\t\t$extension = \\strtolower(\\substr($src, (\\strrpos($src, '.') + 1)));\n\n\t\tif (!\\in_array($extension, $this->image_extensions)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$r = @\\imagecreatefromstring(\\file_get_contents($src));\n\n\t\treturn \\is_resource($r) && \\get_resource_type($r) === 'gd';\n\t}",
"function has_header_image()\n {\n }",
"function __checkImgParams() {\n\t\t/* check file type */\n\t\t$this->__checkType($this->request->data['Upload']['file']['type']);\n\t\t\n\t\n\t\t\n\t\t/* check file size */\n\t\t$this->__checkSize($this->request->data['Upload']['file']['size']);\n\t\t\n\t\t\n\t\t\n\t\t/* check image dimensions */\n\t\t$this->__checkDimensions($this->request->data['Upload']['file']['tmp_name']);\n\t\t\n\t\t\t\n\t}",
"public function __construct(){\n\t\tif(!function_exists(\"imagecreatetruecolor\")){\n\t\t\tif(!function_exists(\"imagecreate\")){\n\t\t\t\t$this->error[] = \"You do not have the GD library loaded in PHP!\";\n\t\t\t}\n\t\t}\n\t}",
"public function notice_missing_extensions() {\n\n ?>\n <div class=\"error\">\n <p><strong><?php _e( 'The GD or Imagick libraries are not installed on your server. Envira Gallery requires at least one (preferably Imagick) in order to crop images and may not work properly without it. Please contact your webhost and ask them to compile GD or Imagick for your PHP install.', 'envira-gallery' ); ?></strong></p>\n </div>\n <?php\n\n }",
"public function testCheckConvertability3()\r\n {\r\n global $pretend;\r\n\r\n $gd = $this->createGd('test.jpg');\r\n self::resetPretending();\r\n\r\n $pretend['functionsNotExisting'] = ['imagecreatefromjpeg'];\r\n $this->expectException(SystemRequirementsNotMetException::class);\r\n $gd->checkConvertability();\r\n $pretend['functionsNotExisting'] = [];\r\n }",
"public static function test_image($source) {\n\t\tif (strlen($source) < 10) {\n\t\t\tdebug_event('Art', 'Invalid image passed', 1);\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check to make sure PHP:GD exists. If so, we can sanity check\n\t\t// the image.\n\t\tif (function_exists('ImageCreateFromString')) {\n\t\t\t $image = ImageCreateFromString($source);\n\t\t\t if (!$image || imagesx($image) < 5 || imagesy($image) < 5) {\n\t\t\t\tdebug_event('Art', 'Image failed PHP-GD test',1);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}",
"function define_image_vars ( ) {\r\n\t\t/*\r\n\t\t * Changlog\r\n\t\t * v1.1, November 11, 2009\r\n\t\t * - Cleaned\r\n\t\t */\r\n\t\tglobal $IMAGE_TYPE_EXTS, $IMAGE_TYPE_EXT, $IMAGE_TYPE_READFUNCTION, $IMAGE_TYPE_WRITEFUNCTION, $IMAGE_CODE_TYPE, $IMAGE_SUPPORTED_READ_TYPES, $IMAGE_SUPPORTED_READ_EXTENSIONS, $IMAGE_SUPPORTED_READ_TYPES_EXTENSIONS, $IMAGE_SUPPORTED_WRITE_TYPES, $IMAGE_SUPPORTED_WRITE_EXTENSIONS, $IMAGE_SUPPORTED_WRITE_TYPES_EXTENSIONS, $IMAGE_SUPPORTED_TYPES, $IMAGE_SUPPORTED_EXTENSIONS, $IMAGE_SUPPORTED_TYPES_EXTENSIONS;\r\n\t\tif ( isset($IMAGE_TYPE_EXTS) )\r\n\t\t\treturn true;\r\n\t\t\r\n\t\t$IMAGE_TYPE_EXTS = array(IMAGETYPE_GIF => array('gif'), IMAGETYPE_JPEG => array('jpeg', 'jpg', 'jpe'), IMAGETYPE_JPEG2000 => array('jpeg', 'jpg', 'jpe'), IMAGETYPE_PNG => array('png'), IMAGETYPE_PSD => array('psd'), IMAGETYPE_BMP => array('bmp'), IMAGETYPE_TIFF_II => array('tiff'), IMAGETYPE_TIFF_MM => array('tiff'), IMAGETYPE_JPC => array('jpc'), IMAGETYPE_JP2 => array('jp2'), IMAGETYPE_JPX => array('jpx'), IMAGETYPE_JB2 => array('jb2'), IMAGETYPE_SWF => array('swf'), IMAGETYPE_SWC => array('swc'), IMAGETYPE_IFF => array('iff'), IMAGETYPE_WBMP => array('wbmp'), IMAGETYPE_XBM => array('xbm'));\r\n\t\t$IMAGE_TYPE_EXT = array();\r\n\t\t\r\n\t\t$IMAGE_SUPPORTED_READ_TYPES = array();\r\n\t\t$IMAGE_SUPPORTED_READ_EXTENSIONS = array();\r\n\t\t$IMAGE_SUPPORTED_READ_TYPES_EXTENSIONS = array();\r\n\t\t\r\n\t\t$IMAGE_SUPPORTED_WRITE_TYPES = array();\r\n\t\t$IMAGE_SUPPORTED_WRITE_EXTENSIONS = array();\r\n\t\t$IMAGE_SUPPORTED_WRITE_TYPES_EXTENSIONS = array();\r\n\t\t\r\n\t\t$IMAGE_SUPPORTED_TYPES = array();\r\n\t\t$IMAGE_SUPPORTED_EXTENSIONS = array();\r\n\t\t$IMAGE_SUPPORTED_TYPES_EXTENSIONS = array();\r\n\t\t\r\n\t\t$IMAGE_TYPE_READFUNCTION = array();\r\n\t\t$IMAGE_TYPE_WRITEFUNCTION = array();\r\n\t\t\r\n\t\tforeach ( $IMAGE_TYPE_EXTS as $image_type => $image_extensions ) {\r\n\t\t\t// Check type\r\n\t\t\tforeach ( $image_extensions as $image_extension ) {\r\n\t\t\t\t// Check read\r\n\t\t\t\t$image_read_function = 'imagecreatefrom' . $image_extension;\r\n\t\t\t\t$image_supported_read = function_exists($image_read_function);\r\n\t\t\t\tif ( $image_supported_read ) {\r\n\t\t\t\t\t// Supported\r\n\t\t\t\t\t$IMAGE_SUPPORTED_READ_TYPES[] = $image_type;\r\n\t\t\t\t\t$IMAGE_SUPPORTED_READ_EXTENSIONS += $image_extensions;\r\n\t\t\t\t\t$IMAGE_SUPPORTED_READ_TYPES_EXTENSIONS[$image_type] = $image_extensions;\r\n\t\t\t\t}\r\n\t\t\t\t// check write\r\n\t\t\t\t$image_write_function = 'image' . $image_extension;\r\n\t\t\t\t$image_supported_write = function_exists($image_write_function);\r\n\t\t\t\tif ( $image_supported_write ) {\r\n\t\t\t\t\t// Supported\r\n\t\t\t\t\t$IMAGE_SUPPORTED_WRITE_TYPES[] = $image_type;\r\n\t\t\t\t\t$IMAGE_SUPPORTED_WRITE_EXTENSIONS += $image_extensions;\r\n\t\t\t\t\t$IMAGE_SUPPORTED_WRITE_TYPES_EXTENSIONS[$image_type] = $image_extensions;\r\n\t\t\t\t}\r\n\t\t\t\t// Check overall\r\n\t\t\t\tif ( $image_supported_read && $image_supported_write ) {\r\n\t\t\t\t\t// Supported\r\n\t\t\t\t\t$IMAGE_TYPE_EXT[$image_type] = $image_extension;\r\n\t\t\t\t\t$IMAGE_SUPPORTED_TYPES[] = $image_type;\r\n\t\t\t\t\t$IMAGE_SUPPORTED_EXTENSIONS += $image_extensions;\r\n\t\t\t\t\t$IMAGE_SUPPORTED_TYPES_EXTENSIONS[$image_type] = $image_extensions;\r\n\t\t\t\t\t$IMAGE_TYPE_WRITEFUNCTION[$image_type] = $image_write_function;\r\n\t\t\t\t\t$IMAGE_TYPE_READFUNCTION[$image_type] = $image_read_function;\r\n\t\t\t\t\t// Done we work\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t// Continue\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Done\r\n\t\treturn true;\r\n\t}",
"private function getImageFunctions($img)\n\t{\n\t\t$info = getimagesize($img);\n\n\t\tswitch($info['mime'])\n\t\t{\n\t\t\tcase 'image/jpeg':\n\t\t\tcase 'image/pjpeg':\n\t\t\t\treturn array('imagecreatefromjpeg', 'imagejpeg');\n\t\t\t\tbreak;\n\n\t\t\tcase 'image/gif':\n\t\t\t\treturn array('imagecreatefromgif', 'imagegif');\n\t\t\t\tbreak;\n\n\t\t\tcase 'image/png':\n\t\t\t\treturn array('imagecreatefrompng', 'imagepng');\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\treturn FALSE;\n\t\t\t\tbreak;\n\t\t}\n\t}",
"function gd_edit_image_support($mime_type)\n {\n }",
"function file_is_valid_image($path)\n {\n }",
"private function getImageFunctions($img){\n\t\t$info=getimagesize($img);\n\t\t\n\t\tswitch($info['mime']){\n\t\t\tcase 'image/jpeg':\n\t\t\tcase 'image/pjpeg':\n\t\t\t\treturn array('imagecreatefromjpeg','imagejpeg');\n\t\t\t\tbreak;\n\t\t\tcase 'image/gif':\n\t\t\t\treturn array('imagecreatefromgif','imagegif');\n\t\t\t\tbreak;\n\t\t\tcase 'image/png':\n\t\t\t\treturn array('imagecreatefrompng','imagepng');\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn FALSE;\n\t\t\t\tbreak; //-->useless statement for default\n\t\t}\n\t}",
"public function checkConvertability()\n {\n $im = new \\Gmagick();\n $mimeType = $this->getMimeTypeOfSource();\n switch ($mimeType) {\n case 'image/png':\n if (!in_array('PNG', $im->queryFormats())) {\n throw new SystemRequirementsNotMetException(\n 'Gmagick has been compiled without PNG support and can therefore not convert this PNG image.'\n );\n }\n break;\n case 'image/jpeg':\n if (!in_array('JPEG', $im->queryFormats())) {\n throw new SystemRequirementsNotMetException(\n 'Gmagick has been compiled without Jpeg support and can therefore not convert this Jpeg image.'\n );\n }\n break;\n }\n }",
"public function getSupportedFormat()\n {\n $gdInfo = gd_info();\n $support = array();\n\n foreach ($gdInfo as $key => $info) {\n if (is_bool($info) && $info === true) {\n $tmp = explode(' ', $key);\n $format = $tmp[0];\n if (($format != 'FreeType' || $format != 'T1Lib') && !in_array($format, $support)) {\n $support[] = $format;\n }\n }\n }\n\n return $support;\n }",
"static function graphic_library() {\n\n\t\t$ngg_options = get_option('ngg_options');\n\n\t\tif ( $ngg_options['graphicLibrary'] == 'im')\n\t\t\treturn NGGALLERY_ABSPATH . '/lib/imagemagick.inc.php';\n\t\telse\n\t\t\treturn NGGALLERY_ABSPATH . '/lib/gd.thumbnail.inc.php';\n\n\t}",
"function check_image_type($ftype)\n{\n$ext = strtolower(end(explode('.',$ftype)));\n$img_array = array('jpeg','jpg','gif','png');\n\n//\tif($ftype == \"image/jpeg\" || $ftype == \"image/jpg\" || $ftype == \"image/gif\" || $ftype == \"image/png\" )\n\tif(in_array($ext,$img_array))\n\t\treturn 1;\n\t\telse\n\t\t\treturn 0;\n}",
"function Check($flag = false)\r\n {\r\n static $flags = false;\r\n if (!QF_IMAGER_USE_GD)\r\n return false;\r\n\r\n if (!$flags)\r\n $flags = Array(\r\n 'GIFw' => (imagetypes() & IMG_GIF) && QF_IMAGER_GIF_WRITE,\r\n 'GIF' => (bool) (imagetypes() & IMG_GIF), // gd information\r\n 'JPG' => (bool) (imagetypes() & IMG_JPG),\r\n 'PNG' => (bool) (imagetypes() & IMG_PNG),\r\n );\r\n\r\n if (isset($flags[$flag]))\r\n return $flags[$flag];\r\n else\r\n return $flags;\r\n }",
"function tidypics_get_image_libraries() {\n\t$options = array();\n\tif (extension_loaded('gd')) {\n\t\t$options['GD'] = 'GD';\n\t}\n\n\tif (extension_loaded('imagick')) {\n\t\t$options['ImageMagickPHP'] = 'imagick PHP extension';\n\t}\n\n\t$disablefunc = explode(',', ini_get('disable_functions'));\n\tif (is_callable('exec') && !in_array('exec', $disablefunc)) {\n\t\t$options['ImageMagick'] = 'ImageMagick executable';\n\t}\n\n\treturn $options;\n}",
"function getGDType(){\n \t\treturn isset($GLOBALS[\"GDIMAGE_TYPE\"][strtolower($this->Extension)]) ? $GLOBALS[\"GDIMAGE_TYPE\"][strtolower($this->Extension)] : \"jpg\";\n\t}",
"protected function isImageMagickEnabledAndConfigured() {}",
"public function testValidateDocumentPngValidation()\n {\n }",
"public function has_imagick_extension() {\n\n return extension_loaded( 'imagick' );\n\n }",
"function is_image(mixed $var): bool\n{\n return $var && ($var instanceof GdImage);\n}",
"function is_image( string $path ):bool\r\n {\r\n $a = getimagesize($path);\r\n $image_type = $a[2];\r\n\r\n if( in_array( $image_type , array( IMAGETYPE_GIF , IMAGETYPE_JPEG ,IMAGETYPE_PNG , IMAGETYPE_BMP) ) )\r\n {\r\n return true;\r\n }\r\n return false;\r\n }",
"private function isValidImage() {\r\n\t\t\treturn in_array($this->extension, $this->extAllowed) ? true : false;\r\n\t\t}",
"public function isExtensionLoaded($ext='gd') { \n return extension_loaded($ext); \n }",
"function checkimage($img)\r\n{\r\n $imageMimeTypes = array(\r\n 'image/png',\r\n 'image/gif',\r\n 'image/jpeg');\r\n\r\n $img = mime_content_type($img);\r\n $imgcheck = false;\r\n if (in_array ($img, $imageMimeTypes))\r\n {\r\n $imgcheck = true;\r\n }\r\n return $imgcheck;\r\n}",
"protected function isExternalImage() {}",
"public function checkConvertability()\n {\n // It seems that png and jpeg are always supported by Vips\n // - so nothing needs to be done here\n\n if (function_exists('vips_version')) {\n $this->logLn('vipslib version: ' . vips_version());\n }\n $this->logLn('vips extension version: ' . phpversion('vips'));\n }",
"function is_image($path)\n{\n\t$a = getimagesize($path);\n\t$image_type = $a[2];\n\n\tif(in_array($image_type , array(IMAGETYPE_GIF , IMAGETYPE_JPEG ,IMAGETYPE_PNG , IMAGETYPE_BMP)))\n\t{\n\t\treturn true;\n\t}\n\treturn false;\n}",
"function check_image_type($source_pic)\n{\n $image_info = check_mime_type($source_pic);\n\n switch ($image_info) {\n case 'image/gif':\n return true;\n break;\n\n case 'image/jpeg':\n return true;\n break;\n\n case 'image/png':\n return true;\n break;\n\n case 'image/wbmp':\n return true;\n break;\n\n default:\n return false;\n break;\n }\n}",
"public function checkConvertability()\n {\n $im = new \\Imagick();\n $mimeType = $this->getMimeTypeOfSource();\n switch ($mimeType) {\n case 'image/png':\n if (!in_array('PNG', $im->queryFormats('PNG'))) {\n throw new SystemRequirementsNotMetException(\n 'Imagick has been compiled without PNG support and can therefore not convert this PNG image.'\n );\n }\n break;\n case 'image/jpeg':\n if (!in_array('JPEG', $im->queryFormats('JPEG'))) {\n throw new SystemRequirementsNotMetException(\n 'Imagick has been compiled without Jpeg support and can therefore not convert this Jpeg image.'\n );\n }\n break;\n }\n }",
"function check_image_type_array($source_pic)\n{\n switch ($source_pic) {\n case 'image/gif':\n return true;\n break;\n\n case 'image/jpeg':\n return true;\n break;\n\n case 'image/png':\n return true;\n break;\n\n case 'image/wbmp':\n return true;\n break;\n\n default:\n return false;\n break;\n }\n}",
"function has_image_size($name)\n {\n }",
"public function testNotOperational1()\r\n {\r\n global $pretend;\r\n\r\n $gd = $this->createGd('test.png');\r\n self::resetPretending();\r\n\r\n $pretend['functionsNotExisting'] = ['imagewebp'];\r\n $this->expectException(SystemRequirementsNotMetException::class);\r\n $gd->checkOperationality();\r\n }",
"public function hasImage(): bool;",
"public static function isImage($data) : bool\n {\n return is_resource($data) and get_resource_type($data) === 'gd';\n }",
"function zm_imagedeletionscheck ($data) {\n }",
"private function isApng() {\n $img_bytes = file_get_contents($this->image);\n if ($img_bytes) {\n if (strpos(substr($img_bytes, 0, strpos($img_bytes, 'IDAT')), 'acTL') !== false) {\n return true;\n }\n }\n return false;\n }",
"public function checkOperationality()\n {\n if (!extension_loaded('imagick')) {\n throw new SystemRequirementsNotMetException('Required iMagick extension is not available.');\n }\n\n if (!class_exists('\\\\Imagick')) {\n throw new SystemRequirementsNotMetException(\n 'iMagick is installed, but not correctly. The class Imagick is not available'\n );\n }\n\n $im = new \\Imagick();\n if (!in_array('WEBP', $im->queryFormats('WEBP'))) {\n throw new SystemRequirementsNotMetException('iMagick was compiled without WebP support.');\n }\n }",
"protected function _checkImage() {\n if ( !is_file ( $this->src ) ) {\n $this->src = $this->default_missing_image; \n }\n $image_path_parts = pathinfo ( $this->src );\n $this->_image_name = $image_path_parts['basename'];\n $this->_thumb_filename = $this->attributes['width'] . 'x' . $this->attributes['height'] . '_' . $this->_image_name;\n $this->_thumb_src = $this->thumbs_dir_path . $this->_thumb_filename;\n if ( is_readable ( $this->_thumb_src ) ) {\n $this->_calculated_width = $this->attributes['width'];\n $this->_calculated_height = $this->attributes['height'];\n $this->src = $this->_thumb_src;\n return 'no_thumb_required';\n }\n if ( KISSIT_MAIN_PRODUCT_WATERMARK_SIZE == 0 ) {\n \tif ( !$this->_original_image_info = getimagesize ( $this->src ) ) {\n \t\treturn 'abort';\n \t} \n \tif (!in_array ( $this->_original_image_info['mime'], $this->_valid_mime ) ) {\n \t\treturn 'abort';\n \t}\n }\n }",
"function Is_image($filename){\n \n $size = getimagesize($filename);\nif($size==FALSE){\n $er=FALSE; \n\n}else{\n $er=TRUE; \n}\nreturn $er;\n}",
"protected function isResourceGd($resource)\n {\n return is_resource($resource) || (is_object($resource) && get_class($resource) === 'GdImage');\n }",
"function file_is_image($filename) {\n return in_array(get_file_extension($filename), get_image_file_types());\n }",
"public static function isSupported()\n {\n return function_exists('finfo_open');\n }",
"public function testNotOperational2()\r\n {\r\n global $pretend;\r\n\r\n $gd = $this->createGd('test.png');\r\n self::resetPretending();\r\n\r\n $pretend['extensionsNotExisting'] = ['gd'];\r\n $this->expectException(SystemRequirementsNotMetException::class);\r\n $gd->checkOperationality();\r\n $pretend['extensionsNotExisting'] = [];\r\n }",
"public function checkFormatAllowed() {\n\t\t$imageFileType = pathinfo(basename($this->value[\"name\"]),PATHINFO_EXTENSION);\n\t\tif((($this->extension == \"\") && ($imageFileType == \"jpg\" || $imageFileType == \"png\" || $imageFileType == \"jpeg\"\n\t\t|| $imageFileType == \"gif\")) || ($this->extension == \"pdf\" && $imageFileType == \"pdf\" )) {\n\t\t return true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"function image_save_gd($resource)\n\t{\t\n\t\tswitch ($this->image_type)\n\t\t{\n\t\t\tcase 1 :\n\t\t\t\t\t\tif ( ! function_exists('imagegif'))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->set_error(array('imglib_unsupported_imagecreate', 'imglib_gif_not_supported'));\n\t\t\t\t\t\t\treturn FALSE;\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t@imagegif($resource, $this->full_dst_path);\n\t\t\t\tbreak;\n\t\t\tcase 2\t:\n\t\t\t\t\t\tif ( ! function_exists('imagejpeg'))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->set_error(array('imglib_unsupported_imagecreate', 'imglib_jpg_not_supported'));\n\t\t\t\t\t\t\treturn FALSE;\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t@touch($this->full_dst_path); // PHP 4.4.1 bug #35060 - workaround\n\t\t\t\t\t\t@imagejpeg($resource, $this->full_dst_path, $this->quality);\n\t\t\t\tbreak;\n\t\t\tcase 3\t:\n\t\t\t\t\t\tif ( ! function_exists('imagepng'))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->set_error(array('imglib_unsupported_imagecreate', 'imglib_png_not_supported'));\n\t\t\t\t\t\t\treturn FALSE;\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\t@imagepng($resource, $this->full_dst_path);\n\t\t\t\tbreak;\n\t\t\tdefault\t\t:\n\t\t\t\t\t\t\t$this->set_error(array('imglib_unsupported_imagecreate'));\n\t\t\t\t\t\t\treturn FALSE;\t\t\n\t\t\t\tbreak;\t\t\n\t\t}\n\t\n\t\treturn TRUE;\n\t}",
"public function __construct()\n\t{\n\t\t// to install GD in Ubuntu server:\n\t\t// sudo apt-get install php5-gd\n\t\tif(!function_exists('ImageCreate'))\n\t\t\tfatal_error('Error: GD is not installed') ;\n\t}",
"public function isGdResource($resource)\n {\n return (\n @is_resource($resource) &&\n @get_resource_type($resource) === \"gd\"\n\n ) ? true : false;\n }",
"public function _get_img_info()\n {\n if ( ! file_exists($this->source_file) || ! filesize($this->source_file)) {\n return false;\n }\n list($this->source_width, $this->source_height, $type, $this->source_atts) = getimagesize($this->source_file);\n return isset($this->_avail_types[$type]) ? ($this->source_type = $this->_avail_types[$type]) : false;\n }",
"private function checkRequirements()\n {\n if (!function_exists('mime_content_type') && !function_exists('finfo_file') && version_compare(PHP_VERSION, '5.3.0') < 0){\n add_action('admin_notices', array($this, 'displayFunctionMissingNotice'));\n return TRUE;\n }\n return TRUE;\n }",
"function checkImgPath()\n {\n if (is_dir($this->getPath() . '/img/')) {\n $this->setImgPath($this->getPath() . '/img/');\n return true;\n } elseif (is_dir($GLOBALS['cfg']['ThemePath'] . '/original/img/')) {\n $this->setImgPath($GLOBALS['cfg']['ThemePath'] . '/original/img/');\n return true;\n } else {\n trigger_error(\n sprintf($GLOBALS['strThemeNoValidImgPath'], $this->getName()),\n E_USER_ERROR);\n return false;\n }\n }",
"public function isImage($ext=null){\n global $VALID_IMAGES;\n if (!$ext)\n $ext = $this->ext; \n return (in_Array( $ext, $VALID_IMAGES )); \n }",
"function isImage($filename) {\n \tglobal $synAbsolutePath;\n if (file_exists($synAbsolutePath.$filename)) {\n if (getimagesize($synAbsolutePath.$filename)!==false) $ret=true;\n else $ret=false;\n } else $ret=false;\n return $ret;\n }",
"function getGDType(){\n\t\treturn isset(we_base_imageEdit::$GDIMAGE_TYPE[strtolower($this->Extension)]) ? we_base_imageEdit::$GDIMAGE_TYPE[strtolower($this->Extension)] : 'jpg';\n\t}",
"protected function checkRequiremets () {\n\t\t// Check if `finfo_file()` function exists. File info extension is \n\t\t// presented from PHP 5.3+ by default, so this error probably never happened.\n\t\tif (!function_exists('finfo_file')) \n\t\t\treturn $this->handleUploadError(\n\t\t\t\tstatic::UPLOAD_ERR_NO_FILEINFO\n\t\t\t);\n\t\t\n\t\t// Check if mimetypes and extensions validator class\n\t\t$extToolsMimesExtsClass = static::MVCCORE_EXT_TOOLS_MIMES_EXTS_CLASS;\n\t\tif (!class_exists($extToolsMimesExtsClass)) \n\t\t\treturn $this->handleUploadError(\n\t\t\t\tstatic::UPLOAD_ERR_NO_MIMES_EXT\n\t\t\t);\n\n\t\t// Complete uploaded files temporary directory:\n\t\t$this->GetUploadsTmpDir();\n\t\t\n\t\treturn TRUE;\n\t}",
"function is_compatible() {\n\n\t\tif (!$this->__exec) {\n\t\t\ttrigger_error(\n\t\t\t\t'The Asido_Driver_Imagick_Shell driver is '\n\t\t\t\t\t. ' unable to be initialized, because '\n\t\t\t\t\t. ' the Image Magick (imagick) executables '\n\t\t\t\t\t. ' were not found. Please locate '\n\t\t\t\t\t. ' where those files are and set the '\n\t\t\t\t\t. ' path to them by defining the '\n\t\t\t\t\t. ' ASIDO_IMAGICK_SHELL_PATH constant.',\n\t\t\t\tE_USER_ERROR\n\t\t\t\t);\n\t\t\treturn false;\n\t\t\t}\n\t\t\n\t\t// give access to all the memory\n\t\t//\n\t\t@ini_set(\"memory_limit\", -1);\n\t\t\n\t\t// no time limit\n\t\t//\n\t\t@set_time_limit(-1);\n\t\t\n\t\treturn true;\n\t\t}",
"function testCompatible(){\n\t\tif($this->$imageAsset[\"type\"] == \"image/jpeg\" || $_FILES[\"image_upload_box\"][\"type\"] == \"image/pjpeg\"){\t\n\t\t\t$this->imgType = 'jpg';\n\t\t}\t\t\n\t\t// if uploaded image was GIF\n\t\tif($this->$imageAsset[\"type\"] == \"image/gif\"){\t\n\t\t\t$this->imgType = 'gif';\n\t\t}\t\n\t\t// if uploaded image was PNG\n\t\tif($this->$imageAsset[\"type\"] == \"image/x-png\"){\n\t\t\t$this->imgType = 'png';\n\t\t}\n\t\telse {\n\t\t\t$this->imgType = 'invalid';\n\t\t}\n\t\t\n\t}",
"public function testSourceErrors()\n {\n $Image = new \\Rundiz\\Image\\Drivers\\Gd(self::$source_images_dir . 'city-amsterdam.jpg');\n $this->assertTrue($Image->status);\n // now errors.\n $Image = new \\Rundiz\\Image\\Drivers\\Gd(self::$source_images_dir . 'city-amsterdam-text.jpg');\n $this->assertFalse($Image->status);\n $this->assertSame(\\Rundiz\\Image\\Drivers\\Gd::RDIERROR_SRC_NOTIMAGE, $Image->statusCode);\n $Image = new \\Rundiz\\Image\\Drivers\\Gd(self::$source_images_dir . 'image-not-exists' . date('YmdHis') . '.jpg');\n $this->assertFalse($Image->status);\n $this->assertSame(\\Rundiz\\Image\\Drivers\\Gd::RDIERROR_SRC_NOTEXISTS, $Image->statusCode);\n }",
"public static function test( $args = array() ) {\n\t\tif ( ! extension_loaded('gd') || ! function_exists('gd_info') )\n\t\t\treturn false;\n\n\t\t// On some setups GD library does not provide imagerotate() - Ticket #11536\n\t\tif ( isset( $args['methods'] ) &&\n\t\t\t in_array( 'rotate', $args['methods'] ) &&\n\t\t\t ! function_exists('imagerotate') ){\n\n\t\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}",
"function isImage($path)\n {\n return is_array(getimagesize($path));\n }"
] | [
"0.8103236",
"0.80079645",
"0.80008465",
"0.7959447",
"0.79248345",
"0.7732571",
"0.7719825",
"0.76687855",
"0.7629127",
"0.76253146",
"0.75851667",
"0.74278796",
"0.7425929",
"0.7342836",
"0.72752535",
"0.7182238",
"0.7180095",
"0.7168959",
"0.70785385",
"0.70403415",
"0.69453186",
"0.680767",
"0.67669636",
"0.6736065",
"0.6574727",
"0.65566915",
"0.6544023",
"0.64485055",
"0.6416599",
"0.63760483",
"0.6362908",
"0.62725514",
"0.62526053",
"0.622003",
"0.6181675",
"0.615201",
"0.6150937",
"0.6105558",
"0.6103127",
"0.6102554",
"0.6094472",
"0.604111",
"0.60313106",
"0.6031187",
"0.60032177",
"0.5993737",
"0.59885675",
"0.59829557",
"0.5975395",
"0.59646064",
"0.5961765",
"0.59536797",
"0.5912594",
"0.58876723",
"0.5870026",
"0.584339",
"0.58381486",
"0.5802162",
"0.580082",
"0.5784185",
"0.5767272",
"0.57633615",
"0.57632846",
"0.57396376",
"0.57385176",
"0.5691028",
"0.56850374",
"0.56485564",
"0.5646494",
"0.5635324",
"0.5625367",
"0.5625014",
"0.56218386",
"0.5597164",
"0.5594412",
"0.5582107",
"0.5581544",
"0.55579937",
"0.5542279",
"0.553347",
"0.5528732",
"0.5508344",
"0.5507885",
"0.55031526",
"0.5499866",
"0.54761744",
"0.5446465",
"0.54426485",
"0.5433548",
"0.54079187",
"0.5407145",
"0.54038036",
"0.53892744",
"0.538685",
"0.5386662",
"0.5381506",
"0.5374662",
"0.5372641",
"0.5371026",
"0.5364617",
"0.5360391"
] | 0.0 | -1 |
call this method statically | function Validate($sUserCode, $bCaseInsensitive = true) {
if ($bCaseInsensitive) {
$sUserCode = strtoupper($sUserCode);
}
if (!empty($_SESSION[CAPTCHA_SESSION_ID]) && $sUserCode == $_SESSION[CAPTCHA_SESSION_ID]) {
// clear to prevent re-use
unset($_SESSION[CAPTCHA_SESSION_ID]);
return true;
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function call();",
"public function call();",
"public function method() {\n\t}",
"public function __invoke()\n {\n }",
"private function static_things()\n\t{\n\n\t\t# code...\n\t}",
"public function __invoke()\n {\n\n }",
"public static function __callStatic($method, $args){ return null; }",
"public function call()\n {\n // TODO: Implement call() method.\n }",
"public function method();",
"public function method();",
"public function method();",
"public function method();",
"static public function __callStatic($name, $arguments) {}",
"public function __invoke();",
"public function __invoke();",
"public function __invoke();",
"public function __invoke();",
"public static function __callStatic($method, $arguments=null) {}",
"final public static function __callStatic( $chrMethod, $arrArguments ) {\n\t\t\t\n\t\t$objInstance = self::getInstance();\n\t\t\n\t\tif($chrMethod == 'prepare'){\n\t\t\tself::$intQueryCount++;\n\t\t}\n\t\t\n\t\treturn call_user_func_array(array($objInstance, $chrMethod), $arrArguments);\n\t\t\n\t}",
"protected function callRenderMethod() {}",
"private function __() {\n }",
"abstract protected function _run();",
"abstract protected function _run();",
"protected function callCommandMethod() {}",
"public function __init(){}",
"protected function callActionMethod() {}",
"public function method()\n {\n\n }",
"public static function __callStatic($_func,array $_args) {\n\t\tF3::$global['CONTEXT']=__CLASS__.'::'.$_func;\n\t\ttrigger_error(F3::TEXT_Method);\n\t}",
"public static function __callStatic($_func,array $_args) {\n\t\tF3::$global['CONTEXT']=__CLASS__.'::'.$_func;\n\t\ttrigger_error(F3::TEXT_Method);\n\t}",
"public static function __callStatic($_func,array $_args) {\n\t\tF3::$global['CONTEXT']=__CLASS__.'::'.$_func;\n\t\ttrigger_error(F3::TEXT_Method);\n\t}",
"public static function init(){\n \n }",
"public function __call($name, $arguments) { return self::__callStatic($name, $arguments); }",
"static function __callstatic($func,array $args) {\n\t\tif (!self::$fw)\n\t\t\tself::$fw=Base::instance();\n\t\treturn call_user_func_array(array(self::$fw,$func),$args);\n\t}",
"protected function __init__() { }",
"protected function init() {return;}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"public function invoke();",
"public function helper()\n\t{\n\t\n\t}",
"function __call($method ,$params)\n {\n return self::handleCall($method ,$params);\n }",
"public function run()\n {\n // $this->call\n }",
"protected abstract function run();",
"public function apply() {}",
"public static function __callStatic($method, $parameters);",
"public function init(){\n\t\t\t\t}",
"static public function init() {\n }",
"private function method1()\n\t{\n\t}",
"public static function __constructStatic() : void;",
"protected static function __callStaticHook($method, array & $arguments)\n { }",
"static function create(): self;",
"public function custom()\n\t{\n\t}",
"final public static function __callStatic($chrMethod, $arrArguments)\n\t{\n\t\t$objInstance = self::getInstance();\n\n\t\treturn call_user_func_array(array($objInstance, $chrMethod), $arrArguments);\n\n\t}",
"private function _callToDefault()\n {\n foreach (get_class_methods($this) as $method) {\n try {\n $that = new ReflectionMethod($this, $method);\n } catch (ReflectionException $exception) {\n break;\n }\n if (\n $that->isProtected()\n && !array_key_exists($method, $this->query())\n ) {\n $this->{$method}($this->builder);\n }\n }\n }",
"public function __invoke()\n {\n return null;\n }",
"public function __invoke()\n {\n return null;\n }",
"public static function __callStatic($method, $arguments) {\n\t\treturn static::run($method,$arguments);\n\t}",
"static function __callStatic($name,$arguments){\n\t\tif(!method_exists(__class__,$name)){\n\t\t\tDebug::toss('DbBatch method not found: '.$name);\n\t\t}\n\t\t$class = __class__;\n\t\t$that = new $class();\n\t\treturn call_user_func_array(array($that,$name),$arguments);\n\t}",
"public function init() {\t\t\n\n }",
"public static function run() {\n\t}",
"abstract protected function setMethod();",
"abstract public function __invoke(): void;",
"protected function protected_method() {}",
"public function run(){}",
"protected function initialize() {}",
"protected function initialize() {}",
"protected function initialize() {}",
"protected function initialize() {}",
"static function __callStatic($name,$arguments){\n\t\tself::$currentInclude = array(\n\t\t\t\t'file'=>$arguments[0],\n\t\t\t\t'globals'=>$arguments[1],\n\t\t\t\t'vars'=>$arguments[2],\n\t\t\t\t'type'=>$name\n\t\t\t);\n\t\treturn call_user_func_array(array('self',$name),$arguments);\n\t}",
"public function init(){\n\t}",
"public function init(){\n\t}",
"public function none(){\n return call_user_func_array($this->fetchStaticClassName() . '::' . __FUNCTION__, func_get_args());\n }",
"public function init(){\n\t\t}",
"public function __invoke(): void;",
"abstract public function run() ;",
"public function init() {\r\n\r\n\t\t}",
"public function _init() {\r\n\r\n }",
"public function instance() {\n\t\t\n\t}",
"public function theInit()\n {\n\n }",
"public function theInit()\n {\n\n }",
"abstract public function run();",
"abstract public function run();",
"abstract public function run();",
"abstract public function run();",
"abstract public function run();",
"abstract public function run();",
"abstract public function run();",
"abstract public function run();",
"public static function firstRun(){\n\t\tparent::firstRun();\n\n\t}",
"public function init() {\r\n\t}",
"protected abstract function performImpl();",
"public function run()\n {\n /* this particular object won't run */\n }"
] | [
"0.6663391",
"0.6663391",
"0.65348005",
"0.6515572",
"0.64114344",
"0.6360055",
"0.6324083",
"0.6306084",
"0.6232001",
"0.6232001",
"0.6232001",
"0.6232001",
"0.62224007",
"0.6186159",
"0.6186159",
"0.6186159",
"0.6186159",
"0.6181167",
"0.6168769",
"0.614519",
"0.60232604",
"0.60191256",
"0.60191256",
"0.60188717",
"0.60148776",
"0.6003351",
"0.5993336",
"0.5992176",
"0.5992176",
"0.5992176",
"0.59812516",
"0.5976337",
"0.59743756",
"0.5971554",
"0.5957227",
"0.5944315",
"0.5944315",
"0.5944315",
"0.5944315",
"0.5943389",
"0.5943389",
"0.5943389",
"0.5943389",
"0.5943389",
"0.5943389",
"0.5942263",
"0.5942263",
"0.5934168",
"0.5933912",
"0.5868182",
"0.5860047",
"0.58583206",
"0.58341414",
"0.58339924",
"0.5832912",
"0.5812843",
"0.5799012",
"0.57984513",
"0.57939",
"0.5788885",
"0.57885283",
"0.578164",
"0.5777703",
"0.5771535",
"0.5771535",
"0.5764144",
"0.5730027",
"0.57227105",
"0.5721638",
"0.5716949",
"0.571616",
"0.57125825",
"0.5709585",
"0.57006603",
"0.57006603",
"0.57006603",
"0.57006603",
"0.57000405",
"0.56961256",
"0.56961256",
"0.5694808",
"0.5683249",
"0.56679845",
"0.5666225",
"0.5662785",
"0.5659104",
"0.56517357",
"0.5641977",
"0.5641977",
"0.56392866",
"0.56392866",
"0.56392866",
"0.56392866",
"0.56392866",
"0.56392866",
"0.56392866",
"0.56392866",
"0.56232333",
"0.5621358",
"0.5619457",
"0.56127465"
] | 0.0 | -1 |
"isTrue" checks that the boolean is strictly equal to "true". boolean($true) >isTrue() // succeed >boolean($false) >isTrue() // fails ; | public function isTrue($failMessage = null) {} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function isTrue();",
"public function isBoolean();",
"public function testIsBoolean() {\n\t\t$result = _::isBoolean(true);\n\t\t$this->assertTrue($result);\n\n\t\t// test that false is a boolean\n\t\t$result = _::isBoolean(false);\n\t\t$this->assertTrue($result);\n\n\t\t// test that null is not a boolean\n\t\t$result = _::isBoolean(null);\n\t\t$this->assertFalse($result);\n\t}",
"function bool ($value)\r\n{\r\n\tif ($value === true || $value === false)\r\n\t\treturn $value;\r\n\r\n\treturn $value === 'true' || ($value !== 'false' && !!$value);\r\n}",
"public static function boolean() {}",
"public static function ensureBoolean($value)\n\t{\n\t\tif (is_string($value))\n\t\t\treturn strcasecmp($value,'true')==0 || $value!=0;\n\t\telse\n\t\t\treturn (boolean)$value;\n\t}",
"public function boolean_style($value){\n\t\t//if it is null, it fails, if it isn't null then it succeeds\n\t\t$this->set_message('boolean_style', 'The %s field does not evaluate to a boolean.');\n\t\t$bool = filter_var($value, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);\n\t\treturn !is_null($bool);\n\n\t}",
"function to_boolean ($value) {\n\tif (\n\n\t\t// Falsy\n\t\t!$value or\n\n\t\t// Empty\n\t\tempty($value) or\n\n\t\t// Zero or less\n\t\t(is_numeric($value) and strval($value) <= 0) or\n\n\t\t// Keyword\n\t\t(is_string($value) and in_array(trim(strtolower($value)), array('null', 'nul', 'nil', 'false')))\n\n\t) {\n\t\treturn false;\n\t} else {\n\t\treturn true;\n\t}\n}",
"function isTrue($value) {\r\n\treturn is_bool($value) ? $value : (bool)preg_match('/^(1|y|yes|true|on)$/i',(string)$value);\r\n}",
"function erp_validate_boolean( $value ) {\n return filter_var( $value, FILTER_VALIDATE_BOOLEAN );\n}",
"public function isTrue()\n {\n return $this->value === true;\n }",
"function is_true(mixed $var): bool\n{\n return ($var === true);\n}",
"function isBool ($value)\r\n{\r\n\treturn is_bool ($value);\r\n}",
"private function checkIsBoolean($value)\n {\n if ($this->strictMode) {\n return $this->checkStrict($value);\n } else {\n return $this->checkNotStrict($value);\n }\n }",
"protected static function validate_boolean( $value ){\n\t\t// FIXME: this doesn't do the strict comparison we intended. 'hello' would match the \"case true\" statement.\n\t\tswitch ($value) {\n\t\t\tcase 0:\n\t\t\tcase '0':\n\t\t\tcase false:\n\t\t\tcase 'false':\n\t\t\tcase 1:\n\t\t\tcase '1':\n\t\t\tcase true:\n\t\t\tcase 'true':\n\t\t\t\treturn true;\n\t\t\t\tbreak;\n\t\t}\n\t\treturn false;\n\t}",
"protected function _toBoolean($value)\n\t{\n\t\tif (is_bool($value)) {\n\t\t\treturn $value;\n\t\t}\n\t\tif (is_int($value) || is_float($value)) {\n\t\t\treturn ($value !== 0);\n\t\t}\n\t\tif (is_string($value)) {\n\t\t\treturn ($value === 't' || $value === 'T' || $value === 'true');\n\t\t}\n\t\treturn (boolean)$value;\n\t}",
"public function testToStringWithBooleanValueTrue()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean(true);\n\t\t// check that the two booleans are equal\n\t\t$this->assertEquals('true', $boolean->__toString());\n\t}",
"public static function convertToBoolean($value)\n {\n if (is_bool($value)) {\n return $value;\n }\n if (is_numeric($value)) {\n return $value > 0;\n }\n if (is_string($value)) {\n return (!empty($value) && strtolower($value) !== 'false');\n }\n if (is_array($value) || (is_object($value) && $value instanceof \\Countable)) {\n return count($value) > 0;\n }\n if (is_object($value)) {\n return true;\n }\n return false;\n }",
"private function xs_true($xs_bool) {\n return ($xs_bool == '1' || strtoupper($xs_bool) == 'TRUE');\n }",
"public static function aBoolean($value)\n {\n return (is_bool($value))?:false;\n }",
"public function isTrue()\n {\n \n return !!$this->value;\n \n }",
"public function isBoolean(): bool\n {\n return $this->phpType === self::BOOLEAN;\n }",
"static function isTrue()\n {\n try {\n return call_user_func_array('PHPUnit_Framework_Assert::isTrue', func_get_args());\n } catch (\\Exception $e) {\n self::callSlack($e, debug_backtrace()[1]);\n }\n }",
"function rest_is_boolean($maybe_bool)\n {\n }",
"function wp_validate_boolean($value)\n {\n }",
"public function testTrue()\n {\n $testtrue = true;\n $this->assertTrue($testtrue);\n\n\treturn false;\n }",
"function o_isBool($value) {\n\t\t\treturn Obj::singleton()->isBool($value);\n\t\t}",
"function validBool($value)\n {\n return filter_var($value, FILTER_VALIDATE_BOOLEAN);\n }",
"public static function bool($value)\n\t{\n\t\treturn filter_var($value, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);\n\t}",
"function isBoolType($a = 0)\n{\n $b = (boolean)$a;\n\n echo \"число $a при переводе в булев тип изменится на '$b ' <br/>\n так как при переводе значение boolean будет = false(по правилам приведения типов)\";\n echo \"<br>\";\n var_dump($a, $b);\n}",
"public static function true(): self\n {\n return self::fromValue(Value::true());\n }",
"public static function boolean()\n {\n return self::builtinType('bool');\n }",
"public function bool()\n {\n return filter_var($this->value, FILTER_VALIDATE_BOOLEAN);\n }",
"public function checkIf($conf)\n {\n if (!is_array($conf)) {\n return true;\n }\n if (isset($conf['directReturn'])) {\n return (bool)$conf['directReturn'];\n }\n $flag = true;\n if (isset($conf['isNull.'])) {\n $isNull = $this->stdWrap('', $conf['isNull.']);\n if ($isNull !== null) {\n $flag = false;\n }\n }\n if (isset($conf['isTrue']) || isset($conf['isTrue.'])) {\n $isTrue = isset($conf['isTrue.']) ? trim($this->stdWrap($conf['isTrue'], $conf['isTrue.'])) : trim($conf['isTrue']);\n if (!$isTrue) {\n $flag = false;\n }\n }\n if (isset($conf['isFalse']) || isset($conf['isFalse.'])) {\n $isFalse = isset($conf['isFalse.']) ? trim($this->stdWrap($conf['isFalse'], $conf['isFalse.'])) : trim($conf['isFalse']);\n if ($isFalse) {\n $flag = false;\n }\n }\n if (isset($conf['isPositive']) || isset($conf['isPositive.'])) {\n $number = isset($conf['isPositive.']) ? $this->calc($this->stdWrap($conf['isPositive'], $conf['isPositive.'])) : $this->calc($conf['isPositive']);\n if ($number < 1) {\n $flag = false;\n }\n }\n if ($flag) {\n $value = isset($conf['value.']) ? trim($this->stdWrap($conf['value'], $conf['value.'])) : trim($conf['value']);\n if (isset($conf['isGreaterThan']) || isset($conf['isGreaterThan.'])) {\n $number = isset($conf['isGreaterThan.']) ? trim($this->stdWrap($conf['isGreaterThan'], $conf['isGreaterThan.'])) : trim($conf['isGreaterThan']);\n if ($number <= $value) {\n $flag = false;\n }\n }\n if (isset($conf['isLessThan']) || isset($conf['isLessThan.'])) {\n $number = isset($conf['isLessThan.']) ? trim($this->stdWrap($conf['isLessThan'], $conf['isLessThan.'])) : trim($conf['isLessThan']);\n if ($number >= $value) {\n $flag = false;\n }\n }\n if (isset($conf['equals']) || isset($conf['equals.'])) {\n $number = isset($conf['equals.']) ? trim($this->stdWrap($conf['equals'], $conf['equals.'])) : trim($conf['equals']);\n if ($number != $value) {\n $flag = false;\n }\n }\n if (isset($conf['isInList']) || isset($conf['isInList.'])) {\n $number = isset($conf['isInList.']) ? trim($this->stdWrap($conf['isInList'], $conf['isInList.'])) : trim($conf['isInList']);\n if (!GeneralUtility::inList($value, $number)) {\n $flag = false;\n }\n }\n }\n if ($conf['negate']) {\n $flag = !$flag;\n }\n return $flag;\n }",
"public function getBool(): bool;",
"public function castToBool($value);",
"public static function true(): bool\n {\n return true;\n }",
"function pseudoTypeFalseAndBool(bool|false $var = false) {}",
"public function isFalse();",
"static public function GetBooleanValue( $value )\r\n\t{\r\n\t\tif( gettype( $value ) == 'boolean')\r\n\t\t{\r\n\t\t\tif( $value == true )\r\n\t\t\t{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\telseif( is_numeric( $value ) )\r\n\t\t{\r\n\t\t\tif( $value > 0 )\r\n\t\t\t{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$cleaned = strtoupper( trim( $value ) );\r\n\r\n\t\t\tif( $cleaned == 'ON' )\r\n\t\t\t{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telseif( $cleaned == 'SELECTED' || $cleaned == 'CHECKED' )\r\n\t\t\t{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telseif( $cleaned == 'YES' || $cleaned == 'Y')\r\n\t\t\t{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telseif( $cleaned == 'TRUE' || $cleaned == 'T')\r\n\t\t\t{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private function _convert_boolean(mixed $value): bool {\n\t\treturn Types::toBool($value);\n\t}",
"public function isBoolean(): bool\n {\n return $this->boolean;\n }",
"public function testBoolean()\r\n {\r\n $s = new XML_Serializer();\r\n $s->serialize(true);\r\n $this->assertEquals('<boolean>1</boolean>', $s->getSerializedData());\r\n $s->serialize(false);\r\n $this->assertEquals('<boolean />', $s->getSerializedData());\r\n }",
"function boolean(bool|int|string|null $var): bool\n {\n if (is_bool($var)) {\n return ($var == true);\n }\n\n if (is_string($var)) {\n $var = strtolower($var);\n\n return match ($var) {\n 'true', 'on', 'yes', 'y', '1' => true,\n default => false,\n };\n }\n\n if (is_numeric($var)) {\n return ($var == 1);\n }\n\n return boolval($var);\n }",
"public static function boolean()\n {\n return Type::boolean();\n }",
"public function convertToBoolean($value) {\r\n return $value !== 'false' && $value !== 0 && $value !== false && $value !== '' && $value !== '0';\r\n }",
"function to_boolean($val);",
"function boolval($val){\n return $val === 'true' ? true : false;\n}",
"public function testBooleanField()\n {\n $field = $this->table->getField('trueorfalse'); // Boolean\n $this->assertInstanceOf('Metrol\\DBTable\\Field\\PostgreSQL\\Boolean',\n $field);\n $this->assertEquals('trueorfalse', $field->getName());\n\n $this->assertTrue($field->getPHPValue(1));\n $this->assertFalse($field->getPHPValue(0));\n $this->assertNull($field->getPHPValue(null));\n\n $this->assertTrue($field->isNullOk());\n $this->assertNull($field->getDefaultValue());\n\n $field = $this->table->getField('falsedef'); // Boolean, No Nulls, default False\n $this->assertInstanceOf('Metrol\\DBTable\\Field\\PostgreSQL\\Boolean', $field);\n $this->assertEquals('falsedef', $field->getName());\n\n $this->assertFalse($field->getPHPValue(null));\n\n // Check for an exception when in strict\n $field->setStrictValues();\n $x = false;\n\n try\n {\n $field->getPHPValue(null);\n }\n catch ( RangeException )\n {\n $x = true;\n }\n\n $this->assertTrue($x);\n\n $field = $this->table->getField('truedef'); // Boolean, No Nulls, default true\n $this->assertInstanceOf('Metrol\\DBTable\\Field\\PostgreSQL\\Boolean', $field);\n $this->assertEquals('truedef', $field->getName());\n\n $this->assertTrue($field->getPHPValue(null));\n $boundVal = $field->getSqlBoundValue(null);\n $valMarker = $boundVal->getValueMarker();\n\n $this->assertEquals('true', $boundVal->getBoundValues()[$valMarker]);\n }",
"protected function isTrue($value) {\n\t\t$value = strtolower(trim((string)$value));\n\t\treturn (in_array($value, array(\"yes\", \"true\", \"1\")));\n\t}",
"public static function toBool($value) : bool\n\t{\n\t\tswitch(true) {\n\n\t\t\tcase is_bool($value) :\n\t\t\t\treturn $value;\n\n\t\t\tcase is_null($value) :\n\t\t\t\treturn false;\n\n\t\t\tcase is_scalar($value) :\n\t\t\t\treturn Str::toBool((string)$value);\n\n\t\t\tdefault :\n\t\t\t\treturn ! self::isEmpty($value);\n\t\t}\n\t}",
"public static function assertIsBool(string $var_name, mixed $value): void\n {\n self::assertIsType($var_name, $value, [Type::BOOLEAN], Ex\\NotBooleanException::class);\n }",
"public function testCastToBooleanTrue($data) {\n\t\t$this->assertTrue(Convertor::cast($data), \"[{$data}] is not Boolean TRUE\");\n\t}",
"public function checkBoolean(): bool\n {\n if (!is_bool($this->getValue())) {\n throw new TypeInvalidException('boolean', gettype($this->getValue()));\n }\n\n return $this->getValue();\n }",
"public function testConvertToBoolean() {\r\n $data = array(\r\n true => true,\r\n false => false,\r\n 'true' => true,\r\n 'false' => false,\r\n 'test' => true,\r\n 0 => false,\r\n '0' => false,\r\n 1 => true\r\n );\r\n\r\n foreach ($data as $value => $expected) {\r\n $this->assertSame($expected, $this->_utils->convertToBoolean($value));\r\n }\r\n }",
"public function assert_true($value, $strict = true)\n\t{\n\t\tTests::$results['assertions']++;\n\n\t\tif ($value === true or ( ! $strict and $value))\n\t\t{\n\t\t\t$this->pass();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->fail('assert_true - Value is does not validate as true.');\n\t\t}\n\t}",
"public function testToStringWithBooleanValueFalse()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean(false);\n\t\t// check that the two boolean are equal\n\t\t$this->assertEquals('false', $boolean->__toString());\n\t}",
"public function setBooleanValue($var)\n {\n GPBUtil::checkBool($var);\n $this->writeOneof(4, $var);\n\n return $this;\n }",
"private function checkNotStrict($value)\n {\n if (filter_var($value, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE) !== null) {\n return true;\n } else {\n return false;\n }\n }",
"public function checkBool($value)\n {\n return $this->checkHasType($value, 'boolean');\n }",
"public static function isTrue()\n {\n return new Matcher\\IsTrue();\n }",
"function bool($val,$str=false){\n if(is_string($val)) {\n $val=strtolower($val);\n $val=$val && $val!=\"false\" && $val !=\"no\" && $val !=\"n\" && $val !=\"f\" && $val !=\"off\";\n }else $val=(bool)$val;\n return $str?($val?\"true\":\"false\"):$val;\n}",
"protected function conditionIsTrue() : bool\n {\n return (bool)$this->app->call($this->config->get('laraload.condition'), [], '__invoke');\n }",
"function validate_boolean($bool){\n if ($bool == \"\" ) { return true ; }\n $bool = strtolower($bool);\n\n $true = array(\"y\",\"yes\",\"t\",\"true\",\"n\",\"no\",\"f\",\"false\");\n if ( in_array($bool, $true ) ) {\n return true ;\n }\n\n if ( is_bool($bool) ) {\n return true ;\n }\n else { \n return false ;\n }\n}",
"function post_bool($boolean_name) {\n\t$boolean = $_POST[$boolean_name];\n\tif ($boolean == \"true\")\n\t\treturn true;\n\n\treturn false;\n}",
"public function isTrue() {\n return $this->is(new Identical(true));\n }",
"public function testTrueIsTrue(){\n $foo = true;\n $this->assertTrue($foo);\n }",
"public static function prepareBool($value)\n {\n return (bool) $value;\n }",
"final public static function is($value):bool\n {\n return is_bool($value);\n }",
"protected final function AssertTrue( $value, $strict = true )\n {\n $this->observer->OnAssert();\n\n if( $strict )\n {\n $result = ( $value === true );\n }\n else\n {\n $result = ( $value == true );\n }\n\n Core::Assert( $result, var_export( $value, true ) . ' is not true' );\n }",
"public function getBoolean($key)\n {\n \n if (!isset($this->data[$key])) {\n return false;\n }\n \n if (is_bool($this->data[$key])) {\n return $this->data[$key];\n }\n\n if (('f' !== $this->data[$key] && 'FALSE' !== $this->data[$key] && '0' != $this->data[$key]))\n return true;\n else\n return false;\n\n }",
"public function isBool(string|int|float $message): self\n {\n return $this->addMessage(new IsBool($message));\n }",
"private function bool($value)\n\t{\n\t\t// We do *not* follow the string 0 php casting rule.\n\t\t// {if field} should be true if the user entered\n\t\t// something. Doesn't matter what it is.\n\t\tif ($value === '0')\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\n\t\treturn (bool) $value;\n\t}",
"public function boolberry(): bool\n\t{\n\t\treturn false;\n\t}",
"public function testEmptyObjectCastedToBoolGivesTrue() {\n\t\t$this->asserttrue((bool)new stdClass());\n\t}",
"#[@test]\n public function boolCast() {\n $this->assertSourcecodeEquals(\n '$s= (bool)$num;',\n $this->emit('$s= (bool)$num;')\n );\n }",
"function bool(): Closure\n{\n return function ($value): bool {\n return (bool)$value;\n };\n}",
"protected function toBool($value)\n\t{\n\t\tif ($value === true) {\n\t\t\treturn 'yes';\n\t\t}\n\t\treturn 'no';\n\t}",
"public function postBool(string $field_name, string $true_value)\n {\n return $this->field_bool(INPUT_POST, $field_name, $true_value);\n }",
"function is_true($val, $returnNull = false) : bool\n {\n $boolval = (is_string($val) ? filter_var($val, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE) : (bool) $val);\n return ($boolval === null && ! $returnNull ? false : $boolval);\n }",
"public function testIfStockManagementIsBool()\n {\n $this->assertIsBool($this->stock->isStock());\n }",
"private function checkStrict($value)\n {\n if ($value === 'true' or $value === 'false') {\n return true;\n } else {\n return false;\n }\n }",
"static public function SQLBooleanValue( $value, $trueValue, $falseValue, $datatype = self::SQLVALUE_TEXT )\r\n\t{\r\n\t\tif( self::GetBooleanValue( $value ) )\r\n\t\t{\r\n\t\t $return_value = self::SQLValue( $trueValue, $datatype );\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t $return_value = self::SQLValue( $falseValue, $datatype );\r\n\t\t}\r\n\t\treturn $return_value;\r\n\t}",
"function boolval( $val ) {\r\n\t\treturn (bool) $val;\r\n\t}",
"function format_bool(mixed $input): string\n{\n return $input ? 'true' : 'false';\n}",
"function toBool($var) {\n\tif (true === $var || 1 === $var) {\n\t\treturn true;\n\t}\n\tswitch (strtolower($var)) {\n\t\tcase \"yes\":\n\t\tcase \"on\":\n\t\tcase \"1\":\n\t\tcase \"y\":\n\t\tcase \"true\":\n\t\tcase \"t\":\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn false;\n\t}\n}",
"public function check($value): bool;",
"public function mustBeBoolean($value, string $propertyPath = null, UIValidatorInterface $parentValidator = null, string $exceptionMessage = null): bool\n {\n $this->validationEngine->validateFieldValue(\n $parentValidator ?: $this,\n function() use ($value, $propertyPath, $exceptionMessage) {\n Assertion::inArray(\n $value,\n [true, false, 1, 0, '1', '0', 'true', 'false'],\n $exceptionMessage,\n $propertyPath\n );\n }\n );\n\n // Otherwise \"false\" would return true\n if (in_array($value, [true, 'true', '1', 1], true)) {\n return true;\n }\n\n return false;\n }",
"public static function toBool($val) {\n return ($val === true || in_array($val, array('true', 'yes', 'on', 'checked', '1', 1))) ? true : false;\n }",
"public function toBool() : bool\n {\n return boolval($this->value);\n }",
"static public function Boolean( $var ) {\r\n\r\n\t\t$options = array('flags' => FILTER_NULL_ON_FAILURE);\r\n\t\t$result = filter_var( $var, FILTER_VALIDATE_BOOLEAN, $options);\r\n\r\n\t}",
"function bool($value)\n{\n return ! in_array(strtolower($value), ['no', 'false', '0', '', '-1']);\n}",
"public static function plainBoolean($value)\n {\n if ($value === true) {\n return 'Yes';\n } elseif ($value === false) {\n return 'No';\n }\n\n return '---';\n }",
"private function boolean(bool $value): string\n {\n return $value ? 'true' : 'false';\n }",
"protected function validateBoolean($value){\n\t\t$acceptable = array(true, false, 0, 1, '0', '1');\n\n\t\treturn in_array($value, $acceptable, true);\n\t}",
"protected function escapeBoolean($value)\n {\n return ($value) ? $this->booleanTrue : $this->booleanFalse;\n }",
"public function addElseIf(BooleanExpression $expression)\n\t{\n\t\tif ($this->isDone() || $this->encountered_true_condition)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t$can_eval = $expression->canEvaluate();\n\n\t\tif ($can_eval)\n\t\t{\n\t\t\t$result = $this->evaluate($expression);\n\n\t\t\t// If not all previous ones have evaluated, then we can't\n\t\t\t// make a determination on a true branch since a previous one may\n\t\t\t// also be true. However, we do know that subsequent ones cannot be\n\t\t\t// reached, so we can remove them. This then becomes the else branch,\n\t\t\t// making it easy to parse on subsequent passes.\n\t\t\tif ( ! $this->all_previous_could_eval && $result == TRUE)\n\t\t\t{\n\t\t\t\t$this->parser->output('{if:else}');\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->parser->outputLastAnnotation();\n\t\t\t$this->outputCondition($expression->stringify());\n\t\t}\n\n\t\t$this->setLastCouldEval($can_eval);\n\n\t\treturn $this->shouldAddBody();\n\t}",
"private function fixTrueFalse(&$value, $key) {\r\n if ($value == 'false') {\r\n \t$value = false;\r\n } elseif ($value == 'true') {\r\n $value = true;\r\n }\r\n }",
"public function setBoolean($trueFalse);",
"public function assertAllTrue()\n {\n $bools = func_get_args();\n\n if (is_array(func_get_arg(0))) {\n $bools = func_get_arg(0);\n }\n\n return ! collect($bools)->contains(false);\n }"
] | [
"0.68517697",
"0.6766951",
"0.64169884",
"0.641648",
"0.6332444",
"0.6312277",
"0.62422806",
"0.6204315",
"0.61879456",
"0.61554146",
"0.61498046",
"0.61425316",
"0.6108633",
"0.6088926",
"0.60644585",
"0.6045826",
"0.60042435",
"0.59953606",
"0.5974364",
"0.5930563",
"0.59305286",
"0.59154594",
"0.59097224",
"0.58664435",
"0.58556104",
"0.5850615",
"0.5844606",
"0.5834164",
"0.5808795",
"0.5798995",
"0.5792196",
"0.5767136",
"0.5766841",
"0.5765986",
"0.5745573",
"0.5742015",
"0.5699315",
"0.5692034",
"0.56732076",
"0.5672823",
"0.5671436",
"0.56346405",
"0.56261814",
"0.5623957",
"0.5622327",
"0.5593505",
"0.5576254",
"0.5574486",
"0.5564278",
"0.5547441",
"0.55466366",
"0.5540572",
"0.5539005",
"0.5536127",
"0.5515667",
"0.55111414",
"0.5509305",
"0.5473335",
"0.54591644",
"0.5452716",
"0.5442763",
"0.543835",
"0.5437116",
"0.5435094",
"0.54338115",
"0.54268795",
"0.5426296",
"0.5423391",
"0.5417211",
"0.5414925",
"0.54141843",
"0.5400545",
"0.5394994",
"0.5392535",
"0.539137",
"0.5378688",
"0.5378292",
"0.53713757",
"0.5371075",
"0.5365511",
"0.53617775",
"0.5359288",
"0.5351803",
"0.53198147",
"0.5285153",
"0.52820575",
"0.52686906",
"0.52678066",
"0.5261095",
"0.5245275",
"0.524045",
"0.52372915",
"0.52243865",
"0.5221398",
"0.52207017",
"0.5214349",
"0.5211637",
"0.5211472",
"0.5211443",
"0.52066135"
] | 0.5253611 | 89 |
"isFalse" check that the boolean is strictly equal to "false". boolean($true) >isFalse() // fails >boolean($false) >isFalse() // succeed ; | public function isFalse($failMessage = null) {} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function isFalse();",
"public function isFalse()\n {\n \n return !$this->value;\n \n }",
"static function isFalse()\n {\n try {\n return call_user_func_array('PHPUnit_Framework_Assert::isFalse', func_get_args());\n } catch (\\Exception $e) {\n self::callSlack($e, debug_backtrace()[1]);\n }\n }",
"public function isBoolean();",
"function pseudoTypeFalseAndBool(bool|false $var = false) {}",
"public function isTrue();",
"function is_false(mixed $var): bool\n{\n return ($var === false);\n}",
"function is_false(mixed $value): bool\n\t{\n\t\treturn $value === false;\n\t}",
"public static function assertIsNotBool( $actual, $message = '' ) {\n\t\tstatic::assertNotInternalType( 'bool', $actual, $message );\n\t}",
"public function testIsBoolean() {\n\t\t$result = _::isBoolean(true);\n\t\t$this->assertTrue($result);\n\n\t\t// test that false is a boolean\n\t\t$result = _::isBoolean(false);\n\t\t$this->assertTrue($result);\n\n\t\t// test that null is not a boolean\n\t\t$result = _::isBoolean(null);\n\t\t$this->assertFalse($result);\n\t}",
"public function testToStringWithBooleanValueFalse()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean(false);\n\t\t// check that the two boolean are equal\n\t\t$this->assertEquals('false', $boolean->__toString());\n\t}",
"public function testCastToBooleanFalse($data) {\n\t\t$this->assertFalse(Convertor::cast($data), \"[{$data}] is not Boolean FALSE\");\n\t}",
"protected function isFalse($value) {\n\t\treturn !$this->isTrue($value);\n\t}",
"public static function isFalse()\n {\n return new Matcher\\IsFalse();\n }",
"public static function false(): self\n {\n return self::fromValue(Value::false());\n }",
"public function isTrue()\n {\n \n return !!$this->value;\n \n }",
"public function isFalse() {\n return $this->is(new Identical(false));\n }",
"public static function boolean() {}",
"function erp_validate_boolean( $value ) {\n return filter_var( $value, FILTER_VALIDATE_BOOLEAN );\n}",
"protected final function AssertNotFalse( $value, $strict = true )\n {\n $this->observer->OnAssert();\n\n if( $strict )\n {\n $result = ( $value !== false );\n }\n else\n {\n $result = ( $value != false );\n }\n\n Core::Assert( $result, var_export( $value, true ) . ' is false' );\n }",
"public function assertNotTrue($bool, $label = \"\") {\n\t\tif (!$bool) {\n\t\t\t$this->currResults[$this->count] = $this->tag.\"assertNotTrue $label TRUE\";\n\t\t} else {\n\t\t\t$this->currResults[$this->count] = $this->tag.\"assertNotTrue $label FALSE\"; \n\t\t}\n\t\t$this->count++;\n\t\t$this->tag = \"\";\n\t\treturn !$bool;\n\t}",
"public function testValidateFalse(): void\n {\n $this->assertFalse($this->validate(false));\n }",
"public function testNullEqualsFalseWhenAllowNullIsFalse()\n {\n $arguments = [null];\n\n $return = $this->call(BooleanValidation::create()->setAllowNull(false), $arguments);\n\n $this->assertEquals(false, $return);\n }",
"function rest_is_boolean($maybe_bool)\n {\n }",
"public static function false(): bool\n {\n return false;\n }",
"public function testEmptyArrayCastedToBoolGivesFalse() {\n\t\t$this->assertFalse((bool)array());\n\t}",
"function pseudoTypeFalse(false $var = false) {}",
"function bool($value)\n{\n return ! in_array(strtolower($value), ['no', 'false', '0', '', '-1']);\n}",
"public function assert_false($value, $strict = true)\n\t{\n\t\tTests::$results['assertions']++;\n\n\t\tif ($value === false or ( ! $strict and ! $value))\n\t\t{\n\t\t\t$this->pass();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->fail('assert_false - Value is does not validate as false.');\n\t\t}\n\t}",
"public function isNotOk()\n {\n return ! $this->isOk();\n }",
"public function convertToBoolean($value) {\r\n return $value !== 'false' && $value !== 0 && $value !== false && $value !== '' && $value !== '0';\r\n }",
"function bool ($value)\r\n{\r\n\tif ($value === true || $value === false)\r\n\t\treturn $value;\r\n\r\n\treturn $value === 'true' || ($value !== 'false' && !!$value);\r\n}",
"public function assertFalse($value, $message = null) {\n $this->assertions++;\n $message = $message ?? 'Assert if <' . gettype($value) . '> ' . $value . ' is false ';\n $passed = $value === (boolean)false;\n $this->_passed += $passed;\n $this->_log($message. ': '.$this->_colors->getColoredString($this->_textOutputs[$passed], $this->_colorsPalete[$passed]));\n $this->_progress($passed);\n $trueFalse = ['False','True'];\n !$passed && $this->_log('Expectig `false` but found <' . gettype($value) . '> ' . (is_bool($value) ? $trueFalse[$value] : $value)) && $this->_triggerError('Asserts False');\n }",
"public function scrubBool(bool $data) : bool;",
"private function checkNotStrict($value)\n {\n if (filter_var($value, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE) !== null) {\n return true;\n } else {\n return false;\n }\n }",
"public function boolean_style($value){\n\t\t//if it is null, it fails, if it isn't null then it succeeds\n\t\t$this->set_message('boolean_style', 'The %s field does not evaluate to a boolean.');\n\t\t$bool = filter_var($value, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);\n\t\treturn !is_null($bool);\n\n\t}",
"static function unittest_nonEmptyBoolGuarantee () {\n PhlintTest::assertIssues('\n $foo = false;\n if (rand(0, 1))\n $foo = new ArrayObject();\n if (!empty($foo))\n foreach ($foo as $bar) {}\n ', [\n ]);\n }",
"public function isFalse(string|int|float $message): self\n {\n return $this->addMessage(new IsFalse($message));\n }",
"public function isAlwaysFalse() {\n return $this->alwaysFalse;\n }",
"function to_boolean ($value) {\n\tif (\n\n\t\t// Falsy\n\t\t!$value or\n\n\t\t// Empty\n\t\tempty($value) or\n\n\t\t// Zero or less\n\t\t(is_numeric($value) and strval($value) <= 0) or\n\n\t\t// Keyword\n\t\t(is_string($value) and in_array(trim(strtolower($value)), array('null', 'nul', 'nil', 'false')))\n\n\t) {\n\t\treturn false;\n\t} else {\n\t\treturn true;\n\t}\n}",
"public function setBoolean($trueFalse);",
"protected final function AssertFalse( $value, $strict = true )\n {\n $this->observer->OnAssert();\n\n if( $strict )\n {\n $result = ( $value === false );\n }\n else\n {\n $result = ( $value == false );\n }\n\n Core::Assert( $result, var_export( $value, true ) . ' is not false' );\n }",
"public function toBoolean(): bool\n {\n return !!$this->getValue();\n }",
"public function getBool(): bool;",
"protected final function AssertNotTrue( $value, $strict = true )\n {\n $this->observer->OnAssert();\n\n if( $strict )\n {\n $result = ( $value !== true );\n }\n else\n {\n $result = ( $value != true );\n }\n\n Core::Assert( $result, var_export( $value, true ) . ' is true' );\n }",
"function to_boolean($val);",
"public function testEmptyObjectCastedToBoolGivesTrue() {\n\t\t$this->asserttrue((bool)new stdClass());\n\t}",
"function validBool($value)\n {\n return filter_var($value, FILTER_VALIDATE_BOOLEAN);\n }",
"public function testFalseType()\n {\n $validator=new Validator();\n $result=$validator->type(\"10000\");\n $this->assertFalse($result[0]);\n $this->assertEquals('Type is not valid.',$result[1]);\n }",
"public function boolberry(): bool\n\t{\n\t\treturn false;\n\t}",
"function isBoolType($a = 0)\n{\n $b = (boolean)$a;\n\n echo \"число $a при переводе в булев тип изменится на '$b ' <br/>\n так как при переводе значение boolean будет = false(по правилам приведения типов)\";\n echo \"<br>\";\n var_dump($a, $b);\n}",
"public function testStringWithZeroCastedToBoolGivesFalse() {\n\t\t$this->assertFalse((bool)'0');\n\t}",
"public function notToBeBool(string $message = ''): self\n {\n Assert::assertIsNotBool($this->actual, $message);\n return $this;\n }",
"function assertFalse($bool){\r\n if(!$bool){\r\n $status = \"passed\";\r\n }\r\n else{\r\n $status = \"failed\";\r\n }\r\n \r\n $this->updateStatus($status);\r\n $this->updateAction(__FUNCTION__);\r\n }",
"public static function ensureBoolean($value)\n\t{\n\t\tif (is_string($value))\n\t\t\treturn strcasecmp($value,'true')==0 || $value!=0;\n\t\telse\n\t\t\treturn (boolean)$value;\n\t}",
"protected function _isNegated()\n {\n return (bool) $this->negated;\n }",
"public function bool()\n {\n return filter_var($this->value, FILTER_VALIDATE_BOOLEAN);\n }",
"function wp_validate_boolean($value)\n {\n }",
"public function testToStringWithStringValueFalse()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean('false');\n\t\t// check that the two boolean are equal\n\t\t$this->assertEquals('false', $boolean->__toString());\n\t}",
"function isBool ($value)\r\n{\r\n\treturn is_bool ($value);\r\n}",
"public function checkIsFalse($value)\n {\n return $this->checkIdenticalTo($value, false);\n }",
"function ashe_true_false( $option ) {\n\tif ( $option === true ) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}",
"public function testConvertToBoolean() {\r\n $data = array(\r\n true => true,\r\n false => false,\r\n 'true' => true,\r\n 'false' => false,\r\n 'test' => true,\r\n 0 => false,\r\n '0' => false,\r\n 1 => true\r\n );\r\n\r\n foreach ($data as $value => $expected) {\r\n $this->assertSame($expected, $this->_utils->convertToBoolean($value));\r\n }\r\n }",
"public function isTrue($failMessage = null) {}",
"public static function assertIsBool( $actual, $message = '' ) {\n\t\tstatic::assertInternalType( 'bool', $actual, $message );\n\t}",
"public function testBooleanField()\n {\n $field = $this->table->getField('trueorfalse'); // Boolean\n $this->assertInstanceOf('Metrol\\DBTable\\Field\\PostgreSQL\\Boolean',\n $field);\n $this->assertEquals('trueorfalse', $field->getName());\n\n $this->assertTrue($field->getPHPValue(1));\n $this->assertFalse($field->getPHPValue(0));\n $this->assertNull($field->getPHPValue(null));\n\n $this->assertTrue($field->isNullOk());\n $this->assertNull($field->getDefaultValue());\n\n $field = $this->table->getField('falsedef'); // Boolean, No Nulls, default False\n $this->assertInstanceOf('Metrol\\DBTable\\Field\\PostgreSQL\\Boolean', $field);\n $this->assertEquals('falsedef', $field->getName());\n\n $this->assertFalse($field->getPHPValue(null));\n\n // Check for an exception when in strict\n $field->setStrictValues();\n $x = false;\n\n try\n {\n $field->getPHPValue(null);\n }\n catch ( RangeException )\n {\n $x = true;\n }\n\n $this->assertTrue($x);\n\n $field = $this->table->getField('truedef'); // Boolean, No Nulls, default true\n $this->assertInstanceOf('Metrol\\DBTable\\Field\\PostgreSQL\\Boolean', $field);\n $this->assertEquals('truedef', $field->getName());\n\n $this->assertTrue($field->getPHPValue(null));\n $boundVal = $field->getSqlBoundValue(null);\n $valMarker = $boundVal->getValueMarker();\n\n $this->assertEquals('true', $boundVal->getBoundValues()[$valMarker]);\n }",
"protected static function validate_boolean( $value ){\n\t\t// FIXME: this doesn't do the strict comparison we intended. 'hello' would match the \"case true\" statement.\n\t\tswitch ($value) {\n\t\t\tcase 0:\n\t\t\tcase '0':\n\t\t\tcase false:\n\t\t\tcase 'false':\n\t\t\tcase 1:\n\t\t\tcase '1':\n\t\t\tcase true:\n\t\t\tcase 'true':\n\t\t\t\treturn true;\n\t\t\t\tbreak;\n\t\t}\n\t\treturn false;\n\t}",
"function bool($val,$str=false){\n if(is_string($val)) {\n $val=strtolower($val);\n $val=$val && $val!=\"false\" && $val !=\"no\" && $val !=\"n\" && $val !=\"f\" && $val !=\"off\";\n }else $val=(bool)$val;\n return $str?($val?\"true\":\"false\"):$val;\n}",
"#[@test]\n public function boolCast() {\n $this->assertSourcecodeEquals(\n '$s= (bool)$num;',\n $this->emit('$s= (bool)$num;')\n );\n }",
"function o_isBool($value) {\n\t\t\treturn Obj::singleton()->isBool($value);\n\t\t}",
"public function checkBoolean(): bool\n {\n if (!is_bool($this->getValue())) {\n throw new TypeInvalidException('boolean', gettype($this->getValue()));\n }\n\n return $this->getValue();\n }",
"public static function aBoolean($value)\n {\n return (is_bool($value))?:false;\n }",
"function assertFalse($value, $message = '%s should be FALSE') {\n return $this->assert(\n new IdenticalExpectation(false),\n $value,\n $message\n );\n }",
"public static function boolean()\n {\n return self::builtinType('bool');\n }",
"function is_logical($x){\n\t//note blank is interpreted as false\n\tif(in_array(strtolower(trim($x)),array(/*true: */'y','yes','1','true','t', /*false: */'n','no','0','false','f','')))return true;\n}",
"public function isBoolean(): bool\n {\n return $this->phpType === self::BOOLEAN;\n }",
"public function castToBool($value);",
"private function checkIsBoolean($value)\n {\n if ($this->strictMode) {\n return $this->checkStrict($value);\n } else {\n return $this->checkNotStrict($value);\n }\n }",
"public function testNotRule()\n {\n $rule = new NotRule();\n $rule->addRule(new TrueRule());\n\n $this->assertFalse($rule->validate());\n\n $rule = $this->getRuleBuilder()->fromArray(array(\n 'false',\n ), 'not');\n $this->assertTrue($rule->validate());\n\n\n try {\n $rule = $this->getRuleBuilder()->fromArray(array(\n 'false',\n 'true',\n ), 'not');\n } catch (\\RuntimeException $e) {\n $rule = null;\n }\n $this->assertNull($rule);\n\n }",
"public function assertAllTrue()\n {\n $bools = func_get_args();\n\n if (is_array(func_get_arg(0))) {\n $bools = func_get_arg(0);\n }\n\n return ! collect($bools)->contains(false);\n }",
"function boolval( $val ) {\r\n\t\treturn (bool) $val;\r\n\t}",
"protected function _toBoolean($value)\n\t{\n\t\tif (is_bool($value)) {\n\t\t\treturn $value;\n\t\t}\n\t\tif (is_int($value) || is_float($value)) {\n\t\t\treturn ($value !== 0);\n\t\t}\n\t\tif (is_string($value)) {\n\t\t\treturn ($value === 't' || $value === 'T' || $value === 'true');\n\t\t}\n\t\treturn (boolean)$value;\n\t}",
"public function unsetBooleanValue(): void\n {\n $this->booleanValue = [];\n }",
"function validate_boolean($bool){\n if ($bool == \"\" ) { return true ; }\n $bool = strtolower($bool);\n\n $true = array(\"y\",\"yes\",\"t\",\"true\",\"n\",\"no\",\"f\",\"false\");\n if ( in_array($bool, $true ) ) {\n return true ;\n }\n\n if ( is_bool($bool) ) {\n return true ;\n }\n else { \n return false ;\n }\n}",
"function isValidBoolean($var) {\n //Returns blank error message for a false character string, such as \"0\", \"false\", \"off\" and \"no\"\n //Otherwise returns an error message\n\n //Check for unsafe characters\n $msg = isSantizeString($var);\n if ($msg != \"\") {\n return $msg;\n }\n\n $msg = filter_var($var, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);\n if ($msg === true || $msg === false) {\n return \"\";\n } else {\n return \"Invalid Boolean\";\n }\n}",
"function isInfinite() { # :: Num -> Bool\n return new Bool(is_infinite($this->value));\n }",
"function isTrue($value) {\r\n\treturn is_bool($value) ? $value : (bool)preg_match('/^(1|y|yes|true|on)$/i',(string)$value);\r\n}",
"function booleanValuefromString($s) {\r\n\t\treturn ((strcmp($s, '0') != 0) && (strcasecmp($s, 'false') != 0));\r\n\t}",
"public function toBool(): bool\n\t{\n\t\treturn false;\n\t}",
"public function isTrue()\n {\n return $this->value === true;\n }",
"static public function Boolean( $var ) {\r\n\r\n\t\t$options = array('flags' => FILTER_NULL_ON_FAILURE);\r\n\t\t$result = filter_var( $var, FILTER_VALIDATE_BOOLEAN, $options);\r\n\r\n\t}",
"public function testIfStockManagementIsBool()\n {\n $this->assertIsBool($this->stock->isStock());\n }",
"function isFinite() { # :: Num -> Bool\n return new Bool(is_finite($this->value));\n }",
"function convert_string_to_boolean($string)\n{\n return filter_var($string, FILTER_VALIDATE_BOOLEAN);\n}",
"public static function assertIsBool(string $var_name, mixed $value): void\n {\n self::assertIsType($var_name, $value, [Type::BOOLEAN], Ex\\NotBooleanException::class);\n }",
"public function assertFalse($arg, $message = '')\n {\n return $this->recordTest($arg == false, $message);\n }",
"public static function convertToBoolean($value)\n {\n if (is_bool($value)) {\n return $value;\n }\n if (is_numeric($value)) {\n return $value > 0;\n }\n if (is_string($value)) {\n return (!empty($value) && strtolower($value) !== 'false');\n }\n if (is_array($value) || (is_object($value) && $value instanceof \\Countable)) {\n return count($value) > 0;\n }\n if (is_object($value)) {\n return true;\n }\n return false;\n }",
"public function testGetBoolFalse(): void\n {\n // 0\n $_SERVER['MY_KEY'] = 0;\n $this->assertFalse(Env::getBool('MY_KEY'));\n\n // false\n $_SERVER['MY_KEY'] = false;\n $this->assertFalse(Env::getBool('MY_KEY'));\n\n // '0'\n $_SERVER['MY_KEY'] = '0';\n $this->assertFalse(Env::getBool('MY_KEY'));\n\n // 'false'\n $_SERVER['MY_KEY'] = 'false';\n $this->assertFalse(Env::getBool('MY_KEY'));\n\n // 'no'\n $_SERVER['MY_KEY'] = 'no';\n $this->assertFalse(Env::getBool('MY_KEY'));\n\n // 'off'\n $_SERVER['MY_KEY'] = 'off';\n $this->assertFalse(Env::getBool('MY_KEY'));\n\n // 'unknown'\n $_SERVER['MY_KEY'] = 'unknown';\n $this->assertFalse(Env::getBool('MY_KEY'));\n }",
"public function validate_boolean( $var ) {\n\t\tif ( is_string( $var ) ) {\n\t\t\treturn wp_validate_boolean( $var ) || bool_from_yn( $var ) || 'yes' === $var;\n\t\t}\n\n\t\treturn wp_validate_boolean( $var );\n\t}",
"public static function true(): self\n {\n return self::fromValue(Value::true());\n }"
] | [
"0.7831073",
"0.69790924",
"0.69354093",
"0.6703438",
"0.6698243",
"0.65677404",
"0.65504575",
"0.6504159",
"0.64706",
"0.64209384",
"0.6381188",
"0.63569796",
"0.63436496",
"0.62857497",
"0.627552",
"0.6259005",
"0.6242871",
"0.6235255",
"0.62214494",
"0.6183468",
"0.61724025",
"0.61543524",
"0.606742",
"0.60665905",
"0.6057301",
"0.6044588",
"0.6043021",
"0.60255325",
"0.60086805",
"0.6005327",
"0.5968747",
"0.59560925",
"0.593081",
"0.5903777",
"0.5898931",
"0.5891261",
"0.5888692",
"0.588005",
"0.58683765",
"0.5844485",
"0.5832831",
"0.5815521",
"0.58139646",
"0.5810769",
"0.5802606",
"0.57999885",
"0.57950693",
"0.5787404",
"0.5776403",
"0.57696223",
"0.57610464",
"0.5750792",
"0.5746543",
"0.5742862",
"0.57286096",
"0.5725281",
"0.5719106",
"0.5710014",
"0.5702714",
"0.56928015",
"0.5683111",
"0.5679902",
"0.5662971",
"0.56527084",
"0.56481045",
"0.5626348",
"0.5626146",
"0.561023",
"0.56090283",
"0.5608335",
"0.55970144",
"0.558883",
"0.5577193",
"0.5563255",
"0.5550641",
"0.55383503",
"0.5513403",
"0.5512741",
"0.54990804",
"0.5498617",
"0.54759943",
"0.5474356",
"0.54739904",
"0.54672",
"0.5454682",
"0.54509366",
"0.5443988",
"0.5440934",
"0.5440791",
"0.54385024",
"0.54319024",
"0.54194295",
"0.5415942",
"0.5402429",
"0.5396683",
"0.5390059",
"0.5385254",
"0.5384685",
"0.5379396",
"0.5373135"
] | 0.64160687 | 10 |
Create a new command instance. | public function __construct()
{
parent::__construct();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function newCommand() {\n return newinstance(Command::class, [], '{\n public static $wasRun= false;\n public function __construct() { self::$wasRun= false; }\n public function run() { self::$wasRun= true; }\n public function wasRun() { return self::$wasRun; }\n }');\n }",
"public function createCommand()\r\n\t{\r\n\t\t$obj = new DbCommand($this,$this->dbms);\r\n\t\treturn $obj;\r\n\t}",
"public function createCommand() {\n\t\treturn new UnboxedCommand( $this );\n\t}",
"protected function createCommand($args) {\n $command = new Command();\n $command->id = ifseta($args, 'id');\n $command->name = ifseta($args, 'name');\n $command->url = ifseta($args, 'url');\n $command->description = ifseta($args, 'description');\n $command->uses = ifseta($args, 'uses');\n $command->creationDate = ifseta($args, 'creation_date');\n $command->lastUseDate = ifseta($args, 'last_use_date');\n $command->goldenEggDate = ifseta($args, 'golden_egg_date');\n return $command;\n }",
"static public function create($cmd = null, $args = null)\n {\n return new self($cmd, $args);\n }",
"public function createCommand($kernel, string $commandName = null, string $commandDescription = null): Command;",
"public function makeCommand() \n {\n if($this->CrontabCommandObject === NULL)\n {\n $this->CrontabCommandObject = new \\root\\library\\Crontab\\CrontabCommand\\CrontabCommand();\n }\n \n return $this->CrontabCommandObject;\n }",
"public function testInstantiation()\n {\n $command = new CreateRule('dummy name');\n }",
"public function command(Command $command);",
"public function __construct($command)\n {\n $this->command = $command;\n }",
"public static function create(array $data)\n {\n $command = new static();\n $command->exchangeArray($data);\n return $command;\n }",
"protected function getCreateCommand()\n {\n $command = new IndexCreateCommand();\n $command->setContainer($this->getContainer());\n\n return $command;\n }",
"public function createCommand($string = '')\n {\n return $this->createStringable($string);\n }",
"public function createCommand($type) {\r\n $command = $this->xml->createElement('command');\r\n $command->setAttribute('xsi:type', $type);\r\n $command->setAttribute('xmlns', '');\r\n $this->xmlSchema($command);\r\n return $command;\r\n }",
"public function __construct()\n {\n // We will go ahead and set the name, description, and parameters on console\n // commands just to make things a little easier on the developer. This is\n // so they don't have to all be manually specified in the constructors.\n if (isset($this->signature)) {\n $this->configureUsingFluentDefinition();\n } else {\n parent::__construct($this->name);\n }\n\n // Once we have constructed the command, we'll set the description and other\n // related properties of the command. If a signature wasn't used to build\n // the command we'll set the arguments and the options on this command.\n $this->setDescription((string) $this->description);\n\n $this->setHelp((string) $this->help);\n\n $this->setHidden($this->isHidden());\n\n if (! isset($this->signature)) {\n $this->specifyParameters();\n }\n }",
"public function make(string $name, PreprocessorInterface $preprocessor = null): CommandInterface;",
"private function _getCommandByClassName($className)\n {\n return new $className;\n }",
"public function newCommand($regex, $callable) {\n $cmd = new Command();\n $cmd->regex = $regex;\n $cmd->callable = $callable;\n return $this->addCommand($cmd);\n }",
"public static function create($commandID, ...$args)\n {\n $arguments = func_get_args();\n\n return new static(array_shift($arguments), $arguments);\n }",
"private function __construct($command = null)\n {\n $this->command = $command;\n }",
"public static function factory(string $command, string $before = '', string $after = ''): self\n {\n return new self($command, $before, $after);\n }",
"public function getCommand() {}",
"protected function buildCommand()\n {\n $command = new Command(\\Tivie\\Command\\ESCAPE);\n $command\n ->chdir(realpath($this->repoDir))\n ->setCommand($this->gitDir)\n ->addArgument(new Argument('tag', null, null, false))\n ->addArgument(new Argument($this->tag, null, null, true));\n\n return $command;\n }",
"public function testCanBeInstantiated()\n {\n $command = $this->createInstance();\n $this->assertInstanceOf('\\\\Dhii\\\\ShellInterop\\\\CommandInterface', $command, 'Command must be an interoperable command');\n $this->assertInstanceOf('\\\\Dhii\\\\ShellCommandInterop\\\\ConfigurableCommandInterface', $command, 'Command must be a configurable command');\n $this->assertInstanceOf('\\\\Dhii\\\\ShellCommandInterop\\\\MutableCommandInterface', $command, 'Command must be a mutable command');\n }",
"public function getCommand();",
"protected function createCommand($name, array $parameters = [])\n {\n return new Fluent(\n array_merge(\n compact('name'),\n $parameters)\n );\n }",
"public function testCanPassCommandStringToConstructor()\n {\n $command = new Command('/bin/ls -l');\n\n $this->assertEquals('/bin/ls -l', $command->getExecCommand());\n }",
"public function makeCommandInstanceByType(...$args): CommandInterface\n {\n $commandType = array_shift($args);\n\n switch ($commandType) {\n case self::PROGRAM_READ_MODEL_FETCH_ONE_COMMAND:\n return $this->makeFetchOneCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_FIND_COMMAND:\n return $this->makeFindCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_FIND_LITE_COMMAND:\n return $this->makeFindLiteCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_CREATE_TASK_COMMAND:\n return $this->makeItemCreateTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_CREATE_COMMAND:\n return $this->makeItemCreateCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_UPDATE_TASK_COMMAND:\n return $this->makeItemUpdateTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_UPDATE_COMMAND:\n return $this->makeItemUpdateCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_DELETE_TASK_COMMAND:\n return $this->makeItemDeleteTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_DELETE_COMMAND:\n return $this->makeItemDeleteCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_ADD_ID_COMMAND:\n return $this->makeItemAddIdCommand(...$args);\n\n default:\n throw new FactoryException(sprintf('Command bus for type `%s` not found!', (string) $commandType));\n }\n }",
"public function __construct($cmd)\n {\n $this->cmd = $cmd;\n }",
"public function getCommand()\n {\n }",
"public function command($class)\n {\n $runnable = $this->resolveClass($class);\n\n if ( ! $runnable instanceof Command) {\n throw new InvalidArgumentException(get_class($runnable).' must be an instance of '.Command::class.'.');\n }\n\n $command = $runnable;\n\n if ($runnable instanceof Taggable) {\n $command = new Cached($command, $this);\n }\n\n if ($runnable instanceof Transactional) {\n $command = new Transaction($command, $this, $this->makeFromContainer(ConnectionInterface::class));\n }\n\n if ($runnable instanceof Eventable) {\n $command = new Evented($command, $this);\n }\n\n return $this->newBuilder($command);\n }",
"protected function createCommandFactory(): CommandFactory\n {\n return new CommandFactory([\n 'CLOSE' => Command\\CLOSE::class,\n ]);\n }",
"public static function register() {\n\n if ( !defined( 'WP_CLI' ) || !WP_CLI ) {\n return;\n }\n \n $instance = new static;\n if(empty( $instance->namespace )) {\n throw new \\Exception(\"Command namespace not defined\", 1);\n \n }\n\t\t\\WP_CLI::add_command( $instance->namespace, $instance, $instance->args ?? null );\n\t}",
"public function addCommand($command);",
"public function add(Command $command);",
"abstract protected function getCommand();",
"public function createCommand()\r\n\t{\r\n\t\t//start the string\r\n\t\t$command = '';\r\n\t\t\r\n\t\t//add the java command or the path to java\r\n\t\t$command .= $this->java_path;\r\n\t\t\r\n\t\t//add the class path\r\n\t\t$command .= ' -cp \"'. $this->stanford_path . $this->seperator . '*\" ';\r\n\t\t\r\n\t\t//add options\r\n\t\t$options = implode(' ', $this->java_options);\r\n\t\t$command .= '-'.$options;\r\n\t\t\r\n\t\t//add the call to the pipeline object\r\n\t\t$command .= ' edu.stanford.nlp.pipeline.StanfordCoreNLP ';\r\n\r\n\t\t//add the annotators\r\n\t\t$command .= '-annotators '. $this->listAnnotators();\r\n\t\t\r\n\t\t//add the input and output directors\r\n\t\t$command .= ' -file '. $this->tmp_file . ' -outputDirectory '. $this->tmp_path;\r\n\t\t\r\n\t\t//this is for testing purposes\r\n\t\t//$command .= ' -file '. $this->tmp_path .'\\\\nlp3F25.tmp' . ' -outputDirectory '. $this->tmp_path;\r\n\t\t\r\n\t\t//if using regexner add this to the command string\r\n\t\tif($this->annotators['regexner'] === true)\r\n\t\t{\r\n\t\t\t$command .=' -regexner.mapping '. $this->regexner_path . $this->seperator . $this->regexner_file;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn $command;\r\n\t}",
"protected function createCommand(string $name, array $parameters = []): Fluent\n {\n return new Fluent(array_merge(compact('name'), $parameters));\n }",
"public function __construct()\n {\n parent::__construct(static::NAME, static::VERSION);\n $this->add(new DefaultCommand());\n }",
"public function __construct()\n {\n parent::__construct();\n\n $this->command_name = config(\"custom-commands.command_name\");\n\n parent::__construct($this->signature = $this->command_name);\n\n $this->commands = (array) config(\"custom-commands.commands\");\n \n $this->table = config(\"custom-commands.table\");\n\n $this->row = config(\"custom-commands.row\");\n\n $this->changeEnv = (boolean) config(\"custom-commands.change_env\");\n\n }",
"protected function createCommandFile()\n {\n $command_file_full_path = $this->command_dir_path . DIRECTORY_SEPARATOR . $this->arg->getCommandFileName();\n\n // Check if the command already exists\n if (file_exists($command_file_full_path)) {\n throw new Exception('Command already exists.');\n }\n\n // Create the file for the new command\n $command_file = fopen($command_file_full_path, 'w');\n\n // TODO: Create Script Generator to generate the PHP scripts for the new command.\n\n fclose($command_file);\n\n $this->console->getOutput()->println('File created at: ' . $command_file_full_path);\n $this->console->getOutput()->success('Command ' . $this->arg->getSignature() . ' created successfully.');\n }",
"public static function create() {}",
"public static function create() {}",
"public static function create() {}",
"public static function create(InteropContainer $container)\n {\n $middleware = $container->get('cmd.middleware');\n return new CommandBusFactory($middleware);\n }",
"public function testInstantiation()\n {\n $this->assertInstanceOf('Contao\\ManagerBundle\\Command\\InstallWebDirCommand', $this->command);\n }",
"private function createCli() {\n $this->cli = new Cli();\n $this->commands = $this->commandParser->getAllCommands();\n\n foreach ($this->commands as $command) {\n if ($command->isDefault()) {\n $this->cli->command(\"*\");\n foreach ($command->getOptions() as $option) {\n $this->cli->opt($option->getName(), $option->getDescription(), $option->isRequired(), $option->getType());\n }\n foreach ($command->getArguments() as $argument) {\n if (!$argument->isVariadic())\n $this->cli->arg($argument->getName(), $argument->getDescription(), $argument->isRequired());\n }\n }\n if ($command->getName() != \"\") {\n $this->cli->command($command->getName())->description($command->getDescription());\n foreach ($command->getOptions() as $option) {\n $this->cli->opt($option->getName(), $option->getDescription(), $option->isRequired(), $option->getType());\n }\n foreach ($command->getArguments() as $argument) {\n if (!$argument->isVariadic())\n $this->cli->arg($argument->getName(), $argument->getDescription(), $argument->isRequired());\n }\n }\n }\n\n\n }",
"public function command(string $command): self\n {\n $this->addCommands[] = $command;\n\n return $this;\n }",
"protected function createProcess($cmd)\n {\n return new Process(explode(' ', $cmd));\n }",
"public function create() {}",
"public function create(){}",
"protected function getCommandFactory(): Command\\Factory\n {\n return new Command\\RedisFactory();\n }",
"public function __construct()\n {\n parent::__construct();\n\n $this->commandData = new CommandData($this, CommandData::$COMMAND_TYPE_API);\n }",
"public function testNewCommand() : void\n {\n $this->assertFalse($this->command->hasArguments());\n $this->assertEquals(\"\", $this->command->getArguments());\n }",
"protected function createCommandBuilder()\n\t{\n\t\treturn new CSqliteCommandBuilder($this);\n\t}",
"public function __construct($command, $config = [])\n {\n $this->command = $command;\n $this->_output = $this->getDefaultOutput();\n parent::__construct($config);\n }",
"public function __construct(){\n\n global $argv;\n\n if(!isset($argv[1])){\n echo 'You must supply a command!' . PHP_EOL;\n exit;\n }//if\n\n $args = $argv;\n\n $scriptName = array_shift($args);\n $method = array_shift($args);\n\n $method = explode('-',$method);\n foreach($method as $k => $v){\n if($k != 0){\n $method[$k] = ucwords($v);\n }//if\n }//foreach\n\n $method = implode('',$method);\n\n $resolved = false;\n\n if(method_exists($this,$method)){\n call_user_func(Array($this,$method), $args);\n $resolved = true;\n }//if\n else {\n foreach(static::$extendedCommands as $commandClass){\n if(method_exists($commandClass,$method)){\n call_user_func(Array($commandClass,$method), $args);\n $resolved = true;\n break;\n }//if\n }//foreach\n }//el\n\n if(!$resolved){\n echo \"`{$method}` is not a valid CLI command!\";\n }//if\n\n echo PHP_EOL;\n exit;\n\n }",
"public function forCommand($command)\n {\n $this->command = $command;\n $this->pipe = new NullPipe();\n $this->manager = new InteractiveProcessManager($this->userInteraction);\n\n return $this;\n }",
"public function __construct()\n {\n parent::__construct('pwman', '0.1.0');\n\n $getCommand = new Get();\n $this->add($getCommand);\n\n $setCommand = new Set();\n $this->add($setCommand);\n }",
"public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }",
"public function createCommand(?string $sql = null, array $params = []): Command;",
"public function __construct($command = NULL, $name = NULL)\n {\n $args = func_get_args();\n\n switch ($command) {\n case self::CONSTR_CMD_POPULATE_SYNCED_ARRAY:\n case self::CONSTR_CMD_POP_FROM_ARR:\n case self::CONSTR_CMD_POP_FROM_OBJ:\n case self::CONSTR_CMD_POP_FROM_DB:\n case self::CONSTR_CMD_NEW:\n $this->setup_name = $name;\n\n # shift off known args\n array_shift($args);\n array_shift($args);\n break;\n }\n\n switch ($command) {\n case self::CONSTR_CMD_POP_FROM_ARR:\n $this->applyArray($args[0]);\n break;\n case self::CONSTR_CMD_POP_FROM_OBJ:\n break;\n case self::CONSTR_CMD_POP_FROM_DB:\n break;\n case self::CONSTR_CMD_POPULATE_SYNCED_ARRAY:\n $this->applyArray($args[0]);\n $this->setAllLoaded();\n break;\n default:\n throw new OrmInputException('Guessing not supported, please explicitly specify construction type');\n self::constructGuess($args);\n }\n\n $this->ensureObjectInDb();\n }",
"public function generateCommands();",
"protected function newInstanceCommand($commandClass)\n {\n $class = new ReflectionClass($commandClass);\n\n return $class->newInstanceArgs($this->resolveCommandParameters($class));\n }",
"protected function buildCommand()\n {\n return $this->command;\n }",
"public function makeItemCreateCommand(string $processUuid, array $item): ItemCreateCommand\n {\n $processUuid = ProcessUuid::fromNative($processUuid);\n $uuid = Uuid::fromNative(null);\n $item = Item::fromNative($item);\n\n return new ItemCreateCommand($processUuid, $uuid, $item);\n }",
"public function __construct($commandName, $args = [], $description = '') {\n if (!$this->setName($commandName)) {\n $this->setName('--new-command');\n }\n $this->addArgs($args);\n\n if (!$this->setDescription($description)) {\n $this->setDescription('<NO DESCRIPTION>');\n }\n }",
"public function getCommand($name, array $args = array())\n {\n return parent::getCommand($name, $args)\n ->setRequestSerializer(RequestSerializer::getInstance());\n }",
"protected function buildCommand()\n {\n $command = new Command(\\Tivie\\Command\\DONT_ADD_SPACE_BEFORE_VALUE);\n $command\n ->chdir(realpath($this->repoDir))\n ->setCommand($this->gitDir)\n ->addArgument(new Argument('rev-parse'))\n ->addArgument(new Argument('HEAD'));\n\n return $command;\n }",
"protected function instantiateCommand(Request $request, $args)\n {\n $command = new DeletePackageCustomerCommand($args);\n\n $requestBody = $request->getParsedBody();\n\n $this->setCommandFields($command, $requestBody);\n\n return $command;\n }",
"public function createCommand($sql = null, $params = [])\n {\n $command = new Command([\n 'db' => $this,\n 'sql' => $sql,\n ]);\n\n return $command->bindValues($params);\n }",
"protected function setCommand($value) {\n\t\t$this->_command = trim($value);\n\t\treturn $this;\n\t}",
"public function setCommand($command)\n {\n $this->command = $command;\n\n return $this;\n }",
"public function buildCommand()\n {\n return parent::buildCommand();\n }",
"private function registerMakeModuleCommand()\n {\n $this->app->singleton('command.make.module', function($app) {\n return $app['Caffeinated\\Modules\\Console\\Generators\\MakeModuleCommand'];\n });\n\n $this->commands('command.make.module');\n }",
"public function __construct()\n {\n parent::__construct();\n\n $this->currentDirectory = getcwd();\n $this->baseIndentLevel = 0;\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\HelpCommand\", \"help\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\InitializePlanetCommand\", \"init\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PackAndPushUniToolCommand\", \"packpushuni\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PackLightPluginCommand\", \"packlightmap\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PushCommand\", \"push\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PushUniverseSnapshotCommand\", \"pushuni\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\UpdateSubscriberDependenciesCommand\", \"updsd\");\n\n }",
"public function getCommand(string $command);",
"protected function registerCommand(){\n\t\t$this->app->singleton('fakeid.command.setup', function ($app){\n\t\t\treturn new SetupCommand();\n\t\t});\n\n\t\t$this->commands('fakeid.command.setup');\n\t}",
"public function addCommand($command, $args = [], $data = [])\n {\n $item = new ScreenCommand();\n $item->screen_id = $this->id;\n $item->command = $command;\n $item->arguments = $args;\n $item->fill($data);\n $item->save();\n\n return $item;\n }",
"public function test_creating_command_from_container()\n {\n $now = new \\DateTime();\n $this->container->add('DateTime', $now);\n $command = 'Spekkionu\\DomainDispatcher\\Test\\Commands\\CommandWithConstructor';\n $result = $this->dispatcher->dispatch($command);\n $this->assertSame($now, $result);\n }",
"protected function createProcess(): Process\n {\n $command = [\n $this->settings['executable']\n ];\n\n $command[] = $this->from;\n $command[] = $this->to;\n\n // Set the margins if needed.\n if ($this->settings['marginsType'] !== self::MARGIN_TYPE_NO_MARGINS) {\n $command[] = '--marginsType=' . $this->settings['marginsType'];\n }\n\n // If we need to proxy with node we just need to prepend the $command with `node`.\n if ($this->settings['proxyWithNode']) {\n array_unshift($command, 'node');\n }\n\n // If there's no graphical environment we need to prepend the $command with `xvfb-run\n // --auto-servernum`.\n if (! $this->settings['graphicalEnvironment']) {\n array_unshift($command, '--auto-servernum');\n array_unshift($command, 'xvfb-run');\n }\n\n return new Process($command);\n }",
"private function registerCommand()\n {\n $this->app->singleton('command.shenma.push', function () {\n return new \\Larva\\Shenma\\Push\\Commands\\Push();\n });\n\n $this->app->singleton('command.shenma.push.retry', function () {\n return new \\Larva\\Shenma\\Push\\Commands\\PushRetry();\n });\n }",
"public function generateCommand($singleCommandDefinition);",
"public function __construct(string $command, string $before = '', string $after = '')\n {\n $this->command = $command;\n $this->before = $before;\n $this->after = $after;\n }",
"public function create() {\n }",
"public function create() {\n }",
"public function create() {\r\n }",
"public function create() {\n\n\t}",
"private function getImportCommand()\n {\n return new IndexImportCommand(self::getContainer());\n }",
"public function __construct($command)\n {\n $this->command = $command;\n\n $this->command->line('Installing Images: <info>✔</info>');\n }",
"public function __construct()\n {\n self::$instance =& $this;\n\n $commanddir = Config::main('directory');\n $excludes = Config::main('exclude');\n\n if(is_null($commanddir))\n die('Could not find commands directory. It should be specified in the main config.');\n\n //The directory where commands reside should be relative\n //to the directory with the clip executable.\n $dir = realpath(__DIR__.\"/{$commanddir}\");\n\n $cmdfiles = scandir($dir);\n //Loop through each file in the commands directory\n foreach($cmdfiles as $file)\n {\n //Assume that each file uses the standard '.php' file extension.\n $command = substr($file, 0, -4);\n\n //Ignore the unnecessary directories as commands and anything that\n //has been marked for exclusion then attempt to include the valid ones.\n if($file !== '.' && $file !== '..' && array_search($command, $excludes) === false && include(\"{$dir}/{$file}\"))\n {\n if(class_exists($command, false))\n {\n $obj = new $command;\n //Only load commands that use the clip command interface\n if($obj instanceof Command)\n $this->commands[strtolower($command)] = $obj;\n }\n }\n }\n }",
"public function __construct($action, $command = null) {\n parent::__construct($action, self::NAME);\n\n $fieldFactory = FieldFactory::getInstance();\n\n $commandField = $fieldFactory->createField(FieldFactory::TYPE_STRING, self::FIELD_COMMAND, $command);\n\n $this->addField($commandField);\n }",
"public function testCommand()\n {\n $response = (new Command())->testCommand(Command::class);\n\n $this->assertInstanceOf(Builder::class, $response, 'A call to command() should dispatch an instance of the command and return a builder.');\n $this->assertInstanceOf(Command::class, $response->toBase(), 'The builder should wrap the command passed to command().');\n }",
"public function createCommand($db = null, $action = 'get')\n {\n if ($db === null) {\n $db = Yii::$app->get(Connection::getDriverName());\n }\n $this->addAction($action);\n $commandConfig = $db->getQueryBuilder()->build($this);\n\n return $db->createCommand($commandConfig);\n }",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();"
] | [
"0.8010803",
"0.73342687",
"0.7260599",
"0.7165084",
"0.7159782",
"0.71384674",
"0.6749612",
"0.67224956",
"0.67182314",
"0.66973996",
"0.667946",
"0.664498",
"0.6562459",
"0.65445805",
"0.64828986",
"0.64694583",
"0.6429215",
"0.6382685",
"0.6378959",
"0.63776636",
"0.6316605",
"0.6248476",
"0.62424046",
"0.61948323",
"0.6081543",
"0.60758466",
"0.6069815",
"0.6069492",
"0.6055129",
"0.6027833",
"0.60145473",
"0.60121685",
"0.601175",
"0.59699726",
"0.59616756",
"0.5954951",
"0.59400845",
"0.59387225",
"0.5928426",
"0.5910286",
"0.5906315",
"0.5896096",
"0.5896096",
"0.5896096",
"0.5870922",
"0.5866761",
"0.58666366",
"0.5866585",
"0.58524835",
"0.5851746",
"0.58436584",
"0.58396167",
"0.581578",
"0.58057016",
"0.57976776",
"0.57807666",
"0.5764674",
"0.57642967",
"0.5757806",
"0.57566476",
"0.5744353",
"0.5739418",
"0.57340527",
"0.57236814",
"0.570178",
"0.5687536",
"0.5684328",
"0.56818765",
"0.56765383",
"0.5668461",
"0.56621677",
"0.5659168",
"0.5657221",
"0.56532407",
"0.5634016",
"0.5628284",
"0.5627503",
"0.56259525",
"0.56094354",
"0.5608904",
"0.56074554",
"0.5603256",
"0.5601158",
"0.5600227",
"0.5563038",
"0.5563038",
"0.556098",
"0.55588603",
"0.55549955",
"0.5551346",
"0.55442995",
"0.5538584",
"0.5529537",
"0.55293715",
"0.5528715",
"0.5528715",
"0.5528715",
"0.5528715",
"0.5528715",
"0.5528715",
"0.5528715"
] | 0.0 | -1 |
Execute the console command. | public function handle()
{
/*$waktu = Carbon::now(8);
$produk= DB::table('produk')
->where('')
$data = new RiwayatPo;*/
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function handle()\n {\n\t\t$this->info('league fetching ..');\n $object = new XmlFeed();\n\t\t$object->fetchLeague($this->argument('sports_id'));\n\t\t$this->info('league saved');\n }",
"public function handle()\n {\n //get us the Converter class instance and call the convert() method on it.\n $this->info(\n \\Aregsar\\Converter\\ConverterFacade::convert($this->argument(\"currency\"))\n );\n }",
"public function handle()\n {\n $this->locale = $this->argument('locale');\n\n $this->loadGroupLines();\n\n $this->loadNameSpacedLines();\n\n $this->info('Complete');\n }",
"public function handle()\n {\n $this->importUser($this->argument('username'));\n $this->call('ldap:show-user', $this->arguments());\n }",
"public function handle() {\n $user = User::where('id', $this->argument('userId'))->first();\n $this->info($user->email);\n }",
"public function handle()\n {\n $translations = collect(json_decode(file_get_contents('https://raw.githubusercontent.com/getbible/Bibles/master/translations.json')))->flatten();\n switch($this->argument('action')) {\n case 'fetch':\n $this->fetchBibles($translations);\n break;\n case 'convert':\n $this->convertBibles($translations);\n break;\n }\n }",
"public function handle()\n {\n try {\n $evalstr = $this->evaluater->evaluate($this->argument('evalString'));\n $this->info($evalstr);\n } catch (ForbiddenSymbolsException $exception) {\n $this->error($exception->getMessage());\n } catch (IncorrectSymbolsException $exception) {\n $this->error($exception->getMessage());\n }\n }",
"public function handle()\n {\n\n $settings = Setting::fetch();\n $id = $this->argument('id');\n $this->scrape_game_data($id);\n }",
"public function handle()\n {\n // env('CALENDARINDEX_TOKEN', '6f2bd927201ba4b22bb57df08db0c517e51732de')\n $this->getData($this->argument('country'), $this->argument('region'));\n }",
"public function handle()\n {\n $email = $this->argument('email');\n $name = $this->argument('name');\n\n $this->info(\"starting to generate users details\");\n\n }",
"public function handle()\n {\n\t\t$this->info('Importing translations...');\n\n\t\t$this->manager->importTranslations(true);\n }",
"public function handle()\n {\n $user = null;\n\n if ($email = $this->option(\"email\", false)) {\n $user = $this->findByEmail($email);\n }\n\n if ($id = $this->option(\"id\", false)) {\n $user = $this->findById($id);\n }\n\n if (empty($user)) {\n $this->warn(\"User no found\");\n }\n else {\n $this->setRoleToUser($user);\n }\n }",
"public function handle()\n {\n $name = ucwords($this->argument('name'));\n $this->call('repository:contract', [ 'name' => $name ]);\n $this->call('repository:class', [ 'name' => $name, '--driver' => $this->option('driver') ]);\n }",
"public function handle()\n\t{\n\t\t// Superuser\n\t\tif( ! $this->option('no-superuser'))\n\t\t\t$this->call('setup:superuser');\n\n\t\t// Countries\n\t\tif( ! $this->option('no-countries'))\n\t\t\t$this->call('setup:countries', ['country' => array_filter(explode(',', $this->option('countries')))]);\n\n\t\t// Languages\n\t\tif( ! $this->option('no-languages'))\n\t\t\t$this->call('setup:languages', ['language' => array_filter(explode(',', $this->option('languages')))]);\n\n\t\t// Currencies\n\t\tif( ! $this->option('no-currencies'))\n\t\t\t$this->call('setup:currencies', ['currency' => array_filter(explode(',', $this->option('currencies')))]);\n\n\t\t// Clear cache\n\t\t$this->call('cache:clear');\n\t}",
"public function handle()\n\t{\n\t\t$name = $this->argument('name');\n\t\t\n\t\t$this->info(\"Searching eve api for {$name}\");\n\t\t$result = Corporation::searchEVEAPI($name);\n\n\t\t$this->info(\"results\");\n\t\tforeach($result as $corp)\n\t\t{\n\t\t\tprint $corp->name . \" \" . $corp->id . \"\\r\\n\";\n\t\t}\n\t}",
"public function handle()\n {\n $user = $this->argument('user');\n $this->info('Display this on the screen, user ' . $user);\n return 0;\n }",
"public function handle()\n {\n $this->userVectors->test($this->option('force'));\n }",
"public function handle()\n {\n $mapping = $this->formatMappingName((string)$this->argument('mapping'));\n \n $model = $this->option('model') ? $this->formatModelName($this->option('model')) : null;\n \n $this->filesystem->put(\n $this->buildMappingFilePath($mapping),\n $this->buildMapping(\n $this->getDefaultStub(),\n $mapping,\n $model\n )\n );\n \n $this->composer->dumpAutoloads();\n }",
"public function handle()\n {\n switch ($this->argument('type')) {\n case 'dns':\n $this->dnscheck->run($this->option('dry-run') ? true : false, $this->argument('domain'));\n break;\n case 'whois':\n $this->whoischeck->run($this->option('dry-run') ? true : false, $this->argument('domain'));\n break;\n }\n }",
"public function handle()\n {\n $option = $this->argument('option');\n\n if (! in_array($option, ['expired', 'all'])) {\n return $this->error('Invalid option supplied to command...');\n }\n\n $this->comment('Beginning pruning process...');\n\n $this->comment($this->pruneDatabase($option) . ' deleted from database...');\n\n $this->comment($this->pruneFiles($option) . ' deleted from files...');\n\n $this->info('Nonces pruned successfully!');\n }",
"public function handle()\n {\n $subscriptionUpdateService = new SubscriptionUpdateService();\n $subscriptionUpdateService->runUpdates();\n }",
"public function handle()\n\t{\n\t\t\n\t\t$source_directory = $this->argument( 'source_directory' );\n\t\t$target_directory = $this->argument( 'target_directory' );\n\t\t$template = (string) $this->option( 'template' );\n\n\t\t$statik = new \\App\\Statik\\Statik;\n\n\t\t$statik->generateHTMLFiles( $this, $source_directory, $target_directory, $template ) && $this->info( \"\\e[1;32mDONE!\" );\n\n\t}",
"public function handle()\n {\n if (!$this->argument('file')) {\n $this->info('Please specify file to call.');\n }\n\n $file = $this->argument('file');\n\n if (!$this->fileHandler->exists($file)) {\n $this->info('Wrong path or file not exist.');\n }\n\n $this->executeFile($file);\n }",
"public function handle()\n {\n $user = $this->argument('user');\n $this->scanner->setUserName($user);\n $this->scanner->scanUser();\n }",
"public function handle()\n {\n if ($this->argument('user')) {\n $userId = $this->argument('user');\n\n $this->info(\"Liquidate affiliate commission for user \" . $userId);\n\n $user = $this->userService->findById($userId);\n\n if ($user) {\n $this->walletService->liquidateUserBalance($user);\n } else {\n $this->error(\"User not found\");\n }\n\n $this->info(\"Done\");\n } else {\n $this->info(\"Liquidate all commissions\");\n\n $this->walletService->liquidateAllUsersBalance();\n\n $this->info(\"Done\");\n }\n }",
"public function handle()\n {\n $action = $this->choice('what action do you have on mind', [\n 'add-relation', 'remove-columns', 'column-type', 'rename-column'\n ]);\n switch ($action) {\n case 'add-relation':\n $this->addRelation();\n break;\n\n case 'remove-columns':\n $this->removeColumns();\n break;\n case 'column-type':\n $this->columnType();\n break;\n case 'rename-column':\n $this->renameColumn();\n break;\n default:\n $this->error('Unsupported action requested...');\n }\n $this->info('Command executed successfully');\n }",
"public function handle()\n {\n $arguments = $this->arguments();\n $storageDir = $arguments['storageDir'];\n $localStorageDir = $arguments['localStorageDir'];\n $url = $arguments['url'];\n $cmd = sprintf(\"./app/Console/Commands/ShellScripts/screen_shot.sh %s %s %s\", $storageDir, $localStorageDir, $url);\n\n while (true) {\n $result = shell_exec($cmd);\n print_r($result);\n sleep(3);\n }\n }",
"public function handle()\n {\n $city = $this->argument('city');\n\n $weatherService = new CurrentWeatherService();\n try {\n $weather = $weatherService->getByCity($city);\n } catch (WeatherException $e) {\n $this->error($e->getMessage());\n return;\n }\n\n $this->info('Weather for city '.$city);\n dump($weather->toArray());\n }",
"public function handle()\n {\n $this->getModels($this->argument('model'));\n $this->getLanguages($this->argument('locale'));\n $this->createMultiLanguageRecords();\n }",
"public function handle()\n {\n $this->processOptions();\n\n echo json_encode( $this->dateTimeRange ) . \"\\n\";\n\n $this->dispatch( new ProcessNewActionsJob(\n $this->dateTimeRange ,\n str_random( 16 ),\n $this->option('runtime-threshold')\n ) );\n }",
"public function handle()\n {\n $fightId = $this->argument('fight_id');\n $metricId = $this->argument('metric_id');\n //$strategyName = 'App\\\\'.$this->argument('metric_name');\n\n $metric = BossMetric::find($metricId);\n if ($metric === null) {\n $this->error(\"Error: no metric with id: $metricId found!\");\n return;\n }\n\n $fight = Fight::find($fightId);\n\n if ($fight === null) {\n $this->error(\"Error: no fight with id: $fightId found!\");\n return;\n }\n\n $strategy = $metric->getStrategy();\n $strategy->setFight($fight);\n $strategy->run();\n }",
"public function handle()\n {\n\t\t$this->call('vendor:publish');\n\t\t$this->call('migrate');\n\t\t$this->call('db:seed');\n\t\t$this->call('factotum:storage');\n\t\t$this->call('factotum:storage');\n }",
"public function handle()\n {\n $user_id = $this->argument('user') ?? null;\n\n if (is_null($user_id)) {\n $users = User::all();\n\n foreach ($users as $user) {\n $this->showUserBalance($user);\n }\n } else {\n $user = User::find($user_id);\n\n $this->showUserBalance($user);\n }\n }",
"public function handle()\n {\n $this->capsuleService->getAll();\n $this->line('Command Worked');\n }",
"public function handle()\n {\n $platform_wechat_id = $this->argument('id');\n $customer_id = $this->argument('customer_id');\n $this->info(\"Starting at \".date('Y-m-d H:i:s').\". Running initial for 【{$this->signature}】\");\n $this->getUserInfoList($platform_wechat_id,$customer_id);\n $this->info(\"End at \".date('Y-m-d H:i:s').\". over for 【{$this->signature}】\");\n }",
"public function handle()\n {\n $this->publishAssets();\n $this->call('twill:flush-manifest');\n $this->call('view:clear');\n }",
"public function handle()\n {\n \n $argument = $this->argument('data');\n \n $this->prepare( $argument );\n \n $this->make();\n \n $this->info( 'migration has been created : '. $this->fileName );\n \n }",
"public function handle()\n {\n chdir(resource_path('assets/ts'));\n $path = $this->argument(\"path\");\n if(isset($path))\n {\n Logger::info('execute '.$path);\n Command::executeRaw('tsc', [\"-p\", $path]);\n }else\n Logger::info('execute tsc');\n Command::executeRaw('tsc');\n }",
"public function handle()\n {\n $this->info('Starting date change command.');\n\n Word::where('language_id', 1)->update(array('created_at' => '1970-01-01 00:00:01'));\n Word::where('language_id', 2)->update(array('created_at' => '1970-01-01 00:00:01'));\n\n $this->info('Dates have been changed to 1970-01-01 00:00:01');\n }",
"public function handle()\n {\n $this->info($this->slugger->encode($this->argument('id')));\n }",
"public function handle()\n {\n $this->line(static::$logo);\n $this->line('Neat admin current version:' . Neat::version());\n\n $this->comment('');\n $this->comment('Available commands:');\n\n $this->listAvailableCommands();\n }",
"public function handle()\n {\n $this->revisions->updateListFiles();\n }",
"public function handle(): void\n {\n // Set argument\n $this->url = $this->argument(self::URL_ARGUMENT);\n\n // Handler takes care of computation\n (new CommandHandler($this))->compute();\n }",
"public function handle()\n {\n try\n {\n $filename = $this->argument('filename');\n Excel::import(new ObjectsImport, $filename);\n\n $this->info('Data import is now completed');\n }\n catch(Exception $ex)\n {\n $this->error($ex->getMessage());\n }\n }",
"public function handle() {\n $entity = $this->validateEntity($this->argument('entity'));\n $job = new DataProcessingJob($entity, str_random(16));\n $this->dispatch($job);\n }",
"public function handle()\n {\n $isProductionMode = 'prod' == $this->argument('mode');\n\n if ($isProductionMode) {\n if (!$this->confirm('Are you sure to run in production mode? Running this command may cause critical issues?')) {\n exit(1);\n }\n }\n\n $this->_recalculate($isProductionMode);\n }",
"public function handle()\n {\n if(!$this->verify()) {\n $rank = $this->createRankSuperAdmin();\n $user = $this->createUserSuperAdmin();\n $user->Ranks()->attach($rank);\n $this->line('Felicitaciones');\n } else {\n $this->error('No se puede ejecutar');\n }\n }",
"public function handle()\n {\n // Get CLI Input\n $user_id = $this->option(\"uid\");\n\n // User Products\n ( new CommandManager() )->showUserProducts( $user_id );\n }",
"public function handle()\n {\n $force = $this->option('force');\n\n if($this->option('without-bulk')){\n $this->withoutBulk = true;\n }\n\n if ($this->generateClass($force)){\n $this->info('Generating permissions for '.$this->modelBaseName.' finished');\n }\n }",
"public function handle()\n {\n $tournaments = Tournament::all()->toArray();\n foreach ($tournaments as $tournament) {\n $slug = $this->tournamentRepoObj->generateSlug($tournament['name'].Carbon::createFromFormat('d/m/Y', $tournament['start_date'])->year,'');\n DB::table('tournaments')\n ->where('id', $tournament['id'])\n ->update([\n 'slug' => $slug\n ]);\n }\n $this->info('Script executed.');\n }",
"public function handle()\n {\n $userId = $this->argument('user');\n\n /** @var User $user */\n $user = User::findOrFail($userId);\n\n // Get token.\n $info = (new Client())->auth();\n\n // Save to db.\n $user->access_token = $info['access_token'];\n $user->access_secret = $info['access_secret'];\n $user->save();\n\n $this->line(\"Saved access token and secret for user: {$user->email}\");\n }",
"public function handle()\n {\n $m = new MemberFromText;\n $m->train();\n $id = $m->predict($this->argument('text'));\n dump(Miembro::find($id)->toArray());\n }",
"public function handle()\n {\n $this->generator\n ->setConsole($this)\n ->run();\n }",
"public function handle()\n {\n $this->createController();\n $this->createServiceDir();\n\n exit;\n $args = [\n '--provider' => TestProvider::class\n ];\n $className = $this->argument('className');\n if (!$className) {\n $className = 'MethodsList';\n }\n $className = ucwords($className);\n $this->call('vendor:publish', $args);\n $this->info('Display this on the screen ' . $className);\n }",
"public function handle()\n {\n $this->createDirectories();\n\n $this->publishTests();\n\n $this->info('Authentication tests generated successfully.');\n }",
"public function handle()\n {\n $this->setDbConnection(\n $this->input->getOption('database') ?: config('ghost-database.default_connection')\n );\n\n $native = $this->input->getOption('native-import') ?: config('ghost-database.use_native_importer');\n\n $snapshot = $this->import($native);\n\n $this->info(\"Snapshot `{$snapshot->name}` loaded!\");\n }",
"public function handle()\n {\n $exec = $this->argument('exec');\n\n switch ($exec) {\n case 'download' :\n $this->download();\n break;\n\n case 'generate' :\n $this->generate();\n break;\n\n default :\n echo \"Choose 'download' or 'generate' for this command\";\n break;\n }\n }",
"public function handle()\n {\n $this->call('ziggy:generate', ['path' => './resources/js/ziggy-admin.js', '--group' => 'admin']);\n $this->call('ziggy:generate', ['path' => './resources/js/ziggy-frontend.js', '--group' => 'frontend']);\n $this->call(TranslationsGenerateCommand::class);\n }",
"public function handle()\n {\n $tenantName = $this->argument('tenant');\n\n $tenant = Tenant::where('name', $tenantName)->orWhere('subdomain', $tenantName)->first();\n\n if ($tenant) {\n $tenant->setActive();\n \\Artisan::call('tinker');\n } else {\n $this->error('Error: Tenant not found');\n }\n }",
"public function handle()\n {\n try {\n if (!empty($userId = $this->argument('user'))) {\n $user = User::find($userId);\n } else {\n $user = User::inRandomOrder()->first();\n }\n\n if (empty($user)) {\n throw new \\Exception('User not found');\n }\n\n echo JWTAuth::fromUser($user);\n } catch (\\Exception $e) {\n echo $e->getMessage();\n }\n\n }",
"public function handle()\n {\n $this->fetchAndSetToken();\n $imagesToDownload = $this->peekImages(WatchedApp::pluck('package_name'));\n $this->fetchImages($imagesToDownload);\n\n if ($this->option('dont-optimize')) {\n return;\n }\n\n $this->runOptimizeCommand();\n }",
"public function handle()\n {\n $this->setCryptIVFromUrl($this->argument('url'));\n\n $participant = URLParser::parseByName('santa.index', $this->argument('url'))->participant;\n if($participant) {\n $draw = $participant->draw;\n } else {\n $draw = URLParser::parseByName('organizer.index', $this->argument('url'))->draw;\n }\n\n $this->table(\n ['ID', 'Name', 'Email'],\n $draw->participants()->get(['id', 'name', 'email'])->toArray()\n );\n }",
"public function handle()\n {\n // if you are on the local environment\n if (!(app()->isLocal() || app()->runningUnitTests())) {\n $this->error('This command is only available on the local environment.');\n return;\n }\n\n $fqdn = $this->argument('fqdn');\n if ($tenant = Tenant::retrieveBy($fqdn)){\n $tenant->delete($fqdn);\n $this->info(\"Tenant {$fqdn} successfully deleted.\");\n }else {\n $this->error('This fqdn doesn\\'t exist.');\n }\n\n }",
"public function handle()\n {\n $user_from = $this->option('from');\n $user_to = $this->option('to');\n $sum = $this->option('sum');\n\n CreateTransaction::dispatch($this->usersRepository->getByID($user_from), $this->usersRepository->getByID($user_to), $sum, true);\n $this->transactionsRepository->getAll()->each(function ($transaction){\n \tExecuteTransaction::dispatch($transaction);\n });\n }",
"public function handle()\n {\n $this->warn('Starting Retrieve Data');\n\n PeopleService::retrieveData();\n\n $this->info('Retrieve Data Completed');\n }",
"public function handle()\n {\n \n $period = $this->option('period');\n \n switch ($period) {\n\n case 'half_month':\n $this->info('Grabing Half Month Income...');\n $this->halfMonth();\n break;\n\n case 'monthly':\n $this->info('Grabing Monthly Income...');\n $this->monthly();\n break;\n \n default:\n $this->info('Grabing Daily Income...');\n $this->daily();\n break;\n\n }\n\n \n }",
"public function handle()\n {\n $countryFiles = $this->getFiles();\n\n foreach ($countryFiles as $fileName) {\n $this->seed($fileName);\n }\n\n $this->info('End.');\n }",
"public function fire()\n {\n $entityName = $this->argument('entityName');\n $startEntityId = $this->argument('startEntityId');\n $endEntityId = $this->argument('endEntityId');\n $depth = $this->argument('depth');\n\n $this->fixturePath = $this->option('outputPath');\n\n $this->info(\"Generating fixtures for $entityName in {$this->fixturePath}...\");\n \n $this->generateFixtures($entityName, $startEntityId, $endEntityId, $depth);\n }",
"public function handle()\n {\n $check = PublishTraitsService::publishTraits();\n\n if ($check)\n {\n $this->info('All files have been published');\n }\n\n $this->info('Failed to publish');\n }",
"public function handle()\n {\n $user = User::where('username', $this->argument('user'))\n ->orWhere('email', $this->argument('user'))\n ->first();\n\n if ($user != null) {\n $user->assign('admin');\n $this->line(\"{$user->email} was successfully made an admin.\");\n } else {\n $this->line(\"No user found where username or email is '{$this->argument('user')}'\");\n }\n }",
"public function handle()\n {\n event( 'laraview:compile' );\n $this->checkForSelectedViewGeneration();\n\n app( RegisterBlueprint::class )\n ->console( $this )\n ->generate();\n }",
"public function handle()\n {\n $project = Project::with(['team.admins', 'team.members'])->findOrFail($this->option('project-id'));\n $user = User::findOrFail($this->option('user-id'));\n if ($this->option('admin')) {\n $project->team->admins()->syncWithoutDetaching($user);\n } else {\n $project->team->members()->syncWithoutDetaching($user);\n }\n return Command::SUCCESS;\n }",
"public function handle() {\n try {\n $this->roomService->loadRoomOccupations();\n Log::notice('untis:occupations executed successfully.');\n $this->line('Loaded room occupations from WebUntis.');\n } catch (Exception $e) {\n Log::error('Error loading room occupations.', ['exception' => $e]);\n $this->error('Error loading room occupations: ' . $e->getMessage());\n }\n }",
"public function handle()\n {\n $this->loadIxList();\n $this->loadIxMembersList();\n $this->updateIxInfo();\n $this->updateIxMembersInfo();\n }",
"public function handle()\n {\n $this->call('vendor:publish', [\n '--provider' => \"Qoraiche\\MailEclipse\\MailEclipseServiceProvider\",\n ]);\n }",
"public function handle()\n\t{\n\t\tif ($this->option('dev')) {\n\t\t\tsystem('php '.base_path('.deploy/deploy-dev.php'));\n\t\t} else {\n\t\t\tsystem('php '.base_path('.deploy/deploy.php'));\n\t\t}\n\t}",
"public function handle(Command $command);",
"public function handle(Command $command);",
"public function handle()\n {\n $date_from = $this->argument('date_from');\n\t\t$date_to = $this->argument('date_to');\n\t\tif(!$date_from) {\n\t\t\t$date_from = Carbon::today()->subDays(5);\n\t\t}\n\t\tif(!$date_to) {\n\t\t\t$date_to = Carbon::yesterday();\n\t\t}\n\t\tStats::computeMembers($this->argument('venue_id'), $date_from, $date_to);\n }",
"public function handle()\n {\n switch ($this->argument('type')){\n case 'fih':\n $scrapper = new Scrappers\\FederationScrapper();\n $scrapper->get($this->option('level'));\n print $scrapper->message();\n break;\n }\n }",
"public function handle()\n {\n Log::info(\"seed:dash Command is working fine!\");\n $this->info('Dashboard Database seeding completed successfully.');\n }",
"public function handle()\n {\n $originalId = $this->argument('original_id');\n\n $status = true;\n if ($this->option('status') === 'false') {\n $status = false;\n }\n\n if ($video = Video::where('original_id', $originalId)->first()) {\n $video->dmca_claim = $status;\n $video->save();\n\n $this->info('Video\\'s dmca_claim set to: ' . json_encode($status));\n return ;\n }\n\n $this->error('No video found with original_id of: ' . $originalId);\n return;\n }",
"public function handle()\n {\n $this->call('config:clear');\n\n $this->call('config:update');\n\n $this->info('Configuration cached successfully!');\n }",
"public function handle()\n {\n //\n $modelName = $this->argument('model');\n $column = $this->argument('column');\n $this->generateMutation($modelName, $column);\n\n }",
"public function handle()\n {\n $filePath = 'public/' . $this->argument('fileName');\n $count = $this->argument('count');\n \n $fileData = array_slice(file($filePath), 0, $count);\n $this->info(implode('', $fileData));\n }",
"public function handle()\n {\n $email = $this->argument('email');\n\n Mail::to($email)->send(new SendMailable('Test Mail'));\n\n if (Mail::failures()) {\n $this->info('Email failed to send');\n } else {\n $this->info('Email successfully sent');\n }\n }",
"public function handle()\n {\n $this->call('route:trans:clear');\n\n $this->cacheRoutesPerLocale();\n\n $this->info('Routes cached successfully for all locales!');\n }",
"public function handle()\n {\n $this->info('Welcome to command for Bantenprov\\WilayahIndonesia package');\n }",
"public function handle()\n {\n if($this->hasOption('no_dump') && $this->option('no_dump')){\n $this->composer_dump = false;\n }\n $this->readyDatas();\n $this->datas['startSymbol']='{{';\n $this->datas['endSymbol']='}}';\n $this->create();\n }",
"public function handle()\n {\n $repository = new OglasiCrawlerRepository();\n $ads = $repository->getAds();\n $repository->saveAds($ads);\n\n echo 'Ads were successfully retrieved' . PHP_EOL;\n }",
"public function handle()\n {\n $this->makeDir($this->basePath . $this->kebabPlural());\n\n $this->exportViews();\n\n $this->info('Resource views generated successfully.');\n }",
"public function handle()\n {\n $movies = \\App\\Models\\Movie::whereNull('meta')->take(40)->orderBy('id')->get();\n $movies->each(function($movie){ sleep(1); $movie->getMeta(); });\n return Command::SUCCESS;\n }",
"public function handle()\n {\n $this->packageGenerator->setConsole($this)\n ->setPackage($this->argument('package'))\n ->setType('shipping')\n ->setForce($this->option('force'))\n ->generate();\n }",
"public function handle()\n {\n $test = $this->argument('test');\n\n $dir = config('speed-test.dir');\n\n $className = ucfirst(\\Str::camel($test));\n\n $namespace = config('speed-test.namespace');\n\n $class = class_entity($className)\n ->namespace($namespace);\n\n $class->method('speed1')\n ->line($this->option('line'))->doc(function ($doc) use ($className) {\n /** @var DocumentorEntity $doc */\n $doc->tagCustom('times', $this->option('times'));\n $doc->description($this->option('description') ?: \"{$className} Speed 1\");\n });\n\n if (! is_dir($dir)) {\n mkdir($dir, 0777, 1);\n }\n\n file_put_contents(\n $dir.'/'.$className.'.php',\n $class->wrap('php')\n );\n\n $this->info('Speed created!');\n\n return 0;\n }",
"public function handle()\n {\n $message = $this->GenerateRandomUser($this->argument('count'));\n $this->info($message);\n }",
"public function handle()\n {\n $host = Cache::get('executingHost', null);\n $this->info(\"Host: ${host}\");\n\n if ($host === null) {\n $this->info('実行するホストが選択されていません');\n return;\n }\n\n if (Schema::hasTable('companies') && Company::count() !== 0) {\n $this->info('マイグレーションが既に1回以上実行されています');\n return;\n }\n\n $should_execute = $host === $this->argument('executingHost');\n\n if ($should_execute) {\n Artisan::call('migrate:fresh', ['--seed' => true]);\n $this->info('マイグレーションが完了しました');\n\n Cache::forget('executingHost');\n } else {\n $this->info('別ホストにてマイグレーションが行われます');\n }\n }",
"public function handle()\n {\n // Configuration...\n $this->callSilent('vendor:publish', ['--tag' => 'model-login-config']);\n\n // Migrations\n $this->callSilent('vendor:publish', ['--tag' => 'model-login-migrations']);\n\n $this->info('Model Login resources published.');\n }",
"public function handle()\n {\n if ($this->validation()) {\n $money = $this->argument('money');\n Cache::increment('amount', $money);\n }\n }",
"public function handle()\n {\n $this->info('Publishing stuff..');\n\n $this->publishFiles();\n\n $this->info('Setup complete. Enjoy!');\n }",
"public function handle()\n {\n $this->publishConfig();\n $this->publishClassStub();\n $this->generateAndStoreKey();\n\n $this->info('Use the details below for your \"Lead delivery options\" in Google Ads.');\n $this->info('Webhook URL: ' . route('GoogleAdsLeadExtensionController@index'));\n $this->info('Key: ' . $this->generated_key);\n }",
"public function handle()\n {\n $opts = $this->options();\n $args = $this->arguments();\n #print_r($opts);\n #print_r($args);\n\n # Redundant as argument validation handled by Laravel\n #\n if (!isset($args['destination'])) {\n printf(\"Usage: php artisan %s\\n\", $this->signature);\n exit(1);\n }\n\n # Default to normal message type\n #\n if (!isset($opts['type'])) {\n $opts['type'] = 'normal';\n }\n\n $uac = new UserApiController();\n\n if ($opts['type'] == 'normal') {\n if (!isset($opts['message'])) {\n printf(\"Usage: php artisan %s\\n\\n\", $this->signature);\n printf(\"ERROR: Message must be specified for type 'normal'\\n\");\n exit(1);\n }\n $result = $uac->sendSms(\n $args['destination'],\n $opts['message'],\n $opts['route']\n );\n }\n else if ($opts['type'] == 'otp') {\n $result = $uac->sendVerificationSms(\n $args['destination'],\n '<code>',\n '<name>',\n $opts['route'],\n '<appName>'\n );\n }\n\n if ($result === true) {\n printf(\"INFO: SMS message to %s sent successfully (%s)\\n\",\n $args['destination'], $opts['type']);\n }\n else {\n printf(\"INFO: SMS message to %s failed to send (%s)\\n\", \n $args['destination'], $opts['type']);\n printf(\"ERROR: %s\\n\", $result);\n }\n\n return;\n }"
] | [
"0.6469962",
"0.6463639",
"0.64271367",
"0.635053",
"0.63190264",
"0.62747604",
"0.6261977",
"0.6261908",
"0.6235821",
"0.62248456",
"0.62217945",
"0.6214421",
"0.6193356",
"0.61916095",
"0.6183878",
"0.6177804",
"0.61763877",
"0.6172579",
"0.61497146",
"0.6148907",
"0.61484164",
"0.6146793",
"0.6139144",
"0.61347336",
"0.6131662",
"0.61164206",
"0.61144686",
"0.61109483",
"0.61082935",
"0.6105106",
"0.6103338",
"0.6102162",
"0.61020017",
"0.60962653",
"0.6095482",
"0.6091584",
"0.60885274",
"0.6083864",
"0.6082142",
"0.6077832",
"0.60766655",
"0.607472",
"0.60739267",
"0.607275",
"0.60699606",
"0.6069931",
"0.6068753",
"0.6067665",
"0.6061175",
"0.60599935",
"0.6059836",
"0.605693",
"0.60499364",
"0.60418284",
"0.6039709",
"0.6031963",
"0.6031549",
"0.6027515",
"0.60255647",
"0.60208166",
"0.6018581",
"0.60179937",
"0.6014668",
"0.60145515",
"0.60141796",
"0.6011772",
"0.6008498",
"0.6007883",
"0.60072047",
"0.6006732",
"0.60039204",
"0.6001778",
"0.6000803",
"0.59996396",
"0.5999325",
"0.5992452",
"0.5987503",
"0.5987503",
"0.5987477",
"0.5986996",
"0.59853584",
"0.5983282",
"0.59804505",
"0.5976757",
"0.5976542",
"0.5973796",
"0.5969228",
"0.5968169",
"0.59655035",
"0.59642595",
"0.59635514",
"0.59619296",
"0.5960217",
"0.5955025",
"0.5954439",
"0.59528315",
"0.59513766",
"0.5947869",
"0.59456027",
"0.5945575",
"0.5945031"
] | 0.0 | -1 |
Renders the element. Any object that has a representation in the xml must implement this method | public abstract function render($update = false); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"final public function render() {\n\t\treturn $this->_view->getBaseView()->element($this->_name, $this->_data, $this->_options);\n\t}",
"protected function renderAsXML() {}",
"public function renderElement($element);",
"public function render()\n {\n echo $this->__toString();\n\n }",
"protected function renderElement() {\n $result = \"\";\n $result .= $this->getOpeningTag();\n $result .= (!empty($this->options['content'])) ? $this->options['content'] : \"\";\n $result .= $this->getClosingTag();\n return $result;\n }",
"public function RenderElement() {\n\n // prepare most important attributes\n $Attr= $this->BuildAttributes(array('type'=>'checkbox'));\n // prepare attribute \"value\", remember - this is not value of [$Value, $InitValue]\n $Attr['value']= $this->GetOption('Value');\n // prepare attribute \"checked\"\n $Attr['checked']= $this->IsChecked() ? 'checked' : '';\n // render tag\n return $this->Form->RenderTag('input', $Attr, false);\n }",
"public function render()\n {\n return $this->xmlDocument->saveHTML();\n }",
"public function render()\n {\n \n }",
"public function render() {\n if ($this->shouldRender) {\n $this->rendered = true;\n\n return $this->renderElement();\n }\n\n return \"\";\n }",
"public function render() {\n echo $this->getHtml();\n }",
"public function render() {\r\n\t\t\r\n\t}",
"public function render ()\r\n\t{\r\n\t\t$this->decorate(); // decorate bofore render\r\n\t\treturn parent::render();\r\n\t}",
"public function render( ){\n\t\treturn $this->__childWidget->render();\n\t}",
"function Render() {\n $this->RenderChildren();\n }",
"function render ()\n {\n parent::render();\n }",
"public function render(Varien_Data_Form_Element_Abstract $element){\n return $this->toHtml();\n }",
"protected function render()\n {\n }",
"protected function render()\n {\n }",
"protected function render()\n {\n }",
"protected function render()\n {\n }",
"protected function render( Nano_Element $element ) {\n $wrapper = $element->getWrapper();\n $type = $element->getType();\n $className = $element->getAttribute('class');\n $label = $element->getLabel();\n\n\n if ( null == ( $id = $element->getAttribute('id') ) ) {//generate unique id\n $count = $this->getElementCount();\n\n $eType = ( $eType = $element->getAttribute('type') ) ? $eType : $type;\n\n $element->setAttribute( 'id', sprintf('%s-element-%d', $eType, $count) );\n }\n\n if ( empty( $className ) ) {//generate auto classnames\n $className = $element->getClassName();\n }\n\n $content = $this->renderElement( $element );\n\n if ( null !== $label ) {//generate label around element\n $labelElement = new Nano_Element( 'label', array(\n 'for' => $element->getAttribute('id'),\n 'class' => \"label-\" . $element->getAttribute('type')\n ));\n\n $labelElement->setVertile();\n\n // checkbuttons and radios have a label on the right. saves gazillions of css.\n if ( in_array( $element->getAttribute('type'), array( 'checkbox', 'radio' ) ) ) {\n $content = $content . $this->renderElement( $labelElement->addContent( $label ) );\n }\n else {\n $content = $this->renderElement( $labelElement->addContent( $label ) ) . $content;\n }\n\n }\n\n if ( $type !== 'hidden' && !empty($wrapper) ) {\n $content = $this->renderElement( $wrapper->addContent( $content ) );\n }\n\n return sprintf( \"%s%s%s\", $element->getPrefix(), $content, $element->getSuffix() );\n }",
"public function render(){\n\t\t\n\t}",
"public function render()\n {\n return $this->getRenderer()->render($this);\n }",
"public function Render()\n {\n return \"<span class='\".$this->Icone.\"' title='\".$this->Title.\"' onclick=\".$this->OnClick.\" > </span>\";\n }",
"public function render()\n {\n echo htmlspecialcharsbx($this->getPrefix());\n $action = $this->getAction();\n $id = $this->getId();\n $class = $this->getClass();\n $name = $this->getName();\n $dataAttributes = $this->getDataAttributes();\n $dataAttributesString = '';\n foreach ($dataAttributes as $key => $value) {\n $dataAttributesString .= ' data-' . $key . '=\"' . $value . '\" ';\n }\n\n $formArguments = 'action=\"' . (($action !== null) ? $action : '#') . '\" ';\n $formArguments .= ($id !== null) ? 'id=\"' . $id . '\" ' : '';\n $formArguments .= !empty($class) ? 'class=\"' . implode(' ', $class) . '\" ' : '';\n $formArguments .= ($name !== null) ? 'name=\"' . $name . '\" ' : '';\n $formArguments .= $dataAttributesString;\n echo '<form ' . $formArguments . '>';\n\n $fields = $this->getFields();\n foreach ($fields as $key => $field) {\n $field->render();\n }\n\n echo '</form>';\n\n echo htmlspecialcharsbx($this->getPostfix());\n }",
"public function render()\r\n\t{\r\n\t\t$content = \"\";\r\n\t\t\r\n\t\tif (!empty($this->id)) \r\n\t\t{\r\n\t\t\t$content .= \"id='\" . $this->id . \"' \";\r\n\t\t}\r\n\t\t\r\n\t\tif (!empty($this->name)) \r\n\t\t{\r\n\t\t\t$content .= \"name='\" . $this->name . \"' \";\r\n\t\t}\r\n\t\t\r\n\t\tif (!empty($this->className)) \r\n\t\t{\r\n\t\t\t$content .= \"class='\" . $this->className . \"' \";\r\n\t\t}\r\n\t\t\r\n\t\treturn $content;\r\n\t}",
"function render(){\n \t\treturn parent::render();\n \t}",
"public function render()\n {\n //\n }",
"public function render()\n {\n }",
"public function render()\n {\n }",
"public function render()\n {\n }",
"public function render()\n {\n }",
"public function toHtml() {\n\t\techo '<em '.$this->getAttributes().'>'.$this->renderChildren().'</em>';\n\t}",
"public function Render()\n {\n }",
"protected function render() {}",
"public abstract function render();",
"public abstract function render();",
"protected function render() {}",
"protected function render() {}",
"final public function render()\n {\n echo $this->generateMarkup($this->sanitizeData());\n }",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"abstract public function render();",
"abstract public function render();",
"abstract public function render();",
"abstract public function render();",
"abstract public function render();",
"abstract public function render();",
"protected function _render()\n {\n }",
"public function render(\\Magento\\Framework\\Data\\Form\\Element\\AbstractElement $element) {\n $this->setElement($element);\n\n return $this->toHtml();\n }",
"public function render()\n {\n return $this->renderChildren();\n }"
] | [
"0.7418219",
"0.71450174",
"0.71097714",
"0.69655263",
"0.6818093",
"0.67897344",
"0.6785725",
"0.6687651",
"0.6677221",
"0.66598",
"0.65582013",
"0.6556647",
"0.65388876",
"0.6536395",
"0.65360904",
"0.6518333",
"0.64979327",
"0.6497313",
"0.6497313",
"0.64969194",
"0.64939564",
"0.6459265",
"0.6455493",
"0.6437613",
"0.64333993",
"0.64257395",
"0.6391918",
"0.6378613",
"0.6377919",
"0.6377919",
"0.6377919",
"0.6377919",
"0.63674754",
"0.6347474",
"0.63300097",
"0.63294065",
"0.63294065",
"0.6328869",
"0.6328869",
"0.6325426",
"0.63208026",
"0.63208026",
"0.63208026",
"0.63208026",
"0.63208026",
"0.63208026",
"0.63208026",
"0.63208026",
"0.63208026",
"0.63208026",
"0.63208026",
"0.63208026",
"0.63208026",
"0.63208026",
"0.63208026",
"0.63208026",
"0.63208026",
"0.63208026",
"0.63208026",
"0.63208026",
"0.63208026",
"0.63208026",
"0.63208026",
"0.63208026",
"0.63208026",
"0.63208026",
"0.63208026",
"0.63208026",
"0.63208026",
"0.63208026",
"0.63208026",
"0.63208026",
"0.63208026",
"0.63208026",
"0.63208026",
"0.6320603",
"0.6320603",
"0.6320603",
"0.6320603",
"0.6320603",
"0.6320603",
"0.6320603",
"0.6320603",
"0.6320603",
"0.6320603",
"0.6320603",
"0.6320603",
"0.6320603",
"0.6320603",
"0.6320603",
"0.6320603",
"0.6320603",
"0.6311674",
"0.6311674",
"0.6311674",
"0.6311674",
"0.6311674",
"0.6311674",
"0.6309802",
"0.629199",
"0.62720764"
] | 0.0 | -1 |
Gets the index of a child. | public function getChildIndex(Registry $c) {
return array_search($c, $this->children, true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function index() {\r\n\t\tif ($parent = $this->getParent()) {\r\n\t\t\treturn array_search($this, $parent->children);\r\n\t\t}\r\n\t\treturn -1;\r\n\t}",
"public function index($child)\n {\n $result = -1;\n if (!empty($this->nodes)) {\n if (is_object($child)) {\n $i = array_search($child, $this->nodes, true);\n if ($i !== false) {\n $result = $i;\n }\n } elseif (is_int($child) || (is_string($child) && is_numeric($child)) || is_float($child)) {\n $child = (int) $child;\n if ($child >= 0 && $child <= count($this->nodes)) {\n $result = $child;\n }\n }\n }\n\n return $result;\n }",
"public static function getIndex(): int\n {\n return static::$index;\n }",
"public function getChildId(): int {\n return $this->child_id;\n }",
"public function key(): int\n {\n return $this->_index;\n }",
"public function key(): int\n {\n return $this->index;\n }",
"public function getIdx()\n {\n return $this->get(self::_IDX);\n }",
"public function getChildrenRelationIndex();",
"function _findChild (&$child) {\r\n if (!is_object ($child)) {\r\n return false;\r\n }\r\n \r\n $ccount = count ($this->_children);\r\n for ($i = 0; $i < $ccount; $i++) {\r\n if ($this->_children[$i]->_id == $child->_id) {\r\n return $i;\r\n }\r\n }\r\n \r\n return false;\r\n }",
"public function getChildIndex(Element $element)\n {\n foreach ($this->children as $k => $child) {\n if ($child === $element) {\n return $k;\n }\n }\n\n return false;\n }",
"public function index(): int\n {\n return $this->index;\n }",
"public function key()\r\n {\r\n return key($this->children);\r\n }",
"public function key(): int\n {\n return $this->position;\n }",
"public function key(): int\n {\n return $this->position;\n }",
"public function key(): int\n {\n return $this->position;\n }",
"public function key()\n\t{\n\t\treturn $this->index;\n\t}",
"public function key()\n\t{\n\t\treturn $this->index;\n\t}",
"function key()\n\t{\n\t\treturn $this->index;\n\t}",
"public function key() {\n\t\t\treturn $this->index;\n\t\t}",
"private function _findChild(&$child)\n {\n if (! is_object($child)) {\n return false;\n }\n\n $ccount = count($this->_children);\n for ($i = 0; $i < $ccount; $i++) {\n if ($this->_children[$i]->_id == $child->_id) {\n return $i;\n }\n }\n\n return false;\n }",
"function getIndex() ;",
"public function position()\n {\n return $this->i;\n }",
"public function key(){\n return $this->index;\n }",
"abstract protected function getIndex();",
"public function getChildByIndex($index)\n {\n $index = intval($index);\n\n return ((null !== $this->children) && array_key_exists($index, $this->children)) ? $this->children[$index] : null;\n }",
"public function index ($selector = null) {\r\n\t\t\r\n\t\tif (!isset($selector)) {\r\n\t\t\t\r\n\t\t\tforeach ($this[0]->parentNode->childNodes as $index => $child) {\r\n\t\t\t\t\r\n\t\t\t\tif ($child->isSameNode($this[0])) return $index;\r\n\t\t\t}\r\n\t\t} elseif (is_object($selector) AND get_class($selector) === 'DOMElement') {\r\n\t\t\t\t\r\n\t\t\tforeach ($this->list as $index => $elt) {\r\n\t\t\t\tif ($selector->isSameNode($elt)) return $index;\r\n\t\t\t}\r\n\t\t} elseif (is_string($selector)) {\r\n\t\t\t\r\n\t\t\t$old_list = $this->list;\r\n\t\t\t\r\n\t\t\tforeach ($old_list as $index => $node) {\r\n\t\t\t\t\r\n\t\t\t\tif ($node->isSameNode($this->filter($selector)->first()->get(0))) return $index;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn -1;\r\n\t}",
"public function key ( ) {\n\n return key($this->_childs);\n }",
"public function indexInTag() {\n if ($this->_m_indexInTag !== null)\n return $this->_m_indexInTag;\n $this->_m_indexInTag = ($this->tag() - 32);\n return $this->_m_indexInTag;\n }",
"function find_index($parentid,$ar){\n\t\t$pos=array(); //tracks the positions of the child nodes\n\t\t$parent=$this->nodes[$parentid];\n\t\tforeach($parent->children as $id){\n\t\t\tif(array_key_exists($id,$ar)){\n\t\t\t\t$pos[]=array_search($id,array_keys($ar))+1;\n\t\t\t\t$pos[]=$this->find_index($id,$ar);\n\t\t\t}\n\t\t}\n\t\tif(count($pos)>0){\n\t\t\treturn max($pos);\n\t\t}else{\n\t\t\treturn array_search($parentid,array_keys($ar))+1;;\n\t\t}\n\t}",
"#[Pure] public function get_children_number(): int\n {\n return $this -> children -> size();\n }",
"public function child($index = 0)\r\n {\r\n if (is_null($index)) {\r\n return $this->childs; \r\n }\r\n if (array_key_exists($index, $this->childs)) {\r\n return $this->childs[$index];\r\n }\r\n return false;\r\n }",
"public static function getKeyIndex(): int\n {\n if (self::$keyIndex == PHP_INT_MAX) {\n self::$keyIndex = 0;\n } else {\n self::$keyIndex++;\n }\n\n return self::$keyIndex;\n }",
"public function getIndex(): ?int\n {\n return $this->index;\n }",
"public function key()\n\t{\n\t\treturn $this->__position;\n\t}",
"function key() {\r\n return $this->i >= 0 ? $this->i : NULL;\r\n }",
"public function index() {\n if ($this->_m_index !== null)\n return $this->_m_index;\n $this->_m_index = ($this->isIndexSeparate() ? $this->indexSeparate() : $this->indexInTag());\n return $this->_m_index;\n }",
"#[\\ReturnTypeWillChange]\n public final function offsetGet($index)\n {\n return $this->children[$index];\n }",
"public function getIndex() {\r\n\t\treturn $this->_index;\r\n\t}",
"public function at($index)\n {\n if (isset($this->_children[$index])) {\n return $this->_children[$index];\n }\n throw new OutOfBoundsException(\"Index $index does not exist\");\n }",
"public function key()\n\t{\n\t\treturn $this->_position;\n\t}",
"public function key()\n {\n return $this->_position;\n }",
"public function getNestedRightIndex();",
"public function thruIndex() {\n\t\treturn $this->thru > 0 ? $this->thru - 1 : 0;\n\t}",
"function key()\n {\n return $this->_position;\n }",
"function key()\n\t\t{\n\t\t\t$this->current();\n\t\t\treturn $this->offset;\n\t\t}",
"public function getPosition(): int\n {\n return $this->position;\n }",
"public function getPosition(): int\n {\n return $this->position;\n }",
"public function getOrdinalPosition()\n {\n return $this->ordinal_position;\n }",
"public function getIndex()\n\t\t{\n\t\t\treturn $this->_index;\n\t\t}",
"public function key() {\n\n\t\t\treturn $this->position;\n\t\t}",
"public function key()\n {\n return $this->position;\n }",
"public function key()\n {\n return $this->position;\n }",
"public function key()\n {\n return $this->position;\n }",
"public function key()\n {\n return $this->position;\n }",
"public function key()\n {\n return $this->position;\n }",
"public function key()\n {\n return $this->position;\n }",
"public function key()\n {\n return $this->position;\n }",
"public function key()\n {\n return $this->position;\n }",
"public function key()\n {\n return $this->position;\n }",
"public function key()\n {\n return $this->position;\n }",
"public function key()\n {\n return $this->position;\n }",
"public function key() {\r\n\t\treturn $this->position;\r\n\t}",
"public function key()\n {\n return $this->_currentIndex;\n }",
"public function key() {\n return $this->currentIndex;\n }",
"public function getNumber()\n {\n foreach ($this->getGame()->getLegs() as $idx=>$leg) {\n if ($leg == $this) {\n return $idx+1;\n }\n }\n\n return null;\n }",
"public function getSortIndex();",
"function key() {\r\n return $this->_position;\r\n }",
"public function key() {\n\t\treturn $this->position;\n\t}",
"public function key() {\n\t\treturn $this->position;\n\t}",
"public function key() {\n\t\treturn $this->position;\n\t}",
"public function getNestedLeftIndex();",
"public function key() {\n return $this->position;\n }",
"public function getChild($i) {\n if (array_key_exists ($i, $this->items) ) {\n return $this->items[$i];\n }\n }",
"public function key()\n {\n if(is_null($this->paginationVar))\n return 0;\n return $this->curIndex + $this->paginationVar->GetOffset();\n }",
"public function getIndex();",
"public function getIndex();",
"public function getIndex();",
"public function getPosition() : int\n {\n $rtn = $this->data['position'];\n\n return $rtn;\n }",
"public function key()\n {\n return $this->keys[$this->index];\n }",
"public function getIndex()\n {\n return isset($this->index) ? $this->index : null;\n }",
"public function key(): int\n {\n return $this->pointer;\n }",
"public function key() {\n return $this->keys[$this->index];\n }",
"public function getNumber(): int\n {\n return self::ROULETTE[$this->getPosition()];\n }",
"public function getNumberChildren();",
"public function tell()\n {\n return $this->index;\n }",
"public function key()\n {\n return $this->current;\n }",
"public function getIndex() {\r\n\t\t\treturn $this->index;\r\n\t\t}",
"protected function parentIndex($index)\n\t{\n\t\t$r = false;\n\t\t\n\t\tif($index > 1)\n\t\t{\n\t\t\t$r = floor($index / 2);\n\t\t}\n\t\telse if($index === 1)\n\t\t{\n\t\t\t$r = null;\n\t\t}\n\t\t\n\t\treturn $r;\n\t}",
"function key() \n {\n return $this->position;\n }",
"public function key()\n\t{\n\t\treturn $this->_keys[$this->_idx];\n\t}",
"public function key()\n {\n return $this->offset;\n }",
"public function getIndex() {\n\t\treturn $this->index;\n\t}",
"public function getIndex() {\n\t\treturn $this->index;\n\t}",
"public function getIndex() {\n\t\treturn $this->index;\n\t}",
"public function getIndex() {\n\t\treturn $this->index;\n\t}",
"public function key() {\n\t\t$this->checkResultSet();\n\n\t\tif (! is_null($this->keyColumn)) {\n\t\t\t$row = $this->fetchRowAssoc($this->index, true);\n\t\t\treturn $row[$this->keyColumn];\n\t\t}\n\n\t\treturn $this->index;\n\t}",
"public function key() : int\n {\n return $this->currentRecordPos - ($this->pageSize * ($this->currentPagePos-1));\n }",
"public function key()\n {\n return $this->current();\n }",
"public function key ()\n {\n return $this->offset;\n }",
"public function seekByChild($objChild) {\r\n \t$intReturn = 0;\r\n\t\t$intId = (is_object($objChild)) ? $objChild->getId() : $objChild;\r\n\r\n\t\t$intCount = 0;\r\n reset($this->collection);\r\n\t\tforeach ($this->collection as $object) {\r\n\t\t\tif ($object->getId() == $intId) {\r\n\t\t\t\t$intReturn = $intCount;\r\n\t\t\t}\r\n\r\n\t\t\t$intCount++;\r\n\t\t}\r\n\r\n\t\t$this->isSeek = TRUE;\r\n\r\n\t\treturn $intReturn;\r\n\t}"
] | [
"0.77300507",
"0.75683266",
"0.67777765",
"0.6673901",
"0.6651359",
"0.6643994",
"0.6629385",
"0.6584179",
"0.65440446",
"0.6462692",
"0.6440015",
"0.6287791",
"0.6276006",
"0.6276006",
"0.6276006",
"0.62728184",
"0.62728184",
"0.62348104",
"0.6164462",
"0.61626166",
"0.6126988",
"0.6114946",
"0.61087394",
"0.6006177",
"0.5995481",
"0.59590006",
"0.5946037",
"0.59291726",
"0.5883565",
"0.5877398",
"0.58491284",
"0.5842543",
"0.58371896",
"0.5826455",
"0.58097583",
"0.5803895",
"0.5802015",
"0.5786775",
"0.57822955",
"0.5753106",
"0.57439834",
"0.57209367",
"0.5702945",
"0.5693915",
"0.56760454",
"0.5674085",
"0.5674085",
"0.56674147",
"0.56577474",
"0.5649654",
"0.5649579",
"0.5649579",
"0.5649579",
"0.5649579",
"0.5649579",
"0.5649579",
"0.5649579",
"0.5649579",
"0.5649579",
"0.5649579",
"0.5649579",
"0.5648048",
"0.56441975",
"0.5643636",
"0.5641081",
"0.5638943",
"0.5637991",
"0.5630197",
"0.5630197",
"0.5630197",
"0.5605635",
"0.56027794",
"0.5599461",
"0.5590602",
"0.5586162",
"0.5586162",
"0.5586162",
"0.55771697",
"0.55748856",
"0.55560297",
"0.55540305",
"0.5531523",
"0.5528493",
"0.55213636",
"0.5501814",
"0.5495195",
"0.54949975",
"0.5487151",
"0.54814297",
"0.54747045",
"0.54718685",
"0.5466442",
"0.5466442",
"0.5466442",
"0.5466442",
"0.5463868",
"0.54536575",
"0.54494226",
"0.5441169",
"0.5423384"
] | 0.6341039 | 11 |
Inserts an element at the beginning | public function appendChild(Registry $child) {
$this->children[] = $child;
$child->setParent($this);
return $child;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function prepend ($content) {\r\n\t\t\r\n\t\tif ($this->length < 1) return null;\r\n\t\t\r\n\t\t$args = func_get_args();\r\n\t\tforeach ($args as $offset => $value) \r\n\t\t\tif ($value = $this->process($value)) \r\n\t\t\t\tforeach ($this as $node) \r\n\t\t\t\t\tif (get_class($value) === 'XDTNodeList') $node->insertBefore($value[0], $node->firstChild);\r\n\t\t\t\t\telse $node->insertBefore($value, $node->firstChild);\r\n\t\t\t\t\r\n\t\treturn $this;\r\n\t}",
"public function AddItemToStart($item)\n {\n array_unshift($this->_items, $item);\n if ($this->getItemPointer() > 0) {\n $this->setItemPointer($this->getItemPointer() + 1);\n }\n }",
"public function prepend($obj) {\r\n\t\t$obj->pzkParentId = @$this->id;\r\n\t\tarray_unshift($this->children, $obj);\r\n\t}",
"public function prepend($value)\n\t{\n\t\tarray_unshift($this->stack, $value);\n\t}",
"public function insertBefore (DOMNode $newnode , $refnode = null) {}",
"public function insertBefore($key, $data){\n $input = new Node($data);\n $temp = $this->head;\n while($temp != NULL){\n if(($temp->data == $key) && ($temp == $this->head)){\n $this->addFirst($input);\n break;\n }elseif($temp->next->data == $key){\n $input->next = $temp->next;\n $temp->next = &$input;\n break;\n }\n $temp = $temp->next;\n }\n }",
"public function insertBefore($exist, $add)\n {\n $exist = $this->index($exist);\n $type = ($exist === 0) ? 'prepend' : false;\n $nodes = $this->normalize($add, isset($this->nodes[$exist]) ? $this->nodes[$exist] : null, $type);\n $numNodes = count($nodes);\n if ($numNodes > 0) {\n if ($exist < 0) {\n $this->nodes = array_merge($this->nodes, $nodes);\n } else {\n array_splice($this->nodes, $exist, 0, $nodes);\n }\n if (!empty($this->indexes)) {\n foreach ($this->indexes as $id => $index) {\n if ($exist <= $index) {\n $this->indexes[$id] = $index + $numNodes;\n }\n }\n }\n }\n\n return $this;\n }",
"public function insertBefore(\\SetaPDF_Core_Type_AbstractType $value, $beforeIndex = 0) {}",
"public function prepend( $key, $value )\n\t{\n\t\t$array = $this->get( $key );\n\t\tarray_unshift( $array, $value );\n\t\t$this->set( $key, $array );\n\t}",
"function prepend ()\n {\n call_user_func_array ('array_unshift', array_merge ($this->A, func_get_args ()));\n return $this;\n }",
"public function getAppendBeforeNode();",
"public function prepend($value, $key = null)\n {\n $key ? $this->unshiftKey($key, $value) : $this->unshift($value);\n }",
"public static function prepend($index, $value)\n {\n self::exist($index);\n array_unshift(self::$registry[$index], $value);\n }",
"public function prepend(...$items): self;",
"public function prepend($key, $value)\n {\n $array = $this->get($key);\n\n array_unshift($array, $value);\n\n $this->set($key, $array);\n }",
"public function prepend() {\n $num_of_args = func_num_args();\n if ( $num_of_args == 1 && gettype( func_get_arg( 0 ) ) == \"array\" ) {\n $args = func_get_arg( 0 );\n $num_of_args = count( $args );\n } else {\n $args = func_get_args();\n }\n for ( $i = 0; $i < $num_of_args; $i++ ) {\n $arg = $args[$i];\n if ( $arg instanceof AbstractHTMLElement ) {\n $arg = $arg->asHTML();\n }\n $this->content = $arg . $this->content;\n }\n return $this;\n }",
"function insertAtFirst($data){\n\t\t$newNode = new ListNode($data);\n\n\t\tif($this->head == NULL){\n\t\t\t$this->head = $newNode;\n\t\t\t$this->tail = $newNode;\n\n\t\t}else{\n\t\t\t$temp = $this->head;\n\t\t\t$this->head = $newNode;\n\t\t\t$this->head->next = $temp;\n\t\t}\n\t}",
"public function insertFirst($data){\r\n $link = new Note($data);\r\n $link->next = $this->firstNode;\r\n $this->firstNode = $link;\r\n if($this->lastNode == null){\r\n $this->lastNode = $link;\r\n $this->count ++;\r\n }\r\n }",
"function array_insert(&$array,$element,$position=NULL) \n{\n\t if(count($array) == 0) \n\t\t{\n\t\t\t$array[] = $element;\n\t\t}\n\t \n\t elseif (is_numeric($position) && $position < 0)\n\t\t{\n\t\t\tif((count($array)+position) < 0) \n\t\t\t\t{\n\t\t\t\t\t$array = array_insert($array,$element,0);\n\t\t\t\t}\n\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$array[count($array)+$position] = $element;\n\t\t\t\t}\n\t \n\t\t}\n\t \n\t elseif (is_numeric($position) && isset($array[$position])) \n\t\t{\n\t\t\t$part1 = array_slice($array,0,$position,true);\n\t\t\t$part2 = array_slice($array,$position,null,true);\n\t\t\t$array = array_merge($part1,array($position=>$element),$part2);\n\t\t\t\n\t\t\tforeach($array as $key=>$item)\n\t\t\t{\n\t\t\t\tif (is_null($item))\n\t\t\t\t\t{\n\t\t\t\t\t\tunset($array[$key]);\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t elseif (is_null($position))\n\t\t {\n\t\t $array[] = $element;\n\t\t }\n\t elseif (!isset($array[$position]))\n\t\t {\n\t\t\t$array[$position] = $element;\n\t\t }\n\t\t\n\t\t$array = array_merge($array);\n\t\treturn $array;\n}",
"static function insertBefore(&$array, $position, $insert)\n {\n if (is_int($position)) {\n array_splice($array, $position, 0, $insert);\n } else {\n $pos = array_search($position, array_keys($array));\n $array = array_merge(\n array_slice($array, 0, $pos),\n $insert,\n array_slice($array, $pos)\n );\n }\n }",
"public static function prepend($key, $value)\n {\n $array = self::get($key);\n\n array_unshift($array, $value);\n\n self::set($key, $array);\n }",
"function arrayPrepend($array, $value) {\n array_unshift($array, $value);\n return $array;\n}",
"function insertFront($value)\n {\n if ($this->isFull()) {\n return false;\n }\n //注意后面2行的先后顺序,先移动指针,再赋值head和tail必须要有一个这样操作,不然就会覆盖,或者用空数组\n $this->head = ($this->head - 1 + $this->count) % $this->count;\n $this->queue[$this->head] = $value;\n return true;\n }",
"public function testExistedNodeFirstSiblingsMovePrependTo()\n {\n $model8 = Animal::findOne(8);\n $model9 = Animal::findOne(9);\n \n $this->assertTrue($model8->prependTo($model8->parent()));\n $this->assertEquals(1, $model8->weight);\n $model9->refresh();\n $this->assertEquals(2, $model9->weight);\n }",
"public function pushFront($value) {\n $node = new Node($value);\n $node->next = $this->head;\n $this->head = $node;\n $this->size++;\n }",
"public function setBefore(string $content): HtmlElementInterface;",
"public function push($element)\n {\n array_unshift($this->stack,$element);\n }",
"public function insertBefore ($target) { \r\n\t\t\r\n\t\tif ($target = $this->process($target)) \r\n\t\t\tforeach ($this as $node) \r\n\t\t\t\tif (get_class() === 'XDTNodeList') $target[0]->parentNode->insertBefore($node, $target[0]);\r\n\t\t\t\telse $target->parentNode->insertBefore($node, $target);\r\n\t\t\t\t\r\n\t\treturn $this;\r\n\t}",
"public function insertAtFront($newData)\n {\n if($this->front== -1 && $this->rear== -1){\n $this->front++;\n $this->array[$this->front] = $newData;\n $this->front = $this->rear;\n self::$size++;\n }\n //If queue contains elements\n else{\n $this->front =$this->front-1;\n $this->array[$this->front] = $newData;\n self::$size++;\n }\n }",
"public function before(&$obj) {\r\n\t\tif ($parent = $this->getParent()) {\r\n\t\t\t$parent->insert($obj, $this->index());\r\n\t\t}\r\n\t}",
"function tideways_prepend_overwritten()\n{\n}",
"public function addElementAtStart(IElement $element): IFormBuilder;",
"public function insertAtTop()\n {\n return $this->insertAtRank(1);\n }",
"public function prepend($value) {\n\t\tif (is_array($value)) {\n\t\t\tforeach ($value as $v) {\n\t\t\t\t$this->prepend($v);\n\t\t\t}\n\t\t} else {\n\t\t\tarray_unshift($this->_value, $value);\n\t\t}\n\n\t\treturn $this;\n\t}",
"public function prependTo($value) {\n \n return $this->append($value);\n }",
"function newItemBefore()\r\n\t{\r\n\t\t$this->content_obj->newItemBefore();\r\n\t\t$_SESSION[\"il_pg_error\"] = $this->pg_obj->update();\r\n\t\t$this->ctrl->returnToParent($this, \"jump\".$this->hier_id);\r\n\t}",
"public function prepend($prepend): self {\n return new self($prepend, $this);\n }",
"public function testOldNodeInsertBeforeItself()\n {\n $this->haveFixture('animal', 'an_addon', false);\n \n $model13 = Animal::findOne(13);\n \n $this->expectExceptionMessage('You cannot insert after of before yourself');\n $model13->insertBefore($model13);\n }",
"function addItemAtBeginOfTodos($item){\n\t\t\t\t$arTmp = array();\n\n\t\t\t\t//corro los indices en uno asi puedo insertar el item\n\t\t\t\tif (count($this->Todos())>0)\n\t\t\t\t{\n\t\t\t\t\tforeach($this->Todos() as $k => $r){\n\t\t\t\t\t\t$k++;\n\t\t\t\t\t\t$arTmp[$k] = $r;\n\t\t\t\t\t}\n\t\t\t\t}\n \n\t\t\t\t$this->todos = $arTmp;\n\t\t\t\t$arTmp = null;\n\t\t\t\t$this->addItemAtBeginOf($this->todos, $item);\n\t\t\t}",
"public function prepend($content)\n\t{\n\t\t$this->content = $content.$this->content;\n\t}",
"abstract public function insert();",
"public function prepend($key, $value)\n {\n $array = $this->get($key);\n\n array_unshift($array, $value);\n\n $this->set($key, $array);\n\n return $this;\n }",
"public function first(): void\n {\n $this->index = 0;\n }",
"public function prependRepeat($var = '')\n {\n if (!$this->isWritable()) {\n return;\n }\n $this->repeatParent->setHeaderList(array_merge($this->repeatParent->getHeaderList(), $this->getHeaderList()));\n $appendNode = $this->repeatNode;\n if ($var && $this->repeatParent) {\n $appendNode = $this->repeatParent->getVarElement($var);\n }\n $insertNode = $appendNode->ownerDocument->importNode($this->getDocument()->documentElement, true);\n return $insertNode;\n }",
"public function addFirst($data){\n $input = new Node($data);\n if($this->isEmpty()){\n $this->head = &$input;\n $this->tail = &$input;\n }else{\n $input->next = $this->head;\n $this->head = &$input;\n }\n }",
"static function prependHtmlDom($element, $html, $encoding = 'UTF-8')\n {\n if ($html == null) {\n return;\n }\n $elementDoc = $element->ownerDocument;\n\n $contentNode = self::makeContentNode($html);\n foreach ($contentNode->childNodes as $child) {\n $node = $elementDoc->importNode($child, true);\n if ($element->firstChild) {\n $element->insertBefore($node, $element->firstChild);\n } else {\n $element->appendChild($node);\n }\n }\n return $contentNode;\n }",
"public function insertAsFirstChildOf(Doctrine_Record $dest);",
"public function testNewNodeInsertBeforeFirstChild()\n {\n $model1 = Animal::findOne(1);\n $model4 = Animal::findOne(4);\n \n $model = new Animal();\n $model->name = 'new'; \n \n $this->assertTrue($model->insertBefore($model1));\n $model1->refresh();\n $model4->refresh();\n \n $this->assertSame('', $model->path);\n $this->assertEquals(1, $model->level);\n $this->assertEquals(1, $model->weight); \n \n $this->assertEquals(2, $model1->weight); \n $this->assertEquals(5, $model4->weight); \n }",
"function array_insert(&$array, $offset, $object, $replace=false){\r\n \r\n if(is_array($array)){\r\n if($replace ){\r\n if($offset<0) $offset = 0;\r\n else if($offset > count($array)-1) $offset = count($array)-1;\r\n $a1 = array_slice($array, 0, $offset);\r\n $a2 = array_slice($array, $offset+1);\r\n array_push($a1, $object);\r\n $array = array_merge($a1, $a2);\r\n }else{ \r\n if($offset == 0){\r\n array_unshift($array, $object);\r\n }else if($offset >= count($array)){\r\n array_push($array, $object);\r\n }else{ \r\n $a1 = array_slice($array, 0, $offset);\r\n $a2 = array_slice($array, $offset);\r\n array_push($a1, $object);\r\n $array = array_merge($a1, $a2);\r\n }\r\n }\r\n } \r\n }",
"function prepend($item) {\r\n return Match::on($item)\r\n ->ListM(function($list) {\r\n return new self(array_merge($list->value(), $this->list));\r\n })\r\n ->any(function($item) {\r\n return new self(array_merge([$item], $this->list));\r\n })\r\n ->value(); \r\n }",
"function array_insert(&$array, $value, $offset)\r\n{\r\n if (is_array($array)) {\r\n $array = array_values($array);\r\n $offset = intval($offset);\r\n if ($offset < 0 || $offset >= count($array)) {\r\n array_push($array, $value);\r\n } elseif ($offset == 0) {\r\n array_unshift($array, $value);\r\n } else {\r\n $temp = array_slice($array, 0, $offset);\r\n array_push($temp, $value);\r\n $array = array_slice($array, $offset);\r\n $array = array_merge($temp, $array);\r\n }\r\n } else {\r\n $array = array($value);\r\n }\r\n return count($array);\r\n}",
"public abstract function insert();",
"public function prepend(self $item, ?\\SetaPDF_Core_Document $document = null, $mode = null) {}",
"public function testPrepend() {\n\t\t\t$builder = new StringBuilder();\n\t\t\t$builder->prepend(\"Hello\")->prepend(\"World\");\n\n\t\t\t$this->assertEquals(\"WorldHello\", $builder->__toString());\n\t\t\tunset($builder);\n\t\t}",
"public function prependItem($item, $key=null): CollectionInterface;",
"public function insert($val) {\n // Make sure element being inserted is type of Node.\n if (!is_object($val) || getclass($val) !== \"Node\") {\n $node = new Node($val);\n } else {\n $node = $val;\n }\n\n $this->_head->setPrev($node);\n\n $node->setNext($this->_head);\n $node->setPrev($this->_sentinel);\n $this->_head = $node;\n }",
"public function prependTo ($target) { \r\n\t\t\r\n\t\tif ($target = $this->process($target))\r\n\t\t\tforeach ($this as $node) \r\n\t\t\t\tif (get_class($target) === 'XDTNodeList' OR is_array($target)) \r\n\t\t\t\t\tforeach ($target as $t) $t->insertBefore($node, $t->firstChild);\r\n\t\t\t\telse $target->insertBefore($node, $target->firstChild);\r\n\t\t\t\t\r\n\t\treturn $this;\r\n\t}",
"public function insertBefore(Element $newElement, Element $refElement)\n {\n $this->contentManager->insertBefore($newElement, $refElement);\n\n return $this;\n }",
"function ArrayInsert( $array, $insert, $position ) {\n return array_slice($array, 0, $position, TRUE) + $insert + array_slice($array, $position, NULL, TRUE);\n}",
"public function prependVersion(Version $version)\n {\n array_unshift($this->versions, $version);\n }",
"public function insert(Tag $tag);",
"public function prependGroup($group, ?\\SetaPDF_Core_Document_OptionalContent_Group $parent = null, $beforeIndex = 0, $nextToOrLabel = null, $label = '') {}",
"public function insertToHead($node)\n {\n $node->setNext($this->head);\n $this->head = $node;\n }",
"public function insert() {\n \n }",
"public function prepend($stringOrObject)\n {\n array_unshift($this->content, $stringOrObject);\n\n return $this;\n }",
"function setPrepend($text) {\n\n $this->field['prepend'] = $text;\n return $this;\n\n }",
"public function prepend($value, $key = null)\n {\n return parent::prepend($value, $key);\n $this->performHook('modified');\n return $this;\n }",
"protected function unshift($value)\n {\n array_unshift($this->items, $this->set($value));\n }",
"public static function insert()\n {\n }",
"public function prepend(string $key, $value)\n {\n // TODO: Implement prepend() method.\n }",
"public function insertElement(PageElement $element, int $insertIndex = 0): bool {\n\t\tif($insertIndex >= $this->elementCount()) {\n\t\t\t$this->m_elements[] = $element;\n\t\t}\n\t\telse {\n\t\t\tarray_splice($this->m_elements, max(0, $insertIndex), 0, [$element]);\n\t\t}\n\n\t\treturn true;\n\t}",
"public function add($before, $key, $value)\n {\n if (!(is_string($key) || is_int($key))) {\n throw new \\OutOfRangeException('Offset invalid or out of range');\n }\n\n if ($this->offsetExists($key)) {\n throw new \\RuntimeException(\"$key must be unique\");\n }\n\n $after = null;\n $element = new Element($key, $value);\n $element->setBefore($before);\n\n if (is_null($before)) {\n // insert at the head\n $after = $this->head;\n $element->setAfter($after);\n $this->head = $element;\n } else {\n // insert between an element and the element that follows it\n $after = $before->getAfter();\n $before->setAfter($element);\n $element->setAfter($after);\n }\n\n if (is_null($after)) {\n // it was inserted at the tail\n $this->tail = $element;\n } else {\n $after->setBefore($element);\n }\n\n $this->elements[$key] = $element;\n }",
"public function addPrepend(ContainerInterface $container, $name = null)\n {\n if ($name !== null) {\n unset($this->containers[$name]);\n $this->containers = array_merge([$name => $container], $this->containers);\n } else {\n array_unshift($this->containers, $container);\n }\n }",
"public function prependKey($section, $element){\n\t\t$body = $this->toArray();\n\t\t$i = 0;\n\t\tforeach ($body as $key => $value) {\n\t\t\tif($key == $section){\n\t\t\t\tforeach ($value as $k => $v) {\n\t\t\t\t\tif($i == 0){\n\t\t\t\t\t\t$this->beforeKey($section, $element, $k);\n\t\t\t\t\t}\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"function prepend($content) {\n\t\t$this->write($content . $this->read());\n\t}",
"public function prepend($content, string $username = '', string $avatar = ''): void {\n\t\t$payload = static::createPayload($content, $username, $avatar);\n\t\tarray_unshift($this->queue, $payload);\n\t}",
"public function prepend($key, $value, $expiry = 0, $cas = null) {}",
"public function prependContent ($content) {\r\n\t\t$this->content = (string)$content.$this->content;\r\n\t}",
"public function prependLocation($location)\n {\n array_unshift($this->locations, $this->createLocationFromInput($location));\n }",
"function array_insert($array, $keyafter, $insert, $options=array()){\n\t//handle options\n\textract($options);\n\tif(!$increment)$increment=1;\n\tif(!isset($appendToEnd))$appendToEnd=true;\n\t\n\t//handle trivial conditions\n\tif(!is_array($array))return $array;\n\tif(!count($array)){\n\t\treturn array(1=>$insert);\n\t}\n\t//insert the node\n\tforeach($array as $n=>$v){\n\t\t$a[$n + ($doIncrement ? $increment : 0)]=$v;\n\t\tif($n==$keyafter){\n\t\t\t$doIncrement=$increment;\n\t\t\t$a[$n+$increment]=$insert;\n\t\t}\n\t}\n\t//append to end if $keyafter not reached\n\tif(!$doIncrement && $appendToEnd)$a[$n + $increment]=$v;\n\treturn $a;\n}",
"public function addFirst($e);",
"public function push_at($newElement, $position) { \n $newNode = new Node(); \n $newNode->data = $newElement;\n $newNode->next = null;\n if($position < 1) {\n echo \"\\nposition should be >= 1.\";\n } else if ($position == 1) {\n $newNode->next = $this->head;\n $this->head = $newNode;\n } else {\n $temp = new Node();\n $temp = $this->head;\n for($i = 1; $i < $position-1; $i++) {\n if($temp != null) {\n $temp = $temp->next;\n }\n }\n if($temp != null) {\n $newNode->next = $temp->next;\n $temp->next = $newNode; \n\n } else {\n echo \"\\nThe previous node is null.\";\n } \n }\n }",
"public function moveTagFromEndToTheMiddle() {}",
"function prepend($content){\n\t\t$this->_String4 = \"$content\".$this->_String4;\n\t\treturn $this;\n\t}",
"function insertTest()\n {\n $this->cD->insertElement(new Product(1, \"Trang\"));\n $this->cD->insertElement(new Product(1, \"Trang\"));\n $this->cD->insertElement(new Product(1, \"Trang\"));\n }",
"public function prepend(ActionInterface $action)\n {\n $this->before[] = $action;\n }",
"public function testPrependHtml() {\r\n\t\t$this->testObject->prependHtml ( '<div>test</div>' );\r\n\t\t$this->assertTrue ( '<div>test</div>' == $this->testObject->getPrependHtml (), 'incorrect prepended html found' );\r\n\t}",
"public function prepend($pages) {}",
"public static function insertAtIndex( $array, $newElement, $index )\n\t{\n\t\t$start = array_slice( $array, 0, $index );\n\t\t/*** get the end of the array ***/\n\t\t$end = array_slice( $array, $index );\n\t\t/*** add the new element to the array ***/\n\t\t$start[] = $newElement;\n\t\t/*** glue them back together and return ***/\n\t\treturn array_merge( $start, $end );\n\t}",
"function array_prepend($array, $value, $key = null)\n {\n return Arr::prepend($array, $value, $key);\n }",
"function add($element, $controller)\r\n\t\t{\r\n\t\t\t//go through each element in the node\r\n\t\t\tfor ($i = 0; $i < count($this->elements); $i++)\r\n\t\t\t{\r\n\t\t\t\t//if we get to a key that's greater than this element's key, we insert\r\n\t\t\t\t//the element right before it\r\n\t\t\t\tif ($controller->compare($this->elements[$i]->key, $element->key) > 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tarray_splice($this->elements, $i, 0, array($element));\r\n\t\t\t\t\treturn $i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//if we still haven't found an element greater than the new one, insert the\r\n\t\t\t//new one at the end.\r\n\t\t\t$this->elements[] = $element;\r\n\t\t\treturn count($this->elements) - 1;\r\n\t\t}",
"public function insert($index, $value);",
"public function insert($index, $value) {\n if ($index == 0) {\n $this->pushFront($value);\n return;\n } elseif ($index == $this->size - 1) {\n $this->pushBack($value);\n return;\n }\n $prev = NULL;\n $curr = $this->head;\n $i = 0;\n while ($i < $index) {\n $prev = $curr;\n $curr = $curr->next;\n $i++;\n }\n $node = new Node($value);\n $prev->next = $node;\n $node->next = $curr;\n $this->size++;\n }",
"function moveLeft()\n {\n $this->position--;\n if ($this->position < 0) {\n $this->position++;\n array_unshift($this->line, '_');\n }\n }",
"public function insertChild(Element $element, int $index): self\n {\n if (array_key_exists($index, $this->children)) {\n $this->beforeInsert($element);\n array_splice($this->children, $index, 0, [$element]);\n $this->afterInsert();\n } elseif ($index === count($this->children)) {\n $this->appendChild($element);\n } elseif ($index === 0) {\n $this->prependChild($element);\n } else {\n throw new \\OutOfBoundsException(\n 'index must be a valid key, zero, or length plus one'\n );\n }\n\n return $this;\n }",
"protected function preVisitDocument(Document $element)\n\t{\n\t\t$elementCodeBuffers = $this->codeBufferManager->getProperties($element);\n\t\t$this->output .= $elementCodeBuffers->link(array(CodeBufferCollection::TAG_BEFORE));\n\t\treturn $this->enqueue($element);\n\t}",
"public function unshiftNode( $node );",
"public function testPrepend($content, callable $assert)\n {\n $dom = (new Dom($this->demoElement()))\n ->append($node = $this->demoCData())\n ->prepend($content);\n\n $assert($content, $dom->children()->get(), function (array $expected) use ($node) {\n return array_merge($expected, [$node]);\n });\n }",
"public static function prepend($array, $value, $key = null)\n {\n if (is_null($key)) {\n array_unshift($array, $value);\n } else {\n $array = [$key => $value] + $array;\n }\n\n return $array;\n }",
"public function insertAsPrevSiblingOf(Doctrine_Record $dest);",
"function ins2ary(&$ary, $element, $pos) {\n\t $ar1=array_slice($ary, 0, $pos); $ar1[]=$element;\n\t $ary=array_merge($ar1, array_slice($ary, $pos));\n\t}"
] | [
"0.67646176",
"0.6575263",
"0.6465663",
"0.6454954",
"0.64172906",
"0.6370875",
"0.63597566",
"0.63553834",
"0.6347638",
"0.6336025",
"0.6317991",
"0.63121504",
"0.62561333",
"0.623033",
"0.6221862",
"0.6218444",
"0.6201152",
"0.6161697",
"0.6144952",
"0.61356586",
"0.6091001",
"0.6069683",
"0.60013074",
"0.5987491",
"0.59846437",
"0.59568006",
"0.59381914",
"0.59232926",
"0.5882272",
"0.58627397",
"0.58590484",
"0.58416796",
"0.5829709",
"0.58108944",
"0.5796329",
"0.57906705",
"0.5783688",
"0.5780553",
"0.5780542",
"0.57689023",
"0.57593495",
"0.57525235",
"0.5752277",
"0.57450753",
"0.5743112",
"0.57292324",
"0.57179976",
"0.5711969",
"0.571057",
"0.5708735",
"0.5645335",
"0.56444246",
"0.56439024",
"0.5639834",
"0.5637034",
"0.560605",
"0.5578242",
"0.55740464",
"0.5568272",
"0.55651146",
"0.55615395",
"0.5549048",
"0.5540702",
"0.5539987",
"0.55398643",
"0.55232924",
"0.5521512",
"0.55058026",
"0.5498276",
"0.5494572",
"0.5489399",
"0.5486653",
"0.5486561",
"0.5486372",
"0.54798883",
"0.54669076",
"0.5464123",
"0.54537326",
"0.54368114",
"0.543195",
"0.54202074",
"0.54175794",
"0.5410544",
"0.54073924",
"0.54027766",
"0.5401698",
"0.53948987",
"0.53875744",
"0.5381887",
"0.53751695",
"0.53726",
"0.5357811",
"0.5346134",
"0.5344258",
"0.5337344",
"0.5307894",
"0.53067917",
"0.52830905",
"0.5281354",
"0.5265259",
"0.52636737"
] | 0.0 | -1 |
Inserts an element at the end | public function prependChild(Registry $child) {
array_unshift($this->children, $child);
$child->setParent($this);
return $child;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addElementAtEnd(IElement $element): IFormBuilder;",
"public function append($element)\n {\n $this->elements[] = $element;\n $this->iteratorCount = count($this->elements);\n }",
"public function addLast($e);",
"public function after(&$obj) {\r\n\t\tif ($parent = $this->getParent()) {\r\n\t\t\t$parent->insert($obj, $this->index() + 1);\r\n\t\t}\r\n\t}",
"public function moveTagFromEndToTheMiddle() {}",
"function append ( $element ) {\n $this->childrenElements[] = $element;\n }",
"function MoveLast() {}",
"public function insertAsLastChildOf(Doctrine_Record $dest);",
"function insertLast($value)\n {\n if ($this->isFull()) {\n return false;\n }\n //注意下面2行的先后顺序,先赋值,再进行移动指针\n $this->queue[$this->tail] = $value;\n $this->tail = ($this->tail + 1) % $this->count;\n return true;\n }",
"public function push_back($newElement) {\n $newNode = new Node();\n $newNode->data = $newElement;\n $newNode->next = null; \n if($this->head == null) {\n $this->head = $newNode;\n } else {\n $temp = new Node();\n $temp = $this->head;\n while($temp->next != null) {\n $temp = $temp->next;\n }\n $temp->next = $newNode;\n } \n }",
"function insertAtLast($data){\n\t\t$newNode = new ListNode($data);\n\t\tif($this->head == NULL){\n\t\t\t$this->head = $newNode;\n\t\t\t$this->tail = $newNode;\n\t\t}else{\n\t\t\t$this->tail->next = $newNode;\n\t\t\t$this->tail = $newNode;\n\t\t}\n\t}",
"static function insertAfter(&$array, $position, $insert)\n {\n if (is_int($position)) {\n array_splice($array, $position, 0, $insert);\n } else {\n $pos = array_search($position, array_keys($array));\n $array = array_merge(\n array_slice($array, 0, $pos + 1),\n $insert,\n array_slice($array, $pos - 1)\n );\n }\n }",
"public function addChild(HTMLElement $el) {\n\t\tparent::addChild($el);\n\t\t/* Add pointer to last child, and its children */\n\t\t$this->rAddPointers($this->getChild($this->getNoOfChildren()-1));\n\t}",
"public function insertAfter($key, $data){\n $input = new Node($data);\n $temp = $this->head;\n while($temp != NULL){\n if($temp->data == $key){\n $input->next = $temp->next;\n $temp->next = &$input;\n break;\n }\n $temp = $temp->next;\n }\n }",
"public function insertAfter($idElementRef, $tagNewElement, $idNewElement) {\n\n\t\t$this->response->insertAfter($idElementRef, $tagNewElement, $idNewElement);\n\t}",
"public function inserirFinal(array &$array, $item)\n\t{\n\t\t$array[] = $item;\n\t}",
"function add($element, $controller)\r\n\t\t{\r\n\t\t\t//go through each element in the node\r\n\t\t\tfor ($i = 0; $i < count($this->elements); $i++)\r\n\t\t\t{\r\n\t\t\t\t//if we get to a key that's greater than this element's key, we insert\r\n\t\t\t\t//the element right before it\r\n\t\t\t\tif ($controller->compare($this->elements[$i]->key, $element->key) > 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tarray_splice($this->elements, $i, 0, array($element));\r\n\t\t\t\t\treturn $i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//if we still haven't found an element greater than the new one, insert the\r\n\t\t\t//new one at the end.\r\n\t\t\t$this->elements[] = $element;\r\n\t\t\treturn count($this->elements) - 1;\r\n\t\t}",
"public function after_insert() {}",
"function array_insert(&$array,$element,$position=NULL) \n{\n\t if(count($array) == 0) \n\t\t{\n\t\t\t$array[] = $element;\n\t\t}\n\t \n\t elseif (is_numeric($position) && $position < 0)\n\t\t{\n\t\t\tif((count($array)+position) < 0) \n\t\t\t\t{\n\t\t\t\t\t$array = array_insert($array,$element,0);\n\t\t\t\t}\n\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$array[count($array)+$position] = $element;\n\t\t\t\t}\n\t \n\t\t}\n\t \n\t elseif (is_numeric($position) && isset($array[$position])) \n\t\t{\n\t\t\t$part1 = array_slice($array,0,$position,true);\n\t\t\t$part2 = array_slice($array,$position,null,true);\n\t\t\t$array = array_merge($part1,array($position=>$element),$part2);\n\t\t\t\n\t\t\tforeach($array as $key=>$item)\n\t\t\t{\n\t\t\t\tif (is_null($item))\n\t\t\t\t\t{\n\t\t\t\t\t\tunset($array[$key]);\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t elseif (is_null($position))\n\t\t {\n\t\t $array[] = $element;\n\t\t }\n\t elseif (!isset($array[$position]))\n\t\t {\n\t\t\t$array[$position] = $element;\n\t\t }\n\t\t\n\t\t$array = array_merge($array);\n\t\treturn $array;\n}",
"function array_insert($array, $keyafter, $insert, $options=array()){\n\t//handle options\n\textract($options);\n\tif(!$increment)$increment=1;\n\tif(!isset($appendToEnd))$appendToEnd=true;\n\t\n\t//handle trivial conditions\n\tif(!is_array($array))return $array;\n\tif(!count($array)){\n\t\treturn array(1=>$insert);\n\t}\n\t//insert the node\n\tforeach($array as $n=>$v){\n\t\t$a[$n + ($doIncrement ? $increment : 0)]=$v;\n\t\tif($n==$keyafter){\n\t\t\t$doIncrement=$increment;\n\t\t\t$a[$n+$increment]=$insert;\n\t\t}\n\t}\n\t//append to end if $keyafter not reached\n\tif(!$doIncrement && $appendToEnd)$a[$n + $increment]=$v;\n\treturn $a;\n}",
"public function addLast($data){\n $input = new Node($data);\n if($this->isEmpty()){\n $this->head = &$input;\n $this->tail = &$input;\n }else{\n $this->tail->next = &$input;\n $this->tail = &$input;\n }\n }",
"function addNodeafter($node,$flag){\n $node->next = $flag->next;\n $flag->next = $node;\n $this->_length++;\n }",
"function end_tag() {\r\n\t\t$this->push_nodelist();\r\n\t\t\r\n\t}",
"public function insertAfter ($target) { \r\n\t\t\r\n\t\tif ($target = $this->process($target)) \r\n\t\t\tforeach ($this as $node) \r\n\t\t\t\tif (get_class() === 'XDTNodeList') $target[0]->parentNode->insertBefore($node, $target[0]->nextSibling);\r\n\t\t\t\telse $target->parentNode->insertBefore($node, $target->nextSibling); \r\n\t\t\r\n\t\treturn $this;\r\n\t}",
"public function insertAfter($exist, $add)\n {\n $exist = $this->index($exist);\n $nodes = $this->normalize($add, isset($this->nodes[$exist]) ? $this->nodes[$exist] : null);\n $numNodes = count($nodes);\n if ($numNodes > 0) {\n if ($exist < 0) {\n $this->nodes = array_merge($nodes, $this->nodes);\n } else {\n array_splice($this->nodes, $exist + 1, 0, $nodes);\n }\n if (!empty($this->indexes)) {\n foreach ($this->indexes as $id => $index) {\n if ($exist < $index) {\n $this->indexes[$id] = $index + $numNodes;\n }\n }\n }\n }\n\n return $this;\n }",
"abstract public function insert();",
"function _appendToLastTextChild ($text) {\r\n $scount = count ($this->_stack);\r\n if ($scount == 0) {\r\n return false;\r\n }\r\n return $this->_stack[$scount-1]->appendToLastTextChild ($text);\r\n }",
"public function append ($content) {\r\n\t\t\r\n\t\tif ($this->length < 1) return null;\r\n\t\t\r\n\t\t$args = func_get_args();\r\n\t\tforeach ($args as $offset => $value) \r\n\t\t\tif ($value = $this->process($value)) \r\n\t\t\t\tforeach ($this as $node) \r\n\t\t\t\t\tif (get_class($value) === 'XDTNodeList') $node->appendChild($value[0]);\r\n\t\t\t\t\telse $node->appendChild($value);\r\n\t\t\t\t\r\n\t\treturn $this;\r\n\t}",
"public function testNewNodeInsertAfterLastChild()\n {\n $model4 = Animal::findOne(4);\n \n $model = new Animal();\n $model->name = 'new'; \n \n $this->assertTrue($model->insertAfter($model4));\n $model4->refresh();\n \n $this->assertSame('', $model->path);\n $this->assertEquals(1, $model->level);\n $this->assertEquals(5, $model->weight); \n \n $this->assertEquals(4, $model4->weight); \n }",
"public function afterInsert() {\n\t\t\tparent::afterInsert();\n\t\t\t//$this->pos = 1;\n\t\t\t$this->updatePos(1);\n\t\t}",
"public function insertAsNextSiblingOf(Doctrine_Record $dest);",
"public function setAfter(string $content): HtmlElementInterface;",
"protected abstract function append($token);",
"public function onAfterInsert(){\n\t\t$this->player->setValue('entries', $this->player->entries + 1);\n\t\t$this->player->save();\n\t\t\n\t}",
"public function getAppendBeforeNode();",
"function append($data) {}",
"public abstract function insert();",
"public function insertElement(PageElement $element, int $insertIndex = 0): bool {\n\t\tif($insertIndex >= $this->elementCount()) {\n\t\t\t$this->m_elements[] = $element;\n\t\t}\n\t\telse {\n\t\t\tarray_splice($this->m_elements, max(0, $insertIndex), 0, [$element]);\n\t\t}\n\n\t\treturn true;\n\t}",
"public function removeLastChild();",
"public function insertAtRear($newData)\n {\n if($this->front== -1 && $this->rear== -1){\n $this->array[++$this->rear] = $newData;\n $this->front = $this->rear;\n self::$size++;\n }\n //If queue contains elements\n else{\n $this->rear = $this->rear+1;\n $this->array[$this->rear] = $newData;\n self::$size++;\n }\n }",
"function newItemAfter()\r\n\t{\r\n\t\t$this->content_obj->newItemAfter();\r\n\t\t$_SESSION[\"il_pg_error\"] = $this->pg_obj->update();\r\n\t\t$this->ctrl->returnToParent($this, \"jump\".$this->hier_id);\r\n\t}",
"public function GoToEnd()\n {\n $this->setItemPointer(($this->Length() - 1));\n }",
"function end_el( &$output, $item, $depth = 0, $args = [], $id = 0 ) {\n\t\t$output .= '</li>';\n\t\treturn;\n\t}",
"function end_el( &$output, $item, $depth = 0, $args = array() ) {\n $output .= \"</li>\\n\";\n }",
"function end_el( &$output, $item, $depth = 0, $args = array() ) {\r\n\t\t\t$output .= \"</li>\\n\";\r\n\t\t}",
"public function add($element);",
"public function add($element);",
"public function add($element);",
"function add_row($arr_html,$row){\r\n\r\n\t\tarray_splice($this->data, $row-1, 0, array($arr_html));\r\n\r\n\t}",
"public function push_at($newElement, $position) { \n $newNode = new Node(); \n $newNode->data = $newElement;\n $newNode->next = null;\n if($position < 1) {\n echo \"\\nposition should be >= 1.\";\n } else if ($position == 1) {\n $newNode->next = $this->head;\n $this->head = $newNode;\n } else {\n $temp = new Node();\n $temp = $this->head;\n for($i = 1; $i < $position-1; $i++) {\n if($temp != null) {\n $temp = $temp->next;\n }\n }\n if($temp != null) {\n $newNode->next = $temp->next;\n $temp->next = $newNode; \n\n } else {\n echo \"\\nThe previous node is null.\";\n } \n }\n }",
"public function insertAsLastChildOf(BaseObject $node, BaseObject $dest_node)\n {\n $node->setLeftValue($dest_node->getRightValue());\n $node->setRightValue($dest_node->getRightValue() + 1);\n $node->setScopeIdValue($dest_node->getScopeIdValue());\n $node->setParentIdValue($dest_node->getPrimaryKey());\n \n $this->addPreSaveStackEntries($this->shiftRLValues(get_class($node->getPeer()),\n $node->getLeftValue(),\n 2,\n $dest_node->getScopeIdValue()));\n \n $dest_node->setRightValue($dest_node->getRightValue() + 2);\n $this->addPreSaveStackEntries(array($dest_node));\n }",
"public function moveAsLastChildOf(Doctrine_Record $dest);",
"public function addChildAsLast(Node $node)\n {\n if(null === $this->children)\n {\n $this->children = array();\n }\n\n $this->children[] = $node;\n }",
"private function addRawElement($newElement)\n {\n $this->elements[] = $newElement;\n }",
"function insertTest()\n {\n $this->cD->insertElement(new Product(1, \"Trang\"));\n $this->cD->insertElement(new Product(1, \"Trang\"));\n $this->cD->insertElement(new Product(1, \"Trang\"));\n }",
"public function insert($val) {\n // Make sure element being inserted is type of Node.\n if (!is_object($val) || getclass($val) !== \"Node\") {\n $node = new Node($val);\n } else {\n $node = $val;\n }\n\n $this->_head->setPrev($node);\n\n $node->setNext($this->_head);\n $node->setPrev($this->_sentinel);\n $this->_head = $node;\n }",
"protected function append($child): void\n {\n $this->children[] = $child;\n }",
"public function appendTo(PapayaXmlElement $parent) {\n $this->elements()->appendTo($parent);\n return NULL;\n }",
"public function append($element)\n {\n $this->_data[] = $element;\n return $this;\n }",
"private function append($value)\n {\n \t$this->values[] = $value;\n }",
"public function push($element)\n {\n array_unshift($this->stack,$element);\n }",
"public function insertInputAfter($idElementRef, $typeNewElement, $strNameNewElement, $idNewElement) {\n\n\t\t$this->response->insertInputAfter($idElementRef, $typeNewElement, $strNameNewElement, $idNewElement);\n\t}",
"function appendToLastTextChild ($text) {\r\n $ccount = count ($this->_children);\r\n if ($ccount == 0 || $this->_children[$ccount-1]->_type != STRINGPARSER_NODE_TEXT) {\r\n $ntextnode = new StringParser_Node_Text ($text);\r\n return $this->appendChild ($ntextnode);\r\n } else {\r\n $this->_children[$ccount-1]->appendText ($text);\r\n return true;\r\n }\r\n }",
"public static function insertAtIndex( $array, $newElement, $index )\n\t{\n\t\t$start = array_slice( $array, 0, $index );\n\t\t/*** get the end of the array ***/\n\t\t$end = array_slice( $array, $index );\n\t\t/*** add the new element to the array ***/\n\t\t$start[] = $newElement;\n\t\t/*** glue them back together and return ***/\n\t\treturn array_merge( $start, $end );\n\t}",
"function append($node) {\n\t\tif (!is_array($node)) {\n\t\t\t$this->child[]=$node;\n\t\t} else if (is_array($node)) {\n\t\t\tfor ($childIdx=0; $childIdx<count($node); $childIdx++)\n\t\t\t\t$this->child[]=$node[$childIdx];\n\t\t}\n\t}",
"public function movePostFromEndToTheMiddle() {}",
"public function appendChildCopy($item) {}",
"function startEndArray ($items, $newItem)\n{\n echo 'Add new item to (S)tart or (E)nd of list? ' . PHP_EOL;\n $option = getInput(true);\n\n if ($option == 's') {\n array_unshift($items, $newItem);\n } else {\n array_push($items, $newItem);\n }\n\n return $items; \n}",
"public function append($value)\n {\n $this->items[] = $value;\n }",
"public function appended(mixed $element): Set;",
"function edit_elements($element, $sentence)\n {\n $element->nodeValue = '';\n foreach($sentence as $node)\n {\n /* Appends a new HTML element at the end of the old one. */\n $element->appendChild($node);\n }\n }",
"public function addElementInMiddle(IElement $element): IFormBuilder;",
"protected function _insertElt($elt)\n {\n if (!$elt || isset($this->_tree[$elt['v']])) {\n return;\n }\n\n // UW fix - it may return both 'foo' and 'foo/' as mailbox names.\n // Only add one of these (without the namespace character) to\n // the tree. See Ticket #5764.\n $ns_info = $this->_getNamespace($elt['v']);\n if (isset($this->_tree[rtrim($elt['v'], is_null($ns_info) ? $this->_delimiter : $ns_info['delimiter'])])) {\n return;\n }\n\n $this->_changed = true;\n\n $prev = $this->track\n ? $this->hasChildren($this->_tree[$elt['p']])\n : null;\n\n /* Set the parent array to the value in $elt['p']. */\n if (empty($this->_parent[$elt['p']])) {\n $this->_parent[$elt['p']] = array();\n }\n\n $this->_parent[$elt['p']][] = $elt['v'];\n $this->_tree[$elt['v']] = $elt;\n\n $this->_addEltDiff($elt, 'a');\n if (!is_null($prev) &&\n ($this->hasChildren($this->_tree[$elt['p']]) != $prev)) {\n $this->_addEltDiff($this->_tree[$elt['p']], 'c');\n }\n\n /* Make sure we are sorted correctly. */\n if (count($this->_parent[$elt['p']]) > 1) {\n $this->_setNeedSort($this->_tree[$elt['p']], true);\n }\n }",
"public function addEnd()\n {\n self::addExtends();\n $return=(count($this->item)<0)?$object = array():$this->item;\n return $return;\n }",
"public function insert() {\n \n }",
"public function append($items);",
"function addSubListIndex($supElem,$subElem){\r\n\t\tif($supElem->data==null) $supElem->data=new LinkedList($supElem->key);\r\n\t\t$supElem->data->insertLast($subElem);\r\n\t}",
"public function add($before, $key, $value)\n {\n if (!(is_string($key) || is_int($key))) {\n throw new \\OutOfRangeException('Offset invalid or out of range');\n }\n\n if ($this->offsetExists($key)) {\n throw new \\RuntimeException(\"$key must be unique\");\n }\n\n $after = null;\n $element = new Element($key, $value);\n $element->setBefore($before);\n\n if (is_null($before)) {\n // insert at the head\n $after = $this->head;\n $element->setAfter($after);\n $this->head = $element;\n } else {\n // insert between an element and the element that follows it\n $after = $before->getAfter();\n $before->setAfter($element);\n $element->setAfter($after);\n }\n\n if (is_null($after)) {\n // it was inserted at the tail\n $this->tail = $element;\n } else {\n $after->setBefore($element);\n }\n\n $this->elements[$key] = $element;\n }",
"function ArrayInsert( $array, $insert, $position ) {\n return array_slice($array, 0, $position, TRUE) + $insert + array_slice($array, $position, NULL, TRUE);\n}",
"private function endBlock()\n {\n end($this->_blocks);\n\n // grab key of that last element and fill it with rendered data\n $this->_blocks[key($this->_blocks)] = ob_get_clean();\n }",
"public function end()\n\t{\n\t\t$this->show('</ul>' . LF);\n\t}",
"public function add($elem) {\n\t\t$this->elems[] = $elem;\n\t}",
"public function append($obj) {\r\n\t\t$obj->pzkParentId = @$this->id;\r\n\t\t$this->children[] = $obj;\r\n\t}",
"function ad_insert_after_paragraph( $insertion, $paragraph_id, $content ) {\n $closing_p = '</p>';\n $paragraphs = explode( $closing_p, $content );\n foreach ($paragraphs as $index => $paragraph) {\n \n if ( trim( $paragraph ) ) {\n $paragraphs[$index] .= $closing_p;\n }\n \n //check for at least 5 paragraphs before displaying inline ad cube\n $minParagraphCount = 5;\n \t\tif ((count($paragraphs)-1) >= $minParagraphCount) {\n\t\t\tif ( $paragraph_id == $index + 1 ) {\n\t\t\t\t$paragraphs[$index] .= $insertion;\n\t\t\t}\n\t\t}\n }\n \n return implode( '', $paragraphs );\n}",
"function endElement($parser, $name)\r\n{\r\n\tglobal $currentElements;\r\n\t$currentCount = count($currentElements);\r\n\tif($currentElements[$currentCount-1] == $name)\r\n\t{\r\n\t\tarray_pop($currentElements);\r\n\t}\r\n}",
"function array_insert(&$array, $offset, $object, $replace=false){\r\n \r\n if(is_array($array)){\r\n if($replace ){\r\n if($offset<0) $offset = 0;\r\n else if($offset > count($array)-1) $offset = count($array)-1;\r\n $a1 = array_slice($array, 0, $offset);\r\n $a2 = array_slice($array, $offset+1);\r\n array_push($a1, $object);\r\n $array = array_merge($a1, $a2);\r\n }else{ \r\n if($offset == 0){\r\n array_unshift($array, $object);\r\n }else if($offset >= count($array)){\r\n array_push($array, $object);\r\n }else{ \r\n $a1 = array_slice($array, 0, $offset);\r\n $a2 = array_slice($array, $offset);\r\n array_push($a1, $object);\r\n $array = array_merge($a1, $a2);\r\n }\r\n }\r\n } \r\n }",
"public function append($data);",
"public function deleteLastRow()\n {\n array_pop($this->childNodes);\n }",
"function append($content) {\r\n\t\tif (is_string($content)) {\r\n\t\t\t$this->append($this->domFragment->createTextNode($content));\r\n\t\t} else {\r\n\t\t\t$this->root->appendChild($content);\r\n\t\t}\r\n\t}",
"public function addChild($child)\r\n\t{\r\n\t\t$this->last = $child->last;\r\n\r\n\t\t$this->entries []= $child;\r\n\t}",
"public function push($item, $whichEnd) \n {\n // Unfortunate kludge: when there is exactly 1 item in the deque the code cannot tell the difference between head and tail\n // So we temporarily increase the size of the array to make the difference noticeable\n // Since this is an issue specific to the deque, we cannot fix it at the level of the parent. We have do do something here,\n // because the parent only understands position and knows nothing of head and tail\n $this->__get('size');\n if ($this->size == 1) {\n \tparent::insert('void',1);\n }\n \n $position = $this->__get($whichEnd);\n $pushed = parent::insert($item,$position);\n \n // Remove the item we added\n $this->__get('size');\n if ($this->size == 2) {\n \t$position = ($whichEnd == 'tail') ? 1 : 2;\n \tparent::delete($position);\n }\n return $pushed;\n }",
"protected function afterInserting()\n {\n }",
"public function testExistedNodeSiblingsMoveAppendTo()\n {\n $model8 = Animal::findOne(8);\n \n $this->assertTrue($model8->appendTo($model8->parent()));\n $this->assertEquals(3, $model8->weight);\n }",
"public function push($element): void\n {\n if ($this->isFull()) {\n throw new \\BadMethodCallException('Cannot push element onto full stack.');\n }\n\n ++$this->size;\n\n $this->elements[] = $element;\n }",
"public function insertAfter(Element $newElement, Element $refElement)\n {\n $this->contentManager->insertAfter($newElement, $refElement);\n\n return $this;\n }",
"function insertChildAfter (&$node, &$reference) {\r\n if (!is_object ($node)) {\r\n return false;\r\n }\r\n \r\n // root nodes may not be children of other nodes!\r\n if ($node->_type == STRINGPARSER_NODE_ROOT) {\r\n return false;\r\n }\r\n \r\n // is the reference node a child?\r\n $child = $this->_findChild ($reference);\r\n \r\n if ($child === false) {\r\n return false;\r\n }\r\n \r\n // if node already has a parent\r\n if ($node->_parent !== false) {\r\n // remove node from there\r\n $parent =& $node->_parent;\r\n if (!$parent->removeChild ($node, false)) {\r\n return false;\r\n }\r\n unset ($parent);\r\n }\r\n \r\n $index = count ($this->_children) - 1;\r\n // move all nodes to a new index\r\n while ($index >= $child + 1) {\r\n // save object\r\n $object =& $this->_children[$index];\r\n // we have to unset it because else it will be\r\n // overridden in in the loop\r\n unset ($this->_children[$index]);\r\n // put object to new position\r\n $this->_children[$index+1] =& $object;\r\n $index--;\r\n }\r\n $this->_children[$child + 1] =& $node;\r\n return true;\r\n }",
"abstract public function insert ( \\Hoa\\Tree\\Generic $child );",
"function end_el( &$output, $item, $depth = 0, $args = array() ) {\n\t\tif ( $depth != 0 && $this->is_mega ) {\n\t\t\t$output .= '';\n\t\t} else {\n \t\t\t$output .= '</li>';\n \t\t}\n\t}",
"public static function insert()\n {\n }",
"public function add_or_replace()\n {\n $this->insert_replace('table', array('foo' => 'bar'));\n\n // you can also do\n $this->replace();\n $this->insert('table', array('foo' => 'bar'));\n }",
"public function push($el){\r\n\r\n array_push($this->data,$el);\r\n\r\n }"
] | [
"0.6487499",
"0.643295",
"0.6387605",
"0.6300646",
"0.62179756",
"0.6217104",
"0.6009154",
"0.6004396",
"0.59753656",
"0.593672",
"0.59366566",
"0.5902666",
"0.58653325",
"0.5814578",
"0.5807967",
"0.57936656",
"0.573627",
"0.5722106",
"0.56792575",
"0.5647194",
"0.5608734",
"0.55878764",
"0.55793923",
"0.557887",
"0.55700207",
"0.55584437",
"0.5555847",
"0.5527727",
"0.55264056",
"0.5520835",
"0.5513311",
"0.55081147",
"0.5487751",
"0.5476143",
"0.5464779",
"0.5463814",
"0.5451464",
"0.54389787",
"0.5437733",
"0.54354405",
"0.54232603",
"0.5419908",
"0.54066885",
"0.53847504",
"0.53803784",
"0.5368514",
"0.5368514",
"0.5368514",
"0.53487754",
"0.5348247",
"0.53478515",
"0.53064996",
"0.5302295",
"0.5271854",
"0.5271673",
"0.52710414",
"0.52663255",
"0.5262338",
"0.5261843",
"0.52528757",
"0.5245964",
"0.5244067",
"0.523875",
"0.52299976",
"0.52059704",
"0.5201695",
"0.5200209",
"0.51933986",
"0.51909226",
"0.5186668",
"0.51863855",
"0.51852375",
"0.5182598",
"0.51720965",
"0.51679766",
"0.5152733",
"0.51466227",
"0.51443845",
"0.5136053",
"0.5127137",
"0.51258004",
"0.51241225",
"0.51199484",
"0.51142263",
"0.51136047",
"0.5106385",
"0.5103471",
"0.50864166",
"0.5085234",
"0.50836563",
"0.50827605",
"0.5082074",
"0.5081957",
"0.5081132",
"0.5071153",
"0.50583756",
"0.5053502",
"0.5052943",
"0.5046019",
"0.50424397",
"0.50311893"
] | 0.0 | -1 |
Replaces a child at specified index with a new one. | public function replaceChild(Registry $child, $idx) {
if (isset($this->children[$idx])) {
$this->children[$idx] = $child;
$child->setParent($this);
return $child;
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public final function offsetSet($index, $child) : void\n {\n $this->insert($index, $child, \\true);\n }",
"public function replaceChildAtBy($index, AbstractClassContent $contentSet)\n {\n $index = (isset($index) && is_int($index)) ? $index : false;\n if (is_bool($index)) {\n throw new BBException(__METHOD__.' index parameter must be an integer');\n }\n $newContentsetArr = array();\n\n foreach ($this->getData() as $key => $content) {\n $contentToAdd = ($key == $index) ? $contentSet : $content;\n $newContentsetArr[] = $contentToAdd;\n }\n\n $this->clear();\n foreach ($newContentsetArr as $key => $content) {\n if ($content instanceof AbstractClassContent) {\n $this->push($content);\n }\n }\n\n return true;\n }",
"public function replaceChild($old, Element $new): Element\n {\n if (!is_int($old) && !($old instanceof Element)) {\n throw new \\InvalidArgumentException(\n 'argument one must be an index or element'\n );\n }\n\n $index = is_int($old) ? $old : $this->getChildIndex($old);\n\n if ($index === false || !array_key_exists($index, $this->children)) {\n throw new \\OutOfBoundsException(\n 'argument one must be a valid key or child element'\n );\n }\n\n $this->beforeInsert($new);\n\n $slice = array_splice($this->children, $index, 1, [$new]);\n\n $replaced = reset($slice);\n\n $this->afterDelete($replaced);\n\n return $replaced;\n }",
"public function replaceChildren($parent, $startChildIndex, $stopChildIndex, $t);",
"public function insertObject($obj, $index) {\r\n\t\t$obj->pzkParentId = @$this->id;\r\n\t\tarray_splice($this->children, $index, 0, $obj);\r\n\t}",
"public function moveToAttribute($index = null);",
"public function offsetUnset($index) : void\n {\n if (isset($this->children[$index])) {\n \\array_splice($this->children, $index, 1);\n }\n }",
"public function insertChild(Element $element, int $index): self\n {\n if (array_key_exists($index, $this->children)) {\n $this->beforeInsert($element);\n array_splice($this->children, $index, 0, [$element]);\n $this->afterInsert();\n } elseif ($index === count($this->children)) {\n $this->appendChild($element);\n } elseif ($index === 0) {\n $this->prependChild($element);\n } else {\n throw new \\OutOfBoundsException(\n 'index must be a valid key, zero, or length plus one'\n );\n }\n\n return $this;\n }",
"public function addChild($arg = \"\", $index = -1) {\n\t\tif ($index < 0 || $index >= count($this->children)-1) {\n\t\t\tif (is_array($arg)) {\n\t\t\t\tforeach ($arg as $a) {\n\t\t\t\t\t$this -> addChild($a);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($arg instanceof Node) {\n\t\t\t\t\tif ($arg -> parentNode) {\n\t\t\t\t\t\t$arg -> parentNode -> removeChild($arg);\n\t\t\t\t\t}\n\t\t\t\t\t$arg -> parentNode = $this;\n\t\t\t\t\treturn $this -> children[] = $arg;\n\t\t\t\t} elseif (is_string((string) $arg)) {\n\t\t\t\t\t$textNode = new TextNode($arg);\n\t\t\t\t\t$textNode -> parentNode = $this;\n\t\t\t\t\treturn $this -> children[] = $textNode;\n\t\t\t\t}\n\t\t\t}\n\t\t} elseif (is_int($index)) {\n\t\t\tfor ($i = count($this->children); $i >= $index; $i--) {\n\t\t\t\t$child = $this->children[$i];\n\t\t\t\t$this->children[$i+1] = $child;\n\t\t\t}\n\t\t\tif ($arg instanceof Node) {\n\t\t\t\tif ($arg -> parentNode) {\n\t\t\t\t\t$arg -> parentNode -> removeChild($arg);\n\t\t\t\t}\n\t\t\t\t$arg -> parentNode = $this;\n\t\t\t\treturn $this -> children[$index] = $arg;\n\t\t\t} elseif (is_string((string) $arg)) {\n\t\t\t\t$textNode = new TextNode($arg);\n\t\t\t\t$textNode -> parentNode = $this;\n\t\t\t\treturn $this -> children[$index] = $textNode;\n\t\t\t}\n\t\t}\n\t}",
"public function set(int $index, $value);",
"public function setElement(int $index, string $value): void {\n if($index >= $this->length()) {\n $this->elements[] = $value;\n } else {\n $this->elements[$index] = $value;\n }\n }",
"public function testNodeinsertAsChildAtPositionToNewNode()\n {\n $this->haveFixture('animal', 'an_addon', false);\n \n $model13 = Animal::findOne(13);\n $model = new Animal(['name' => 'new']);\n \n $this->expectExceptionMessage('You cannot add nodes to a new node');\n $model13->insertAsChildAtPosition($model, 3);\n }",
"public function set($index, $v) {\n $i = ($this->top + $index) % $this->size;\n $this->buf[$i] = $v;\n }",
"public function set($index, $value)\n {\n $value = $this->cube($value);\n parent::set($index, $value);\n }",
"public function insert($index, $value);",
"protected function createDuplicate($index = null, $insert = true)\n {\n $child = clone $this->field;\n\n if ($index === null) {\n $index = $this->index++;\n }\n\n if ($insert) {\n $this->children[$index] = $child;\n }\n\n $child->setParent($this);\n $this->prepareChild($child, $index, $this->parentPath);\n\n return $child;\n }",
"final public function replaceChild(CtkBuildable $node, CtkBuildable $replace) {\n\t\tthrow new CakeException(sprintf('Unknown child %s', get_class($replace)));\n\t}",
"public function removeChild($idx) {\n\t\tif (isset($this->children[$idx])) {\n\t\t\tarray_splice($this->children, $idx, 1);\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public function replaceValue(int $index, string $value)\n {\n $this->messageWithValues = $this->replaceTag(\n $index,\n $value,\n $this->messageWithValues\n );\n }",
"public function addChildTo($parentUuid, $childModel, $index = -1)\n {\n $parentNode = $this->findByPK($parentUuid);\n\n $parentNode->addChildUuid($childModel->uuid, $index);\n $parentNode->save();\n\n if ($childModel->parentUuid) {\n // update child model\n $childModel->parentUuid = $parentUuid;\n }\n return true;\n }",
"public function remove($index);",
"public function remove(int $index);",
"public function remove(int $index);",
"public function setIndex($position);",
"public function offsetSet(mixed $name, mixed $child): void\n {\n $this->add($child);\n }",
"public function at($index);",
"public function remove_child(int $position){\n $this -> children -> delete($position);\n }",
"final public function __set($index, $value)\n {\n $this->_registry->$index = $value;\n }",
"function _relocate_children($old_ID, $new_ID)\n {\n }",
"public function moveNode(?PhpcrChildrenInterface $newParent = null, ?string $newNodename = null);",
"public function set($child) {\n\t\t$this->childs = array($child);\n\t}",
"public function removeAt($index)\n {\n unset($this->entities[$index]);\n }",
"function removeAt($index)\r\n\t\t{\r\n\t\t\tarray_splice($this->elements, $index, 1);\r\n\t\t}",
"public function setCard($index,Card $val) :void\n {\n if($index>=0 && $index<=47)\n $this->cards[$index]=$val;\n }",
"public function remove($index)\r\n\t{\r\n\t}",
"public function insert($index, $value) {\n if ($index == 0) {\n $this->pushFront($value);\n return;\n } elseif ($index == $this->size - 1) {\n $this->pushBack($value);\n return;\n }\n $prev = NULL;\n $curr = $this->head;\n $i = 0;\n while ($i < $index) {\n $prev = $curr;\n $curr = $curr->next;\n $i++;\n }\n $node = new Node($value);\n $prev->next = $node;\n $node->next = $curr;\n $this->size++;\n }",
"public function offsetSet($index, $newval);",
"public function offsetSet($index, $object)\r\n\t{\r\n\t\tif( $index === null )\r\n\t\t{\r\n\t\t\t$index = $object->get($this->obj->primaryKey);\r\n\t\t}\r\n\r\n\t\tif( !isset($this->keyAssocation[$index]) )\r\n\t\t{\r\n\t\t\t$this->keyAssocation[$index] = $this->count++;\r\n\t\t}\r\n\r\n\t\t$this->elements[$this->keyAssocation[$index]] = $object;\r\n\t}",
"public function reIndex() {\n $index = collect([]);\n // Loop through each of the blueprints\n $this->getBlueprints()->each(function($blueprint,$k) use ($index) {\n // Pass each blueprint through the to reference process\n $blueprint->toReference($index);\n });\n // Replace the current index value\n $this->index = $index;\n // Return for chaining\n return $this;\n }",
"function putIndex(){\n\n }",
"function putIndex(){\n\n }",
"public function insertAt($index, $item)\n {\n parent::insertAt($index, $this->createObject($item));\n }",
"function put($index = '',$xss_clean=FALSE)\n\t{\n\t\treturn $this->_fetch_from_array($this->put_var, $index, $xss_clean);\n\t}",
"public function getChildByIndex($index)\n {\n $index = intval($index);\n\n return ((null !== $this->children) && array_key_exists($index, $this->children)) ? $this->children[$index] : null;\n }",
"protected function moveTo(int $index): int\n {\n if ($this->hasNodeId()) {\n $ranks = $this->ranks;\n $ranks = array_diff($ranks, [$this->nodeId]);\n array_splice($ranks, $index, 0, $this->nodeId);\n $this->commit($ranks);\n\n return $index;\n }\n }",
"function deleteByIndex($p_index)\n {\n }",
"public function removeProgramChild($index){\n unset($this->programChildArrayList[$index]);\n }",
"public function offsetSet($index, $value) {\n return;\n }",
"function _setParent($parent_srl, $child_index, &$target)\n\t{\n\t\t$child_srl = $this->itemKeyList[$child_index];\n\t\t$this->checked[$child_srl] = 1;\n\n\t\t$child_node = new stdClass();\n\t\t$child_node->node = $child_srl;\n\t\t$child_node->parent_node = $parent_srl;\n\t\t$child_node->child = array();\n\t\t$target->child[] = $child_node;\n\n\t\twhile(count($this->map[$child_srl]))\n\t\t{\n\t\t\t$this->_setParent($child_srl, array_shift($this->map[$child_srl]), $child_node);\n\t\t}\n\t\t//return $target;\n\t}",
"public function revertIndex($index, $dataType);",
"public function offsetSet($index, $newval)\n\t{\n\t\tif ($index === null)\n\t\t{\n\t\t\t$this[] = $newval;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tparent::offsetSet($index, $newval);\n\t\t}\n\t}",
"public function add($item, int $index): void;",
"public function __set($index, $value) {\n\n\t\tif ($this->_hasAdapter(get_class(), __FUNCTION__))\n\t\t\treturn $this->_callAdapter(get_class(), __FUNCTION__, $index, $value);\n\n\t\t$filtered = $this->_applyFilter(get_class(), __FUNCTION__, array(\n\t\t\t'index' => $index,\n\t\t\t'value' => $value\n\t\t), array('event' => 'args'));\n\t\t\n\t\t$index = $filtered['index'];\n\t\t$value = $filtered['value'];\n\n\t\tif ($this->_collection === null) {\n\t\t\t$this->_collection = new Collection();\n\t\t}\n\t\t$this->_collection->addWithName($index, $value);\n\t\t$this->_notify(get_class() . '::' . __FUNCTION__, $index, $value);\n\t}",
"public function testAddChild_Modification()\n\t{\n\t\t$this->object->AddChild($this->child);\n\t\t$this->child->attribute = \"changed att\";\n\t\t$this->assertEquals(\"changed att\", $this->object->childList[0]->attribute);\n\t}",
"public function item($index)\n {\n return parent::item($index);\n }",
"public function item($index)\n {\n return parent::item($index);\n }",
"public function item($index)\n {\n return parent::item($index);\n }",
"public function item($index)\n {\n return parent::item($index);\n }",
"public function item($index)\n {\n return parent::item($index);\n }",
"public function item($index)\n {\n return parent::item($index);\n }",
"public function item($index)\n {\n return parent::item($index);\n }",
"public function item($index)\n {\n return parent::item($index);\n }",
"public function item($index)\n {\n return parent::item($index);\n }",
"public function item($index)\n {\n return parent::item($index);\n }",
"public function item($index)\n {\n return parent::item($index);\n }",
"public function item($index)\n {\n return parent::item($index);\n }",
"public function item($index)\n {\n return parent::item($index);\n }",
"public function item($index)\n {\n return parent::item($index);\n }",
"public function item($index)\n {\n return parent::item($index);\n }",
"function updateElementAtIndex($list, $value, $index)\n{\n if (isset($list[$index])) {\n $list[$index] = $value;\n }\n return $list;\n}",
"public function offsetSet($index, $newval)\n {\n parent::offsetSet($index, $newval & 0xff);\n }",
"public function insert($index, $value) \r\n {\r\n if($this->isInvalidIndex($index)) \r\n {\r\n throw new ArgumentOutOfRangeException(\"index is less than zero or greater than the current length of this instance.\");\r\n }\r\n \r\n $this->addElement($value, $index);\r\n }",
"public function offsetSet($index, $newval)\n {\n }",
"abstract public function insert ( \\Hoa\\Tree\\Generic $child );",
"#[\\ReturnTypeWillChange]\n public function offsetSet($index, $value)\n {\n }",
"public function removeChild($position = null, $forceDelete = false);",
"abstract public function wipeIndex();",
"public function setIdx( $idx ) { $this->idx = $idx; return $this; }",
"public function insert( $index, $value )\n {\n throw new UnmodifiableException(\"This collection cannot be changed\");\n }",
"public function delete($index) {\n\t\t// remove the value in the array at the appropriate index\n\t\tarray_splice($this->store, $index, 1);\n\t\treturn $this;\n\t}",
"public static function set($index, $value)\n {\n self::$registry[$index] = $value;\n }",
"public function getChildAt($position, array $columns = ['*']);",
"public function child($index = 0)\r\n {\r\n if (is_null($index)) {\r\n return $this->childs; \r\n }\r\n if (array_key_exists($index, $this->childs)) {\r\n return $this->childs[$index];\r\n }\r\n return false;\r\n }",
"#[\\ReturnTypeWillChange]\n public final function offsetGet($index)\n {\n return $this->children[$index];\n }",
"public function resetIndex()\n {\n $this->setIndex(0);\n }",
"public function insertAt($index,$item)\n\t{\n\t\tif(!is_string($item)) // string is possible if property tag is used. we simply ignore it in this case\n\t\t\tparent::insertAt($index,$item); // this will generate an exception in parent implementation\n\t}",
"function reIndex($cval=1,$level=0) {\n\t\t$cval++;\n\t\t$lft = $cval;\n\t\tforeach ($this->children as $child) {\n\t\t\t$cval = $child->reIndex($cval,$level+1);\n\t\t}\n\t\t$cval++;\n\t\t$rgt = $cval;\n\t\tif (($this->lft != $lft) || ($this->rgt != $rgt) || ($this->level != $level)) {\n\t\t\t$this->fixes[] = 'Changing LFT('.$this->lft.'->'.$lft.'),RGT('.$this->rgt.'->'.$rgt.'),LEVEL('.$this->level.'->'.$level.') of asset at reindex.';\n\t\t\t$this->container->fixed[] = $this;\n\t\t}\n\t\t$this->lft = $lft;\n\t\t$this->rgt = $rgt;\n\t\t$this->level = $level;\n\t\tprint '.';\n\t\t// return value is RGT of child element\n\t\treturn $cval;\n\t}",
"public function setChild($child)\n {\n $this->child = $child;\n }",
"public function remove($index)\n {\n if (!isset($this->rows[$index])) {\n return;\n }\n\n unset($this->rows[$index]);\n $this->render();\n }",
"public function removeChild($child)\n {\n $child = $this->index($child);\n if ($child >= 0) {\n $this->nodes[$child]->parent = null;\n array_splice($this->nodes, $child, 1);\n if (!empty($this->indexes)) {\n foreach ($this->indexes as $id => $index) {\n if ($index >= $child) {\n $this->indexes[$id] = $index - 1;\n }\n }\n }\n }\n\n return $this;\n }",
"public function reIndex() {\n $index = collect([]);\n // Loop through each of the hydrated fields\n $this->getHydrated()->each(function($field,$k) use ($index) {\n // Pass each field through the toPath process\n $field->toPath($index);\n });\n // Replace the current index value\n $this->index = $index;\n // Return for chaining\n return $this;\n }",
"public function removeChild($arg): Element\n {\n if (!($arg instanceof Element) && !is_int($arg)) {\n throw new \\InvalidArgumentException(\n 'argument must be an integer or element'\n );\n }\n\n $index = is_int($arg) ? $arg : $this->getChildIndex($arg);\n\n if ($index === false || !array_key_exists($index, $this->children)) {\n throw new \\OutOfBoundsException(\n 'argument must be a valid child element or key'\n );\n }\n\n $this->beforeDelete();\n\n $slice = array_splice($this->children, $index, 1);\n\n $removed = reset($slice);\n\n $this->afterDelete($removed);\n\n return $removed;\n }",
"public function pop($index = null);",
"public function shiftChild(MenuPresenceInterface $presence): void\n {\n $children = $this->children ?: [];\n\n if ($children instanceof Collection) {\n $children->prepend($presence);\n } else {\n $children = Arr::prepend($children, $presence);\n }\n\n $this->children = $children;\n }",
"public function __set($index, $value) {\n $this->vars[$index] = $value;\n }",
"public function offsetSet($index, $value):void {\n\t// Remove all elements in collection:\n\tfor($i = 0; $i < count($this->_elArray); $i++) {\n\t\t$this->offsetUnset($i);\n\t}\n\t$this->rewind();\n\n\t// Create empty array, fill with provided element(s):\n\t$this->_elArray = array();\n\n\tif(is_array($value)) {\n\t\t$this->_elArray = $value;\n\t}\n\telse if($value instanceof DomEl) {\n\t\t$this->_elArray[] = $value;\n\t}\n\telse if($value instanceof DomElCollection) {\n\t\tforeach ($value as $el) {\n\t\t\t$this->_elArray[] = $el;\n\t\t}\n\t}\n}",
"public function removeField($index) {\n\t\t$this->fields[$index] = null;\n\t}",
"public function removeField($index) {\n\t\t$this->fields[$index] = null;\n\t}",
"public static function prepend($index, $value)\n {\n self::exist($index);\n array_unshift(self::$registry[$index], $value);\n }",
"public function deleteItemOrder($index)\n {\n array_splice($this->orders, $index, 1);\n }"
] | [
"0.70758265",
"0.69833785",
"0.6371363",
"0.6203739",
"0.6189019",
"0.6065144",
"0.5871742",
"0.5864379",
"0.58496493",
"0.5647594",
"0.562085",
"0.5592612",
"0.55052125",
"0.5453277",
"0.54223955",
"0.5397076",
"0.53816086",
"0.5359806",
"0.53596807",
"0.53541595",
"0.5336164",
"0.5329296",
"0.5329296",
"0.53286964",
"0.530829",
"0.5302451",
"0.5282371",
"0.528131",
"0.52428615",
"0.52297765",
"0.5174399",
"0.51738024",
"0.5170932",
"0.51617986",
"0.51424456",
"0.5131557",
"0.5124744",
"0.5101468",
"0.509585",
"0.50942075",
"0.50942075",
"0.5091462",
"0.50747913",
"0.50438106",
"0.50239253",
"0.5008692",
"0.4989628",
"0.4988622",
"0.49875233",
"0.49869636",
"0.49831387",
"0.49540177",
"0.49521607",
"0.4951582",
"0.49512",
"0.49512",
"0.49512",
"0.49512",
"0.49512",
"0.49512",
"0.49512",
"0.49512",
"0.49512",
"0.49512",
"0.49512",
"0.49512",
"0.49512",
"0.49512",
"0.49512",
"0.4949946",
"0.49358594",
"0.49328429",
"0.4930075",
"0.4915802",
"0.48939025",
"0.48844868",
"0.48815936",
"0.48812956",
"0.48797888",
"0.4878727",
"0.48746938",
"0.4873224",
"0.48419002",
"0.4818133",
"0.48112857",
"0.48099166",
"0.48066103",
"0.48038515",
"0.4798919",
"0.4780503",
"0.47638658",
"0.47515297",
"0.4750636",
"0.47376072",
"0.47360733",
"0.47270668",
"0.47257012",
"0.47257012",
"0.47188246",
"0.4713218"
] | 0.6580262 | 2 |
Removes a child at specified index. | public function removeChild($idx) {
if (isset($this->children[$idx])) {
array_splice($this->children, $idx, 1);
return true;
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function remove(int $index);",
"public function remove(int $index);",
"public function remove($index);",
"public function offsetUnset($index) : void\n {\n if (isset($this->children[$index])) {\n \\array_splice($this->children, $index, 1);\n }\n }",
"public function remove_child(int $position){\n $this -> children -> delete($position);\n }",
"public function removeProgramChild($index){\n unset($this->programChildArrayList[$index]);\n }",
"public function remove($index)\r\n\t{\r\n\t}",
"public function removeAt($index)\n {\n unset($this->entities[$index]);\n }",
"function removeAt($index)\r\n\t\t{\r\n\t\t\tarray_splice($this->elements, $index, 1);\r\n\t\t}",
"public function removeChild($arg): Element\n {\n if (!($arg instanceof Element) && !is_int($arg)) {\n throw new \\InvalidArgumentException(\n 'argument must be an integer or element'\n );\n }\n\n $index = is_int($arg) ? $arg : $this->getChildIndex($arg);\n\n if ($index === false || !array_key_exists($index, $this->children)) {\n throw new \\OutOfBoundsException(\n 'argument must be a valid child element or key'\n );\n }\n\n $this->beforeDelete();\n\n $slice = array_splice($this->children, $index, 1);\n\n $removed = reset($slice);\n\n $this->afterDelete($removed);\n\n return $removed;\n }",
"public function remove($index)\n {\n if (!isset($this->rows[$index])) {\n return;\n }\n\n unset($this->rows[$index]);\n $this->render();\n }",
"function deleteByIndex($p_index)\n {\n }",
"public function removeChild($child)\n {\n $child = $this->index($child);\n if ($child >= 0) {\n $this->nodes[$child]->parent = null;\n array_splice($this->nodes, $child, 1);\n if (!empty($this->indexes)) {\n foreach ($this->indexes as $id => $index) {\n if ($index >= $child) {\n $this->indexes[$id] = $index - 1;\n }\n }\n }\n }\n\n return $this;\n }",
"public function removeChild($position = null, $forceDelete = false);",
"public function remove( $index )\n {\n if(isset($this->processes[$index]))\n {\n unset($this->processes[$index]);\n }\n }",
"abstract public function removeItemChild($itemName, $childName);",
"public function deleteRow($index)\n {\n unset($this->data[$index]);\n }",
"public function remove($index)\n {\n unset($this->hosts[$index]);\n }",
"public function getChildByIndex($index)\n {\n $index = intval($index);\n\n return ((null !== $this->children) && array_key_exists($index, $this->children)) ? $this->children[$index] : null;\n }",
"public function _unset() {\r\n\t\t$index = 0;\r\n\t\t$children = $this->_parent()->_children();\r\n\t\tforeach ($children as $child) {\r\n\t\t\tif ($child->identifier() == $this->identifier()) {\r\n\t\t\t\t$this->_parent()->_removeChildAtIndex($index);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$index++;\r\n\t\t}\r\n\t\t\r\n\t\treturn $index;\r\n\t}",
"public function remove($index) {\n unset($this->list[$index]);\n\n return $this;\n }",
"public function removeAt( $index )\n\t\t{\n\t\t\tif( isset( $this->items[(int)$index] ))\n\t\t\t{\n\t\t\t\tunset( $this->items[(int)$index] );\n\t\t\t\t$this->items = array_values( $this->items );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new \\System\\Base\\ArgumentOutOfRangeException(\"Argument out of range in \".get_class($this).\"::removeAt()\");\n\t\t\t}\n\t\t}",
"function delete($index = '',$xss_clean=FALSE)\n\t{\n\t\treturn $this->_fetch_from_array($this->delete_var, $index, $xss_clean);\n\t}",
"public function remove($index)\n {\n $this->lines = \\array_diff_key($this->lines, array($index => ''));\n\n $this->write();\n }",
"public function removeField($index) {\n\t\t$this->fields[$index] = null;\n\t}",
"public function removeField($index) {\n\t\t$this->fields[$index] = null;\n\t}",
"public function pop($index = null);",
"public function remove_row(int $position){\n $this -> remove_child($position);\n }",
"public function removeAt($index) {\n if (!$this->isReadOnly) {\n if (key_exists($index, $this->items)) {\n unset($this->items[$index]);\n $this->count -= 1;\n } else {\n throw new Exception(\"Index out of range. The index {$index} is out of range of the collection\", 0);\n }\n } else {\n throw new Exception(\"Cannot remove item from read only collection\", 0);\n }\n }",
"public function delete($index) {\n\t\t// remove the value in the array at the appropriate index\n\t\tarray_splice($this->store, $index, 1);\n\t\treturn $this;\n\t}",
"public function delete( int $index ): Collection;",
"public function dropIndex(): void;",
"public function removeItem($index) {\n $this->sessionCart->removeItem($index);\n }",
"public function offsetUnset($index);",
"public function remove_cell(int $position){\n $this -> children -> delete($position);\n }",
"public function removeChild(CategoryTreeNodeInterface $child);",
"private function removeFs(int $index): void\n {\n\n unset($this->fs[$index]);\n\n }",
"public function RemoveRowByIndex($index) {\n return $this->RemoveByIndex($index);\n }",
"public function remove($index) {\n if (isset($this->arguments[$index])) {\n unset($this->arguments[$index]);\n }\n return $this;\n }",
"public function child($index = 0)\r\n {\r\n if (is_null($index)) {\r\n return $this->childs; \r\n }\r\n if (array_key_exists($index, $this->childs)) {\r\n return $this->childs[$index];\r\n }\r\n return false;\r\n }",
"public function deleteItemOrder($index)\n {\n array_splice($this->orders, $index, 1);\n }",
"public function offsetUnset($index)\n {\n unset($this->entities[$index]);\n }",
"final public function removeChild ()\n {\n throw new ChildException('Trying to remove child from self closing HTML element');\n }",
"public function actionRemoveChild()\n\t{\n\t\t// We only allow deletion via POST request\n\t\tif( Yii::app()->request->isPostRequest===true )\n\t\t{\n\t\t\t$itemName = $this->getItemName();\n\t\t\t$childName = $this->getChildName();\n\t\t\t\n\t\t\t// Remove the child and load it\n\t\t\t$this->_authorizer->authManager->removeItemChild($itemName, $childName);\n\t\t\t$child = $this->_authorizer->authManager->getAuthItem($childName);\n\t\t\t$child = $this->_authorizer->attachAuthItemBehavior($child);\n\n\t\t\t// Set a flash message for removing the child\n\t\t\tYii::app()->user->setFlash($this->module->flashSuccessKey,\n\t\t\t\tRights::t('core', 'Child :name removed.', array(':name'=>$child->getNameText()))\n\t\t\t);\n\n\t\t\t// If AJAX request, we should not redirect the browser\n\t\t\tif( isset($_POST['ajax'])===false )\n\t\t\t\t$this->redirect(array('authItem/update', 'name'=>urlencode($itemName)));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new CHttpException(400, Rights::t('core', 'Invalid request. Please do not repeat this request again.'));\n\t\t}\n\t}",
"public function offsetUnset($index)\n {\n }",
"public function remove($index)\n {\n\n $flag = parent::remove($index);\n\n $this->items = array_values($this->items);\n\n return $flag;\n\n }",
"function deleteAnswer($index = 0)\n\t{\n\t\tif ($index < 0) return;\n\t\tif (count($this->answers) < 1) return;\n\t\tif ($index >= count($this->answers)) return;\n\t\tunset($this->answers[$index]);\n\t\t$this->answers = array_values($this->answers);\n\t\tfor ($i = 0; $i < count($this->answers); $i++)\n\t\t{\n\t\t\tif ($this->answers[$i]->getOrder() > $index)\n\t\t\t{\n\t\t\t\t$this->answers[$i]->setOrder($i);\n\t\t\t}\n\t\t}\n\t}",
"abstract public function wipeIndex();",
"public function deleteNode()\n {\n \n $arra_sub_tree=$this->getSubTree($this->int_my_position);\n \n $this->setPositionToParent();\n \n foreach($arra_sub_tree as $node)\n { \n $index=$this->getIndexById($node['my_id']);\n $this->arra_node_to_delete[]=$node['my_id'];\n unset($this->arra_tree[$index]);\n }\n\n }",
"final public function removeChild(CtkBuildable $node) {\n\t\tthrow new CakeException(sprintf('Unknown child %s', get_class($node)));\n\t}",
"function rm_child($child_id) {\n $t = @$this->triples[$child_id];\n if($t) {\n unset($this->children[$t->parent_id][$child_id]);\n unset($this->triples[$child_id]);\n }\n }",
"public function removeStory($index)\n\t\t{\n\t\t\t$story = $_POST[\"$index\"];\n\t\t\t$removeStoryQuery = \"DELETE FROM `BreakingNews` WHERE `News` = \\\"$story\\\"\";\n\t\t\t$this->connection->query($removeStoryQuery);\n\t\t}",
"#[Route(path: '/{id}/removeChild/{child}', name: 'lsitem_remove_child', methods: ['POST'])]\n #[IsGranted(Permission::ITEM_EDIT, 'lsItem')]\n public function removeChild(LsItem $parent, LsItem $child): Response\n {\n $command = new RemoveChildCommand($parent, $child);\n $this->sendCommand($command);\n\n return $this->render('framework/ls_item/remove_child.html.twig', []);\n }",
"private function delCategory($idx) {\n \t$query = Category::find()->where('ID != 1 && PARENTID='.$idx)->all();\n \tforeach($query as $items) {\n \t\t$this->delCategory($items['ID']);\n \t}\n\n \t$Postmodel = Products::findAll(['CATEGORYID'=>$idx]);\n \tforeach($Postmodel as $items) {\n \t\t$items->CATEGORYID = 0;\n \t\t$items->save();\n \t}\n \t$this->findModel_category($idx)->delete();\n }",
"public function removeColumn($index) {\n\t\t$this->columns[$index] = null;\n\t}",
"public function delete(int $index, BoardItem $item): bool {\n\n if ($this->indexExist($index)) {\n $this->cells[$index]->removeItem($item);\n }\n return $this;\n }",
"public function removeArgument($index) {\n @trigger_error('removeArgument() is deprecated in 8.x-2.3, will be removed in 8.x-3.0. Use ::remove() instead. See https://www.drupal.org/project/imagemagick/issues/2936615.', E_USER_DEPRECATED);\n return $this->remove($index);\n }",
"public function moveToAttribute($index = null);",
"public function addChild($arg = \"\", $index = -1) {\n\t\tif ($index < 0 || $index >= count($this->children)-1) {\n\t\t\tif (is_array($arg)) {\n\t\t\t\tforeach ($arg as $a) {\n\t\t\t\t\t$this -> addChild($a);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($arg instanceof Node) {\n\t\t\t\t\tif ($arg -> parentNode) {\n\t\t\t\t\t\t$arg -> parentNode -> removeChild($arg);\n\t\t\t\t\t}\n\t\t\t\t\t$arg -> parentNode = $this;\n\t\t\t\t\treturn $this -> children[] = $arg;\n\t\t\t\t} elseif (is_string((string) $arg)) {\n\t\t\t\t\t$textNode = new TextNode($arg);\n\t\t\t\t\t$textNode -> parentNode = $this;\n\t\t\t\t\treturn $this -> children[] = $textNode;\n\t\t\t\t}\n\t\t\t}\n\t\t} elseif (is_int($index)) {\n\t\t\tfor ($i = count($this->children); $i >= $index; $i--) {\n\t\t\t\t$child = $this->children[$i];\n\t\t\t\t$this->children[$i+1] = $child;\n\t\t\t}\n\t\t\tif ($arg instanceof Node) {\n\t\t\t\tif ($arg -> parentNode) {\n\t\t\t\t\t$arg -> parentNode -> removeChild($arg);\n\t\t\t\t}\n\t\t\t\t$arg -> parentNode = $this;\n\t\t\t\treturn $this -> children[$index] = $arg;\n\t\t\t} elseif (is_string((string) $arg)) {\n\t\t\t\t$textNode = new TextNode($arg);\n\t\t\t\t$textNode -> parentNode = $this;\n\t\t\t\treturn $this -> children[$index] = $textNode;\n\t\t\t}\n\t\t}\n\t}",
"public function removeAt($key);",
"function remove($rowindex) {\r\n assert($this->ds->_rowid[$rowindex] != '');\r\n # before deleting row, check if there's a file field, and its value is exist, then delete the assocaiated file first\r\n $um = NULL;\r\n $row = NULL;\r\n foreach ($this->properties as $colvar=>$col) {\r\n if ($col->inputtype == 'file' and $col->datatype == 'int') {\r\n # populate this row first (just once, in case there is more than 1 file field)\r\n if (!$row)\r\n $row = $this->get_row(array('rowid'=>$this->ds->_rowid[$rowindex]));\r\n if (!$row) continue;\r\n $file_id = $row[$col->colname];\r\n if (!$um)\r\n $um = instantiate_module('upload_manager');\r\n $um->del_file($file_id); # del the file\r\n }\r\n }\r\n\r\n $sql = 'delete from `'.$this->db_table.'` where rowid='.$this->ds->_rowid[$rowindex].' limit 1'; # with safeguard\r\n #~ echo '<br>'.$sql;\r\n $res = mysql_query($sql) or die('<br>'.$sql.'<br>'.mysql_error()); #do to database\r\n }",
"public function removeAt($index){\n if(isset($this->items[$index])){\n unset($this->items[$index]);\n return true;\n }\n return false;\n }",
"public function remove($item) {\n $index = self::IndexOf($item);\n self::RemoveAt($index);\n }",
"public function unsetImage($index)\n {\n unset($this->image[$index]);\n }",
"public function remove(string $path) : void\n {\n if (!$this->exists($path)) {\n throw new \\RuntimeException(sprintf('The provided child path %s does not exist on path %s (component %s).', $path, $this->get_path(), $this->get_component() ));\n }\n unset($this->children[$path]);\n }",
"public function delete($position)\n {\n array_splice($this -> nodes, $position, 1);\n }",
"public function replaceChildAtBy($index, AbstractClassContent $contentSet)\n {\n $index = (isset($index) && is_int($index)) ? $index : false;\n if (is_bool($index)) {\n throw new BBException(__METHOD__.' index parameter must be an integer');\n }\n $newContentsetArr = array();\n\n foreach ($this->getData() as $key => $content) {\n $contentToAdd = ($key == $index) ? $contentSet : $content;\n $newContentsetArr[] = $contentToAdd;\n }\n\n $this->clear();\n foreach ($newContentsetArr as $key => $content) {\n if ($content instanceof AbstractClassContent) {\n $this->push($content);\n }\n }\n\n return true;\n }",
"public function removeChild($name)\n\t{\n\t\treturn $this->_auth->removeItemChild($this->_calendarId,$this->_name,$name);\n\t}",
"public function unsetItemID($index)\n {\n unset($this->itemID[$index]);\n }",
"public function offsetUnset($index):void {\n\tunset($this->_elArray[$index]);\n\t$this->_elArray = array_values($this->_elArray);\n}",
"public function removeChild($childNode)\r\n {\r\n unset($this->_childNodes[$childNode->id]);\r\n $childNode->setParentNode(null);\r\n }",
"public function unsetAdditional($index)\n {\n unset($this->additional[$index]);\n }",
"public function unsetRemark($index)\n {\n unset($this->remark[$index]);\n }",
"public function removeChild( Component $child ) {\n\t\tparent::removeChild( $child );\n\t\t$child->setOrphan();\n\t}",
"public function unsetFee($index)\n {\n unset($this->fee[$index]);\n }",
"#[\\ReturnTypeWillChange]\n public final function offsetGet($index)\n {\n return $this->children[$index];\n }",
"public function unsetDescription($index)\n {\n unset($this->description[$index]);\n }",
"public function unsetDescription($index)\n {\n unset($this->description[$index]);\n }",
"public function unsetDescription($index)\n {\n unset($this->description[$index]);\n }",
"public function unsetDescription($index)\n {\n unset($this->description[$index]);\n }",
"protected function deleteChildren() {}",
"function deleteByIndex($p_index)\n {\n\n $p_list = $this->delete(PCLZIP_OPT_BY_INDEX, $p_index);\n\n // ----- Return\n return $p_list;\n }",
"public function removeAt( $index )\n {\n throw new UnmodifiableException(\"This collection cannot be changed\");\n }",
"public static function remove($key, $index)\n {\n array_splice($_SESSION[$key], $index, 1);\n }",
"protected static function delete($index) {\n\t\t\t$curl = self::socket();\n\n\t\t\tcurl_setopt($curl, CURLOPT_URL, self::$baseUrl . $index);\t\t//Url setup\n\t\t\tcurl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'DELETE');\t\t\t//DELETE request setup\n\t\t\treturn self::data_decode(curl_exec($curl)); \t\t //Launch and return decrypted data\n\t\t}",
"function inscription_jesa_link_remove_child($form, &$form_state) {\n if ($form_state['num_stagiaires'] > 1) {\n $form_state['num_stagiaires']--;\n }\n\n // Setting $form_state['rebuild'] = TRUE causes the form to be rebuilt again.\n $form_state['rebuild'] = TRUE;\n}",
"public final function offsetSet($index, $child) : void\n {\n $this->insert($index, $child, \\true);\n }",
"protected function deleteIndex(string $index): void\n {\n $engine = $this->app->make(EngineManager::class)->engine();\n $task = $engine->deleteIndex($index);\n $engine->waitForTask($task['taskUid']);\n }",
"public function offsetUnset($index)\r\n\t{\r\n\t\t$this->count--;\r\n\t\tunset($this->elements[$this->keyAssocation[$index]]);\r\n\t\tunset($this->keyAssocation[$index]);\r\n\t\tif( $index == $this->i )\r\n\t\t{\r\n\t\t\t$this->i--;\r\n\t\t}\r\n\t\treturn $this->elements[$this->i];\r\n\t}",
"public function deleteFrom($record = null, $index = null) {\n $array = $this->readFile();\n if (is_null($record)) {\n $array = [];\n }\n else if (!is_null($record) && is_null($index)) {\n $array[$record] = null;\n for ($i = $record; $i < count($array); $i++) {\n if ($i == count($array) - 1) {\n $array[$i] = null;\n break;\n }\n $array[$i] = $array[$i + 1];\n }\n }\n else {\n $array[$record][$index] = null;\n for ($i = $index; $i < count($array[$record]); $i++) {\n if ($i == count($array[$record]) - 1) {\n $record[$i] = null;\n break;\n }\n $array[$record][$i] = $array[$record][$i + 1];\n }\n }\n $this->writeFile($array);\n }",
"public function deleteCookieItem($index) {\n\t\tif($this->cookieIsset()){\n\t\t\t$currentCookie = unserialize($_COOKIE[$this->cookieName]);\n\n\t\t\tforeach($currentCookie as $key => $value) {\n\t\t\t\tif(array_key_exists($index, $currentCookie) || $key == $index) {\n\t\t\t\t\tunset($currentCookie[$index]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$updatedCookie = serialize($currentCookie);\n\t\t\tsetCookie($this->cookieName, $updatedCookie, time() + 100000000000);\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}",
"public static function deleteIndex()\n {\n $db = static::getDb();\n $command = $db->createCommand();\n $command->deleteIndex(static::index(), static::type());\n }",
"public function removeFieldSet($index) {\n\t\t$this->fieldsets[$index] = null;\n\t}",
"public function offsetUnset($index): void\n {\n throw new \\Exception('Not (yet) supported');\n }",
"public function unsetRelatedParty($index)\n {\n unset($this->relatedParty[$index]);\n }",
"public function removeChild($child)\n {\n $this->children->removeElement($child);\n\n return $this;\n }",
"public function offsetUnset($index)\n\t{\n\t\tif (isset($this->_messages[$index]))\n\t\t{\n\t\t\tarray_splice($this->_messages, $index, 1);\n\t\t}\n\t}",
"public function unsetNote($index)\n {\n unset($this->note[$index]);\n }",
"public function unsetNote($index)\n {\n unset($this->note[$index]);\n }",
"public function unsetNote($index)\n {\n unset($this->note[$index]);\n }"
] | [
"0.75093204",
"0.75093204",
"0.7296033",
"0.7221526",
"0.7153167",
"0.6943415",
"0.68844134",
"0.6698783",
"0.6676434",
"0.66682124",
"0.65533197",
"0.64930457",
"0.646308",
"0.64092046",
"0.62842226",
"0.6179004",
"0.6165626",
"0.6146257",
"0.61371595",
"0.6116363",
"0.6093764",
"0.6060757",
"0.60559237",
"0.6001681",
"0.5995178",
"0.5995178",
"0.59919155",
"0.5985112",
"0.5967457",
"0.5946729",
"0.59347534",
"0.59201545",
"0.590813",
"0.58589023",
"0.58065665",
"0.5788094",
"0.57854104",
"0.57813394",
"0.576958",
"0.57410747",
"0.57067114",
"0.568458",
"0.5676461",
"0.5673559",
"0.56565017",
"0.5651334",
"0.56450886",
"0.56310207",
"0.55950755",
"0.5581368",
"0.5579816",
"0.5574384",
"0.55730945",
"0.55694866",
"0.5555872",
"0.5532933",
"0.55291796",
"0.5521312",
"0.54979825",
"0.54842365",
"0.54684675",
"0.5445384",
"0.543991",
"0.54188484",
"0.5389325",
"0.538607",
"0.5371843",
"0.5366861",
"0.53273976",
"0.532091",
"0.531676",
"0.53159016",
"0.5297265",
"0.52946067",
"0.52909",
"0.5286132",
"0.52815384",
"0.52815384",
"0.52815384",
"0.52815384",
"0.5279665",
"0.527123",
"0.5266556",
"0.5265424",
"0.52652",
"0.5255985",
"0.5250062",
"0.5249341",
"0.524926",
"0.5241489",
"0.52014995",
"0.5195379",
"0.51891375",
"0.51827496",
"0.5170861",
"0.51635534",
"0.5162833",
"0.5148199",
"0.5148199",
"0.5148199"
] | 0.7141199 | 5 |
Sets a parent for this element. This method should be called when adding elements to another element, otherwise the hierarchy will not be maintained. | public function setParent(Registry $parent) {
$this->parent = $parent;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setParent(&$element)\n {\n $this->parent = $element;\n\n return $this;\n }",
"public function setParent($parent) {\n\t\t$this->parent = $parent;\n\t}",
"public function setParent(self $parent)\n {\n $this->_parent = $parent;\n }",
"public function setParent($parent)\n {\n $this->parent = $parent;\n }",
"public function setParent($parent)\n {\n $this->parent = $parent;\n }",
"public function setParent($parent)\n\t{\n\t\t$this->parent = $parent;\n\t}",
"function set_parent($parent)\r\n {\r\n $this->parent = $parent;\r\n }",
"function _setParent(& $parent)\n {\n $this->_parent =& $parent;\n $this->_canvas =& $this->_parent->_getCanvas();\n\n if (is_array($this->_elements)) {\n $keys = array_keys($this->_elements);\n foreach ($keys as $key) {\n if (is_object($this->_elements[$key])) {\n $this->_elements[$key]->_setParent($this);\n }\n }\n unset($keys);\n }\n }",
"public function setParent(Node $parent)\n {\n $this->parent = $parent;\n }",
"function setParent($parent) {\n parent::setParent($parent);\n $this->component = $parent->getComponent();\n $suffix = '/' . $this->id;\n if ($parent instanceof ChtNodeCategory) {\n $suffix = '/' . $this->component .':'. $this->id;\n // instead of pseudopath, insert component into first rofpath component\n }\n $this->path = $parent->getPath() . $suffix;\n $this->absolutePath = $parent->getAbsolutePath() . $suffix;\n return $this;\n }",
"public function setParent(PhpcrNodeInterface $parentNode);",
"public function setParent(\\ObjectiveLessCss\\Block $parent)\n\t{\n\t\tif ($this->parent != $parent) {\n\t\t\t$oldParent = $this->parent;\n\t\t\t$this->parent = null; // do not remove or endless recursion will happen!\n\t\t\tif ($oldParent) {\n\t\t\t\t$oldParent->removeRule($this);\n\t\t\t}\n\t\t\t$this->parent = $parent;\n\t\t}\n\t}",
"public function set_parent_id($parent)\n {\n $this->set_default_property(self::PROPERTY_PARENT_ID, $parent);\n }",
"public function setParent($oParent = null)\n {\n $this->_oParent = $oParent;\n }",
"public function SetParent($item, $parent)\n {\n $item->SetParent($parent);\n }",
"public function SetParent($item, $parent)\n {\n $item->SetParent($parent);\n }",
"public function setParent(Module_Node_Model $parent = null);",
"public function makeParent(): void\n {\n $this->parent = null;\n }",
"private function setParent(Folder $parent): void\n {\n $this->parent = $parent;\n }",
"public function set_parent(SBBCodeParser_ContainerNode $parent=null)\r\n\t{\r\n\t\t$this->parent = $parent;\r\n\t\t\r\n\t\tif($parent instanceof SBBCodeParser_Document)\r\n\t\t\t$this->root = $parent;\r\n\t\telse\r\n\t\t\t$this->root = $parent->root();\r\n\t}",
"public function setParent($parent) {\n $this->parent = $parent;\n return $this;\n }",
"public function setParent(CategoryTreeNodeInterface $parent);",
"function SetParent(&$ParentNode)\n {\n $this->ParentNode = &$ParentNode;\n $this->Level = $this->ParentNode->Level + 1;\n }",
"public function setParent($parent)\n {\n $this->parent = $parent;\n return $this;\n }",
"function set_parent($value) {\n $this->set_mapped_property('parent', $value);\n }",
"public function setParent($record)\n {\n $this->parent = $record;\n }",
"function setParent(IBabylonModel $parent);",
"public function setParent($val)\n {\n $this->_propDict[\"parent\"] = $val;\n return $this;\n }",
"public function setTreeParent($row){\n $this->treeParentRow = $row;\n return;\n }",
"public function setParent($parent)\n {\n $this->parent = $parent;\n\n return $this;\n }",
"public function setParent($parent)\n {\n $this->parent = $parent;\n\n return $this;\n }",
"public function setParent_id( $parent_id ) {\n\t\t$this->parent_id = $parent_id;\n\t}",
"public function setParent($value)\n {\n $this->setItemValue('parent', ['id' => (int)$value]);\n }",
"public function setParent($value)\n {\n return $this->set('Parent', $value);\n }",
"public function setParent($var)\n {\n GPBUtil::checkString($var, True);\n $this->parent = $var;\n\n return $this;\n }",
"public function setParent($var)\n {\n GPBUtil::checkString($var, True);\n $this->parent = $var;\n\n return $this;\n }",
"public function setParent($var)\n {\n GPBUtil::checkString($var, True);\n $this->parent = $var;\n\n return $this;\n }",
"public function setParent(self $parent)\n {\n $this->parent = $parent;\n\n return $this;\n }",
"public function setParent(MenuEntry $parent)\n {\n if ($this->parent !== null) {\n throw new LogicException('Parent menu association can not be changed after being set.');\n }\n\n $this->parent = $parent;\n\n return $this;\n }",
"final public function setParent(CtkBuildable $node = null) {\n\t\t$this->_parentNode = $node;\n\t\treturn $this;\n\t}",
"public function set_parent_id( $value ) {\n\t\t// Update the parent in the database\n\t\twp_update_post( array(\n\t\t\t'ID' => $this->id,\n\t\t\t'post_parent' => $value,\n\t\t) );\n\n\t\t// And update the parent in memory\n\t\t$this->post->post_parent = $value;\n\t\t$this->order = null;\n\t}",
"public function set_parent_id($parent_id)\n {\n $this->set_default_property(self::PROPERTY_PARENT_ID, $parent_id);\n }",
"public function setParent($parent): self\n {\n $this->parent = $parent;\n\n return $this;\n }",
"public function parent( $parent = null ) {\n\t\tif( $parent !== null ) {\n\t\t\t$this->parent = $parent;\n\t\t}\n\n\t\treturn $this->parent;\n\t}",
"public function setParentItem($parentItem) {\n $this->parentItem = $parentItem;\n\n return $this;\n }",
"public function setParentKey(string $parentKey): void\n {\n $this->parentKey = $parentKey;\n }",
"public function setParentKey($parentKey)\n {\n $this->parentKey = $parentKey;\n }",
"function setParent( $value )\r\n {\r\n if ( is_a( $value, \"eZImageCategory\" ) )\r\n {\r\n $this->ParentID = $value->id();\r\n }\r\n }",
"public function setParent(ThemeMenuItem $parent = null)\n {\n }",
"public function setParent(Verb $parent)\n {\n $this->parent = $parent;\n }",
"public function setParent(Page $parent = null)\n {\n $this->parent = $parent;\n\n return $this;\n }",
"public function parent()\n {\n }",
"public function setParent(IComponentContainer $parent = NULL, $name = NULL)\n\t{\n\t\t// if parent is the same parent it already has, no action occurs (only renaming)\n\t\tif ($this->parent === $parent) {\n\t\t\tif ($parent === NULL && $name !== NULL) {\n\t\t\t\t$this->name = $name;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t// A component cannot be given a parent if it already has a parent.\n\t\tif ($this->parent !== NULL && $parent !== NULL) {\n\t\t\tthrow new /*::*/InvalidStateException('Component already has a parent.');\n\t\t}\n\n\t\t// remove from parent?\n\t\tif ($parent === NULL) {\n\t\t\t// parent cannot be removed if is still this component contains\n\t\t\tif ($this->parent->getComponent($this->name) === $this) {\n\t\t\t\tthrow new /*::*/InvalidStateException('The current parent still recognizes this component as its child.');\n\t\t\t}\n\n\t\t\t$this->notification($this, self::HIERARCHY_DETACH);\n\t\t\t$this->parent = NULL;\n\t\t\t$this->refreshCache();\n\n\t\t} else { // add to parent\n\t\t\t// Given parent container does not already recognize this component as its child.\n\t\t\tif ($parent->getComponent($name) !== $this) {\n\t\t\t\tthrow new /*::*/InvalidStateException('The given parent does not recognize this component as its child.');\n\t\t\t}\n\n\t\t\t$this->validateParent($parent);\n\n\t\t\t$this->parent = $parent;\n\t\t\tif ($name !== NULL) $this->name = $name;\n\t\t\t$this->refreshCache();\n\t\t\t$this->notification($this, self::HIERARCHY_ATTACH);\n\t\t}\n\t}",
"public function setParentInput(AbstractJson $parent = null): void\n {\n $this->parent = $parent;\n }",
"protected function setParent(Page $parent)\n {\n $this->parent = $parent;\n\n return $this;\n }",
"public function setParent(Node $node)\n {\n $this->parent = $node;\n\n return $this;\n\n }",
"protected function get_parent()\r\n {\r\n return $this->parent;\r\n }",
"public function setParent(Role $parent)\n {\n $this->parent = $parent;\n }",
"public function setIdParent($idParent) \n\t{\n\t\t$this->idParent = $idParent;\n\t\treturn $this;\n\t}",
"public function setIdParent($id_parent)\n {\n $this->id_parent = $id_parent;\n\n return $this;\n }",
"public function parentOf($parent){\n\t\t/*$parents = func_get_args();\n\t\tforeach($parents as $parent){\n\t\t\tif(!in_array($parent, $this->_parentOf)){\n\t\t\t\t$this->_parentOf[] = $parent;\n\t\t\t}\n\t\t}*/\n\t}",
"public function setParent(self $parent, string $parentAssociationMapping): void;",
"function setParent($txn_id) {\n $this->checkChange();\n\n $this->parent_txn_id = $txn_id;\n return $this;\n }",
"public function setParentNode($parentNode)\r\n {\r\n $this->_parentNode = $parentNode;\r\n }",
"public function setParentObject($object) {\n $this->_parent_object = $object;\n }",
"public function set_parent(Fieldset $fieldset) {\n\t\tif (! empty ( $this->fieldset_parent )) {\n\t\t\tthrow new \\RuntimeException ( 'Fieldset already has a parent, belongs to \"' . $this->parent ()->name . '\".' );\n\t\t}\n\t\t\n\t\t$children = $fieldset->children ();\n\t\twhile ( $child = array_shift ( $children ) ) {\n\t\t\tif ($child === $this) {\n\t\t\t\tthrow new \\RuntimeException ( 'Circular reference detected, adding a Fieldset that\\'s already a child as a parent.' );\n\t\t\t}\n\t\t\t$children = array_merge ( $child->children (), $children );\n\t\t}\n\t\t\n\t\t$this->fieldset_parent = $fieldset;\n\t\t$fieldset->add_child ( $this );\n\t\treturn $this;\n\t}",
"public function setParentID($value)\n {\n return $this->set('ParentID', $value);\n }",
"public function setParentID($value)\n {\n return $this->set('ParentID', $value);\n }",
"public function setParentID($value)\n {\n return $this->set('ParentID', $value);\n }",
"public function setParentId($parent_id) {\n $parent_id = (int) $parent_id;\n\n if (!isset($parent_id) || $parent_id == \"\") {\n $parent_id = \"0\";\n }\n $this->fields[\"parent_id\"] = $parent_id;\n\n return $this;\n }",
"public function setParentMessage(Message $parentMessage)\n {\n $this->parentMessage = $parentMessage;\n }",
"public function setParentDocument(object $parent): self\n {\n $this->parent = $parent;\n\n return $this;\n }",
"public function getParentElement() {}",
"public function setParent(Message $parentMessage) {}",
"protected function setParent(MenuNode $node)\n {\n $this->parent = $node;\n }",
"public function setNewParent($value)\n {\n return $this->set('NewParent', $value);\n }",
"public function setParent(?self $parent): self\n {\n if ($parent === $this) {\n $this->hasParentEqualToItself = true;\n\n return $this;\n }\n\n if (in_array($parent, $this->getChildrenRecursively())) {\n $this->hasParentEqualToOneOfItsChildren = true;\n\n return $this;\n }\n\n $this->parent = $parent;\n\n return $this;\n }",
"public function setParent(Tx_Wpj_Domain_Model_place $parent) {\n\t\t$this->parent = $parent;\n\t\t$this->accuracy = count( $this->pathToRoot($this) );\t\n\t}",
"public function setParent(Model $model)\n {\n $this->parent = $model;\n return $this;\n }",
"public function parent() { }",
"public function setSkuParent(?string $skuParent = null): self\n {\n // validation for constraint: string\n if (!is_null($skuParent) && !is_string($skuParent)) {\n throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($skuParent, true), gettype($skuParent)), __LINE__);\n }\n if (is_null($skuParent) || (is_array($skuParent) && empty($skuParent))) {\n unset($this->SkuParent);\n } else {\n $this->SkuParent = $skuParent;\n }\n \n return $this;\n }",
"public function getParent() {\r\n\t\tif ($this->pzkParentId) {\r\n\t\t\treturn pzk_store_element($this->pzkParentId);\r\n\t\t}\r\n\t\treturn NULL;\r\n\t}",
"public function getParent()\n {\n // TODO: Implement getParent() method.\n }",
"public function setParentMessageId(int $parentMessageId) {\n $this->parentMessageId = $parentMessageId;\n }",
"public function getParent() {\n return $this->__parent;\n }",
"public function setAssetParentId(JAsset $asset)\n {\n $asset->parent_id = $this->getAssetParentId();\n\n return $this;\n }",
"public function parent() {\n return $this->parent;\n }",
"public function setParent ($value) {\n\t\n\t\t// validation\n\t\tif ($this->pageID) {\n\t\t\n\t\t\t// check IDs aren't identical\n\t\t\tif ($this->pageID == $value) {\n\t\t\t\t$this->setMessage(strFirst(LANG_INVALID.\" \".LANG_PARENT));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t// check this parent isn't a child of this page\n\t\t\t$pagesModel = new PagesModel();\n\t\t\t$ids = $pagesModel->getChildrenAsArray($this->pageID);\n\t\t\t\n\t\t\tif (in_array($value, $ids)) {\n\t\t\t\t$this->setMessage(strFirst(LANG_INVALID.\" \".LANG_PARENT));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\t$this->setData(\"pageParent\", intval($value));\n\t\treturn true;\n\t\n\t}",
"function get_parent()\r\n {\r\n return $this->parent;\r\n }",
"function get_parent()\r\n {\r\n return $this->parent;\r\n }",
"public function setParentId(int $parent_id = null) : CNabuDataObject\n {\n $this->setValue('nb_commerce_product_category_parent_id', $parent_id);\n \n return $this;\n }",
"function getParent () {\r\n\t\treturn $this->_parent;\r\n\t}",
"function getParent () {\r\n\t\treturn $this->_parent;\r\n\t}",
"public function parent()\r\n\t{\r\n\t\treturn $this->parent;\r\n\t}",
"public function setParentId($parent_id)\n\t{\n\t\t$this->parent_id = $parent_id;\n\n\t\treturn $this;\n\t}",
"public function set_parent($suite) {\n // if empty($suite), that's a start point of the TEST-WORLD.\n if (!empty($suite)) {\n $suite->suites[] = $this;\n $this->parent = $suite;\n }\n }",
"public function reSetInheritedParentId()\n\t{\n\t\tif($this->getInheritanceType() != InheritanceType::INHERIT)\n\t\t\t$this->setInheritedParentId(null);\n\t\telse\n\t\t\t$this->setInheritedParentId($this->getActuallInheritedParentId());\n\t}",
"public function getParent() {\n\t\t\treturn $this->parent;\n\t\t}",
"public function set_parent_type($parent_type)\n {\n $this->set_default_property(self::PROPERTY_PARENT_TYPE, $parent_type);\n }",
"public function getParent() {\n\t\treturn $this->_parent;\n\t}"
] | [
"0.77643",
"0.75655746",
"0.7550784",
"0.7510748",
"0.7510748",
"0.7450836",
"0.73219293",
"0.72920084",
"0.726342",
"0.71590614",
"0.7095322",
"0.7055723",
"0.7003922",
"0.69959694",
"0.69892335",
"0.69892335",
"0.69874805",
"0.6920245",
"0.68964183",
"0.68469113",
"0.6846304",
"0.6802731",
"0.6801647",
"0.67697334",
"0.6768581",
"0.675176",
"0.6727933",
"0.67264247",
"0.6695988",
"0.6692467",
"0.6692467",
"0.66909784",
"0.6682073",
"0.6670068",
"0.6629413",
"0.6629413",
"0.6629413",
"0.66278446",
"0.65881026",
"0.6583259",
"0.6564415",
"0.6562739",
"0.65180385",
"0.65066886",
"0.64930654",
"0.64871037",
"0.64262795",
"0.6379735",
"0.633643",
"0.62917817",
"0.6290974",
"0.62884915",
"0.628248",
"0.62793666",
"0.6265162",
"0.62631226",
"0.62454194",
"0.6240562",
"0.6237867",
"0.6232158",
"0.6213856",
"0.62063146",
"0.62024903",
"0.6196164",
"0.61958814",
"0.6160246",
"0.61562",
"0.61559856",
"0.61559856",
"0.6154964",
"0.61454356",
"0.61302006",
"0.6129425",
"0.6127227",
"0.6111973",
"0.6098762",
"0.60819685",
"0.6079611",
"0.60594094",
"0.60579646",
"0.6040988",
"0.6030996",
"0.5999192",
"0.5998927",
"0.5985703",
"0.5964154",
"0.5952562",
"0.5939275",
"0.5932636",
"0.5932636",
"0.5929393",
"0.5912858",
"0.5912858",
"0.59120744",
"0.5911045",
"0.5910715",
"0.59067583",
"0.5884936",
"0.5883353",
"0.58829343"
] | 0.634624 | 48 |
Counts the number of children. | public function count() {
return count($this->children);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function countChildren();",
"public function count(): int\n {\n return \\count($this->children);\n }",
"public function getNumberChildren();",
"public function count ( ) {\n\n return count($this->_childs);\n }",
"#[Pure] public function get_children_number(): int\n {\n return $this -> children -> size();\n }",
"public function getChildrenCount()\n {\n if (!isset($this->_childrenCount)) {\n $this->_childrenCount = $this->_getRepository()->countByParent($this->id);\n }\n\n return $this->_childrenCount;\n }",
"function ep_post_childcount() {\n\tglobal $wp_query;\n\t$queried_object = $wp_query->get_queried_object();\n\t$child_count = 0;\n\tif (isset($queried_object)) {\n\t\t$parents = get_post_ancestors($queried_object->ID);\n\t\t$args = array(\n\t\t\t\"post_parent\" => $queried_object->ID,\n\t\t\t\"post_type\" => $queried_object->post_type,\n\t\t\t\"post_status\" => \"publish\"\n\t\t);\n\t\t$children = get_children($args);\n\t\t$child_count = sizeof($children);\n\t}\n\treturn $child_count;\n}",
"function countChilds($id);",
"public function count()\n {\n return $this->getChildsObject()->count();\n }",
"public function childCount()\n\t{\n\t\tif( $this->childCount===null )\n\t\t\t$this->childCount = count($this->owner->getChildren());\n $link = CHtml::link($this->childCount, array(\n\t\t\t'tab/menus',\n\t\t\t'pid'=>urlencode($this->owner->id),\n\t\t));\n\t\treturn $this->childCount>0 ? ' [ <span class=\"child-count\">'.$link.'</span> ]' : '';\n\t}",
"function numChildren($options = null) {\n\n#\t\tif (!isset($this->numChildren)) {\n\t\t\t$children = $this->children($options);\n\t\t\treturn sizeof($children);\n#\t\t\t$this->numChildren = sizeof($children);\n#\t\t}\n\n#\t\treturn $this->numChildren;\n\n\t}",
"public function countDescendants();",
"public function count()\n\t{\n\t\treturn $this->getParentObject()->count();\n\t}",
"public function count()\n {\n $children = @unserialize($this->attributes['__members']);\n if (!is_array($children)) {\n return 0;\n } else {\n return count($children);\n }\n }",
"public function numChildFolders()\n {\n return $this->ChildFolders()->count();\n }",
"public function children_count($nid)\n\t{\n\t\treturn $this->has_children($nid) ? count($this->children[$nid]) : 0;\n\t}",
"public function numChildren(bool $withTrashed = true);",
"protected function get_descendents_count()\n\t{\n\t\t$n = 0;\n\n\t\tforeach ($this->children as $child)\n\t\t{\n\t\t\t$n += 1 + $child->descendents_count;\n\t\t}\n\n\t\treturn $n;\n\t}",
"public function hasChildren() {\n return $this->children()->count();\n }",
"public function getChildDocumentsCount() {}",
"public function child_acl_resource_count() {\n $fieldvals = [\n 'parent_id' => (int) $this->vars['id'],\n ];\n\n $key = parent::_count_var_key('child_acl_resource_count', $fieldvals);\n if (! array_key_exists($key, $this->_vars)) {\n $this->_vars[$key] = entity::dao('acl\\resource')->count($fieldvals);\n }\n return $this->_vars[$key];\n }",
"public function childrenCount( $permissionCheck='view', $member=NULL, $subnodes=TRUE, $_where=array() )\n\t{\n\t\t/* We almost universally need the children after getting the count, so let's just cut to the chase and run one query instead of 2 */\n\t\treturn count( $this->children( $permissionCheck, $member, $subnodes, NULL, $_where ) );\n\t}",
"public function count(){\n\t\treturn count($this->nodes);\n\t}",
"public function countSiblings();",
"public function count(): int\n {\n return $this->nodes->count();\n }",
"function CountChildren( $key_category ) {\n\n \t$strwhere = \"select count(*) from category where key_parent = $key_category\"; \n \t$recordSet = runSQL( $strwhere );\n \t$count += $recordSet->fields[0];\n\n\treturn $count;\n}",
"public function count(): int\n {\n return \\count($this->container);\n }",
"function assetTreeCount(\n AssetOperationHandlerService $service,\n Child $child, $params=NULL, &$results=NULL )\n{\n $type = $child->getType();\n\n if( !isset( $results[ F::COUNT ][ $type ] ) )\n $results[ F::COUNT ][ $type ] = 1;\n else\n $results[ F::COUNT ][ $type ] =\n $results[ F::COUNT ][ $type ] + 1;\n}",
"public function count()\n {\n $this->setIteratorFilter(self::FLIST_NOCONTAINER | self::FLIST_UNSUB);\n return count(iterator_to_array($this));\n }",
"public function getNumberOfChildren(BaseObject $node)\n {\n $peer_name = get_class($node->getPeer());\n $con = Propel::getConnection();\n $scope_sql = '';\n if (!is_null($node->getScopeIdValue()))\n {\n $scope_sql = sprintf(' AND %s = \\'%s\\'',\n self::getColumnConstant(get_class($node), 'scope'),\n $node->getScopeIdValue());\n }\n\n $sql = sprintf('SELECT COUNT(*) AS num_children FROM %s WHERE %s = %s %s',\n constant(\"$peer_name::TABLE_NAME\"),\n self::getColumnConstant(get_class($node), 'parent'),\n $node->getPrimaryKey(),\n $scope_sql\n );\n\n $stmt = $con->prepareStatement($sql);\n $resultset = $stmt->executeQuery();\n $resultset->next();\n\n return $resultset->getInt('num_children');\n }",
"public function count()\n {\n return count($this->container);\n }",
"public function getNumberDescendants();",
"public function getChildCount(PartFilter $filter = null)\n {\n return count($this->getChildParts($filter));\n }",
"public function getDescendantsCount()\n {\n if (!isset($this->_descendantsCount)) {\n $this->_descendantsCount = $this->_getRepository()->countDescendantsByParent($this->id);\n }\n\n return $this->_descendantsCount;\n }",
"public function count() : int {\n return count($this->elements);\n }",
"function tep_childs_in_category_count($categories_id) {\n $categories_count = 0;\n\n $categories_query = tep_db_query(\"select categories_id from \" . TABLE_CATEGORIES . \" where parent_id = '\" . $categories_id . \"'\");\n while ($categories = tep_db_fetch_array($categories_query)) {\n $categories_count++;\n $categories_count += tep_childs_in_category_count($categories['categories_id']);\n }\n\n return $categories_count;\n}",
"public function count(): int\n {\n return count($this->elements);\n }",
"public function getNumChildrenFieldName()\n {\n return $this->prototype->getNumChildrenFieldName();\n }",
"public function getNumberOfChildValveGroups()\n {\n return count($this->getChildValveGroups());\n }",
"public function count(): int\n {\n return \\count($this->elements);\n }",
"public function countAncestors();",
"public function count()\n {\n return count($this->elements);\n }",
"public function count()\n {\n return count($this->elements);\n }",
"public function getMaxNbChilds()\n {\n return $this->getOption('max', 0);\n }",
"public function count()\n {\n return count($this->stack);\n }",
"public function count()\n {\n return count($this->stack);\n }",
"public function countNodeStack() {}",
"public function count()\n {\n return count($this->pages);\n }",
"public function getParentsCount()\n {\n if (!isset($this->_parentsCount)) {\n $this->_parentsCount = $this->_getRepository()->countParents($this->id);\n }\n\n return $this->_parentsCount;\n }",
"public function count()\n {\n return count($this->getInnerIterator());\n }",
"public function count(): int\n {\n return count($this->stack);\n }",
"protected function countGridelementChildren()\n {\n $select_fields = 'uid, CType';\n $where = 'CType LIKE \"%gridelements_pi1%\"';\n $resource = $this->execSelect($select_fields, $where);\n if ($resource === false) {\n $this->results['error'] = 'error_no_ge_containers';\n return false;\n }\n\n // Go through all containers\n while ($row = $GLOBALS[\"TYPO3_DB\"]->sql_fetch_assoc($resource)) {\n\n // Find children\n $select_fields = 'tx_gridelements_container';\n $where = 'tx_gridelements_container = ' . $row['uid'];\n $res = $this->execSelect($select_fields, $where);\n\n $i = 0;\n if ($res !== false) {\n while ($GLOBALS[\"TYPO3_DB\"]->sql_fetch_assoc($res)) {\n ++$i;\n }\n $where = 'uid = ' . $row['uid'];\n $fields_values = array('tx_gridelements_children' => $i);\n $this->execUpdate($where, $fields_values);\n $GLOBALS[\"TYPO3_DB\"]->sql_free_result($res);\n }\n }\n $GLOBALS[\"TYPO3_DB\"]->sql_free_result($resource);\n $this->results['countGridelementChildren'] = true;\n return true;\n }",
"public function getDepthAttribute()\n {\n $count = 0;\n $parent = $this->parent;\n while ($parent)\n {\n $count += 1;\n $parent = $parent->parent;\n }\n return $count;\n }",
"public function count()\n {\n return count($this->_elements);\n }",
"public function count() : int\n {\n return count($this->entries);\n }",
"public function count(){\n $query = \"SELECT count(*) FROM \" . $this->parent_tbl;\n\n // prepare query statement\n $stmt = $this->conn->prepare( $query );\n\n // execute query\n\n \\Database::execute($stmt);\n\n // get row value\n $rows = $stmt->fetch(\\PDO::FETCH_NUM);\n\n // return count\n return $rows[0];\n\n }",
"public function count(): int\n {\n $arr = $this->all();\n $this->items = (fn(): Generator => yield from $arr)();\n\n return count($arr);\n }",
"public function countContentsRecursive(callable $filter = null): int\n {\n return $this->countGenerator($this->scanRawRecursive(true, true, $filter, null));\n }",
"public function getCount()\n {\n if (! isset($this->count)) {\n $this->count = (int)$this->getXPath($this->getDom())->query($this->getCountQuery())->item(0)->value;\n }\n return $this->count;\n }",
"public function count() { \r\n\t\t\treturn $this->namedNodeMap->length;\r\n\t\t}",
"public function count()\n {\n return count($this->entries);\n }",
"function tep_childs_in_category_count($categories_id) {\n $categories_count = 0;\n\n $Qcategories = Registry::get('Db')->get('categories', 'categories_id', ['parent_id' => (int)$categories_id]);\n\n while ($Qcategories->fetch()) {\n $categories_count++;\n\n $categories_count += call_user_func(__FUNCTION__, $Qcategories->valueInt('categories_id'));\n }\n\n return $categories_count;\n }",
"public function getMaxChildCountAttribute() : int\n {\n $counts = $this->allChild->pluck('max_child_count')->toArray();\n\n return count($counts) ? max($counts) + 1 : 0;\n }",
"public function count() {\n\t\treturn sizeof($this->elements);\n\t}",
"public function count()\n\t{\n\t\treturn count($this->_pages);\n\t}",
"public function count(): int\n {\n return count($this->resources);\n }",
"public function count()\n {\n // NOTE: Cannot use \\COUNT_RECURSIVE because that counts the arrays\n // as well as their contents. We want a count only of Properties.\n $count = 0;\n foreach ($this->data as $key=>$values)\n {\n if (is_array($this->data[$key]))\n $count += count($values);\n else\n $count += 1;\n }\n return $count;\n }",
"public function count_node()\n\t\t{\n\t\t\t$query = \"SELECT\n\t\t\t\t\t\tCOUNT(1) AS 'total' \n\t\t\t\t\tFROM \n\t\t\t\t\t\t`\".$this->tree_caption.\"`\n\t\t\t\t\tWHERE 1 = 1\n\t\t\t\t\t\tAND `language` = '\".$this->language.\"'\n\t\t\t\t\t\tAND `application_release` = '\".$this->application_release.\"'\";\n\t\t\t\n\t\t\t$result = $this->link_mt->query($query);\n\t\t\t$row = $result->fetch_array(MYSQLI_ASSOC);\n\t\t\t\n\t\t\t$this->total_node = $row['total'];\n\t\t\t\n\t\t\treturn $this->total_node;\n\t\t}",
"public function count():int\n\t{\n\t\treturn count($this->stackArray);\n\t}",
"public static function getSubCount(): int\n {\n return self::$subCount;\n }",
"public function count(): int\n {\n return $this->content()->sum('quantity');\n }",
"function olc_childs_in_category_count($categories_id) {\n\t$categories_count = 0;\n\n\t$categories_query = olc_db_query(SELECT.\"categories_id\".SQL_FROM . TABLE_CATEGORIES . SQL_WHERE.\"parent_id = '\" . $categories_id . APOS);\n\twhile ($categories = olc_db_fetch_array($categories_query)) {\n\t\t$categories_count++;\n\t\t$categories_count += olc_childs_in_category_count($categories['categories_id']);\n\t}\n\n\treturn $categories_count;\n}",
"public function hasVisibleChildren() {\n return $this->children()->visible()->count();\n }",
"public function getNodeCount()\n {\n return $this->node_count;\n }",
"function count_category_childs($category_id) {\n\t\t$categories_count = 0;\n\t\t$categories_query = olc_db_query(\"select categories_id from \".TABLE_CATEGORIES.\" where parent_id = '\".$category_id.\"'\");\n\t\twhile ($categories = olc_db_fetch_array($categories_query)) {\n\t\t\t$categories_count ++;\n\t\t\t$categories_count += $this->count_category_childs($categories['categories_id']);\n\t\t}\n\t\treturn $categories_count;\n\t}",
"public function count() \r\n {\r\n return sizeof($this->elements);\r\n }",
"public function childCount(EntityInterface $node, bool $direct = false): int\n {\n $config = $this->getConfig();\n $parent = $this->_table->aliasField($config['parent']);\n\n if ($direct) {\n return $this->_scope($this->_table->find())\n ->where([$parent => $node->get($this->_getPrimaryKey())])\n ->count();\n }\n\n $this->_ensureFields($node);\n\n return ($node->get($config['right']) - $node->get($config['left']) - 1) / 2;\n }",
"function has_children(){\n\t\tglobal $post;\n\t\t$pages = get_pages('child_of='.$post->ID);\n\t\treturn count($pages);\n\t}",
"public function count() {\n return count($this->components);\n }",
"public function getChildCountRecursive( $nodeId )\n {\n $count = 0;\n $this->countChildNodes( $count, $nodeId );\n return $count;\n }",
"public function count()\n {\n return count($this->groups);\n }",
"final public function count(): int\n {\n return count($this->all());\n }",
"public function count() {\r\n return count($this->objects);\r\n }",
"public abstract function countObjects();",
"public function numNodes() {\r\n return $this->nodeCount;\r\n }",
"public function getRowsCountRecursive()\n {\n $totalCount = 0;\n foreach ($this->rows as $row) {\n if (($idSubTable = $row->getIdSubDataTable()) !== null) {\n $subTable = Piwik_DataTable_Manager::getInstance()->getTable($idSubTable);\n $count = $subTable->getRowsCountRecursive();\n $totalCount += $count;\n }\n }\n\n $totalCount += $this->getRowsCount();\n return $totalCount;\n }",
"public function count()\n\t{\n\t\treturn $this->getCount();\n\t}",
"public function totalNode(){\r\n return $this->count;\r\n }",
"protected function countChildNodes( &$count, $nodeId )\n {\n foreach ( $this->fetchChildRecords( $nodeId ) as $record )\n {\n $count++;\n $this->countChildNodes( $count, $record['id'] );\n }\n }",
"public function count()\n {\n return count($this->group);\n }",
"public function getAdsCount() {\n //! BUG need use cache\n $child_ids = self::getChildIds($this->id);\n $query = ResumeCategoryJob::find()\n ->where(['in', 'category_job_id', $child_ids]);\n\n return $query->count();\n }",
"function acf_get_field_count($parent)\n{\n}",
"public function countAllNodes()\n {\n $manager = $this->getEntityManager();\n $query = $manager->createQuery('SELECT COUNT(n.id) FROM FreifunkStatisticBundle:Node n WHERE n.nodeName IS NOT NULL');\n $count = $query->getSingleScalarResult();\n\n return $count;\n }",
"public function count()\n {\n return count($this->countable);\n }",
"public function count()\n {\n return $this->size();\n }",
"public function count()\n {\n return $this->pager->count();\n }",
"function findWithChildCount($id)\r\n\t{\r\n\t\t$db = & ConnectionManager::getDataSource($this->useDbConfig);\r\n\t\t$table = $db->name($db->fullTableName('nodes'));\r\n\t\t\r\n\t\t$sql = \"SELECT Node.*, \" .\r\n\t\t \t\t\"SUM(Child.type = 'L') as num_lists, \" .\r\n\t\t \t\t\"SUM(Child.done = 1 AND Child.type = 'T') as num_done, \" .\r\n\t\t\t\t\"SUM(Child.done = 0 AND Child.type = 'T') as num_undone \" .\r\n\t\t \t\t\"FROM $table Node LEFT JOIN $table Child ON Child.parent_id = Node.id \" .\r\n\t\t \t\t\"WHERE Node.parent_id = $id AND Node.done = 0 \" .\r\n\t\t \t\t\"GROUP BY Node.id \" .\r\n\t\t \t\t\"ORDER BY Node.type ASC, Node.position ASC\";\r\n\r\n\t\t return $db->query($sql);\r\n\t}",
"public function hasChildren() {}",
"public function hasChildren() {}",
"public function hasChildren() {}"
] | [
"0.90300184",
"0.86308545",
"0.8399561",
"0.8286793",
"0.8084234",
"0.80094206",
"0.7917784",
"0.7717049",
"0.76806104",
"0.76773214",
"0.7576897",
"0.75224465",
"0.7476565",
"0.74746233",
"0.73005307",
"0.7272008",
"0.72467333",
"0.72014195",
"0.7190985",
"0.70588386",
"0.691375",
"0.6899955",
"0.68927497",
"0.6827484",
"0.6818446",
"0.6724502",
"0.6687132",
"0.66700345",
"0.66573536",
"0.6621212",
"0.6615559",
"0.6582144",
"0.6564899",
"0.65557694",
"0.6527393",
"0.6485508",
"0.6479232",
"0.64575714",
"0.64476126",
"0.64281356",
"0.6421189",
"0.6409661",
"0.6409661",
"0.63920635",
"0.637389",
"0.637389",
"0.6352818",
"0.63487905",
"0.6338662",
"0.633671",
"0.6332998",
"0.6328609",
"0.6301152",
"0.6300074",
"0.6284275",
"0.62600684",
"0.62585545",
"0.62521744",
"0.62478673",
"0.62319666",
"0.6224739",
"0.62159926",
"0.6210277",
"0.6209708",
"0.6208213",
"0.62016004",
"0.61978567",
"0.6188611",
"0.61837125",
"0.6180334",
"0.6156374",
"0.6156271",
"0.61382943",
"0.6132835",
"0.61321396",
"0.6118336",
"0.61173004",
"0.61161613",
"0.6107734",
"0.6104788",
"0.6102995",
"0.6101141",
"0.6101047",
"0.60909146",
"0.6080566",
"0.60805535",
"0.60555476",
"0.6050204",
"0.6046847",
"0.60438776",
"0.60252833",
"0.601296",
"0.60038507",
"0.59945357",
"0.59924066",
"0.59850115",
"0.59840775",
"0.5980883",
"0.5980883",
"0.5980883"
] | 0.866409 | 1 |
(PHP 5 >= 5.0.0) Retrieve an external iterator | public function getIterator() {
return new \ArrayIterator($this->children);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getIterator() {}",
"public function getIterator() {}",
"abstract public function getIterator();",
"public function getIterator();",
"public function getIterator();",
"public function getIterator();",
"public function getIterator();",
"public function getIterator();",
"public function getIterator();",
"public function getIterator(): Iterator {}",
"public function getIterator()\n {\n throw new NotImplementedException(\"This resource does not support iteration\");\n }",
"public function getIterator(): Iterator\n {\n return $this->{$this->fnDoGetIterator}();\n }",
"public function getIterator()\n {\n return $this->multi()->load();\n }",
"public function getIterator()\n {\n }",
"public function iterator();",
"public function getIterator()\n\t{\n\t\treturn new \\ArrayIterator($this->fetch());\n\t}",
"public function getIterator()\n {\n return $this->iterator();\n }",
"public function getIterator()\n {\n return $this->iterator;\n }",
"public function iterator()\n {\n return $this->getIterator();\n }",
"public function getIterator(): \\Traversable;",
"public function getIterator(): \\Traversable;",
"public function getIterator()\n {\n return new \\ArrayIterator([$this->contents]);\n }",
"function getIterator() {\r\n\t\treturn new \\ArrayIterator($this->data);\r\n\t}",
"function getiterator() {\n\t\treturn new \\ArrayIterator($this->cast());\n\t}",
"function getInnerIterator()\n\t{\n\t\treturn $this->iterator;\n\t}",
"function getIterator()\n {\n return new \\ArrayIterator($this->items);\n }",
"public function getIterator(): \\Generator\n {\n return $this->resolve();\n }",
"public function getIterator()\n {\n return $this->getValue();\n }",
"#[\\ReturnTypeWillChange]\n public function getIterator()\n {\n }",
"#[\\ReturnTypeWillChange]\n public function getIterator()\n {\n }",
"public function getIterator()\n\t{\n return $this->getData();\n\t\t// return new CMapIterator($this->getData());\n\t}",
"public function getIterator()\n {\n //\n // NOTE(Jake): I had to use ArrayIterator as generators do not work\n // in SS 3.2 due to SSViewer calling '$this->itemIterator->rewind();'\n //\n \t$result = array();\n \tforeach ($this->lists as $list) {\n \t\t$result = array_merge($result, $list->toArray());\n \t}\n \tif ($this->limit > 0) {\n \t\t$result = array_slice($result, $this->offset, $this->limit);\n \t} else {\n \t\t$result = array_slice($result, $this->offset);\n \t}\n \treturn new ArrayIterator($result);\n }",
"public function getIterator(): Generator\n {\n return $this->items;\n }",
"public function getIterator()\n {\n return new RefEntityIterator($this->storage);\n }",
"public function getIterator() {\n\n\t\tif ($this->_hasAdapter(get_class(), __FUNCTION__))\n\t\t\treturn $this->_callAdapter(get_class(), __FUNCTION__);\n\n\t\tif ($this->_collection === null) {\n\t\t\t$this->_collection = new Collection();\n\t\t}\n\t\treturn $this->_collection->getIterator();\n\t}",
"public function getIterator()\n {\n return new Iterator($this->entities);\n }",
"public function getIterator()\n {\n return $this->collection->getIterator();\n }",
"public function getIterator()\n {\n return $this->collection->getIterator();\n }",
"public function getIterator()\r\n {\r\n return new \\ArrayIterator($this->data);\r\n }",
"public function getIterator()\n\t{\n\t\treturn new \\ArrayIterator($this->getPackages());\n\t}",
"public function getIterator()\n {\n return new \\ArrayIterator($this->data);\n }",
"public function getIterator()\n {\n return new \\ArrayIterator($this->data);\n }",
"public function getIterator()\n {\n return new \\ArrayIterator($this->items->all());\n }",
"public function getIterator()\n {\n return new \\ArrayIterator($this->_cache);\n }",
"public function getIterator()\n\t{\n\t\treturn new \\ArrayIterator($this->array);\n\t}",
"public function getIterator() {\n\t\t// Load related records for current row\n\t\t$data = $this->execute();\n\t\treturn $data ? $data : array();\n\t}",
"public function getIterator(): \\Traversable\n {\n yield from $this->source;\n }",
"public function getIterator()\n {\n foreach ($this->iterable as $item) {\n yield $item;\n }\n }",
"public function getIterator(): Generator\n {\n foreach ($this->api->getEach(\"{$this}/items\") as $data) {\n yield $this->api->factory(static::GRAPH[$data['resource_type']] ?? Data::class, $this, $data);\n }\n }",
"public function pulled(): Iterator;",
"public function getIterator()\n {\n return new \\ArrayIterator($this->_data);\n }",
"public function getIterator() {\n return new \\ArrayIterator($this->cast);\n }",
"public function getIterator()\n {\n return new ArrayIterator($this->result);\n }",
"public function getIterator()\n {\n return new \\ArrayIterator($this->__data);\n }",
"public function getIterator()\n\t{\n\t\treturn new ArrayIterator($this->items);\n\t}",
"public function getIterator()\n {\n return new \\ArrayIterator($this->hash);\n }",
"public function getIterator()\n {\n return new \\ArrayIterator($this->_items);\n }",
"public function getIterator()\n {\n return new \\ArrayIterator($this);\n }",
"#[\\ReturnTypeWillChange]\n public function getIterator()\n {\n foreach ($this->iteratePages() as $page) {\n foreach ($page as $key => $element) {\n yield $key => $element;\n }\n }\n }",
"public function getIterator()\n\t{\n\t\treturn new ArrayIterator($this->getListByKey());\n\t}",
"public function getIterator()\n {\n return new ArrayIterator((array)$this->data);\n }",
"public function getIterator()\n {\n // Ensure immutable.\n return new IteratorProxy($this->iterator);\n }",
"public function getIterator()\n {\n return new \\ArrayIterator($this->elements(true));\n }",
"public function getIterator() {\n\t\treturn new \\ArrayObject($this->data);\n\t}",
"public function getIterator(): \\Traversable\n {\n yield from $this->generator;\n }",
"public function getEnumerator() { }",
"public function getIterator ()\r\n\t{\r\n\t\treturn new \\ArrayIterator ( $this->_qts );\r\n\t}",
"public function getIterator()\n {\n return new \\ArrayIterator($this->stack);\n }",
"public function getIterator()\n\t{\n\t\treturn new \\ArrayIterator($this->params);\n\t}",
"public function getIterator()\r\n {\r\n return $this->all();\r\n }",
"public function getIterator()\n {\n return new ArrayIterator($this->items->all());\n }",
"public function getIterator() {\n\t\treturn new SS_Map_Iterator(\n\t\t\t$this->list->getIterator(),\n\t\t\t$this->keyField,\n\t\t\t$this->valueField,\n\t\t\t$this->firstItems,\n\t\t\t$this->lastItems\n\t\t);\n\t}",
"public function getIterator()\n {\n return new ArrayIterator($this->export());\n }",
"public function getIteratorScheme();",
"public function getIterator(): \\Generator\n {\n while (!$this->stream->eof()) {\n $item = $this->stream->read($this->chunkSize);\n // @codeCoverageIgnoreStart\n // I don't know how to fabricate this manually, so I can't test it.\n if ($item === '') {\n continue;\n }\n // @codeCoverageIgnoreEnd\n yield $item;\n }\n }",
"public function getIterator()\n {\n return new ArrayIterator($this->pages);\n }",
"abstract protected function getQueryIterator();",
"public function getIterator()\n {\n return new ArrayIterator(static::$origin);\n }",
"public function getIterator() {\n\t\t\t///////////////////\n\t\t\t// Member Variables\n\t\t\t///////////////////\n\t\t\t$iArray['IdOrganization'] = $this->intIdOrganization;\n\t\t\t$iArray['Name'] = $this->strName;\n\t\t\t$iArray['Phone'] = $this->strPhone;\n\t\t\t$iArray['QrCode'] = $this->strQrCode;\n\t\t\t$iArray['OrganizationImage'] = $this->strOrganizationImage;\n\t\t\t$iArray['Latitude'] = $this->strLatitude;\n\t\t\t$iArray['Longitude'] = $this->strLongitude;\n\t\t\t$iArray['Country'] = $this->strCountry;\n\t\t\t$iArray['City'] = $this->strCity;\n\t\t\t$iArray['Address'] = $this->strAddress;\n\t\t\t$iArray['IdOrganizationType'] = $this->intIdOrganizationType;\n\t\t\t$iArray['IdOwner'] = $this->intIdOwner;\n\t\t\treturn new ArrayIterator($iArray);\n\t\t}",
"public function getIterator()\n\t{\n\t\treturn new ArrayIterator($this->_structures);\n\t}",
"public function getIterator(): Traversable\n {\n return new ArrayIterator($this->resources);\n }",
"public function getIterator() { return new mfp_iterator($this->list); }",
"public function getIterator() {\n\n\t\treturn new \\ArrayIterator( $this->fields );\n\t}",
"public function getIterator()\n {\n return new ArrayIterator($this->items);\n }",
"public function getIterator()\n {\n return new ArrayIterator($this->items);\n }",
"public function getIterator()\n {\n return new ArrayIterator($this->items);\n }",
"public function getIterator()\n {\n return new ArrayIterator($this->items);\n }",
"public function getIterator()\n {\n return new ArrayIterator($this->items);\n }",
"public function getIterator()\n {\n return new ArrayIterator($this->items);\n }",
"public function getIterator() {\n return new ArrayIterator($this->getAll());\n }",
"public function getIterator()\n {\n return new ArrayIterator($this->data);\n }",
"public function getIterator()\n {\n return new ArrayIterator($this->data);\n }",
"public function getIterator()\n {\n if ($this->offset > 0) {\n $key = null;\n $index = 0;\n //Skip the first N\n while (false !== ($record = $this->statement->fetch())) {\n if ($key === $record[ $this->pkField ]) {\n continue;\n }\n $key = $record[ $this->pkField ];\n if ($index++ === $this->offset) {\n break;\n }\n }\n $current = $record;\n } else {\n $current = $this->statement->fetch();\n }\n\n $currentKey = $current[ $this->pkField ];\n\n $fetchedRecordCount = 1;\n do {\n yield $currentKey => $current;\n\n $current = $this->statement->fetch();\n if (empty($current)) {\n break;\n }\n if ($currentKey !== $current[ $this->pkField ]) {\n $currentKey = $current[ $this->pkField ];\n $fetchedRecordCount++;\n }\n } while ($fetchedRecordCount <= $this->limit);\n\n $this->statement->closeCursor();\n }",
"public function getIterator()\n {\n return new GhostIterator($this->storage);\n }",
"public function getIterator()\n\t{\n\t\t// Execute query and return ResultSet for iteration\n\t\t$result = $this->execute();\n\t\treturn ($result !== false) ? $result : array();\n\t}",
"function getIterator(){\n if(is_null($i=$this->model?:$this->dq?:$this->iter))\n throw $this->exception('Please specify data source with setSource or setModel');\n return $i;\n }",
"public function getIterator()\n\t{\n\t\t$attributes=$this->getAttributes();\n\t\treturn new CMapIterator($attributes);\n\t}",
"public function getIterator()\n {\n return new Itr($this);\n }",
"public function getIterator() {\n\t\t\t///////////////////\n\t\t\t// Member Variables\n\t\t\t///////////////////\n\t\t\t$iArray['Id'] = $this->intId;\n\t\t\t$iArray['FirstName'] = $this->strFirstName;\n\t\t\t$iArray['LastName'] = $this->strLastName;\n\t\t\t$iArray['SysTimestamp'] = $this->strSysTimestamp;\n\t\t\treturn new ArrayIterator($iArray);\n\t\t}",
"function getIterator() {\n foreach($this->data() as $record) {\n yield $record;\n }\n }",
"public function getIterator()\n {\n return new ArrayIterator($this->_data);\n }"
] | [
"0.78275746",
"0.78275746",
"0.7815728",
"0.76747423",
"0.76747423",
"0.76747423",
"0.76747423",
"0.76747423",
"0.76747423",
"0.7570447",
"0.72964865",
"0.7215402",
"0.7108311",
"0.70822555",
"0.7051593",
"0.7048961",
"0.7013031",
"0.6933675",
"0.6932642",
"0.69030154",
"0.69030154",
"0.6842679",
"0.6840089",
"0.6815639",
"0.6785979",
"0.6761444",
"0.66709745",
"0.6649683",
"0.66388464",
"0.66388464",
"0.65727484",
"0.6564721",
"0.6528296",
"0.65247446",
"0.65019345",
"0.6501291",
"0.6491351",
"0.6491351",
"0.648527",
"0.64685535",
"0.6462648",
"0.6462648",
"0.64484745",
"0.6437849",
"0.6435668",
"0.64332247",
"0.64313775",
"0.64281934",
"0.64133364",
"0.64111125",
"0.640877",
"0.6393373",
"0.6385831",
"0.63854104",
"0.63562334",
"0.6348674",
"0.6348664",
"0.6344271",
"0.63306105",
"0.63136244",
"0.63090724",
"0.6297443",
"0.6296311",
"0.62909454",
"0.62718177",
"0.62665975",
"0.6266405",
"0.6250766",
"0.6215857",
"0.62131995",
"0.6207388",
"0.6206752",
"0.62029094",
"0.6199436",
"0.61906403",
"0.6182401",
"0.6178898",
"0.61638117",
"0.61621845",
"0.61609733",
"0.6159175",
"0.61461496",
"0.6140907",
"0.6138625",
"0.6138625",
"0.6138625",
"0.6138625",
"0.6138625",
"0.6138625",
"0.6134832",
"0.6116037",
"0.6116037",
"0.6104571",
"0.61035955",
"0.6094776",
"0.6094125",
"0.6081015",
"0.6068564",
"0.6067157",
"0.60614336",
"0.6054536"
] | 0.0 | -1 |
Handle an incoming request. | public function handle($request, Closure $next, $guard = null)
{
if ($request->segment(1) == 'api') {
return $next($request);
}
if ($setting = $this->settingLoad($request)) {
return $setting;
}
if ($local = $this->localizationSet($request)) {
return $local;
}
if ($route = $this->routeLoad($request)) {
return $route;
}
$this->groupSet($request);
$this->definitionSet($request);
// Next
return $next($request);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public function handle_request();",
"public function handleRequest();",
"public function handleRequest();",
"public function handleRequest();",
"protected abstract function handleRequest();",
"abstract public function handleRequest($request);",
"abstract public function handleRequest(Request $request);",
"public function handle($request);",
"public function handleRequest() {}",
"function handleRequest() ;",
"public function handle(Request $request);",
"protected function handle(Request $request) {}",
"public function handle(array $request);",
"public function process_request() {\n if(!empty($this->POST)) {\n return $this->handlePOST();\n } else {\n return $this->handleGET();\n }\n }",
"public function handleRequest() {\n // Make sure the action parameter exists\n $this->requireParam('action');\n\n // Call the correct handler based on the action\n switch($this->requestBody['action']) {\n\n case 'checkoutLocker':\n $this->handleCheckoutLocker();\n\t\t\t\tbreak;\n\n\t\t\tcase 'remindLocker':\n $this->handleRemindLocker();\n\t\t\t\tbreak;\n\n\t\t\tcase 'returnLocker':\n $this->handleReturnLocker();\n\t\t\t\tbreak;\n\n default:\n $this->respond(new Response(Response::BAD_REQUEST, 'Invalid action on Locker resource'));\n }\n }",
"abstract protected function process(Request $request);",
"public function handleRequest($request)\n {\n list ($route, $params) = $request->resolve();\n $this->requestedRoute = $route;\n $result = $this->runAction($route, $params);\n\n if ($result instanceof Response) {\n return $result;\n } elseif ($result instanceof Looper){\n $result->loop();\n\n $response = $this->getResponse();\n $response->exitStatus = 0;\n\n return $response;\n } else {\n $response = $this->getResponse();\n $response->exitStatus = $result;\n\n return $response;\n }\n }",
"abstract function handle(Request $request, $parameters);",
"protected function handle_request() {\r\n global $wp;\r\n $film_query = $wp->query_vars['films'];\r\n \r\n if (!$film_query) { // send all films\r\n $raw_data = $this->get_all_films();\r\n }\r\n else if ($film_query == \"featured\") { // send featured films\r\n $raw_data = $this->get_featured_films();\r\n }\r\n else if (is_numeric($film_query)) { // send film of id\r\n $raw_data = $this->get_film_by_id($film_query);\r\n }\r\n else { // input error\r\n $this->send_response('Bad Input');\r\n }\r\n\r\n $all_data = $this->get_acf_data($raw_data);\r\n $this->send_response('200 OK', $all_data);\r\n }",
"public function handle(ServerRequestInterface $request);",
"public function handleRequest()\n {\n $route = $this->router->match();\n\n if ($route) {\n $controllerName = $route['target']['controllerName'];\n $methodName = $route['target']['methodName'];\n\n $controller = new $controllerName();\n\n $controller->$methodName($route['params']);\n } else {\n header(\"HTTP:1.0 404 not Found\");\n echo json_encode([\n \"error_code\" => 404,\n \"reason\" => \"page not found\"\n ]);\n }\n }",
"function handle(Request $request = null, Response $response = null);",
"public function processRequest();",
"public abstract function processRequest();",
"public function handleRequest(Request $request, Response $response);",
"abstract public function processRequest();",
"public function handle(array $request = []);",
"public function handleRequest()\n {\n $router = new Router();\n $controllerClass = $router->resolve()->getController();\n $controllerAction = $router->getAction();\n\n \n\n if(!class_exists($controllerClass)\n || !method_exists($controllerClass,$controllerAction)\n ){\n header('Not found', true, 404);\n exit;\n }\n\n $controller = new $controllerClass();\n call_user_func([$controller, $controllerAction]);\n\n }",
"public function handle(Request $request)\n {\n if ($request->header('X-GitHub-Event') === 'push') {\n return $this->handlePush($request->input());\n }\n\n if ($request->header('X-GitHub-Event') === 'pull_request') {\n return $this->handlePullRequest($request->input());\n }\n\n if ($request->header('X-GitHub-Event') === 'ping') {\n return $this->handlePing();\n }\n\n return $this->handleOther();\n }",
"protected function _handle()\n {\n return $this\n ->_addData('post', $_POST)\n ->_addData('get', $_GET)\n ->_addData('server', $_SERVER)\n ->_handleRequestRoute();\n }",
"public function processRequest() {\n $action = \"\";\n //retrieve action from client.\n if (filter_has_var(INPUT_GET, 'action')) {\n $action = filter_input(INPUT_GET, 'action');\n }\n\n switch ($action) {\n case 'login':\n $this->login(); \n break;\n case 'register':\n $this->register(); //list all articles\n break;\n case 'search':\n $this->search(); //show a form for an article\n break;\n case 'searchList':\n $this->searchList();\n break;\n case 'remove':\n $this->removeArticle();\n break;\n case 'modify':\n $this->modifyArticle();\n break;\n case 'listCategoryForm':\n $this->listCategoryForm();\n break;\n case 'listCategory':\n $this->listCategory();\n break;\n default :\n break;\n }\n }",
"public static function handleRequest($request)\r\n {\r\n // Load controller for requested resource\r\n $controllerName = ucfirst($request->getRessourcePath()) . 'Controller';\r\n\r\n if (class_exists($controllerName))\r\n {\r\n $controller = new $controllerName();\r\n\r\n // Get requested action within controller\r\n $actionName = strtolower($request->getHTTPVerb()) . 'Action';\r\n\r\n if (method_exists($controller, $actionName))\r\n {\r\n // Do the action!\r\n $result = $controller->$actionName($request);\r\n\r\n // Send REST response to client\r\n $outputHandlerName = ucfirst($request->getFormat()) . 'OutputHandler';\r\n\r\n if (class_exists($outputHandlerName))\r\n {\r\n $outputHandler = new $outputHandlerName();\r\n $outputHandler->render($result);\r\n }\r\n }\r\n }\r\n }",
"public function process(Request $request, Response $response, RequestHandlerInterface $handler);",
"public function handle(Request $request)\n {\n $handler = $this->router->match($request);\n if (!$handler) {\n echo \"Could not find your resource!\\n\";\n return;\n }\n\n return $handler();\n }",
"public function handleRequest() {\n\t\t\n\t\tif (is_null($this->itemObj)) {\n\t\t\t$this->itemObj = MovieServices::getVcdByID($this->getParam('vcd_id'));\n\t\t}\n\t\t\n\t\t$action = $this->getParam('action');\n\t\t\n\t\tswitch ($action) {\n\t\t\tcase 'upload':\n\t\t\t\t$this->uploadImages();\n\t\t\t\t// reload and close upon success\n\t\t\t\tredirect('?page=addscreens&vcd_id='.$this->itemObj->getID().'&close=true');\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'fetch':\n\t\t\t\t$this->fetchImages();\n\t\t\t\t// reload and close upon success\n\t\t\t\tredirect('?page=addscreens&vcd_id='.$this->itemObj->getID().'&close=true');\n\t\t\t\tbreak;\n\t\t\n\t\t\tdefault:\n\t\t\t\tredirect();\n\t\t\t\tbreak;\n\t\t}\n\t}",
"public function handle(Request $request): Response;",
"public static function process_http_request()\n {\n }",
"public function processRequest() {\r\n switch($this->requestMethod) {\r\n case 'GET':\r\n if($this->id) {\r\n $response = $this->get($this->id);\r\n }\r\n else {\r\n $response = $this->getAll();\r\n }\r\n break;\r\n case 'POST':\r\n $response = $this->create();\r\n break;\r\n case 'PUT':\r\n $response = $this->update($this->id);\r\n break;\r\n case 'DELETE':\r\n $response = $this->delete($this->id);\r\n break;\r\n case 'OPTIONS':\r\n break;\r\n default:\r\n $response = $this->notFoundResponse();\r\n break;\r\n }\r\n\r\n header($response['status_code_header']);\r\n\r\n // If there is a body then echo it\r\n if($response['body']) {\r\n echo $response['body'];\r\n }\r\n }",
"abstract public function handle(ServerRequestInterface $request): ResponseInterface;",
"public function processRequest()\n\t\t{\n\t\t\t$request_method = strtolower($_SERVER['REQUEST_METHOD']);\n\t\t\tswitch ($request_method)\n\t\t\t{\n\t\t\t\tcase 'get':\n\t\t\t\t\t$data = $_GET['url'];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'post':\n\t\t\t\t\t$data = $_GET['url'];\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$request_parts = explode('/', $data);\n\t\t\t$controller = $request_parts[0];\n\t\t\tswitch ($controller)\n\t\t\t{\n\t\t\t\tcase 'ad':\n\t\t\t\t\tprocessAdRequest(substr($data, strlen('ad')+1));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'category':\n\t\t\t\t\tprocessCategoryRequest(substr($data, strlen('category')+1));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'user':\n\t\t\t\t\tprocessUserRequest(substr($data, strlen('user')+1));\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\techo \"Invalid Request!\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}",
"function handleRequest (&$request, &$context) {\n\n\t\t/* cycle through our process callback queue. using each() vs.\n\t\t * foreach, etc. so we may add elements to the callback array\n\t\t * later. probably primarily used for conditional callbacks. */\n\t\treset ($this->_processCallbacks);\n\t\twhile ($c = each ($this->_processCallbacks)) {\n\n\t\t\t// test for a successful view dispatch\n\t\t\tif ($this->_processProcess ($this->_processCallbacks[$c['key']],\n\t\t\t $request,\n\t\t\t $context))\n\t\t\t\treturn;\n\t\t}\n\n\t\t// if no view has been found yet attempt our default\n\t\tif ($this->defaultViewExists ())\n\t\t\t$this->renderDefaultView ($request, $context);\n\t}",
"public function handle($request, $next);",
"public function handle(): void\n {\n $globals = $_SERVER;\n //$SlimPsrRequest = ServerRequestFactory::createFromGlobals();\n //it doesnt matters if the Request is of different class - no need to create Guzaba\\Http\\Request\n $PsrRequest = ServerRequestFactory::createFromGlobals();\n //the only thing that needs to be fixed is the update the parsedBody if it is NOT POST & form-fata or url-encoded\n\n\n //$GuzabaPsrRequest =\n\n //TODO - this may be reworked to reroute to a new route (provided in the constructor) instead of providing the actual response in the constructor\n $DefaultResponse = $this->DefaultResponse;\n //TODO - fix the below\n// if ($PsrRequest->getContentType() === ContentType::TYPE_JSON) {\n// $DefaultResponse->getBody()->rewind();\n// $structure = ['message' => $DefaultResponse->getBody()->getContents()];\n// $json_string = json_encode($structure, JSON_UNESCAPED_SLASHES);\n// $StreamBody = new Stream(null, $json_string);\n// $DefaultResponse = $DefaultResponse->\n// withBody($StreamBody)->\n// withHeader('Content-Type', ContentType::TYPES_MAP[ContentType::TYPE_JSON]['mime'])->\n// withHeader('Content-Length', (string) strlen($json_string));\n// }\n\n $FallbackHandler = new RequestHandler($DefaultResponse);//this will produce 404\n $QueueRequestHandler = new QueueRequestHandler($FallbackHandler);//the default response prototype is a 404 message\n foreach ($this->middlewares as $Middleware) {\n $QueueRequestHandler->add_middleware($Middleware);\n }\n $PsrResponse = $QueueRequestHandler->handle($PsrRequest);\n $this->emit($PsrResponse);\n\n }",
"public function HandleRequest(Request $request)\r\n {\r\n $command = $this->_commandResolver->GetCommand($request);\t// Create command object for Request\r\n $response = $command->Execute($request);\t\t\t\t\t// Execute the command to get response\r\n $view = ApplicationController::GetView($response);\t\t\t\t\t// Send response to the appropriate view for display\r\n $view->Render();\t\t\t\t\t\t\t\t\t\t\t// Display the view\r\n }",
"public function process($path, Request $request);",
"public function handle(string $query, ServerRequestInterface $request);",
"public function handleRequest()\n\t{\n\t\t$fp = $this->fromRequest();\n\t\treturn $fp->render();\n\t}",
"private function _processRequest()\n\t{\n\t\t// prevent unauthenticated access to API\n\t\t$this->_secureBackend();\n\n\t\t// get the request\n\t\tif (!empty($_REQUEST)) {\n\t\t\t// convert to object for consistency\n\t\t\t$this->request = json_decode(json_encode($_REQUEST));\n\t\t} else {\n\t\t\t// already object\n\t\t\t$this->request = json_decode(file_get_contents('php://input'));\n\t\t}\n\n\t\t//check if an action is sent through\n\t\tif(!isset($this->request->action)){\n\t\t\t//if no action is provided then reply with a 400 error with message\n\t\t\t$this->reply(\"No Action Provided\", 400);\n\t\t\t//kill script\n\t\t\texit();\n\t\t}\n\n\t\t//check if method for the action exists\n\t\tif(!method_exists($this, $this->request->action)){\n\t\t\t//if method doesn't exist, send 400 code and message with reply'\n\t\t\t$this->reply(\"Action method not found\",400);\n\t\t\t//kill script\n\t\t\texit();\n\t\t}\n \n\t\tswitch($this->request->action){\n\t\t\tcase \"hello\":\n\t\t\t\t$this->hello($this->request->data);\n\t\t\t\tbreak;\n\t\t\tcase \"submit_video\":\n\t\t\t\t//error_log(\"formSubmit has been sent through\");\n\t\t\t\t$this->submit_video($this->request, $_FILES);\n\t\t\t\tbreak;\n\t\t\tcase \"remove_video\":\n\t\t\t\t//error_log(\"formSubmit has been sent through\");\n\t\t\t\t$this->remove_video($this->request);\n\t\t\t\tbreak;\n\t\t\tcase \"isSubmitted\":\n\t\t\t\t$this->isSubmitted($this->request);\n\t\t\tdefault:\n\t\t\t\t$this->reply(\"action switch failed\",400);\n\t\t\tbreak;\n\t\t}\n\n\n\n\t}",
"public function handleRequest ()\n\t{\n\t\t$this->version = '1.0';\n\t\t$this->id = NULL;\n\n\t\tif ($this->getProperty(self::PROPERTY_ENABLE_EXTRA_METHODS))\n\t\t\t$this->publishExtraMethods();\n\n\t\tif ($_SERVER['REQUEST_METHOD'] == 'POST')\n\t\t{\n\n\t\t\t$json = file_get_contents('php://input');\n\t\t\t$request = \\json_decode($json);\n\n\t\t\tif (is_array($request))\n\t\t\t{\n\t\t\t\t// Multicall\n\t\t\t\t$this->version = '2.0';\n\n\t\t\t\t$response = array();\n\t\t\t\tforeach ($request as $singleRequest)\n\t\t\t\t{\n\t\t\t\t\t$singleResponse = $this->handleSingleRequest($singleRequest, TRUE);\n\t\t\t\t\tif ($singleResponse !== FALSE)\n\t\t\t\t\t\t$response[] = $singleResponse;\n\t\t\t\t}\n\n\t\t\t\t// If all methods in a multicall are notifications, we must not return an empty array\n\t\t\t\tif (count($response) == 0)\n\t\t\t\t\t$response = FALSE;\n\t\t\t}\n\t\t\telse if (is_object($request))\n\t\t\t{\n\t\t\t\t$this->version = $this->getRpcVersion($request);\n\t\t\t\t$response = $this->handleSingleRequest($request);\n\t\t\t}\n\t\t\telse\n\t\t\t\t$response = $this->formatError(self::ERROR_INVALID_REQUEST);\n\t\t}\n\t\telse if ($_SERVER['PATH_INFO'] != '')\n\t\t{\n\t\t\t$this->version = '1.1';\n\t\t\t$this->id = NULL;\n\n\t\t\t$method = substr($_SERVER['PATH_INFO'], 1);\n\t\t\t$params = $this->convertFromRpcEncoding($_GET);\n\n\t\t\tif (!$this->hasMethod($method))\n\t\t\t\t$response = $this->formatError(self::ERROR_METHOD_NOT_FOUND);\n\t\t\telse\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tRpcResponse::setWriter(new JsonRpcResponseWriter($this->version, $this->id));\n\t\t\t\t\t$res = $this->invoke($method, $params);\n\t\t\t\t\tif ($res instanceof JsonRpcResponseWriter)\n\t\t\t\t\t{\n\t\t\t\t\t\t$res->finalize();\n\t\t\t\t\t\t$resposne = FALSE;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t$response = $this->formatResult($res);\n\t\t\t\t}\n\t\t\t\tcatch (\\Exception $exception)\n\t\t\t\t{\n\t\t\t\t\t$response = $this->formatException($exception);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$response = $this->formatError(self::ERROR_PARSE_ERROR);\n\t\t}\n\n\t\tif (!headers_sent())\n\t\t{\n\t\t\theader('Content-Type: application/json', TRUE);\n\t\t\theader('Cache-Control: nocache', TRUE);\n\t\t\theader('Pragma: no-cache', TRUE);\n\t\t}\n\n\t\tif ($response !== FALSE)\n\t\t{\n\t\t\t$result = \\json_encode($this->convertToRpcEncoding($response));\n\n\t\t\tif ($result === FALSE)\n\t\t\t\terror_log(var_export($response, TRUE));\n\t\t\telse\n\t\t\t\techo($result);\n\t\t}\n\t}",
"public function handle($request)\n {\n $this->setRouter($this->app->compose('Cygnite\\Base\\Router\\Router', $request), $request);\n\n try {\n $response = $this->sendRequestThroughRouter($request);\n /*\n * Check whether return value is a instance of Response,\n * otherwise we will try to fetch the response form container,\n * create a response and return to the browser.\n *\n */\n if (!$response instanceof ResponseInterface && !is_array($response)) {\n $r = $this->app->has('response') ? $this->app->get('response') : '';\n $response = Response::make($r);\n }\n } catch (\\Exception $e) {\n $this->handleException($e);\n } catch (Throwable $e) {\n $this->handleException($e);\n }\n\n return $response;\n }",
"public function handleRequest()\n\t{\n $response = array();\n switch ($this->get_server_var('REQUEST_METHOD')) \n {\n case 'OPTIONS':\n case 'HEAD':\n $response = $this->head();\n break;\n case 'GET':\n $response = $this->get();\n break;\n case 'PATCH':\n case 'PUT':\n case 'POST':\n $response = $this->post();\n break;\n case 'DELETE':\n $response = $this->delete();\n break;\n default:\n $this->header('HTTP/1.1 405 Method Not Allowed');\n }\n\t\treturn $response;\n }",
"public function handleRequest(Zend_Controller_Request_Http $request)\n {\n \n }",
"final public function handle(Request $request)\n {\n $response = $this->process($request);\n if (($response === null) && ($this->successor !== null)) {\n $response = $this->successor->handle($request);\n }\n\n return $response;\n }",
"public function process(Aloi_Serphlet_Application_HttpRequest $request, Aloi_Serphlet_Application_HttpResponse $response) {\r\n\r\n\t\ttry {\r\n\t\t\t// Identify the path component we will use to select a mapping\r\n\t\t\t$path = $this->processPath($request, $response);\r\n\t\t\tif (is_null($path)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (self::$log->isDebugEnabled()) {\r\n\t\t\t\tself::$log->debug('Processing a \"' . $request->getMethod() . '\" for path \"' . $path . '\"');\r\n\t\t\t}\r\n\r\n\t\t\t// Select a Locale for the current user if requested\r\n\t\t\t$this->processLocale($request, $response);\r\n\r\n\t\t\t// Set the content type and no-caching headers if requested\r\n\t\t\t$this->processContent($request, $response);\r\n\t\t\t$this->processNoCache($request, $response);\r\n\r\n\t\t\t// General purpose preprocessing hook\r\n\t\t\tif (!$this->processPreprocess($request, $response)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t//Identify the mapping for this request\r\n\t\t\t$mapping = $this->processMapping($request, $response, $path);\r\n\t\t\tif (is_null($mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Check for any role required to perform this action\r\n\t\t\tif (!$this->processRoles($request, $response, $mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Process any ActionForm bean related to this request\r\n\t\t\t$form = $this->processActionForm($request, $response, $mapping);\r\n\t\t\t$this->processPopulate($request, $response, $form, $mapping);\r\n\t\t\tif (!$this->processValidate($request, $response, $form, $mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Process a forward or include specified by this mapping\r\n\t\t\tif (!$this->processForward($request, $response, $mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (!$this->processInclude($request, $response, $mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Create or acquire the Action instance to process this request\r\n\t\t\t$action = $this->processActionCreate($request, $response, $mapping);\r\n\t\t\tif (is_null($action)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Call the Action instance itself\r\n\t\t\t$forward = $this->processActionPerform($request, $response, $action, $form, $mapping);\r\n\r\n\t\t\t// Process the returned ActionForward instance\r\n\t\t\t$this->processForwardConfig($request, $response, $forward);\r\n\t\t} catch (ServletException $e) {\r\n\t\t\tthrow $e;\r\n\t\t}\r\n\t}",
"function handleRequest() {\n // I. On récupère l'action demandée par l'utilisateur, avec retrocompatibilité\n // Controller et Entité\n $entityName = (isset($_GET['controller']) ? $_GET['controller'] : \"article\");\n // on retravaille le nom pour obtenir un nom de la forme \"Article\"\n $entityName = ucfirst(strtolower($entityName));\n\n // Action\n $actionName = (isset($_GET['action']) ? $_GET['action'] : \"index\");\n $actionName = strtolower($actionName);\n\n // II à IV sont maintenant dans loadDep\n $controller = $this->loadDependencies($entityName);\n\n // V. On regarde si l'action de controller existe, puis on la charge\n // on retravaille la var obtenue pour obtenir un nom de la forme \"indexAction\"\n $action = $actionName . \"Action\";\n\n // si la méthode demandée n'existe pas, remettre \"index\"\n if (!method_exists($controller, $action)) {\n $actionName = \"index\";\n $action = \"indexAction\";\n }\n\n // on stock le titre sous la forme \"Article - Index\"\n $this->title = $entityName . \" - \" . $actionName;\n\n // on appelle dynamiquement la méthode de controller\n $this->content = $controller->$action();\n }",
"public function handle(RequestInterface $request): ResponseInterface;",
"public function handleRequest() {\n $this->loadErrorHandler();\n\n $this->sanitizeRequest();\n $this->modx->invokeEvent('OnHandleRequest');\n if (!$this->modx->checkSiteStatus()) {\n header('HTTP/1.1 503 Service Unavailable');\n if (!$this->modx->getOption('site_unavailable_page',null,1)) {\n $this->modx->resource = $this->modx->newObject('modDocument');\n $this->modx->resource->template = 0;\n $this->modx->resource->content = $this->modx->getOption('site_unavailable_message');\n } else {\n $this->modx->resourceMethod = \"id\";\n $this->modx->resourceIdentifier = $this->modx->getOption('site_unavailable_page',null,1);\n }\n } else {\n $this->checkPublishStatus();\n $this->modx->resourceMethod = $this->getResourceMethod();\n $this->modx->resourceIdentifier = $this->getResourceIdentifier($this->modx->resourceMethod);\n if ($this->modx->resourceMethod == 'id' && $this->modx->getOption('friendly_urls', null, false) && !$this->modx->getOption('request_method_strict', null, false)) {\n $uri = $this->modx->context->getResourceURI($this->modx->resourceIdentifier);\n if (!empty($uri)) {\n if ((integer) $this->modx->resourceIdentifier === (integer) $this->modx->getOption('site_start', null, 1)) {\n $url = $this->modx->getOption('site_url', null, MODX_SITE_URL);\n } else {\n $url = $this->modx->getOption('site_url', null, MODX_SITE_URL) . $uri;\n }\n $this->modx->sendRedirect($url, array('responseCode' => 'HTTP/1.1 301 Moved Permanently'));\n }\n }\n }\n if (empty ($this->modx->resourceMethod)) {\n $this->modx->resourceMethod = \"id\";\n }\n if ($this->modx->resourceMethod == \"alias\") {\n $this->modx->resourceIdentifier = $this->_cleanResourceIdentifier($this->modx->resourceIdentifier);\n }\n if ($this->modx->resourceMethod == \"alias\") {\n $found = $this->findResource($this->modx->resourceIdentifier);\n if ($found) {\n $this->modx->resourceIdentifier = $found;\n $this->modx->resourceMethod = 'id';\n } else {\n $this->modx->sendErrorPage();\n }\n }\n $this->modx->beforeRequest();\n $this->modx->invokeEvent(\"OnWebPageInit\");\n\n if (!is_object($this->modx->resource)) {\n if (!$this->modx->resource = $this->getResource($this->modx->resourceMethod, $this->modx->resourceIdentifier)) {\n $this->modx->sendErrorPage();\n return true;\n }\n }\n\n return $this->prepareResponse();\n }",
"public function process(\n ServerRequestInterface $request,\n RequestHandlerInterface $handler\n );",
"protected function handleRequest() {\n\t\t// TODO: remove conditional when we have a dedicated error render\n\t\t// page and move addModule to Mustache#getResources\n\t\tif ( $this->adapter->getFormClass() === 'Gateway_Form_Mustache' ) {\n\t\t\t$modules = $this->adapter->getConfig( 'ui_modules' );\n\t\t\tif ( !empty( $modules['scripts'] ) ) {\n\t\t\t\t$this->getOutput()->addModules( $modules['scripts'] );\n\t\t\t}\n\t\t\tif ( $this->adapter->getGlobal( 'LogClientErrors' ) ) {\n\t\t\t\t$this->getOutput()->addModules( 'ext.donationInterface.errorLog' );\n\t\t\t}\n\t\t\tif ( !empty( $modules['styles'] ) ) {\n\t\t\t\t$this->getOutput()->addModuleStyles( $modules['styles'] );\n\t\t\t}\n\t\t}\n\t\t$this->handleDonationRequest();\n\t}",
"public function handleHttpRequest($requestParams)\n\t{\n\t\t$action = strtolower(@$requestParams[self::REQ_PARAM_ACTION]);\t\t\n\t\t$methodName = $this->actionToMethod($action);\n\t\t\n\t\ttry\n\t\t{\n\t\t\t$this->$methodName($requestParams);\n\t\t} catch(Exception $e)\n\t\t{\n\t\t\techo \"Error: \".$e->getMessage();\n\t\t}\n\t}",
"public static function handleRequest()\n\t{\n\t\t// Load language strings\n\t\tself::loadLanguage();\n\n\t\t// Load the controller and let it run the show\n\t\trequire_once dirname(__FILE__).'/classes/controller.php';\n\t\t$controller = new LiveUpdateController();\n\t\t$controller->execute(JRequest::getCmd('task','overview'));\n\t\t$controller->redirect();\n\t}",
"public function handle() {\n $this->initDb(((!isset(self::$_config['db']['type'])) ? 'mysql' : self::$_config['db']['type']));\n $request = new corelib_request(self::$_config['routing'], self::$_config['reg_routing']);\n $path = parse_url($_SERVER['REQUEST_URI']);\n\n if (self::$_config['home'] == \"/\" || self::$_config['home'] == \"\") {\n $uri = ltrim($path['path'], '/');\n } else {\n $uri = str_replace(self::$_config['home'], '', $path['path']);\n }\n\n if (\"\" == $uri || \"/\" == $uri) {\n $uri = self::$_config['routing']['default']['controller'] . '/' . self::$_config['routing']['default']['action'];\n }\n self::$isAjax = $request->isAjax();\n self::$request = $request->route($uri);\n self::$request['uri'] = $uri;\n\n if (self::$request['action'] == \"\")\n self::$request['action'] = self::$_config['routing']['default']['action'];\n\n $this->_run( self::$request['params'] );\n }",
"public function processRequest() {\n $this->server->service($GLOBALS['HTTP_RAW_POST_DATA']);\n }",
"public function request_handler(){\r\n\t\t$route = new Router;\r\n\t\t$session = new Session;\r\n\t\t$segments = $route->urlRoute();\r\n\t\t#check if controller/action exist\r\n\t\t#if not use default_controller / default_action\r\n\t\tif( count($segments) == 0 || count($segments) == 1 ){\r\n\t\t\tinclude_class_method( default_controller , default_action );\r\n\t\t}else{\r\n\t\t#if controller/action exist in the url\r\n\t\t#then check the controller if it's existed in the file\r\n\t\t\tif( file_exists( CONTROLLER_DIR . $segments[0] . CONT_EXT ) )\r\n\t\t\t{\r\n\t\t\t\t#check for segments[1] = actions\r\n\t\t\t\t#if segments[1] exist, logically segments[0] which is the controller is also exist!!\r\n\t\t\t\t//if( isset($segments[1]) ){\r\n\t\t\t\t\tinclude_class_method( $segments[0], $segments[1] . 'Action' );\r\n\t\t\t\t//}\r\n\t\t\t}else{\r\n\t\t\t\terrorHandler(CONTROLLER_DIR . $segments[0] . CONT_EXT);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public function handle() {\n if(method_exists($this->class, $this->function)) {\n echo $this->class->{$this->function}($this->request);\n }else {\n echo Response::response(['error' => 'function does not exist on ' . get_class($this->class)], 500);\n }\n }",
"public function handle(ClientInterface $client, RequestInterface $request, HttpRequest $httpRequest);",
"public function handleRequest() {\n $questions=$this->contactsService->getAllQuestions(\"date\");\n //load all the users\n $userList = User::loadUsers();\n //load all the topics\n \t\t$topics = $this->contactsService2->getAllTopics(\"name\");\n \t\t\n\t\t\t\trequire_once '../view/home.tpl';\n\t}",
"public function serve_request()\n {\n }",
"public static function process($request){\r\n\t\tcall_user_func($request -> action, $request -> params);\r\n\t}",
"function process($request) {\n\t//$logFusion =& LoggerManager::getLogger('fusion');\n//PBXFusion begin\n\t$request=$this->mapRequestVars($request);\n $mode = $request->get('callstatus');\n\t//$logFusion->debug(\"PBX CONTROLLER PROCESS mode=\".$mode);\n//PBXFusion end\n switch ($mode) {\n\t//PBXFusion begin\n \t case \"CallStart\" :\n $this->processCallStart($request);\n break;\n\t//PBXFusion end\n case \"StartApp\" :\n $this->processStartupCallFusion($request);\n break;\n case \"DialAnswer\" :\n $this->processDialCallFusion($request);\n break;\n case \"Record\" :\n $this->processRecording($request);\n break;\n case \"EndCall\" :\n $this->processEndCallFusion($request);\n break;\n case \"Hangup\" :\n $callCause = $request->get('causetxt');\n if ($callCause == \"null\") {\n break;\n }\n $this->processHangupCall($request);\n break;\n }\n }",
"public function handle() {\n\t\n\t\t$task = $this->request->getTask();\n\t\t$handler = $this->resolveHandler($task);\n\t\t$action = $this->request->getAction();\n\t\t$method = empty($action) ? $this->defaultActionMethod : $action.$this->actionMethodSuffix;\n\t\t\n\t\tif (! method_exists($handler, $method)) {\n\t\t\tthrow new Task\\NotHandledException(\"'{$method}' method not found on handler.\");\n\t\t}\n\t\t\n\t\t$handler->setRequest($this->request);\n\t\t$handler->setIo($this->io);\n\t\t\n\t\treturn $this->invokeHandler($handler, $method);\n\t}",
"private function handleCall() { //$this->request\n $err = FALSE;\n // route call to method\n $this->logToFile($this->request['action']);\n switch($this->request['action']) {\n // Edit form submitted\n case \"edit\":\n // TODO: improve error handling\n try {\n $this->logToFile(\"case: edit\");\n $this->edit($this->request['filename']);\n //$this->save();\n } catch (Exception $e) {\n $err = \"Something went wrong: \";\n $err .= $e.getMessage();\n }\n break;\n }\n // TODO: set error var in response in case of exception / error\n // send JSON response\n if($err !== FALSE) {\n $this->request['error_msg'] = $err;\n }\n $this->giveJSONResponse($this->request);\n }",
"function handle()\n {\n $this->verifyPost();\n\n $postTarget = $this->determinePostTarget();\n\n $this->filterPostData();\n\n switch ($postTarget) {\n case 'upload_media':\n $this->handleMediaFileUpload();\n break;\n case 'feed':\n $this->handleFeed();\n break;\n case 'feed_media':\n $this->handleFeedMedia();\n break;\n case 'feed_users':\n $this->handleFeedUsers();\n break;\n case 'delete_media':\n $this->handleDeleteMedia();\n break;\n }\n }",
"public function run() {\n\t\t// If this particular request is not a hook, something is wrong.\n\t\tif (!isset($this->server[self::MERGADO_HOOK_AUTH_HEADER])) {\n\t\t\tthrow new \\RuntimeException(sprintf(\n\t\t\t\t\"%s is to be used only for handling hooks sent from Mergado.\n\t\t\t\tMergado-Apps-Hook-Auth is missing.\",\n\t\t\t\t__CLASS__\n\t\t\t));\n\t\t}\n\n\t\tif (!$decoded = json_decode($this->rawRequest, true)) {\n\t\t\tthrow new \\RuntimeException(sprintf(\n\t\t\t\t\"%s cannot handle request, because the data to be handled is empty.\",\n\t\t\t\t__CLASS__\n\t\t\t));\n\t\t} elseif (!isset($decoded['action'])) {\n\t\t\tthrow new \\RuntimeException(sprintf(\n\t\t\t\t\"%s cannot handle the hook, because the hook action is undefined.\",\n\t\t\t\t__CLASS__\n\t\t\t));\n\t\t};\n\n\t\t$this->handle($decoded['action'], $decoded);\n\n\t}",
"public function handleRequest()\n {\n $version = $this->versionEngine->getVersion();\n $queryConfiguration = $version->parseRequest($this->columnConfigurations);\n $this->provider->prepareForProcessing($queryConfiguration, $this->columnConfigurations);\n $data = $this->provider->process();\n return $version->createResponse($data, $queryConfiguration, $this->columnConfigurations);\n }",
"public function process()\n\t{\n\t\t$action = $this->getAction();\n\t\tswitch (strtolower($action))\n\t\t{\n\t\t\tcase 'get':\n\t\t\tcase 'put':\n\t\t\tcase 'post':\n\t\t\tcase 'delete':\n\t\t}\t\n\t}",
"public function run(){\n // server response object \n $requestMethod = $this->requestBuilder->getRequestMethod();\n $this->response = new Response($requestMethod);\n\n try{\n $route = $this->router->validateRequestedRoute($this->requestBuilder);\n\n // serve request object\n $this->requestBuilder->setQuery();\n $this->requestBuilder->setBody();\n $requestParams = $this->requestBuilder->getParam();\n $requestQuery = $this->requestBuilder->getQuery();\n $requestBody = $this->requestBuilder->getBody(); \n $this->request = new Request($requestParams, $requestQuery, $requestBody);\n\n $callback = $route->getCallback();\n $callback($this->request, $this->response);\n }catch(RouteNotImplementedException $e){\n $this->response->statusCode(404)->json($e->getMessage()); \n }\n \n }",
"final public function handle()\n {\n \n $this->_preHandle();\n \n if ($this->_request->getActionName() == null) {\n throw new ZendL_Tool_Endpoint_Exception('Endpoint failed to setup the action name.');\n }\n\n if ($this->_request->getProviderName() == null) {\n throw new ZendL_Tool_Endpoint_Exception('Endpoint failed to setup the provider name.');\n }\n \n ob_start();\n \n try {\n $dispatcher = new ZendL_Tool_Rpc_Endpoint_Dispatcher();\n $dispatcher->setRequest($this->_request)\n ->setResponse($this->_response)\n ->dispatch();\n \n } catch (Exception $e) {\n //@todo implement some sanity here\n die($e->getMessage());\n //$this->_response->setContent($e->getMessage());\n return;\n }\n \n if (($content = ob_get_clean()) != '') {\n $this->_response->setContent($content);\n }\n \n $this->_postHandle();\n }",
"public function RouteRequest ();",
"public function handle(ServerRequestInterface $request, $handler, array $vars): ?ResponseInterface;",
"public function DispatchRequest ();",
"protected function handleRequest() {\n\t\t// FIXME: is this necessary?\n\t\t$this->getOutput()->allowClickjacking();\n\t\tparent::handleRequest();\n\t}",
"public function listen() {\n\t\t// Checks the user agents match\n\t\tif ( $this->user_agent == $this->request_user_agent ) {\n\t\t\t// Determine if a key request has been made\n\t\t\tif ( isset( $_GET['key'] ) ) {\n\t\t\t\t$this->download_update();\n\t\t\t} else {\n\t\t\t\t// Determine the action requested\n\t\t\t\t$action = filter_input( INPUT_POST, 'action', FILTER_SANITIZE_STRING );\n\n\t\t\t\t// If that method exists, call it\n\t\t\t\tif ( method_exists( $this, $action ) )\n\t\t\t\t\t$this->{$action}();\n\t\t\t}\n\t\t}\n\t}",
"abstract public function request();",
"public function run() {\r\n $this->routeRequest(new Request());\r\n }",
"public function processAction(Request $request)\n {\n // Get the request Vars\n $this->requestQuery = $request->query;\n\n // init the hybridAuth instance\n $provider = trim(strip_tags($this->requestQuery->get('hauth_start')));\n $cookieName = $this->get('azine_hybrid_auth_service')->getCookieName($provider);\n $this->hybridAuth = $this->get('azine_hybrid_auth_service')->getInstance($request->cookies->get($cookieName), $provider);\n\n // If openid_policy requested, we return our policy document\n if ($this->requestQuery->has('get') && 'openid_policy' == $this->requestQuery->get('get')) {\n return $this->processOpenidPolicy();\n }\n\n // If openid_xrds requested, we return our XRDS document\n if ($this->requestQuery->has('get') && 'openid_xrds' == $this->requestQuery->get('get')) {\n return $this->processOpenidXRDS();\n }\n\n // If we get a hauth.start\n if ($this->requestQuery->has('hauth_start') && $this->requestQuery->get('hauth_start')) {\n return $this->processAuthStart();\n }\n // Else if hauth.done\n elseif ($this->requestQuery->has('hauth_done') && $this->requestQuery->get('hauth_done')) {\n return $this->processAuthDone($request);\n }\n // Else we advertise our XRDS document, something supposed to be done from the Realm URL page\n\n return $this->processOpenidRealm();\n }",
"public function run() {\n $base = $this->request->getNextRoute();\n if ($base !== BASE) {\n $this->response->notFound();\n }\n $start = $this->request->getNextRoute();\n if ($rs = $this->getRs($start)) {\n if ($this->request->isOptions()) {\n $this->response->okEmpty();\n return;\n }\n try {\n $this->response->ok($rs->handleRequest());\n\n } catch (UnauthorizedException $e) {\n $this->response->unauthorized();\n\n } catch (MethodNotAllowedException $e) {\n $this->response->methodNotAllowed();\n\n } catch (BadRequestExceptionInterface $e) {\n $this->response->badRequest($e->getMessage());\n\n } catch (UnavailableExceptionInterface $e) {\n $this->response->unavailable($e->getMessage());\n\n } catch (Exception $e) {\n $this->response->unavailable($e->getMessage());\n }\n } else {\n $this->response->badRequest();\n }\n }",
"public function handle(Request $request, Response|JsonResponse|BinaryFileResponse|StreamedResponse $response, int $length);",
"public function handle(Request $request, Closure $next);",
"public function handleGetRequest($id);",
"abstract function doExecute($request);",
"public function parseCurrentRequest()\n {\n // If 'action' is post, data will only be read from 'post'\n if ($action = $this->request->post('action')) {\n die('\"post\" method action handling not implemented');\n }\n \n $action = $this->request->get('action') ?: 'home';\n \n if ($response = $this->actionHandler->trigger($action, $this)) {\n $this->getResponder()->send($response);\n } else {\n die('404 not implemented');\n }\n }",
"abstract public function mapRequest($request);",
"public function handle(ServerRequestInterface $request)\n {\n $router = $this->app->get(RouterInterface::class);\n $response = $router->route($request);\n\n if (! headers_sent()) {\n\n // Status\n header(sprintf(\n 'HTTP/%s %s %s',\n $response->getProtocolVersion(),\n $response->getStatusCode(),\n $response->getReasonPhrase()\n ));\n\n // Headers\n foreach ($response->getHeaders() as $name => $values) {\n foreach ($values as $value) {\n header(sprintf('%s: %s', $name, $value), false);\n }\n }\n }\n\n echo $response->getBody()->getContents();\n }",
"abstract public function processRequest(PriceWaiter_NYPWidget_Controller_Endpoint_Request $request);",
"private function handleRequest()\n {\n // we check the inputs validity\n $validator = Validator::make($this->request->only('rowsNumber', 'search', 'sortBy', 'sortDir'), [\n 'rowsNumber' => 'required|numeric',\n 'search' => 'nullable|string',\n 'sortBy' => 'nullable|string|in:' . $this->columns->implode('attribute', ','),\n 'sortDir' => 'nullable|string|in:asc,desc',\n ]);\n // if errors are found\n if ($validator->fails()) {\n // we log the errors\n Log::error($validator->errors());\n // we set back the default values\n $this->request->merge([\n 'rowsNumber' => $this->rowsNumber ? $this->rowsNumber : config('tablelist.default.rows_number'),\n 'search' => null,\n 'sortBy' => $this->sortBy,\n 'sortDir' => $this->sortDir,\n ]);\n } else {\n // we save the request values\n $this->setAttribute('rowsNumber', $this->request->rowsNumber);\n $this->setAttribute('search', $this->request->search);\n }\n }",
"public function handle() {\n\t\t\n\t\t\n\t\t\n\t\theader('ApiVersion: 1.0');\n\t\tif (!isset($_COOKIE['lg_app_guid'])) {\n\t\t\t//error_log(\"NO COOKIE\");\n\t\t\t//setcookie(\"lg_app_guid\", uniqid(rand(),true),time()+(10*365*24*60*60));\n\t\t} else {\n\t\t\t//error_log(\"cookie: \".$_COOKIE['lg_app_guid']);\n\t\t\t\n\t\t}\n\t\t// checks if a JSON-RCP request has been received\n\t\t\n\t\tif (($_SERVER['REQUEST_METHOD'] != 'POST' && (empty($_SERVER['CONTENT_TYPE']) || strpos($_SERVER['CONTENT_TYPE'],'application/json')===false)) && !isset($_GET['d'])) {\n\t\t\t\techo \"INVALID REQUEST\";\n\t\t\t// This is not a JSON-RPC request\n\t\t\treturn false;\n\t\t}\n\t\t\t\t\n\t\t// reads the input data\n\t\tif (isset($_GET['d'])) {\n\t\t\tdefine(\"WEB_REQUEST\",true);\n\t\t\t$request=urldecode($_GET['d']);\n\t\t\t$request = stripslashes($request);\n\t\t\t$request = json_decode($request, true);\n\t\t\t\n\t\t} else {\n\t\t\tdefine(\"WEB_REQUEST\",false);\n\t\t\t//error_log(file_get_contents('php://input'));\n\t\t\t$request = json_decode(file_get_contents('php://input'),true);\n\t\t\t//error_log(print_r(apache_request_headers(),true));\n\t\t}\n\t\t\n\t\terror_log(\"Method: \".$request['method']);\n\t\tif (!isset($this->exemptedMethods[$request['method']])) {\n\t\t\ttry {\n\t\t\t\t$this->authenticate();\n\t\t\t} catch (Exception $e) {\n\t\t\t\t$this->authenticated = false;\n\t\t\t\t$this->handleError($e);\n\t\t\t}\n\t\t} else {\n\t\t\t//error_log('exempted');\n\t\t}\n\t\ttrack_call($request);\n\t\t//error_log(\"RPC Method Called: \".$request['method']);\n\t\t\n\t\t//include the document containing the function being called\n\t\tif (!function_exists($request['method'])) {\n\t\t\t$path_to_file = \"./../include/methods/\".$request['method'].\".php\";\n\t\t\tif (file_exists($path_to_file)) {\n\t\t\t\tinclude $path_to_file;\n\t\t\t} else {\n\t\t\t\t$e = new Exception('Unknown method. ('.$request['method'].')', 404, null);\n \t$this->handleError($e);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t// executes the task on local object\n\t\ttry {\n\t\t\t\n\t\t\t$result = @call_user_func($request['method'],$request['params']);\n\t\t\t\n\t\t\tif (!is_array($result) || !isset($result['result']) || $result['result']) {\n\t\t\t\t\n\t\t\t\tif (is_array($result) && isset($result['result'])) unset($result['result']);\n\t\t\t\t\n\t\t\t\t$response = array (\n\t\t\t\t\t\t\t\t\t'jsonrpc' => '2.0',\n\t\t\t\t\t\t\t\t\t'id' => $request['id'],\n\t\t\t\t\t\t\t\t\t'result' => $result,\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t );\n\t\t\t} else {\n\t\t\t\tunset($result['result']);\n\t\t\t\t\n\t\t\t\t$response = array (\n\t\t\t\t\t\t\t\t\t'jsonrpc' => '2.0',\n\t\t\t\t\t\t\t\t\t'id' => $request['id'],\n\t\t\t\t\t\t\t\t\t'error' => $result\n\t\t\t\t\t\t\t\t );\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception $e) {\n\t\t\t\n\t\t\t$response = array (\n\t\t\t\t\t\t\t\t'id' => $request['id'],\n\t\t\t\t\t\t\t\t'result' => NULL,\n\t\t\t\t\t\t\t\t'error' => $e->getMessage()\n\t\t\t\t\t\t\t\t);\n\t\t\t\n\t\t}\n\t\t// output the response\n\t\tif (!empty($request['id'])) { // notifications don't want response\n\t\t\theader('content-type: text/javascript');\n\t\t\t//error_log(@print_r($response));\n\t\t\tif (isset($_GET['d'])) $str_response = $_GET['jsoncallback'].\"(\".str_replace('\\/','/',json_encode($response)).\")\";\n\t\t\telse $str_response = str_replace('\\/','/',json_encode($response));\n\t\t\t\n\t\t\tif ($_SERVER['SERVER_ADDR']=='192.168.1.6') {\n\t\t\t\t//error_log($str_response);\n\t\t\t}\n\t\t\techo $str_response;\n\t\t}\n\t\t\n\t\t\n\t\t// finish\n\t\treturn true;\n\t}",
"protected function handle(Request $request)\n {\n return 1;\n }",
"public function __invoke(Request $request, RequestHandler $handler) {\n R::setup('mysql:host=127.0.0.1;dbname=cellar','root','');\n \n $response = $handler->handle($request);\n R::close();\n return $response;\n }",
"public function handle($req)\n {\n $params = $req->post ?: [];\n\n $files = $this->transformFiles($req->files);\n\n $cookies = $req->cookie ?: [];\n\n $server = $this->transformHeadersToServerVars(array_merge($req->header, [\n 'PATH_INFO' => array_get($req->server, 'path_info'),\n ]));\n $server['X_REQUEST_ID'] = Str::uuid()->toString();\n\n $requestUri = $req->server['request_uri'];\n if (isset($req->server['query_string']) && $req->server['query_string']) {\n $requestUri .= \"?\" . $req->server['query_string'];\n }\n\n $resp = $this->call(\n strtolower($req->server['request_method']),\n $requestUri, $params, $cookies, $files,\n $server, $req->rawContent()\n );\n\n return [\n 'status' => $resp->getStatusCode(),\n 'headers' => $resp->headers,\n 'body' => $resp->getContent(),\n ];\n }",
"public function handle(Request $request)\n {\n $route_params = $this->_router->match($request->getUri());\n $route = $route_params['route'];\n $params = $route_params['params'];\n\n $func = reset($route) . self::CONTROLLER_METHOD_SUFIX;\n $class_name = key($route);\n $controller = new $class_name($request);\n\n $response = call_user_func_array(\n [\n $controller,\n $func,\n ],\n [$params]\n );\n\n if ($response instanceof Response) {\n return $response;\n } else {\n throw new InvalidHttpResponseException();\n }\n }"
] | [
"0.8299201",
"0.8147294",
"0.8147294",
"0.8147294",
"0.8127764",
"0.7993589",
"0.7927201",
"0.7912899",
"0.7899075",
"0.76317674",
"0.75089735",
"0.7485808",
"0.74074036",
"0.7377414",
"0.736802",
"0.7294553",
"0.72389543",
"0.7230166",
"0.72108",
"0.71808434",
"0.7170364",
"0.71463037",
"0.7126907",
"0.7122795",
"0.71225274",
"0.7116879",
"0.70607233",
"0.6981947",
"0.6966695",
"0.69393975",
"0.6912079",
"0.68985975",
"0.6887614",
"0.68774897",
"0.6806274",
"0.67969805",
"0.67778915",
"0.6762979",
"0.67565143",
"0.67533374",
"0.67192745",
"0.6683243",
"0.66487724",
"0.66395754",
"0.6634629",
"0.66283566",
"0.6617558",
"0.6610097",
"0.6610011",
"0.6544976",
"0.653806",
"0.6512757",
"0.64682734",
"0.64381886",
"0.6416964",
"0.63373476",
"0.63359964",
"0.6334543",
"0.63308066",
"0.6321675",
"0.63176167",
"0.631661",
"0.6310991",
"0.63108873",
"0.6295945",
"0.6279438",
"0.62778515",
"0.62508965",
"0.62422955",
"0.62321424",
"0.62237644",
"0.6203428",
"0.61954546",
"0.6191255",
"0.61774665",
"0.61682004",
"0.6151806",
"0.61271876",
"0.61257905",
"0.6116093",
"0.61126447",
"0.6112368",
"0.6101652",
"0.60893977",
"0.60871464",
"0.60862815",
"0.60734737",
"0.60535145",
"0.6028341",
"0.60250086",
"0.60224646",
"0.6011745",
"0.6011483",
"0.60106593",
"0.5998867",
"0.5997086",
"0.5991233",
"0.59844923",
"0.59668386",
"0.5961315",
"0.5954762"
] | 0.0 | -1 |
vrati udaje pouzivatela ako asociativne pole, ak existuje pouzivatel $username s heslom $pass, inak vrati FALSE | function user_right($mysqli, $username, $pass) {
if (!$mysqli->connect_errno) {
$sql = "SELECT * FROM users WHERE username='$username' AND password='$pass'";
// echo "sql = $sql <br>";
// echo "OK3";
if (($result = $mysqli->query($sql)) && ($result->num_rows > 0)) {
$row = $result->fetch_assoc();
$result->free();
return $row;
} else {
return false;
}
} else {
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function register($user, $pass){\n global $ini;\n if(array_key_exists($user,$ini) && ($pass == $ini[$user]['pass'])){\n return TRUE;\n }\n return FALSE;\n}",
"public function login_pass_ok($username, $password)\n {\n }",
"function validateUserPass($username, $password) {\n\n return ($username == 'username' && $password == 'password');\n\n }",
"function createUser($login,$pass) {\n try {\n if ($this->validateLogin($login))\n return false;\n $sql = \"INSERT INTO Utilisateur VALUES (?,?)\";\n $req = $this->db->prepare($sql);\n $params = array(\n $login,\n $pass\n );\n $res = $req->execute($params);\n if ($res ===FALSE) {\n die(\"createUser error : requête impossible\\n\");\n }\n return true;\n } catch (PDOException $e) {\n die(\"PDO Error :\".$e->getMessage());\n }\n }",
"function addUser($username,$password){\r\n\t\tif ( empty( $username ) ) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t// checking if user already exists\r\n\t\t$file=@fopen($this->fPasswd,\"r\");\r\n\t\t$isAlready=false;\r\n\t\twhile($line=@fgets($file,200)){\r\n\t\t\t$lineArr=explode(\":\", $line, 2);\r\n\t\t\tif($username==$lineArr[0]){\r\n\t\t\t\t$isAlready=true;\r\n\t\t\t }\r\n\t\t}\r\n\t\tfclose($file);\r\n\t\tif($isAlready==false){\r\n\t\t\t$file=fopen($this->fPasswd,\"a\");\r\n\r\n\t\t\t$newLine=$username.\":\".$password;\r\n\t\t\tfputs($file,$newLine.\"\\n\");\r\n\t\t\tfclose($file);\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"function checkUsername($username){\n if($this->con === null)\n return false;\n \n $stmt = $this->con->prepare(\"SELECT USERNAME FROM `korisnik` WHERE USERNAME = ?\");\n if($stmt){\n $stmt->bind_param(\"s\", $username);\n \n if($stmt->execute()){\n $stmt->store_result(); //baferuje rez. Mora da se napise da bi mogao da se koristi property num_rows!\n if($stmt->num_rows!=0){\n // $this->greska(\"Vec postoji nalog sa unetim korisnickim imenom.\");\n return false; //neuspesno, postoji vec ta adresa\n }else\n return true; //uspesno\n }else{\n // $this->greska(\"Greska prilkom izvrsenja upita:\");\n return false;\n }\n }\n else{ //neuspesno, greska u upitu\n // $this->greska(\"Greska u sintaksi upita:\");\n return false;\n }\n }",
"public function logIn($user, $pass){\n $passy = md5($pass);\n \n $sql = \"SELECT idz, heslo, admin FROM zamestnanci WHERE email = :email\"; \n $user_data = $this->db->assoc($this->db->query($sql, array(\":email\" => $user)));\n\n\t\t# neexistujici zaznam\n\t\tif($user_data == NULL){\n\t\t\treturn FALSE;\n\t\t}\n\t\telse{\n\t if($passy != $user_data['heslo']){\n\t return FALSE;\n\t }\n\t else{\n\t $_SESSION['username'] = $user;\n\t $_SESSION['admin'] = $user_data['admin'];\n\t $_SESSION['idz'] = $user_data['idz'];\n $_SESSION['logged'] = 1; \n\t return TRUE;\n\t }\t\t\n\t\t}\n }",
"function verificalogin(){\n if(!isset($this->session->datosusu)){\n return true;\n }\n }",
"private function check($username, $password)\n\t\t{\n\t\t\tglobal $db;\n\t\t\t$db->query(\"SELECT * FROM users WHERE uname = ?\", $username);\n\t\t\t//if(mysql_num_rows($db->result) == 1)\n $num_rows = mysqli_num_rows($db->result);\n if($num_rows == 1)\n\t\t\t{\n\t\t\t\t//$row = mysql_fetch_array($db->result, MYSQL_ASSOC);\n $row = mysqli_fetch_array($db->result,MYSQLI_ASSOC);\n\t\t\t\t$db_password = $row['upass'];\n\n\t\t\t\t// This looks backwards, but it really is correct!\n\t\t\t\tif($this->useHash == false)\n\t\t\t\t\t$db_password = sha1($db_password . $this->salt);\n\n\t\t\t\t// If password is ok\n\t\t\t\tif($db_password == $password)\n\t\t\t\t{\n\t\t\t\t\t$this->doLogin($row);\n\t\t\t\t\t$this->storeSessionData($row['uname'], $row['upass'],$row['level']);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}else if($num_rows == 0){\n //echo \"invalid username\";\n return;\n }else{\n echo \"username allready exist \";\n\t\t\t$this->loggedIn = false;\n\t\t\treturn false;\n }\n\t\t}",
"public function userLogin($username, $pass)\n {\n $password = md5($pass);\n $stmt = $this->conn->prepare(\"SELECT id FROM users WHERE username = ? AND password = ?\");\n $stmt->bind_param(\"ss\", $username, $password);\n $stmt->execute();\n $stmt->store_result();\n return $stmt->num_rows > 0;\n }",
"function user_pass_ok($user_login, $user_pass)\n {\n }",
"function checkLogin($username, $password) {\r\n\t\t\t$query = \"SELECT * from utente WHERE username = '$username'\";\r\n\t\t\t$result = DatabaseModel::executeSelectQuery($query);\r\n\t\t\tif ($result != \"MYSQL\" && password_verify($password, $result[0]['pass'])) {\r\n\t\t\t\t$result = $result[0];\r\n\r\n\t\t\t\t$_SESSION['loggedin'] = TRUE;\r\n\t\t\t\t$_SESSION['username'] = $username;\r\n\t\t\t\t$_SESSION['firstname'] = $result['nome'];\r\n\t\t\t\t$_SESSION['lastname'] = $result['cognome'];\r\n\r\n\t\t\t\tif($result['isOwner'] == 1){\r\n\t\t\t\t\t$_SESSION['owner'] = TRUE;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$_SESSION['owner'] = false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif($result['isAdmin'] == 1){\r\n\t\t\t\t\t$_SESSION['admin'] = TRUE;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$_SESSION['admin'] = FALSE;\r\n\t\t\t\t}\r\n\t\t\t\t$result = TRUE;\r\n\t\t\t}else{\r\n\t\t\t\t$result = FALSE;\r\n\t\t\t}\r\n\t\t\treturn $result;\r\n\t\t}",
"function isValidUser($username, $password) {\n\t$result = getByTwoIds(\"user\", \"userEmail\", $username, \"userPassword\", $password);\n\tif(isset($result)){\n\t\t$_SESSION[\"authenticated\"] = true;\n\t\t$_SESSION[\"username\"] = $result[\"userEmail\"];\n\t\t$_SESSION[\"fname\"] = $result[\"userFname\"];\n\t\t$_SESSION[\"lname\"] = $result[\"userLname\"];\n\t\t$_SESSION[\"id\"] = $result[\"id\"];\n\t\t$_SESSION[\"type\"] = $result[\"userType\"];\n\t\t$_SESSION[\"oname\"] = $result[\"userOname\"];\n\t\treturn true; \n\t}\n\treturn false;\n}",
"public function userExists($user, $pass){\n\t\t$curl = curl_init('http://82.223.244.47:5000/v1/ping');\n\t\tcurl_setopt($curl, CURLOPT_USERPWD,$user . \":\" . $pass);\n \tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_exec($curl);\n\n\t\t//return true if the authentication was correct\n\t\tif(!curl_errno($curl) && curl_getinfo($curl, CURLINFO_HTTP_CODE) == 200){\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"function authenticate( $username, $password) {\n global $shib_UN;\n\n return $username == $shib_UN;\n }",
"public static function userExists($email, $pass){\n $md5pass = md5($pass);\n \n //unir los datos con las variables temporales\n $query = 'SELECT * FROM users WHERE email = :email AND password = :pass';\n\n self::getConexion();\n\n $resultado = self::$cnx->prepare($query);\n\n $resultado->bindParam(\":email\", $email);\n $resultado->bindParam(\":pass\", $pass);\n\n $resultado->execute();\n\n //si hay filas regresa true si no false\n if($resultado->rowCount()){\n return true;\n }else{\n return false;\n }\n }",
"private function login_is_valid($username, $password) {\r\n $passencoded = \"'\" . str_replace(\"'\", \"'\\''\", $password) . \"'\";\r\n $userencoded = \"'\" . str_replace(\"'\", \"'\\''\", $username) . \"'\";\r\n $cmd = \"echo -e $passencoded | sudo -u $userencoded -S whoami 2>/dev/null\";\r\n $res = trim(shell_exec($cmd));\r\n if ($res == $username) {\r\n return 1;\r\n } else {\r\n return 0;\r\n }\r\n }",
"public function checkUserPassword()\n\t{\n\t\tself::authenticate();\n\n\t\t$uname = FormUtil::getPassedValue('user', null);\n\t\t$pass = FormUtil::getPassedValue('up', null);\n\n\t\tif($uname == null) {\n\t\t\treturn self::retError('ERROR: No user name passed!');\n\t\t}\n\t\tif($pass == null) {\n\t\t\treturn self::retError('ERROR: No up passed!');\n\t\t}\n\n\t\t$users = self::getRawUsers('uname = \\'' . mysql_escape_string($uname) . '\\'');\n\n\t\tif(count($users) == 1) {\n\t\t\tforeach($users as $user) {\n\t\t\t\tif($user['uname'] == $uname) {\n\t\t\t\t\tif(FormUtil::getPassedValue('viaauthcode', null, 'POST') != null) {\n\t\t\t\t\t\t$authcode = unserialize(UserUtil::getVar('owncloud_authcode', $user['uid']));\n\t\t\t\t\t\tif($authcode['usebefore'] >= new DateTime('NOW') &&\n\t\t\t\t\t\t\t$authcode['authcode'] == $pass) {\n\t\t\t\t\t\t\t\t$return = true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$return = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$authenticationMethod = array(\n\t\t\t\t\t\t\t'modname' => 'Users' ///TODO\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif (ModUtil::getVar(Users_Constant::MODNAME, Users_Constant::MODVAR_LOGIN_METHOD, Users_Constant::DEFAULT_LOGIN_METHOD) == Users_Constant::LOGIN_METHOD_EMAIL) {\n\t\t\t\t\t\t\t$authenticationMethod['method'] = 'email';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$authenticationMethod['method'] = 'uname';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$authenticationInfo = array(\n\t\t\t\t\t\t\t'login_id' => $uname,\n\t\t\t\t\t\t\t'pass' => $pass\n\t\t\t\t\t\t);\n\t\t\t\t\t\t//try to login (also for the right output)\n\t\t\t\t\t\tif(UserUtil::loginUsing($authenticationMethod, $authenticationInfo, false, null, true) == true) {\n\t\t\t\t\t\t\t$return = true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$return = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$return = false;\n\t\t}\n\t\treturn self::ret($return);\n\t}",
"function usernameExists(){\n\t $query = \"SELECT id, first_name, last_name, password\n\t FROM \" . $this->table_name . \"\n\t WHERE username = ?\n\t LIMIT 0,1\";\n\t \n\t $stmt = $this->conn->prepare( $query );\n\t $this->username=htmlspecialchars(strip_tags($this->username));\n\t $stmt->bindParam(1, $this->username);\n\t \n\t $stmt->execute();\n\t $num = $stmt->rowCount();\n\t \n\t if($num > 0){\n\t $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\t \n\t $this->id = $row['id'];\n\t $this->first_name = $row['first_name'];\n\t $this->last_name = $row['last_name'];\n\t $this->password = $row['password'];\n\t \n\t return true;\n\t }\n\t return false;\n\t}",
"private function checkUsernameExist(){\n $base = new ConnexionDb();\n\n $req = $base->query(\n \"SELECT u.username FROM user as u WHERE u.username = :username\",\n array(\n array('username',$_POST['username'],\\PDO::PARAM_STR)\n )\n );\n\n if(isset($req[0]->username)){\n return true;\n }else{\n return false;\n }\n }",
"public function authUser()\n {\n //я не знаю почему, что эти функции возвращают пустые строки...\n //$login = mysql_real_escape_string($_POST['login']);\n //$password = mysql_real_escape_string($_POST['password']);\n $login = $_POST['login'];\n $password = $_POST['password'];\n if(DBunit::checkLoginPassword($login, $password)){\n DBunit::createUserSession(DBunit::getUser($login, $password));\n return true;\n }\n else {\n return false;\n }\n }",
"function userExists( $username ) {\n return true;\n }",
"public function checkUserPass($username = \"\", $password = \"\") {\n\t\tif(!empty($username) && !empty($password)) {\n\t\t\treturn true;\n\t\t}\n\t\tif(empty($username)) {\n\t\t\t$this->addError(_(\"<strong>Error:</strong> No username entered.\"));\n\t\t}\n\t\tif(empty($password)) {\n\t\t\t$this->addError(_(\"<strong>Error:</strong> No password entered.\"));\n\t\t}\n\t\treturn false;\n\t}",
"public function check_user($name='', $pass='') {\n\t\t$db = self::$pdo;\n\t\t$query = $db->query(\"SELECT * FROM \" . self::$_table . \" WHERE password = '$pass' AND name = '$name'\");\n\t\t$count = $query->rowCount();\n\t\t\n\t\tif($count > 0) return true;\n\t\telse return false;\n\t}",
"function login($username, $data) {\n if ($username != 'admin' || $data != 'secret') {\n return false;\n }\n return parent::login($username, $data);\n }",
"function authentificate($user, $pass) {\n\tif ($db = openDB()) {\n\t\t$result = $db -> query(\"SELECT * from users where user = '\" . $user . \"' and pass='\" . sha1($pass) . \"'\");\n\t\tif ($result) {\n\t\t\tif ($result -> fetchArray())\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\tresponseError(ERROR_INVALID_USER_OR_PASS);\n\t\t}\n\t\telse\n\t\t\tresponseError(ERROR_QUERYING);\n\t\t\n\t\t$db -> close();\n\t}\n\n\treturn false;\n}",
"function validateLogin($username, $password)\n {\n if ($username == 'admin')\n {\n if ($password == 'admin')\n return 'success';\n else\n return 'wrong password';\n }\n else\n {\n $allUsers = $this->data->getAllUsers();\n while ($user = $allUsers->fetch_assoc())\n {\n if ($user['Username'] == $username)\n {\n if ($user['Enabled'] == false)\n {\n return 'disabled';\n }\n if ($user['Password'] == $password)\n {\n return 'success';\n }\n else\n {\n return 'wrong password';\n }\n }\n }\n return 'not exist';\n }\n }",
"public function checkExistUser($username, $password)\n {\n\n $sql = \"SELECT * FROM `user` WHERE `username`='$username' AND `password`= '$password' \";\n $statement = $this->connection->prepare($sql);\n $statement->execute();\n\n $result = $statement->fetchAll();\n\n if (isset($result) && count($result) > 0) {\n return true;\n } else {\n return false;\n }\n }",
"public function hasUser($_login,$_password);",
"function validarDatosUser( $nombre, $pass ){\r\n if( !empty($nombre) ){\r\n if( !empty($pass) ){\r\n return true;\r\n }\r\n }else{\r\n return false;\r\n }\r\n}",
"public function checkManagerPass($pass,$username)\n {\n $sql = \"SELECT * FROM org_manager WHERE username=?\";\n $values=array($username);\n $check=$this->getInfo($sql,$values);\n if($check[0]['password']!=$pass)\n return 0;\n return 1;\n }",
"function checkIfValidUser($name,$pw){\n\t if(($name != NULL) && ($pw != NULL)){\n $count = @mysql_query(\"SELECT COUNT(*) as count FROM UserUNandID WHERE ('$name' = UserName)\");\n\t\t $countdata = mysql_fetch_assoc($count);\n\t\t if($countdata['count'] <= 0){\n\t\t return false;\n\t\t }\n else\n\t\t { \n $userinfo = @mysql_query(\"SELECT * FROM UserUNandID WHERE ('$name' = UserName)\");\n\t\t\t $userdata = mysql_fetch_assoc($userinfo);\n\t\t\t $pwinfo = $userdata['Password'];\n\t\t\t if($pw == $pwinfo)\n\t\t\t return true;\n\t\t\t else return false;\n }\t\t\t \n\t\t}\t\t\n\t}",
"function UserNameExistsEdit($username) {\n\t$usernameUser = GetUser('username');\n\n\t$result = DBRead('usuarios', $params = 'username', $fields = 'username');\n\t$query = \"SELECT username FROM usuarios WHERE username = '$username'\";\n\t$result = DBExecute($query);\n\t$resultUsername = mysqli_fetch_assoc($result);\n\t$resultUsername = $resultUsername['username'];\n\n\tif (mysqli_num_rows($result) <= 0 || $usernameUser == $resultUsername)\n\t\treturn true;\n\telse\n\t\treturn false;\n}",
"function valid_user($username, $password)\n\t{\n\t\t$query = $this->db->get_where('usuarios', array('username'=>$username,'password'=>$password, 'baja'=> 'NO'), 1);\n\t\t//si es igual a 1 quiere decir que encontro el usuario\n if($query->num_rows() == 1)\n {\n return $query->result();\n }\n else\n {\n return false;\n }\n\t}",
"public function isUser($login,$password){\n\n $conexion = new Conexion();\n $consulta=$conexion->prepare('SELECT COUNT(*) FROM '. self::TABLA . ' WHERE login=:login');\n $consulta->bindParam(':login', $login);\n $hash = $this-> getHash($login);\n $password = password_verify($password,$hash);\n $consulta->execute();\n $registro = $consulta->fetch();\n $conexion=null;\n foreach ($registro as $value) {\n if($value[0]==1 && $password)\n return 1;\n }\n return 0;\n }",
"function validate($username, $password){\r\n\t\t//echo \"validando $username, $password\\n\";\r\n\t\t$x = new self();\r\n\t\t$x->setUsername($username);\r\n\t\t$x->setPassword($password);\r\n\t\t$x->setWhere(Db_Helper::equal('username'), Db_Helper::equal('password'));\r\n\t\t$cant = $x->searchCount();\r\n\t\treturn($cant==1);\r\n\t}",
"function TryLogin($username, $password){\n if(empty($username)){\n $this->message = self::MISSING_USERNAME;\n return false;\n }\n if(empty($password)){\n $this->message = self::MISSING_PASSWORD;\n return false;\n }\n \n if($username === $this->username && $password === $this->password){\n return true;\n }\n $this->message = self::WRONG_CREDENTIALS;\n return false;\n }",
"function verifyLogin($user,$pass)\r\n\r\n{\r\n\r\n\t$salt = 's+(_a*';\r\n\r\n\t$pass = md5($pass.$salt);\r\n\r\n\r\n\r\n\t$sql = \"SELECT pass FROM users WHERE pass = '\" . $pass . \"' AND user = '\" . $user .\"'\";\r\n\r\n\t$res = sqlQuery($sql); if(sqlErrorReturn()) sqlDebug(__FILE__,__LINE__,sqlErrorReturn());\r\n\r\n\t$num = sqlNumRows($res);\r\n\r\n\r\n\r\n\tif ($num > 0)\r\n\r\n\t\treturn true;\r\n\r\n\treturn false;\t\r\n\r\n}",
"function m_CheckLogin($user, $pass)\n\t{\t\t\t\t\t\t\n\t\t$stQuery = \"SELECT * FROM tb_client WHERE vEmail = '\".trim(addslashes($user)).\"' AND BINARY vPassword='\".trim(addslashes($pass)).\"' and iActive=1\";\t\n\t\t$rsResult = $this->obDbase->Execute($stQuery);\n\t\tif (!$rsResult)\n\t\t{ \t\t\t\t\t\t\t\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $rsResult;\t\t\t \n\t\t}\t\t\t\t\n\t}",
"function es_usuario_valido() {\n if (!isset($_POST['username'])) {\n return false;\n } elseif (!isset($_POST['password'])) {\n return false;\n }\n\n $nombre_usuario = $_POST['username'];\n $password = $_POST['password'];\n\n return es_usuario_password_valido($nombre_usuario, $password);\n }",
"function validate($user, $pass) {\r\n\t/* replace with appropriate username and password checking, such as checking a database */\r\n\t$users = array(\r\n\t\t\t'david' => 'fadj&32',\r\n\t\t\t'adam' => '8HEj838'\r\n\t\t);\r\n\t\r\n\tif(isset($users[$user]) && ($users[$user] === $pass)) {\r\n\t\treturn true;\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n}",
"abstract protected function is_valid($username, $password);",
"function validate_login($username, $password){\n if (empty($this->username) or empty($this->password)){\n // User has not set its credentials\n print 'Error user has not set user and password.';\n return False;\n }\n if (empty($username) or empty($password)){\n // Empty username or password\n print 'Cannot ser username or password as null.';\n return False;\n }\n if ($username == $this->username and $password == $this->password){\n print 'Username and password are correct.';\n return True;\n }\n }",
"public function isNewUser($dh) {\n //perhaps at some point this will be a flag in the database...for now it's\n //just a matter of if password has ever been set or not\n $info = $this->getDbInfo($dh, true);\n return ($info[\"user\"][\"password\"] === \"\");\n //note that right now this will return false if there is an error returned\n //from getDbInfo\n }",
"function user_is_valid($username, $hash_pw)\n {\n // Connect to MySQL\n $link = get_link(TRUE);\n\n $username = mysqli_real_escape_string($link, $username);\n $query = \"\n SELECT * FROM User\n WHERE name = '$username' AND hash_pw = '$hash_pw'\";\n $result = mysqli_query($link, $query);\n if ($row = mysqli_fetch_array($result))\n return TRUE;\n mysqli_free_result($result);\n mysqli_close($link);\n return FALSE;\n }",
"public static function validateLogin($username, $password) {\r\n $q = \"SELECT id, playername AS username, password, admin, donor, contributor\r\n FROM accounts\r\n WHERE playername = :username\r\n AND active=1\r\n \";\r\n\r\n if ($result = Bitch::source('default')->first($q, compact('username'))) {\r\n if (xAuth::checkPassword($password, $result['password'])) {\r\n Session::initSession($result);\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }",
"private function checkPassold($user, $pass){\r\n\t\t$db = $this->getAdapter();\r\n\t\t$select = $db->select()->from($this->_name, array('username'))\r\n \t\t\t\t\t\t ->where('username =?', $user)\r\n \t\t\t\t\t\t ->where('password =?', md5($pass));\r\n\t\t$result = $db->fetchOne($select);\r\n\t\tif($result != ''){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public function existUser($user,$pwd){\n\t\t$query = \"SELECT idUser FROM final_usuario WHERE nick='\".$user.\"' and \n\t\tpassword='\".$pwd.\"'\";\n\t\treturn mysqli_num_rows($this->con->action($query))> 0? True: False; \n\t}",
"public function validateUserPass($username, $password)\n {\n return 'username' == $username && 'password' == $password;\n }",
"function auth($username, $password) {\n\n if ($password == 'password') { \n return true;\n }\n return false;\n\n}",
"public function userExists($login){\n $usr = $this->userInfo($login);\n if($usr == null) { // uzivatel neni v DB\n return false;\n }\n else {\n return true;\n }\n }",
"private function new_account($username){\n\t\t\t\t\n\t\t$stmt = $this->db->prepare('SELECT * FROM account WHERE username=:username');\n\t\t$stmt->execute(['username'=>$username]);\n\t\t$result = $stmt->fetch();\n\t\t//the if loop checks if the account exists\n\t\tif(is_array($result) && count($result) > 0){\n\t\t\treturn false;//does exists\n\t\t}\n\t\treturn true;//does not exist\n\t}",
"function emptyInputLogin($username, $password){\r\n $result;\r\n if(empty($username) || empty($password)){\r\n $result = true;\r\n }else{\r\n $result = false;\r\n }\r\n return $result;\r\n }",
"function checkLogin($username, $password)\n\t{\n\t\t\n\t\t//set an empty userId variable\n\t\t$userId = null;\n\t\t\n\t\t//make a call to grab the user id of the row that has a username AND password that match the specified ones\n\t\t$stmt = $this->db -> prepare(\"SELECT user_id FROM user WHERE username=? && password=?\");\n\t\t\n\t\t$stmt -> execute(array($username, $password));\n\t\t\n\t\t$userIdToCheck = $stmt->fetch(PDO::FETCH_ASSOC);\n\t\t\n\t\t//var_dump($userIdToCheck);\n\t\t\n\t\t\n\t\t//if the username and password do not match up, no rows will be found, and userIdToCheck will equal false\n\t\t//if username and password do not match up, put out error\n\t\tif($userIdToCheck == false)\n\t\t{\n\t\t\t$this->errors['password'] = \"Username and password do not match\";\n\t\t\t\n\t\t\t//var_dump($password, $userIdToCheck);\n\t\t\t//echo \"NOOOO!!!\";\n\t\t}\n\t\t//else, if the username and password do match up, set the user id to the $userId variable\n\t\t else\n\t\t{\n\t\t\t$userIdToCheck = $userIdToCheck['user_id'];\n\t\t} \n\t\t\n\t\t//return the user ID associated with the username and password\n\t\treturn $userIdToCheck;\n\t}",
"function Boolean_Existencia_Usuario($username,$email)\n{\n\t$query = consultar(sprintf(\"SELECT email_usuario,usuario FROM tb_usuarios WHERE email_usuario='%s' or usuario='%s'\",escape($username),escape($email)));\n\tif(Int_consultaVacia($query)>0)\n\t{\n\t\treturn array(false,'El usuario o el email ya existen, intenta nuevamente.');\n\t}else\n\t{\n\t\treturn array(true,'');\t\n\t}\n\n}",
"function correct_user( $name, $passwd, $domain, $conn, $db_users )\r\n\t\t{\r\n\t\t\t$table = $conn->query( \"SELECT count(*) CNT, user, passwd, domain FROM \".$db_users.\" WHERE user = '\".$name.\"' AND domain = '\".$domain.\"'\" );\r\n\t\t\t$row = mysqli_fetch_array( $table );\r\n\t\t\tif ( $row['CNT'] != 1 ) return false;\r\n\t\t\tif ( $row['passwd'] == $passwd ) return true;\r\n\t\t\treturn false;\r\n\t\t}",
"function checkUserExists($username){\n\treturn false;\n}",
"function checkLogin($u, $p) {\n $sql = \"SELECT * FROM customer WHERE username = :username\";\n $stmt = $this->dbconn->prepare($sql);\n $stmt->bindParam(':username', $u, PDO::PARAM_STR);\n $stmt->execute();\n if($stmt->rowCount() > 0) {\n $retVal = $stmt->fetch(PDO::FETCH_ASSOC);\n if(strlen($retVal['password']) > 0) {\n if($retVal['password'] == $p) { // encrypt & decrypt\n return Array(\n 'CustomerID'=>$retVal['CustomerID'],\n 'username'=>$retVal['username'],\n 'email'=>$retVal['email'],\n 'phone'=>$retVal['phone'],\n 'postcode'=>$retVal['postcode']);\n } else {\n return false;\n }\n } else {\n return Array('username'=>$retVal['username']);\n }\n } else {\n return false;\n }\n }",
"public function connectUser($login,$password){\n $sql = \"SELECT * FROM \". $this->tableName .\" WHERE login=:login AND password= :password ;\";\n $requete = $this->connexion->prepare($sql);\n $requete->bindValue(':login', $login);\n $requete->bindValue(':password', sha1($password));\n if($requete->execute()){\n if($requete->rowcount() == 1){\n return true;\n }\n } \n return false;\n }",
"public function checkLogin($username, $pass) {\n return count($this->db->select('*')\n ->from('Users')\n ->where('username', $username)\n ->where('password', sha1($pass))\n ->get()\n ->result()) > 0;\n }",
"function checkLogin($username,$txtpassword){\n\n $result= $this->db->query(\"SELECT * FROM cck_user WHERE user_name='$username' AND user_password='$txtpassword' \");\n $row = $result->row();\n $count = $result->num_rows();\n\n if($count==1){\n return true;\n }else{\n return false;\n }\n }",
"protected function checkCredentials ($username,$password) {\n\t\t$sql = \"SELECT user_name,user_password FROM users\n\t\t\t\tWHERE user_name = ? AND user_password = MD5(?)\";\n\t\t$data = [$username,$password];\n\t\t//create stdStatemment object | call to Model method from core/Database.php\t\n\t\t$statement = $this->setStatement($sql,$data);\n\t\t\tif ( $statement->rowCount() > 0 ) {\n\t\t\t\t$out = true;\n\t\t\t} else {\n\t\t\t\t$out = false;\n\t}\n\t\treturn $out;\n\t}",
"function autenticado(){\n\tif(isset($_SESSION['DNI'])){//Si existe, existe\n\t\treturn true;\n\t}else{//Si no existe, no existe\n\t\treturn false;\n\t}\n}",
"public function userLogin($username, $pass)\n {\n if ($this->isUserExists($username) || $this->isEmailExist($username)) {\n //Generating password hash\n $password = md5($pass);\n //Creating query\n $stmt = $this->con->prepare(\"SELECT * FROM tbl_usuario WHERE (userlogin=? or email=?) and passlogin=?\");\n //binding the parameters\n $stmt->bind_param(\"sss\", $username, $username, $password);\n //executing the query\n $stmt->execute();\n //Storing result\n $stmt->store_result();\n //Getting the result\n $num_rows = $stmt->num_rows;\n //closing the statment\n $stmt->close();\n //If the result value is greater than 0 means user found in the database with given username and password\n //So returning true\n\n if ($num_rows > 0) {\n return USER_AUTHENTICATED;\n } else {\n return USER_PASSWORD_DO_NOT_MATCH;\n }\n } else {\n return USER_NOT_FOUND;\n }\n }",
"public function login($un,$pw){\n $pw=hash(\"sha512\",$pw);\n $query=$this->con->prepare(\"SELECT * from users WHERE username=:un and password=:pw\");\n $query->bindParam(\":un\",$un);\n $query->bindParam(\":pw\",$pw);\n $query->execute();\n if($query->rowCount()==1){\n return true;\n }\n else\n {\n array_push($this->errorArray,Constants::$loginFailed);\n return false;\n }\n }",
"public function login($username,$password){\n\n //si nos devuelve una fila es porque existe\n $this->db->where('username',$username);\n $this->db->where('password',$password);\n $resp= $this->db->get('usuarios');\n if ($resp->num_rows()>0) {\n return true;\n } else {\n return false;\n }\n \n }",
"public function v_nuevo(){\n\t\tif($this -> e_user === '' && $this -> e_pass === '' && $this -> e_email === ''){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"function check_new_user($login, $passwd, $passwd2, $mail) {\n\t\t//~ validate user data\n\t\tif (empty($login) or empty($passwd) or empty($passwd2)) $error[]='Все поля обязательные для заполнения';\n\t\tif ($passwd != $passwd2) $error[]='Пароли не совпадают';\n\t\tif (strlen($login)<3 or strlen($login)>30) $error[]='Войти должны быть между 3 и 30 символов';\n\t\tif (strlen($passwd)<3 or strlen($passwd)>30) $error[]='Пароль должен быть от 3 до 30 символов';\n\t\t//~ validate email\n\t\tif (!filter_var($mail, FILTER_VALIDATE_EMAIL)) $error[]='Не правильный адрес электронной';\n\t\t//~ Checks the user with the same name in the database\n\t\tif (mysql::query(\"SELECT * FROM users WHERE login_user='\".$login.\"';\", 'num_row')!=0) $error[]='Пользователь с таким именем уже существует';\n\t\tif (mysql::query(\"SELECT * FROM users WHERE mail_user='\".$mail.\"';\", 'num_row')!=0) $error[]='Пользователь с таким E-mail уже существует';\n\n\t\t//~ return error array or TRUE\n\t\tif (isset($error)) {\n\t\t\tself::$error_arr=$error;\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}",
"function login() {\n $sql = \"SELECT *\n FROM USUARIOS\n WHERE (\n\t\t\t\t (email = '$this->email')\n )\";\n\n $resultado = $this->mysqli->query( $sql );//hacemos la consulta en la base de datos\n if ( $resultado->num_rows == 0 ) {//miramos si el numero de filas es 0\n \t\t\t return 'El usuario no existe';\n\n \t\t} else {//si no es 0, el usuario existe\n \t\t\t$tupla = $resultado->fetch_array();//devolvemos la tupla\n\n \t\t\t if ( $tupla[ 'password' ] == $this->password ) {//si la contraseña es correcta entra en la página\n \t\t\t\t return true;\n\n \t\t\t } else {//en caso contrario no entra\n \t\t\t\t return 'La password para este usuario no es correcta';\n \t\t\t }\n \t }\n\t }",
"public function isUserExist($username)\r\n\t{\r\n\t\t$select=$this->select();\r\n\t\t$select->from($this,'username')\r\n\t\t\t->where(\"username=?\",$username);\r\n\t\t$row=$this->fetchRow($select);\r\n\t\tif(!$row) return false;\r\n\t\treturn true;\r\n\t}",
"function login($user, $pass){\n global $database; //The database object\n\n /* Checks that username is in database and password is correct */\n $result = $database->confirmUserPass($user, md5($pass));\n\n\n if($result){\n \t$_SESSION['username'] = $user;\n \treturn true;\n }else{\n \treturn false;\n }\n \n \n }",
"function valid_credentials($user, $pass){\n\n $user = mysqli_real_escape_string($user, $_POST['username']);\n $pass = sha1($pass);\n\n $total = mysql_query(\"SELECT COUNT('user_id') FROM 'users' WHERE 'user_name' = '{$user}' AND 'user_password' = '{$pass}'\");\n\n return (mysql_result($total, 0) == '1') ? true : false;\n\n}",
"public function loginValide () {\n $login = $this->donnees[self::LOGIN_REF];\n // Le champ login ne doit pas ?tre vide\n if ($login == null) {\n $this->erreur[self::LOGIN_REF] = \"Veuillez remplir le champ login\";\n return false;\n // Le champ login doit contenir un login pr?sent dans la base de donn?es\n } else if (! $this->utilisateurs->exist($login)) {\n $this->erreur[self::LOGIN_REF] .= \"ce login est inconnu\";\n return false;\n }\n return true;\n }",
"public function userExists($user,String $act=\"userAndPass\")\n\t{\n\t\t$this->connect();\n\t\t$result = $this->connection->query($this->querys->getUserSelect());\n\t\twhile($row = $result->fetch(PDO::FETCH_ASSOC)) {\n\t\t\tif($act==\"userAndPass\"&&$row[\"username\"]==$user->getUserName()&&$row[\"password\"]==$user->getPassword()){\n\t\t\t\t$this->disconnect();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif($act==\"onlyUser\"&&$row[\"username\"]==$user->getUserName())\n\t\t\t{\n\t\t\t\t$this->disconnect();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t$this->disconnect();\n\t\treturn false;\n\t}",
"function checkPassword(): bool\n {\n $user = FPersistantManager::getInstance()->search(\"utente\", \"UserName\", $this->getUsername());\n if($this->getPassword() == $user[0]->getPassword())\n return true;\n else\n return false;\n }",
"public function userWantsToLogin(){\n\t\tif(isset($_POST[self::$login]) && trim($_POST[self::$password]) != '' && trim($_POST[self::$name]) != '') {\n\t\t\t$this->username = $_POST[self::$name];\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}",
"static function userLogin($username = \"\", $password = \"\")\r\n {\r\n $user = self::getSingleUser('username', $username, 'password', $password);\r\n\r\n if ($user !== NULL && $user->getOffline() == 1) //is offline\r\n {\r\n $user->setOffline(\"0\");\r\n $user->setAddressIP($_SERVER['REMOTE_ADDR']);\r\n\r\n self::updateUser($user);\r\n\r\n $_SESSION[\"user_id\"] = $user->getId();\r\n $_SESSION[\"user_name\"] = $user->getUsername();\r\n $_SESSION[\"user_type\"] = $user->getType();\r\n $_SESSION[\"user_church\"] = $user->getIdChurch();\r\n $_SESSION[\"last_page\"] = \"\";\r\n $_SESSION[\"curr_page\"] = \"\";\r\n\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n }",
"public function isLoginValid($username, $password) {\n\t\t$retVar = false;\n\t\t\n\t\tif($username === $this->username && $password === $this->password) {\n\t\t\t$retVar = true;\n\t\t\t\n\t\t\t$_SESSION['username'] = $username;\n\t\t}\n\t\t\n\t\treturn $retVar;\n\t}",
"function check_login($username,$password){\n\t\t $check=$this->db->prepare(\"SELECT * FROM user WHERE username=:user and password=:pass\");\n\t\t $check->bindParam(\":user\",$username,PDO::PARAM_STR);\n\t\t $check->bindParam(\":pass\",$password,PDO::PARAM_STR);\n\t\t $check->execute();\n\t\t if($check->rowCount()==1)\n\t\t {\n\t\t\t \n\t\t\t $admin=$check->fetch(PDO::FETCH_ASSOC);\n\t\t\t $_SESSION['username']=$admin['username'];\n\t\t\t $_SESSION['user']=$admin['user_id']; \n\t\t\t $this->db->query(\"UPDATE `user` SET `online_status`='1' WHERE user_id=$admin[user_id]\"); \n\t\t }\n\t\t \n\t\t }",
"function doLogin($username,$password)\n{\n // check password\n return true;\n //return false if not valid\n}",
"public function checkUser($username)\n {\n $sql = \"SELECT id FROM user WHERE username = :name\";\n $userdata = $this->db->fetchAssoc($sql, array('name' => $username));\n if($userdata !== false && count($userdata) == 1){\n $this->session->set('loggedin', true);\n $this->session->set('username', $username);\n $this->session->set('userId', $userdata['id']);\n\n return true;\n }else{\n try{\n $this->db->insert('user', array('username' => $username));\n $userdata = $this->db->fetchAssoc($sql, array('name' => $username));\n $this->session->set('loggedin', true);\n $this->session->set('username', $username);\n $this->session->set('userId', $userdata['id']);\n\n return true;\n }catch(\\Exception $e){\n $this->session->set('loggedin', null);\n\n return false;\n }\n }\n }",
"function check_login($username, $password)\n\t{\n\t\t$dn=\"cn=\".$username.\",\".$this->ldapconfig['usersdn'].\",\".$this->ldapconfig['basedn'];\n\t\t\n\t\tif ($bind=ldap_bind($this->ldap_link, $dn, $password))\n\t\t{\n\t\t\t//my_debug_print(\"Login corret\", __FILE__, __LINE__, \"on\");\n\t\t\t\n\t\t\t//ldap_close($this->ldap_link);\n\n\t\t\treturn \"login ok\";\n\t\t} \n\t\telse \n\t\t{\n\t\t\t//my_debug_print(\"Login Failed: Please check your username or password\", __FILE__, __LINE__, \"on\");\n\t\t\t//my_debug_print($this->ldap_link, __FILE__, __LINE__, \"on\");\n\t\t\t//my_debug_print($dn, __FILE__, __LINE__, \"on\");\n\t\t\t//my_debug_print($bind, __FILE__, __LINE__, \"on\");\n\t\t\t\n\t\t\t//ldap_close($this->ldap_link);\n\t\t\treturn FALSE;\n\t\t}\n\t}",
"public function usernameExists($username){ // returns true if username exists in users\n \t$stmt = $this->conn->prepare ( 'SELECT * FROM users WHERE username = :username' );\n\t$stmt->bindParam ( ':username', $username );\n\t$stmt->execute ();\n\t$stmt->fetch ();\n\tif ($stmt->rowCount () === 0)\n\t\treturn FALSE;\n\telse\n\t\treturn TRUE;\n }",
"function cek_login($user, $pass){\r\n\t\t$user\t\t\t= escape($user);\r\n\t\t$pass \t\t= escape($pass);\r\n\t\t\r\n\t\t$query = \"SELECT * FROM users WHERE username='$user' AND password='$pass'\";\r\n\t\tglobal $link;\r\n\t\r\n\t\tif ( $result = mysqli_query($link, $query) ){\r\n\t\t\tif ( mysqli_num_rows($result) != 0 ) return true;\r\n\t\t\telse return false;\r\n\t\t}\r\n\t}",
"function addUser($username,$password,$group=\"\"){\n // checking if user already exists\n $file=@fopen($this->fPasswd,\"r\");\n $isAlready=false;\n while($line=@fgets($file,200)){\n $lineArr=explode(\":\",$line);\n if($username==$lineArr[0]){\n $isAlready=true;\n }\n }\n \n if($isAlready==false){\n $file=fopen($this->fPasswd,\"a\");\n \n\t\t\tif(strtolower(substr($_ENV[\"OS\"],0,7))!=\"windows\"){\n\t\t\t\t$password=crypt($password);\n\t\t\t}\n \n $newLine=$username.\":\".$password.\"\\n\";\n\n fputs($file,$newLine);\n fclose($file);\n return true;\n }else{\n return false;\n }\n }",
"protected function validateUserPass($username, $password){\n\t\t//always give read-only:\n\t\tif(($_SERVER['REQUEST_METHOD'] == 'OPTIONS') \n\t\t || (isset($this->validTokens[$password]))\n || (($_SERVER['REQUEST_METHOD'] == 'GET') && ($this->category == 'public'))\n ) {\n\t\t\tOC_Util::setUpFS();\n\t\t\treturn true;\n\t\t} else {\n //var_export($_SERVER);\n //var_export($this->validTokens);\n //die('not getting in with \"'.$username.'\"/\"'.$password.'\"!');\n\t\t\treturn false;\t\n\t\t}\n\t}",
"public function validate($username=null, $password=null) {\r\n\t\t$users = $this->db\r\n\t\t\t->where('username', $username)\r\n\t\t\t->where('password', md5($password))\r\n\t\t\t->get($this->user_table)\r\n\t\t\t->num_rows();\r\n\t\tif ($users > 0) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"function checkLogginData($username, $password, $connection) {\n $q = mysqli_query($connection, 'SELECT user_name, user_password, user_id\nFROM users \nWHERE user_name = \"' . $username . '\" AND user_password = \"' . $password . '\"'\n );\n\n if (!$q) {\n echo 'Възникна грешка с базата данни!!!';\n exit;\n } else {\n if ($q->num_rows == 0) {\n return false;\n } else {\n $row = $q->fetch_assoc();\n $_SESSION['username'] = $row['user_name'];\n $_SESSION['user_id'] = $row['user_id'];\n return true;\n }\n }\n}",
"function checkAuth($type, $username, $password)\n {\n if (!$_MIDCOM->authentication->is_user())\n {\n if (!$_MIDCOM->authentication->login($username, $password))\n {\n return false;\n }\n }\n return true;\n }",
"function authUser($username, $password) {\n try {\n $connString = \"mysql:host=localhost;dbname=knovak18\";\n $user = \"knovak18\";\n $pass = \"web2\";\n\n $pdo = new PDO($connString,$user,$pass);\n $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n $sql = \"select * from rruser where Username=\\\"\" . $username . \"\\\"\";\n $result = $pdo->query($sql);\n\n while ($row = $result->fetch()) {\n if($row['Password'] == $password) {\n return true;\n } else {\n return false;\n }\n }\n $pdo = null;\n }\n catch (PDOException $e) {\n die( $e->getMessage() );\n }\n}",
"function verificaUsuario($login, $password)\n{\n /*\n Logando com ByCrpt\n */\n $sql = \"select senha from usuario where nome = '{$login}'\";\n $resultado = executaSQL($sql);\n $senha = mysqli_fetch_assoc($resultado);\n \n return (crypt($password, $senha['senha']) === $senha['senha']);\n}",
"function authenticate($username, $password, $usersDAO) {\n $hashedPassword = hashPassword($password, SALT1, SALT2);\n $exists = $usersDAO->userExists($username, $hashedPassword);\n if($exists) {\n $_SESSION['isLogged'] = 1;\n $_SESSION['username'] = $username;\n if($usersDAO->isAdminUser($username)) {\n $_SESSION['isAdmin'] = 1;\n }\n } else {\n $_SESSION['isLogged'] = 0;\n }\n return $exists;\n}",
"function check_login_from_db($user, $pass)\n{\n\t$db = open_database_connection();\n\t$stmt = $db->prepare(\"SELECT userID, name, login, pass\n\t\t\t\t\t\tFROM user\n\t\t\t\t\t\tWHERE login = :user AND pass = :pass\");\n\t$stmt->execute(array(':user' => $user,':pass' => $pass));\n\t$users = $stmt->fetchAll(PDO::FETCH_ASSOC);\n close_database_connection($db);\n return empty($users);\n}",
"function validar_login($user, $pas) {\n\t\t\t$this->db->from($this->tabla);\n\t\t\t$this->db->where('usuario', $user);\n\t\t\t$this->db->where('pass', $pas);\n\t\t\t$consulta = $this->db->get();\n\t\t\tif ($consulta->num_rows() == 0) {\n\t\t\t\t//usuario no existe\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\t//usuario existe\n\t\t\t\treturn $consulta->row(0, 'usuario');\n\t\t\t}\n\t\t}",
"static function checkUsername($username)\n {\n\n $con=Database::getConnection();\n $req=$con->prepare('SELECT * FROM admin WHERE username=?');\n $req->execute(array($username));\n if($req->rowCount()==0)\n {\n return true;\n }\n return false;\n }",
"function addUser($username,$password,$group){\n // checking if user already exists\n $file=@fopen($this->fPasswd,\"r\");\n $isAlready=false;\n while($line=@fgets($file,200)){\n $lineArr=explode(\":\",$line);\n if($username==$lineArr[0]){\n $isAlready=true;\n }\n }\n \n if($isAlready==false){\n $file=fopen($this->fPasswd,\"a\");\n\n $password=crypt($password);\n $newLine=$username.\":\".$password.\"\\n\";\n\n fputs($file,$newLine);\n fclose($file);\n return true;\n }else{\n return false;\n }\n }",
"public function checkUserInBD($login, $pass) {\n // TODO Rafikov Сделать через трайд\n $dbh = $this->db;\n $sql = 'SELECT `id` FROM `users` WHERE `login` = :login';\n\n $stmt = $dbh->prepare($sql);\n $stmt->bindParam(':login', $login);\n $stmt->execute();\n\n $response = $stmt->fetch(\\PDO::FETCH_ASSOC);\n if ($response) {\n return FALSE;\n } else {\n $sql = 'INSERT INTO `users` (`login`,`pass`) VALUES(:login, :pass);';\n //echo $sql; die();\n $stmt = $dbh->prepare($sql);\n $stmt->bindParam(':login', $login);\n $stmt->bindParam(':pass', $pass);\n $stmt->execute();\n\n $sql = 'SELECT `AUTO_INCREMENT`\n FROM INFORMATION_SCHEMA.TABLES\n WHERE TABLE_SCHEMA = \\'chat\\'\n AND TABLE_NAME = \\'users\\'';\n $stmt = $dbh->prepare($sql);\n $stmt->execute();\n $idUser = $stmt->fetch(\\PDO::FETCH_ASSOC)['AUTO_INCREMENT']-1;\n\n return $idUser;\n }\n }",
"static function validateUser($username, $password) {\n if (strlen($username) < 1 || strlen($password) < 8) {\n return false;\n }\n return true;\n }",
"public function checkUser()\n {\n // Prepare ids used to avoid SQL injections(bad code)\n // we store them in the var $sql\n // we select the id and password from the table users where the username equals what was put it\n $sql = $this->db->prepare('SELECT id, password FROM admin WHERE username = ?');\n // Then we bind the parameters, its a string so we use 's', then we execute the statment\n $sql->bind_param('s', $_POST['username']);\n $sql->execute();\n // Now we store the results\n $sql->store_result();\n\n //if the returned rows are greater then 0\n // we bind the results the variblesand then fetch them \n if ($sql->num_rows > 0) {\n $sql->bind_result($id, $password);\n $sql->fetch();\n // If the rows are more then 0 we know the account name exist, now lets check the password!\n // we werify our hashed password if user name and password are right we create a new session\n // Note: remember to use password_hash in your registration file to store the hashed passwords.\n if (password_verify($_POST['password'], $password)) {\n // new session created with a var for being loged in set to true\n //the name is equal to the name from the field\n // and the id is equal to the users id\n session_regenerate_id();\n $_SESSION['loggedin'] = TRUE;\n $_SESSION['person'] = $_POST['username'];\n $_SESSION['id'] = $id;\n } else {\n // Incorrect password\n echo 'Wrong username or password';\n }\n } else {\n // wrong credentials\n echo 'Wrong username or password';\n }\n//we close the prepared statment\n $sql->close();\n }",
"function user_login($username, $password){\n $user = get_user_by_username($username);\n if(strcmp($user[\"password\"],$password) == 0){\n $_SESSION['user'] = $user['username'];\n return true;\n }\n else{\n return false;\n }\n}",
"function user_exists($username){\n\n $sql = \"SELECT Username, Password, Email, Id FROM Users\"; //WHERE\n //Username={$username}\";\n $result = mysqli_query(Db::$conn, $sql);\n //check results return true if >0\n if(mysqli_num_rows($result)>0) {\n while ($row = mysqli_fetch_assoc($result)) {\n $temp_user = $row[\"Username\"];\n $temp_pass = $row[\"Password\"];\n if ($username == $row[\"Username\"]) {\n return true;\n }\n }\n }\n\n return false;\n\n}"
] | [
"0.70424217",
"0.6866002",
"0.682533",
"0.68124443",
"0.6803946",
"0.6791902",
"0.67910826",
"0.6764693",
"0.67561364",
"0.67483395",
"0.67468894",
"0.67402637",
"0.66945475",
"0.6690512",
"0.66850644",
"0.6683234",
"0.66736454",
"0.66716015",
"0.6661474",
"0.66590476",
"0.6653583",
"0.6641428",
"0.66395634",
"0.66384864",
"0.6635719",
"0.66237384",
"0.6612768",
"0.66096824",
"0.6609119",
"0.65834445",
"0.6581542",
"0.6566648",
"0.65644956",
"0.6540369",
"0.65337723",
"0.6532439",
"0.6529182",
"0.6520888",
"0.65041983",
"0.6494296",
"0.6493532",
"0.64908755",
"0.6486658",
"0.64809316",
"0.64735776",
"0.64656335",
"0.6465478",
"0.6463962",
"0.6460789",
"0.64573133",
"0.6456838",
"0.64527386",
"0.6443937",
"0.6442845",
"0.6428186",
"0.6412952",
"0.6412644",
"0.63989156",
"0.6398639",
"0.63934326",
"0.63924617",
"0.63886625",
"0.63779575",
"0.6377022",
"0.63760495",
"0.63758785",
"0.6371868",
"0.6361264",
"0.6356196",
"0.6353504",
"0.63529044",
"0.6350093",
"0.6342107",
"0.6326888",
"0.6324823",
"0.6322166",
"0.6314058",
"0.6309631",
"0.63088185",
"0.6307886",
"0.6306386",
"0.6304514",
"0.62978643",
"0.62955844",
"0.6285043",
"0.6281269",
"0.6274881",
"0.62723464",
"0.6270723",
"0.6269167",
"0.62675637",
"0.6267037",
"0.6256929",
"0.6254407",
"0.62535816",
"0.6248364",
"0.6244702",
"0.624263",
"0.6241291",
"0.6240739",
"0.62403953"
] | 0.0 | -1 |
Get the Author name from an author blog id. | private function getAuthorName($author_blog_id) {
$author_name = FALSE;
$entities = \Drupal::entityTypeManager()->getStorage('author')->loadByProperties(['blog_id' => $author_blog_id]);
$author = ($entities) ? reset($entities) : NULL;
if ($author) {
$author_name = $author->getName();
}
return $author_name;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function get_author_name($auth_id = \\false)\n {\n }",
"public function author()\n {\n if ($this->user_id) {\n $field = config(\"binshopsblog.comments.user_field_for_author_name\",\"name\");\n return optional($this->user)->$field;\n }\n\n return $this->author_name;\n }",
"public function get_author_display_name( $post_id ) {\n \t// sanitize the data\n $post_id = intval( sanitize_text_field( $post_id ) );\n $author_id = (int) get_post_field( 'post_author', $post_id );\n\n return get_the_author_meta( 'display_name', $author_id );\n }",
"public function getAuthorName()\n\t{\n\t\tif(is_null($this->_authorName)){\n\t\t\t$this->loadData();\n\t\t}\n\t\treturn $this->_authorName;\n\t}",
"public static function getAuthor($id = '') {\n if (!$author['name'] = get_post_meta(get_the_ID(), 'author', TRUE)) {\n $author['name'] = get_the_author_meta('display_name', $id);\n }\n $author['prefix'] = get_post_meta(get_the_ID(), 'author_prefix', TRUE);\n $author['ID'] = get_the_author_meta('ID', $id);\n $author['user_login'] = get_the_author_meta('user_login', $id);\n $author['email'] = get_the_author_meta('user_email', $id);\n $author['job'] = get_the_author_meta('acf_position', $id);\n $author['bio'] = get_the_author_meta('description', $id);\n return $author;\n }",
"public function getAuthorID();",
"public function getAuthorId() : string\n {\n return $this->authorId;\n }",
"public function getAuthorname() {}",
"public function getAuthorName()\n {\n if ($this->Name) {\n return $this->Name;\n } elseif ($author = $this->Author()) {\n return $author->getName();\n }\n }",
"function getPostAuthorById($user_id)\n{\n\tglobal $conn;\n\t$sql = \"SELECT username FROM users WHERE id=$user_id\";\n\t$result = mysqli_query($conn, $sql);\n\tif ($result) {\n\t\t// return username\n\t\treturn mysqli_fetch_assoc($result)['username'];\n\t} else {\n\t\treturn null;\n\t}\n}",
"public function getAuthorName()\n {\n return 'Fightmaster.publication.author.name';\n }",
"function getAuthorsName(int $articleAuthorId, array $authors) : string { \n foreach ($authors as $author) {\n if ($author['id'] === $articleAuthorId) {\n $name = $author['full_name'];\n }\n }\nreturn $name;\n}",
"public function getAuthorName() : void {\n\t\treturn $this->authorName;\n\t}",
"public function getAuthorID()\n {\n return (int) $this->_theme->themeAuthor->authorID;\n }",
"public function getAuthor() {\n\t\treturn UserManager::getFromBlid($this->blid);\n\t}",
"public function getAuthor_id()\n {\n return $this->author_id;\n }",
"function get_the_author_firstname()\n {\n }",
"public function getAuthorName()\n {\n return $this->author ? $this->author : $this->createUser->firstname . ' ' . $this->createUser->lastname;\n }",
"function get_the_author_ID()\n {\n }",
"public static function getAuthorId ($post_id)\n {\n return TblPost::findOne($post_id)->user_id;\n }",
"function bd_get_author($comment) {\n\t\t$author ='';\n\n\t\tif ( empty($comment->comment_author) )\n\t\t\t$author = __('Anonymous', 'wolf');\n\t\telse\n\t\t\t$author = $comment->comment_author;\n\n\t\treturn $author;\n\t}",
"function GetAuthor()\n {\n return 'calguy1000';\n }",
"public function getAuthorId()\n {\n return $this->_authorId;\n }",
"public function getAuthorUsername()\n {\n return $this->AUTHOR_USERNAME;\n }",
"public function getAuthorId() {\n\t\treturn $this->authorId;\n\t}",
"function author($id)\n{\n global $app;\n\n $details = $app->calibre->authorDetails($id);\n if (is_null($details)) {\n $app->getLog()->debug(\"no author\");\n $app->notFound();\n }\n $app->render('author_detail.html', [\n 'page' => mkPage(getMessageString('author_details'), 3, 2),\n 'author' => $details['author'],\n 'books' => $details['books']]);\n}",
"function get_author_info($author_id) {\n\n global $data_base;\n\n $request = $data_base->prepare(\"\n SELECT *\n FROM imago_info_creator \n WHERE creator_id = ? \n \");\n\n $request->execute(array($author_id));\n\n return $request->fetch(PDO::FETCH_ASSOC); \n }",
"public function getAuthorLabel()\n {\n return (string) $this->_theme->themeAuthor->authorLabel;\n }",
"public function author() : string\n {\n if (isset($this->entity->author)) {\n return $this->entity->author->name;\n }\n\n return 'Sin autor';\n }",
"public static function getAuthor($authorId)\n {\n return Author::find($authorId);\n }",
"public function authorId() { return $this->post->post_author; }",
"public function getAuthor() {\n $contributors = $this->product->getContributors();\n foreach ($contributors as $contributor) {\n if($contributor->getRole() == PONIpar\\ProductSubitem\\Contributor::ROLE_AUTHOR) {\n\n $value = $contributor->getValue();\n\n if(key_exists('PersonName',$value)) {\n return $value['PersonName'];\n }\n elseif(key_exists('PersonNameInverted',$value)) {\n $inverted = $value['PersonNameInverted'];\n $author = implode(' ',array_reverse(explode(', ',$inverted)));\n }\n\n // if the first author string is too long (might be a collections of authors), skip to the next\n if(strlen($author) < 100) return $author;\n else continue;\n\n }\n }\n // if we reach this that means we haven't found an author\n return null;\n }",
"function emc_get_the_author( $post_id ) {\r\n\r\n\tif ( ! class_exists( 'Acf', false ) ) return false;\r\n\r\n\t$author = get_post_meta( $post_id, 'byline', true );\r\n\r\n\tif ( isset( $author ) && ! empty( $author ) ) {\r\n\r\n\t\t$html = sprintf( __( ' by %s', 'emc' ),\r\n\t\t\tesc_html( $author )\r\n\t\t);\r\n\t\treturn $html;\r\n\r\n\t}\r\n\r\n\treturn false;\r\n\r\n}",
"static public function getAuthorByUid($uid) {\n\t\tlist($row) = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('realName', 'be_users',\n\t\t\t'uid= ' . intval($uid), '', '', '1'\n\t\t);\n\t\treturn (is_array($row) ? $row['realName'] : '');\n\t}",
"public function meta_author_name()\n\t{\n\t\treturn $this->get_context_meta_value( __FUNCTION__ );\n\t}",
"function get_author_ID() {\n\t\treturn $this->get_data( 'user_id' );\n\t}",
"public function getIdAuthor()\n {\n return $this->id_author;\n }",
"public function getIdAuthor()\n {\n return $this->id_author;\n }",
"public static function getAuthorDisplayName(Author $author): string {\n if (!empty($author->last_name)) {\n $name = $author->last_name;\n if (!empty($author->initials)) {\n $name .= ' ' . $author->initials;\n }\n }\n else {\n $name = $author->collective_name;\n }\n return $name;\n }",
"public function getAuthorById($id) {\n\t\t$this->_initDbConnection();\n\t\t\n\t\t$stm = $this->_prepareStatement('author', 'getById');\t\t\n\t\t$stm->execute(array(\n\t\t\t':id' => $id\n\t\t));\n\t\t\n\t\tif ($this->_checkPdoError($stm)) {\n\t\t\treturn NULL;\n\t\t}\n\n\t\tif ($author = $stm->fetchObject()) {\n\t\t\treturn $author;\n\t\t}\t\n\t\treturn NULL;\n\t}",
"function get_the_author_nickname()\n {\n }",
"public function getAuthor($idArt){\n $sql = \"SELECT author FROM fanart WHERE id=\".intval($idArt).\";\";\n $res = mysqli_query($this->link, $sql);\n $author = mysqli_fetch_all($res)[0][0];\n return $author;\n }",
"public function getAuthor() {\n return $this->randomQuote->author_name;\n }",
"function voyage_mikado_get_the_author_name() {\n if(get_the_author_meta('first_name') !== '' || get_the_author_meta('last_name') !== '') {\n $name = get_the_author_meta('first_name').' '.get_the_author_meta('last_name');\n } else {\n $name = get_the_author_meta('display_name');\n }\n\n return $name;\n }",
"public function api_getAuthorInfo($author_id = null) {\t\n\t\t$authors = $this->find('all', array(\n\t\t\t'conditions' => array('Author.author_id' => $author_id),\n\t\t\t'fields' => array('Author.document_id', 'Author.fullname'),\n\t\t\t// 'order' => array('Author.lastname' => 'asc'),\n\t\t\t// 'limit' => 3\n\t\t));\n\t\treturn $authors;\n\t}",
"public function getAuthor();",
"public function getAuthor();",
"public function getAuthor();",
"public function getAuthor(): string\n {\n return $this->_author;\n }",
"public function _author_this_post($article_id){\n\t\t$sql = \"select user from article where id='$article_id'\";\n\t\t$data = $this->fetch($sql);\n\t\t$user_id = $data['user'];\n\t\t$sql2 = \"select name, link from admin where id='$user_id'\";\n\t\t$data2 = $this->fetch($sql2);\n\t\treturn \"<a target='_blank' href='$data2[link]'>$data2[name]</a>\";\n\t}",
"public function getAuthorId() {\n return (int)$this->author_id;\n }",
"private function retrieve_name() {\n\t\t$replacement = null;\n\n\t\t$user_id = $this->retrieve_userid();\n\t\t$name = get_the_author_meta( 'display_name', $user_id );\n\t\tif ( $name !== '' ) {\n\t\t\t$replacement = $name;\n\t\t}\n\n\t\treturn $replacement;\n\t}",
"function sage_author_archive_link( $id = null ) {\n global $post;\n\n if ( isset( $post->ID ) && !$id ) $id = $post->ID;\n echo '<a href=\"' . get_author_posts_url( get_the_author_meta('ID'), get_the_author_meta( 'user_nicename' ) ) . '\">' . get_the_author() . '</a>';\n}",
"function getDataAuthor($data)\n{\n\t$dataAuthor = getData($data, \"Page/Author\");\n\treturn $dataAuthor[0];\n}",
"public function getCorporateAuthor()\n {\n // Try 110 first -- if none found, try 710 next.\n $main = $this->getFirstFieldValue('110', ['a', 'b']);\n if (!empty($main)) {\n return $main;\n }\n return $this->getFirstFieldValue('710', ['a', 'b']);\n }",
"function medigroup_mikado_get_the_author_name() {\n if(get_the_author_meta('first_name') !== '' || get_the_author_meta('last_name') !== '') {\n $name = get_the_author_meta('first_name').' '.get_the_author_meta('last_name');\n } else {\n $name = get_the_author_meta('display_name');\n }\n\n return $name;\n }",
"public function get_author() {\n\t\treturn $this->author();\n\t}",
"public function getAuthor()\n {\n return $this->author = get_userdata($this->get()->post_author);\n }",
"function get_the_author_lastname()\n {\n }",
"public function getAuthor($realValue = false) {\n\t\treturn ($realValue) ? $this->author : UsersManagement::getUserName($this->author);\n\t}",
"function the_author_ID()\n {\n }",
"public function filterPostTypeSlugAuthor( $post_link, $id = 0, $leavename = FALSE ) {\n if ( strpos( $post_link, '%author%') !== FALSE ):\n $post = get_post($id);\n $author = get_userdata($post->post_author);\n return str_replace('%author%', $author->user_nicename, $post_link);\n else:\n return $post_link;\n endif;\n }",
"function get_id_from_blogname($slug)\n {\n }",
"public function author($id);",
"function get_the_author_aim()\n {\n }",
"public function getAuthor() {}",
"function cosmetro_get_the_author_posts_link() {\n\tob_start();\n\tthe_author_posts_link();\n\t$author = ob_get_clean();\n\n\treturn $author;\n}",
"private function retrieve_userid() {\n\t\t$replacement = ! empty( $this->args->post_author ) ? $this->args->post_author : get_query_var( 'author' );\n\n\t\treturn $replacement;\n\t}",
"function theme_get_the_author_posts_link($author = null) {\n if ( !isset($author) ) {\n global $authordata;\n $author = $authordata;\n }\n if ( !is_object( $author ) ) {\n return false;\n }\n $link = sprintf(\n '<a href=\"%1$s\" title=\"%2$s\" rel=\"author\" class=\"meta author\"><i></i>%3$s</a>',\n get_author_posts_url( $author->ID, $author->user_nicename ),\n esc_attr( sprintf( __( 'Posts by %s' ), get_the_author() ) ), // No further l10n needed, core will take care of this one\n get_the_author()\n );\n return $link;\n}",
"function get_author_posts_url($author_id, $author_nicename = '')\n {\n }",
"public function getAuthorId() : Uuid {\n\t\treturn $this->authorId;\n\t}",
"function the_author_firstname()\n {\n }",
"public function getAuthor()\n {\n return $this->author;\n }",
"public function getAuthor()\n {\n return $this->author;\n }",
"public function getAuthor()\n {\n return $this->author;\n }",
"public function getAuthor()\n {\n return $this->author;\n }",
"public function getAuthor()\n {\n return $this->author;\n }",
"public function getAuthor()\n {\n return $this->author;\n }",
"public function getAuthor()\n {\n return $this->author;\n }",
"public function getAuthor()\n {\n return $this->author;\n }",
"public function GetAuthorPostByid($id){\n\t\t$this->db->where('Id', $id);\n\t\t$query=$this->db->get('tblauthorpost');\n\t\tif($query->num_rows()==1)\n\t\t{\n\t\t\treturn $query->result();\n\t\t}\n\t\telse{\n\t\t\tredirect('home');\n\t\t}\n\t}",
"public function getPostAuthorId() : Uuid {\n\t\treturn $this->postAuthorId;\n\t}",
"function get_comment_author($comment_id = 0)\n {\n }",
"function get_the_author_link()\n {\n }",
"abstract public function getAuthor();",
"public function authorDetails($id);",
"function nb_get_author_name( $object, $field_name, $request ) {\n return get_the_author_meta( 'display_name', $object['author'] );\n}",
"public function authorLink() { return $this->post->post_author; }",
"public function get_author()\n\t{\n\t\treturn '';\n\t}",
"function getAuthor($template) {\n\tif ( !is_string($template['Repository'])) return false;\n\tif ( $template['Author'] ) return strip_tags($template['Author']);\n\t$repoEntry = explode(\"/\",$template['Repository']);\n\tif (count($repoEntry) < 2)\n\t\t$repoEntry[] = \"\";\n\n\treturn strip_tags(explode(\":\",$repoEntry[count($repoEntry)-2])[0]);\n}",
"public function checkAuthor()\n {\n if ($this->author()) {\n return $this->author->name;\n }\n return 'N/A';\n }",
"function rs_the_author($display_name)\n{\n if (null !== $display_name) {\n $custom_author = get_post_meta(get_the_ID(), '_author', true);\n if (!empty($custom_author)) {\n $display_name = trim($custom_author);\n }\n }\n return $display_name;\n}",
"public function getAuthor() {\n return $this->author;\n }",
"public function getAuthor() {\n return $this->author;\n }",
"public function getAuthor() {\n return $this->author;\n }",
"function the_author() {\n\tglobal $discussion;\n\treturn $discussion['author'];\n}",
"function GetAuthor()\n {\n return 'texus';\n }",
"public function get_author()\n {\n return 'Kamen Blaginov';\n }",
"public function get_author()\n {\n return 'Kamen Blaginov';\n }",
"public function getAuthor() {\n\t\treturn $this->author;\n\t}"
] | [
"0.76314276",
"0.7373825",
"0.73312485",
"0.72659",
"0.7216788",
"0.71175075",
"0.7105348",
"0.7104557",
"0.70795906",
"0.7051872",
"0.7022495",
"0.6934566",
"0.6896418",
"0.68906105",
"0.6866892",
"0.68660015",
"0.6820409",
"0.6802287",
"0.6796563",
"0.67872316",
"0.67832386",
"0.67720664",
"0.6767591",
"0.6751666",
"0.67256844",
"0.6719871",
"0.67095906",
"0.6696743",
"0.6678211",
"0.66708916",
"0.6667972",
"0.6662383",
"0.6659899",
"0.6638548",
"0.66225225",
"0.6620209",
"0.6618734",
"0.6618734",
"0.6594524",
"0.65833485",
"0.65753603",
"0.65735817",
"0.6554679",
"0.6553591",
"0.6548236",
"0.6545014",
"0.6545014",
"0.6545014",
"0.64926094",
"0.648904",
"0.6472465",
"0.6431404",
"0.64251465",
"0.6420325",
"0.6408828",
"0.63874036",
"0.63847286",
"0.6382468",
"0.63775194",
"0.6360992",
"0.63506895",
"0.63359296",
"0.6327422",
"0.6319391",
"0.6312546",
"0.63054156",
"0.63015985",
"0.62865734",
"0.6272203",
"0.62631947",
"0.62573767",
"0.62544554",
"0.6243944",
"0.6243944",
"0.6243944",
"0.6243944",
"0.6243944",
"0.6243944",
"0.6243944",
"0.6243944",
"0.6241693",
"0.6240733",
"0.6238791",
"0.6237917",
"0.6228273",
"0.62265444",
"0.6220565",
"0.62080204",
"0.6200483",
"0.6196107",
"0.61860716",
"0.6180273",
"0.6178606",
"0.6178606",
"0.6178606",
"0.61742765",
"0.61603636",
"0.6148781",
"0.6148781",
"0.61485994"
] | 0.82639575 | 0 |
Create a new message instance. | public function __construct(TravelGrant $travelgrant)
{
$this->travelgrant = $travelgrant;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function createMessage()\n {\n $message = new Message(new Swift_Message);\n\n\n // If a global from address has been specified we will set it on every message\n // instances so the developer does not have to repeat themselves every time\n // they create a new message. We will just go ahead and push the address.\n if (isset($this->from['address'])) {\n $message->from($this->from['address'], $this->from['name']);\n }\n\n return $message;\n }",
"protected function createMessage() {\n $config = $this->messageConfig;\n if (!array_key_exists('class', $config)) {\n $config['class'] = $this->messageClass;\n }\n $config['smser'] = $this;\n return Yii::createObject($config);\n }",
"protected static function newMessage()\n {\n self::$message = \\Swift_Message::newInstance();\n }",
"public function create()\n {\n //\n $this->message->sendMessage();\n }",
"private function newMessage()\n {\n /* @var $config ModuleOptions */\n $config = $this->serviceLocator->get('EscoMail\\Options');\n\n $this->message = new Message();\n $this->message->setFrom($config->getMailSendFrom(), $config->getMailSendFromName());\n\n return $this->message;\n }",
"protected function createMessage()\n\t{\n\t\t$config = $this->messageConfig;\n\t\tif (!array_key_exists('class', $config)) {\n\t\t\t$config['class'] = $this->messageClass;\n\t\t}\n\t\t$config['mailer'] = $this;\n\n\t\treturn Yii::createObject($config);\n\t}",
"public function createMessage(): MessageInterface;",
"public function create(string $message = ''): BusMessageInterface;",
"public function createInstance()\n {\n $mock = $this->mock(static::TEST_SUBJECT_CLASSNAME)\n ->getMessage();\n\n return $mock->new();\n }",
"public static function createInstance()\n {\n return new MailMessage('[email protected]');\n }",
"public static function init( $_id )\n {\n $message = new Message();\n $message->get( $_id );\n return $message;\n }",
"public function createMessage(string $typeName): MessageInterface;",
"public function createMailMessage();",
"static public function factory($messageType = 3) {\n\t\treturn new self($messageType);\n\t}",
"public function createMessage(array $parameters = []);",
"public function user_message_create() {\n\t\t$this->onDebug ( __METHOD__, 1 );\n\t\tif ($this->valide_userid () == false) {\n\t\t\treturn $this;\n\t\t}\n\t\t$message_created = $this->getObjetO365Wsclient ()\n\t\t\t->jsonPostMethod ( '/users/' . $this->getUserId () . '/messages', $this->getEmailContent () );\n\t\t$this->onDebug ( $message_created, 2 );\n\t\tif (isset ( $message_created->id ) && ! empty ( $message_created->id )) {\n\t\t\treturn $this->setO356MessageRef ( $message_created )\n\t\t\t\t->setMessageId ( $message_created->id );\n\t\t}\n\t\treturn $this->onError ( 'Pas d\\'ID durant la creation du message de O365', $message_created, 1 );\n\t}",
"private function newMessage(array $data)\n {\n\n $message = Message::create([\n 'channel_id' => $data['channel_id'],\n 'user_id' => Auth::guard()->user()->id,\n 'message' => $data['message']\n ]);\n if ($message) {\n $this->notifyChannelUsers($data['channel_id']);\n }\n return $message;\n }",
"public function initMessage() {}",
"public function __construct(Message $message)\n {\n $this->message = $message;\n }",
"public function __construct(Message $message)\n {\n $this->message = $message;\n }",
"public function __construct(Message $message)\n {\n $this->message = $message;\n }",
"public function __construct(Message $message)\n {\n $this->message = $message;\n }",
"public function __construct(Message $message)\n {\n $this->message = $message;\n }",
"private function createMessageObject(string $type, string $message): Notification\n {\n $msg = new Notification();\n\n $msg->setType($type);\n $msg->setMessage($message);\n\n $this->handler->add($msg);\n\n return $msg;\n }",
"protected static function newFactory()\n {\n return MessageFactory::new();\n }",
"public function message(mixed $data = null)\n {\n $message = new Message((string) $data);\n\n return $message;\n }",
"public static function createFromString($raw)\n {\n $message = new self(array('raw' => $raw));\n return $message;\n }",
"public static function create(string $text = null): GoogleChatMessage\n {\n $message = new static;\n\n if ($text) {\n $message->text($text);\n }\n\n return $message;\n }",
"public function create() {\n\t\t$user = $this->current_user();\n\t\t$message = $this->discussion->create_message($this->message_data() + ['creator' => ['id' => $user->_id, 'name' => $user->name]]);\n\n\t\tif ($this->discussion->push_message($message)) {\n\t\t\treturn $this->redirect(['Discussions::show', 'id' => $this->discussion->_id, 'project_id' => $this->discussion->project_id]);\n\t\t}\n\n\t\treturn compact('message');\n\t}",
"public static function createFromArray($fields) \n\t{\n\t\t$message = new Message();\n\t\tself::populate($message,$fields);\n\t\treturn $message;\n\t}",
"public function addMessage()\n {\n if(null === $this->obj_message) {\n $this->obj_message = new Message();\n }\n return $this->obj_message;\n }",
"public function createMimeMessage();",
"public function testCreateMethodReturnsNewInstance(): void\n {\n $message = DiscordMessage::create();\n $this->assertInstanceOf(DiscordMessage::class, $message);\n }",
"function createMessage($email) {\n $message = new Google_Service_Gmail_Message();\n $message->setRaw(base64_encode($email));\n return $message;\n}",
"protected function createMessage(Swift_Message $message)\n {\n $mimeEntity = new Swift_Message('', $message->getBody(), $message->getContentType(), $message->getCharset());\n $mimeEntity->setChildren($message->getChildren());\n\n $messageHeaders = $mimeEntity->getHeaders();\n $messageHeaders->remove('Message-ID');\n $messageHeaders->remove('Date');\n $messageHeaders->remove('Subject');\n $messageHeaders->remove('MIME-Version');\n $messageHeaders->remove('To');\n $messageHeaders->remove('From');\n\n return $mimeEntity;\n }",
"public function __construct($message)\n {\n // $this->message = $message;\n }",
"function createMessage($object) {\n\tglobal $USER;\n\t\n\t$message = new \\core\\message\\message();\n\t$message->component = 'local_littlehelpers';\n\t$message->name = 'paragraph52notification';\n\t$message->userfrom = $USER;\n\t\n\t// Get user\n\t$message->userto = core_user::get_user($object->useridto);\n\t\n\t// force email sending\n\t$message->userto->emailstop = 0;\n\t\n\t$message->subject = $object->subject;\n\t$message->fullmessage = $object->fullmessage;\n\t$message->fullmessageformat = FORMAT_MARKDOWN;\n\t$message->fullmessagehtml = $object->fullmessagehtml;\n\t$message->smallmessage = $object->smallmessage;\n\t$message->notification = '0';\n\t\n\t$message->contexturl = 'https://moodle.tu-darmstadt.de/local/littlehelpers/paragraph52';\n\t$message->contexturlname = 'Paragraph52';\n\t$message->replyto = \"[email protected]\";\n\n\treturn $message;\n}",
"public function __construct($message)\r\n {\r\n $this->message = $message;\r\n\r\n }",
"public function createMessage($content, $options = array('content_type' => 'application/json', 'delivery_mode' => 2))\n {\n if (!empty($options['content_type']) && $options['content_type'] == 'application/json')\n $content = json_encode($content);\n return new AMQPMessage($content, $options);\n }",
"public function __construct($message) {\n $this->message= $message;\n }",
"public function __construct($msg)\n {\n $this->message = $msg;\n }",
"public function __construct(Message $message)\n {\n parent::__construct($message);\n }",
"public function __construct($messageDefinition)\n {\n $this->messageDefintion = $messageDefinition;\n }",
"public function testCreateMessage()\n {\n $config = new Configuration();\n// $config->setHost(\"http://127.0.0.1:8080\");\n $apiInstance = new DaDaPushMessageApi(\n // If you want use custom http client, pass your client which implements `GuzzleHttp\\ClientInterface`.\n // This is optional, `GuzzleHttp\\Client` will be used as default.\n new \\GuzzleHttp\\Client(),\n $config\n );\n\n $actions = [\n new Action($data = array(\"name\" => \"view\", \"url\" => \"https://www.dadapush.com/\", \"type\" => \"link\"))\n ];\n\n $body = new MessagePushRequest($data = array(\"title\" => \"Good News!\",\n \"content\" => \"Good News! DaDaPush releasing new version\",\n \"need_push\" => true,\n \"actions\" => $actions\n ));\n\n $channel_token = 'ctb3lwO6AeiZOwqZgp8BE8980FdNgp0cp6MCf';\n\n $result = $apiInstance->createMessage($body, $channel_token);\n print_r($result);\n self::assertTrue($result->getCode()==0);\n }",
"public static function create( $msg, $code = null, array $data = null ) {\n\t\tif ( $msg instanceof IApiMessage ) {\n\t\t\treturn $msg;\n\t\t} elseif ( $msg instanceof RawMessage ) {\n\t\t\treturn new ApiRawMessage( $msg, $code, $data );\n\t\t} else {\n\t\t\treturn new ApiMessage( $msg, $code, $data );\n\t\t}\n\t}",
"public static function create($message, $type = '', $title = '', $icon = '')\n {\n return new self($message, $type, $title, $icon);\n }",
"public function newEntity(array $attributes = [])\n {\n return new MessageContent($attributes);\n }",
"public function create()\n {\n return view('materialadmin::message.create');\n }",
"public static function factory($raw_message = null, $class_name = null) {}",
"public function __construct($message = null) {}",
"public function __construct($message)\n {\n $this->message = $message;\n }",
"public function __construct($message)\n {\n $this->message = $message;\n }",
"public function __construct($message)\n {\n $this->message = $message;\n }",
"public function __construct($message)\n {\n $this->message = $message;\n }",
"public function __construct($message)\n {\n $this->message = $message;\n }",
"public function __construct($message)\n {\n $this->message = $message;\n }",
"public static function createFromFile($filename)\n {\n $message = new self(array('file' => $filename));\n\n return $message;\n }",
"public function create()\n\t{\n\t\treturn View::make('messages.create');\n\t}",
"public function actionCreate()\n {\n $model = new Message();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"private function createMessage(InputInterface $input)\n {\n $message = new \\Swift_Message(\n $input->getOption('subject'),\n $input->getOption('body'),\n $input->getOption('content-type'),\n $input->getOption('charset')\n );\n $message->setFrom($input->getOption('from'));\n $message->setTo($input->getOption('to'));\n\n return $message;\n }",
"public function test_message_can_be_created() {\n\n $this->assertInstanceOf(Message::class, $this->message);\n $this->assertDatabaseHasMessageWithPublicId($this->message->getPublicId());\n\n }",
"protected function getMessage()\n {\n //return new \\Swift_Message('Test subject', 'Test body.');\n }",
"public function testConstructorAndGetters() \r\n \t{\r\n \t\t// create a message with complete constructor args\r\n \t\t$message = new Message( Message::NORMAL, \r\n \t\t\t\t\t\t\t\t(object)array( 'testProp' => 'testval' ),\r\n \t\t\t\t\t\t\t\tsimplexml_load_string('<testMessage testAtt=\"Hello\" testAtt2=\"world\"/>'),\r\n \t\t\t\t\t\t\t\tMessage::PRIORITY_HIGH);\r\n \t\t\r\n \t\t// test assertions\r\n \t\t$this->assertTrue( $message instanceof Message, \"Expecting \\$message is Message\" );\r\n \t\t$this->assertTrue( $message->getType() == Message::NORMAL, \"Expecting \\$message->getType() == Message::NORMAL\" );\r\n \t\t$this->assertTrue( $message->getHeader()->testProp == 'testval', \"Expecting \\$message->getHeader()->testProp == 'testval'\" );\r\n \t\t$this->assertTrue( $message->getBody()->attributes()->testAtt == 'Hello', \"Expecting \\$message->getBody()->attributes()->testAtt == 'Hello'\" );\r\n \t\t$this->assertTrue( $message->getPriority() == Message::PRIORITY_HIGH, \"Expecting \\$message->getPriority() == Message::PRIORITY_HIGH\" );\r\n \t\t\r\n \t}",
"public function __construct($data)\n {\n $this->message = $data;\n }",
"public function __construct($data)\n {\n $this->message = $data;\n }",
"public static function getInstance($messageClass = '\\PEIP\\Message\\GenericMessage')\n {\n return new self($messageClass);\n }",
"public function __construct(NewMessageEvent $event)\n {\n $this->event = $event;\n }",
"public static function createFromFile(string $path) : CommitMessage\n {\n if (!file_exists($path)) {\n throw new \\RuntimeException('Commit message file not found');\n }\n return new CommitMessage(file_get_contents($path));\n }",
"public function testCreateWithoutId()\n {\n $faker = Factory::create();\n $messageAttributes = [\n 'body' => $faker->sentence(15),\n 'subject' => $faker->sentence(5),\n 'name' => $faker->name(),\n 'email' => $faker->email(),\n 'custom_info' => $faker->sentence(3)\n\n ];\n $response = $this->client->messages()->create($messageAttributes);\n $this->assertEquals($messageAttributes['body'], $response['message']['body']);\n $this->assertEquals($messageAttributes['subject'], $response['message']['subject']);\n\n return $response;\n }",
"public function create(Message $message): void\n {\n $this->items[$message->getEventName()][$message->getId()] = $message;\n }",
"public function __construct($message, $type)\n\t{\n\t\t$this->message = $message;\n\t\t$this->type = $type;\n\t}",
"public function __construct(MimeMessage $message = null) {\n $this->htmlBody = new MimePart();\n $this->htmlBody->type = Mime::TYPE_HTML;\n $this->htmlBody->charset = 'utf-8';\n $this->htmlBody->encoding = Mime::ENCODING_QUOTEDPRINTABLE;\n\n $this->textBody = new MimePart();\n $this->textBody->type = Mime::TYPE_TEXT;\n $this->textBody->charset = 'utf-8';\n $this->textBody->encoding = Mime::ENCODING_QUOTEDPRINTABLE;\n }",
"public function create(){}",
"public function actionCreate() {\n if (isset($_POST['Message'])) {\n $resp = array(\n 'color' => '#FF6600',\n 'background_color' => '#FFFFCC',\n 'position' => 'top',\n 'removebutton' => 0,\n 'translation' => $_POST['Message']['translation']\n );\n $model = new Message();\n $model->setAttributes($_POST['Message']);\n if ($model->save()) {\n $resp['message'] = Yii::t('translate', 'Message successfully saved');\n $resp['id'] = $model->id;\n } else {\n $errors = $this->errors($model);\n $resp['message'] = Yii::t('translate', '<p>Unable to save the message. Something went wrong!<p/>' . implode('<br/>', $errors));\n }\n echo $this->je($resp);\n Yii::app()->end();\n }\n $id = (int)Yii::app()->request->getParam('id');\n $lang = Yii::app()->request->getParam('lang');\n if ($id && $lang) {\n $model = MessageSource::model()->findByPk($id);\n if ($model) {\n $message = $model->loadMessage();\n $message->id = $model->id;\n $message->language = $lang;\n $this->renderPartial('form', array(\n 'model' => $message\n ));\n } else throw new CHttpException(400);\n } else throw new CHttpException(404, 'The requested page does not exist.');\n }",
"public static function create() {}",
"public static function create() {}",
"public static function create() {}",
"protected static function newFactory(): Factory\n {\n return MessageFactory::new();\n }",
"public function __construct(string $message)\n {\n $this->message = $message;\n }",
"public function create()\n {\n return view('message');\n }",
"public function newAction()\n {\n $entity = new Message();\n $form = $this->createForm(new MessageType(), $entity);\n\n return $this->render('CoreMarketingBundle:Message:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"protected function createDocument(\\TYPO3\\Jobqueue\\Common\\Queue\\Message $message) {\n\t\t$properties = ObjectAccess::getGettableProperties($message);\n\t\t$messageDocument = new Message($message->getPayload(), $message->getIdentifier());\n\n\t\tforeach ($properties as $propertyName => $propertyValue) {\n\t\t\tObjectAccess::setProperty($messageDocument, $propertyName, $propertyValue);\n\t\t}\n\n\t\treturn $messageDocument;\n\t}",
"public function __construct($message = '', $type = 'info') {\n $this->message = $message;\n }",
"protected function render(): Message\n {\n $headers = '';\n foreach ($this->buildHeaders() as $header => $value) {\n $headers .= \"{$header}: {$value}\" . self::CRLF;\n }\n $message = implode(self::CRLF, $this->buildMessage());\n\n return new Message($headers, $message);\n }",
"public function create()\n\t{\n\t\t$form = \\View::make('message.form');\n\t\t$form->project_id = \\Session::get('active_project');\n\t\t$form->action = array('action' => 'Toomdrix\\Pm\\MessageController@store', 'class'=>'form-signup');\n\t\treturn $form;\n\t}",
"public static function getInstance($context=null) {\n return new Messages($context);\n }",
"public function create_post() {\n\t\t$data['uid'] = $this->input->get('uid');\n\t\t$data['to'] = $this->input->get('to');\n\t\t$data['text'] = $this->input->get('text');\n\t\t$data['ts'] = now();\n\n\t\t$this->Messages_model->create($data);\n\t}",
"public function getGeneratedMessage()\n {\n # Force the template to render\n (string) $this->prepareTemplate();\n\n $m = $this->template->__message;\n\n if (!$m->getFrom()) {\n trigger_error(\"You should add 'from' information.\", E_USER_WARNING);\n }\n\n if (!$m->getSubject()) {\n trigger_error(\"You should add 'subject'.\", E_USER_WARNING);\n }\n\n if (!$m->getHeader('To')) {\n trigger_error(\"You should add recipients.\", E_USER_WARNING);\n }\n\n foreach ($this->attachments as $attachment) {\n list($filename, $content, $type) = $attachment;\n $m->addAttachment($filename, $content, $type);\n }\n\n return $m;\n }",
"public function __construct($message='1111222333',$type='2222')\n {\n $this->type = $type;\n $this->message = $message;\n }",
"public static function new()\n {\n if ( ! empty($_REQUEST['mgb_rating_message']) ) Database::insert([\n 'message' => $_REQUEST['mgb_rating_message'],\n 'author' => self::author(),\n 'state' => (!json_decode($_REQUEST['mgb_rating_moderation'])) ? true : false\n ]);\n }",
"public function create() {}",
"public function compose() {\n return $this->createMessage();\n }",
"public function create()\n {\n // die('here');\n return view('message.create');\n }",
"public function create()\n {\n return view('messages.create');\n }",
"public function create()\n {\n return view('messages.create');\n }",
"public function actionCreate()\n {\n $model = new Message();\n\n if ($model->load(Yii::$app->request->post())) {\n if ($model->save())\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model\n ]);\n }\n }",
"public static function getInstanceFromMessage(\\PEIP\\INF\\Message\\Message $message)\n {\n return new self(get_class($message));\n }",
"public function store(Request $request)\n {\n $this->validate($request, [\n 'body' => 'required|max:5000',\n 'user_id' => ['required', new NotSelfId(), 'exists:users,id'],\n ]);\n\n $message = Auth::user()->messages()->create([\n 'data' => [\n 'text' => request('body'),\n ],\n ]);\n\n Auth::user()->conversations()->attach($message, [\n 'contact_id' => $request->user_id,\n ]);\n\n if (!$this->isAuthUserBlockedToContact($request->user_id, Auth::user()->id)) {\n User::find($request->user_id)->conversations()->attach($message, [\n 'contact_id' => Auth::id(),\n ]);\n\n // broadcast the message to the other person\n event(new MessageCreated($message, $request->user_id, Auth::user()->id));\n }\n\n $message->owner = Auth::user();\n\n return new MessageResource($message);\n }",
"public function create()\n {\n return view('admin.messages.create');\n }",
"public function __construct($message) {\r\n parent::__construct($message);\r\n }",
"public function __construct($messageData)\n {\n $this->messageData = $messageData;\n }"
] | [
"0.81376195",
"0.7959614",
"0.77619994",
"0.7713793",
"0.76559645",
"0.7553059",
"0.7458076",
"0.71510184",
"0.6852663",
"0.68347865",
"0.67154217",
"0.6689976",
"0.6683088",
"0.6644564",
"0.6628052",
"0.6549025",
"0.6514292",
"0.6501647",
"0.645071",
"0.645071",
"0.645071",
"0.645071",
"0.645071",
"0.64457685",
"0.63510966",
"0.6340597",
"0.633213",
"0.6326836",
"0.6310014",
"0.6258695",
"0.6234698",
"0.62195796",
"0.62077796",
"0.620518",
"0.6204953",
"0.6198459",
"0.6177945",
"0.61717975",
"0.617064",
"0.6150332",
"0.61301666",
"0.6109668",
"0.61057645",
"0.60924155",
"0.6081678",
"0.60787344",
"0.60670817",
"0.6049224",
"0.60457045",
"0.60438704",
"0.6036989",
"0.6036989",
"0.6036989",
"0.6036989",
"0.6036989",
"0.6036989",
"0.6026595",
"0.6025895",
"0.6022185",
"0.6005734",
"0.6002389",
"0.6000802",
"0.59941816",
"0.59808266",
"0.59808266",
"0.59678143",
"0.5966462",
"0.59593695",
"0.594777",
"0.5938714",
"0.5910345",
"0.5893692",
"0.5880708",
"0.5878038",
"0.58748907",
"0.58748907",
"0.58748907",
"0.5873998",
"0.5869665",
"0.5864223",
"0.5860705",
"0.5858159",
"0.5854505",
"0.5845474",
"0.5842933",
"0.58327615",
"0.58256036",
"0.58199257",
"0.58134514",
"0.57909477",
"0.5787155",
"0.57835746",
"0.5783115",
"0.57801926",
"0.57801926",
"0.5779767",
"0.57784975",
"0.57596684",
"0.5748547",
"0.5746673",
"0.57461363"
] | 0.0 | -1 |
put your code here | public function __construct()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function run()\n {\n //\n \n }",
"public function run()\n\t{\n\t\t//\n\t}",
"public function preExecute(){\n\n\t\n\t}",
"function script()\n {\n }",
"public function run()\n {\n \n }",
"public function run()\n {\n \n }",
"public function custom()\n\t{\n\t}",
"public function run()\n {\n //\n }",
"public function run()\n {\n //\n }",
"public function run()\r\n {\r\n\r\n }",
"public function run(){\n parent::run();\n //Do stuff...\n }",
"function run() {\r\n $this->set_demopage();\r\n\r\n $options_def = array(\r\n __class__ => '', // code CSS. ATTENTION [ ] à la place des {}\r\n 'id' => ''\r\n );\r\n\r\n $options = $this->ctrl_options($options_def);\r\n\r\n // il suffit de charger le code dans le head\r\n $this->load_css_head($options[__class__]);\r\n\r\n // -- aucun code en retour\r\n return '';\r\n }",
"public function run()\n {\n\n parent::run();\n\n }",
"public function run()\n {\n\n }",
"public function run()\n {\n\n }",
"public function run()\n {\n\n }",
"function execute()\r\n\t{\r\n\t\t\r\n\t}",
"protected function doExecute()\n\t{\n\t\t// Your application routines go here.\n\t}",
"function use_codepress()\n {\n }",
"public function run()\n {\n // Put your code here;\n }",
"function run()\r\n {\r\n }",
"public function run()\n {\n }",
"public function run()\n {\n }",
"public function run()\n {\n }",
"public function run()\n {\n }",
"public function run() {\n }",
"public static function run() {\n\t}",
"public function onRun()\n {\n }",
"public function run() {\n\t\t\\Yii::trace(__METHOD__.'()', 'sweelix.yii1.admin.core.widgets');\n\t\t$content = ob_get_contents();\n\t\tob_end_clean();\n\t\tif(\\Yii::app()->user->isGuest === true) {\n\t\t\techo $content;\n\t\t} else {\n\t\t\t$this->render('header');\n\t\t}\n\t}",
"public function run() {\n }",
"public function render_content() {\n\t}",
"public function main()\r\n {\r\n \r\n }",
"public function render_content()\n {\n }",
"public function render_content()\n {\n }",
"public function render_content()\n {\n }",
"public function render_content()\n {\n }",
"public function render_content()\n {\n }",
"public function render_content()\n {\n }",
"public function render_content()\n {\n }",
"public function render_content()\n {\n }",
"public function render_content()\n {\n }",
"public function render_content()\n {\n }",
"public function render_content()\n {\n }",
"public function render_content()\n {\n }",
"public function render_content()\n {\n }",
"public function render_content()\n {\n }",
"function render() ;",
"function execute()\n {\n }",
"public function run(): void\n {\n //\n }",
"protected function main()\n /**/\n {\n parent::run();\n }",
"public function execute()\n {\n //echo __('Hello Webkul Team.');\n $this->_view->loadLayout();\n $this->_view->renderLayout();\n }",
"public function render()\n {\n //\n }",
"public function run(){\n echo CHtml::closeTag( \"div\" );\n $this->registerScript();\n }",
"public function run();",
"public function run();",
"public function run();",
"public function run();",
"public function run();",
"public function run();",
"public function run();",
"public function run();",
"public function run();",
"public function run();",
"public function run();",
"public function run();",
"public function run();",
"public function run();",
"public function run();",
"public function run();",
"function __desctuct(){\r\n\t\t?>\r\n\r\n\t\t</body>\r\n\t\t</html>\r\n\t\t<?php\r\n\t}",
"public function run(){}",
"public function demo()\n {\n // xu ly logic\n }",
"protected function render_content()\n {\n }",
"protected function render_content()\n {\n }",
"protected function render_content()\n {\n }",
"protected function render_content()\n {\n }",
"public function render(){\n\t\t\n\t}",
"public static function main(){\n\t\t\t\n\t\t}",
"public function render() {\r\n\t\t\r\n\t}",
"public function main()\n\t{\n\t}",
"function handle() ;",
"public function execute() {\n\t}",
"function preProcess()\n {\t\n parent::preProcess( );\n\t\t \n\t}",
"public function run() {}",
"public\n\n\tfunction generate_code()\n\t{\n\t\t$data[\"hitung\"] = $this->Madmin->buat_code();\n\t\t$this->load->view('admin/Generate_code', $data);\n\t}",
"public function display_code() {\n\t\techo '<h1>Premise Demo Page</h1>\n\t\t<div class=\"span10\">';\n\n\n\t\t\t// test a form with all possible fields.\n\t\t\t// pass your own arguments if you'd like.\n\t\t\t// new PWP_Demo_Form();\n\n\t\t\t// Premise_test::fields();\n\t\t\t// Premise_test::fields_hooks();\n\t\t\t// Premise_test::fields_demo();\n\t\t\t// Premise_test::videos_embed();\n\t\t\t// Premise_test::fields_duplicate();\n\t\t\t// Premise_test::google_map();\n\t\t\t// Premise_test::grids();\n\n\t\techo '</div>';\n\t}",
"function main()\r\n {\r\n $this->setOutput();\r\n }",
"public function run()\n\n {\n DB::table('actives')->insert([\n 'script_tag' => 0,\n 'status' =>0\n \n ]);\n //\n }",
"protected function _exec()\n {\n }",
"public function run() {\n\n\t\t// generate random string md5(uniqid(rand(), true));\n\t\t$this->goneta();\n\t\t$this->pamparam();\n\t\t$this->insideOut();\n\t\t$this->morfoza();\n\t\t$this->basorelief();\n\t\t$this->acajouWasZuSagen();\n\t}",
"protected function after_load(){\n\n\n }",
"public function work()\n {\n }",
"function run();",
"function run();",
"public function run() {\n\t\t// include other classes\n\t\trequire_once plugin_dir_path ( __FILE__ ) . 'class-top-ratter-render.php';\n\t\trequire_once plugin_dir_path ( __FILE__ ) . 'class-top-ratter-sso.php';\n\t\t\n\t\t// enque styles for this plugin\n\t\tadd_action ( 'wp_enqueue_scripts', array (\n\t\t\t\t$this,\n\t\t\t\t'register_plugin_styles' \n\t\t) );\n\t\t// enque jquery scripts for this plugin\n\t\tadd_action ( 'wp_enqueue_scripts', array (\n\t\t\t\t$this,\n\t\t\t\t'register_plugin_script' \n\t\t) );\n\t\t// add submit action form to redirect and catch from admin.php\n\t\tadd_action ( 'admin_post_tr_action', array (\n\t\t\t\t$this,\n\t\t\t\t'prefix_admin_tr_action' \n\t\t) );\n\t\t\n\t\t// check if plugin tables exist\n\t\t$this->table_check ();\n\t\t\n\t\t// instantiate the render class for shortcodes to work\n\t\t$shortcodes = new Top_Ratter_Render ();\n\t}",
"function tap_run_page_handler() \n {\n include(\"/var/www/html/run/tap_run.php\");\n \n $params = cargaArray('Torneo Argentino de Programación', $form, '');\n \n include('body.php'); \n }",
"function run() {\r\n $this->view->data=$this->model->run();\r\n }",
"function custom_construction() {\r\n\t\r\n\t\r\n\t}",
"public function run()\n {\n \\App\\Model\\TemplateLib::create([\n 'name' => 'FNK Test',\n 'stylesheet' => 'body {background:white};',\n 'javascript' => '',\n 'code_header' => $this->codeHeader,\n 'code_footer' => $this->codeFooter,\n 'code_index' => $this->codeIndex,\n 'code_search' => '<h1>saya di search</h1>',\n 'code_category' => '<h1>saya di category</h1>',\n 'code_page' => $this->codePage,\n 'code_post' => $this->codePost,\n 'code_about' => '<h1>saya di about</h1>',\n 'code_404' => '<h1>saya di 404</h1>',\n ]);\n }",
"public function helper()\n\t{\n\t\n\t}",
"public function drawContent()\n\t\t{\n\t\t}"
] | [
"0.60586566",
"0.59289104",
"0.5919654",
"0.5899511",
"0.5838488",
"0.5838488",
"0.58356965",
"0.5814271",
"0.5814271",
"0.57796824",
"0.5701954",
"0.5700516",
"0.5685669",
"0.5684617",
"0.5684617",
"0.5684617",
"0.5639208",
"0.563027",
"0.56278986",
"0.56231225",
"0.5620407",
"0.56068903",
"0.56068903",
"0.56068903",
"0.56016845",
"0.5597219",
"0.5595339",
"0.5591545",
"0.558057",
"0.55636305",
"0.55034596",
"0.5487096",
"0.5477182",
"0.5477182",
"0.5477182",
"0.5477182",
"0.5477182",
"0.5477182",
"0.5477182",
"0.5477182",
"0.5477182",
"0.5477182",
"0.5477182",
"0.5477182",
"0.5477182",
"0.5477182",
"0.54594034",
"0.5446425",
"0.5446197",
"0.54451364",
"0.54319674",
"0.5426377",
"0.54072845",
"0.5401934",
"0.5401934",
"0.5401934",
"0.5401934",
"0.5401934",
"0.5401934",
"0.5401934",
"0.5401934",
"0.5401934",
"0.5401934",
"0.5401934",
"0.5401934",
"0.5401934",
"0.5401934",
"0.5401934",
"0.5401934",
"0.53981763",
"0.5394762",
"0.5392594",
"0.5392164",
"0.5391672",
"0.5391672",
"0.5391672",
"0.5386191",
"0.53823715",
"0.5374112",
"0.5373851",
"0.5371084",
"0.5369742",
"0.53666246",
"0.5365522",
"0.5358571",
"0.53542304",
"0.5353158",
"0.5345768",
"0.5339915",
"0.53389114",
"0.53339213",
"0.5332912",
"0.5323722",
"0.5323722",
"0.5321411",
"0.5318719",
"0.53184503",
"0.5300535",
"0.5290181",
"0.52723837",
"0.52723306"
] | 0.0 | -1 |
Display a listing of the resource. | public function index(Request $request)
{
$kriteria['q'] = $request->input('q');
$kriteria['title'] = 'Data Alternatif';
$kriteria = Kriteria::all();
// $data['alternatifs'] = Alternatif::where('nama_alternatif','like','%'. $data['q'] . '%')
// ->orderBy('Kode_alternatif')
// ->paginate(25);
return view('pages.kriteria.index')->with([
'kriteria' => $kriteria
]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }",
"public function listing();",
"function index() {\n\t\t$this->show_list();\n\t}",
"public function actionList() {\n $this->_getList();\n }",
"public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }",
"public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }",
"public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }",
"function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}",
"public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }",
"public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }",
"public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}",
"function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}",
"public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }",
"public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}",
"public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}",
"public function actionRestList() {\n\t $this->doRestList();\n\t}",
"public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }",
"public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }",
"public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}",
"public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}",
"public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }",
"public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }",
"public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }",
"public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }",
"public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}",
"public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }",
"public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}",
"public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }",
"public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }",
"public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }",
"public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}",
"public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }",
"public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }",
"public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }",
"public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }",
"public function index()\n {\n return Resources::collection(Checking::paginate());\n }",
"public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }",
"public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }",
"public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }",
"public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }",
"public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }",
"public function view(){\n\t\t$this->buildListing();\n\t}",
"public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }",
"public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }",
"public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }",
"public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }",
"public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }",
"public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }",
"public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }",
"public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }",
"public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}",
"public function listAction() {}",
"public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }",
"public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }",
"public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }",
"public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }",
"public function executeList()\n {\n $this->setTemplate('list');\n }",
"public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }",
"function listing() {\r\n\r\n }",
"public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }",
"public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }",
"public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }",
"public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}",
"public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }",
"public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}",
"public function _index(){\n\t $this->_list();\n\t}",
"public function index()\n {\n $this->booklist();\n }",
"function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}",
"public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }",
"public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }",
"public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }",
"public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }",
"public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }",
"public function indexAction() {\n $this->_forward('list');\n }",
"public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }",
"public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }",
"public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}",
"public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }",
"public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }",
"public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }",
"public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }",
"public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }",
"public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}",
"public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }",
"public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }",
"public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }",
"public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}",
"public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }",
"public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }",
"public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }",
"public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }",
"public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }",
"public function index()\n {\n return view('admin.resources.index');\n }",
"public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}"
] | [
"0.7447426",
"0.73628515",
"0.73007894",
"0.7249563",
"0.7164474",
"0.7148467",
"0.71320325",
"0.7104678",
"0.7103152",
"0.7100512",
"0.7048493",
"0.6994995",
"0.69899315",
"0.6935843",
"0.6899995",
"0.68999326",
"0.6892163",
"0.6887924",
"0.6867505",
"0.6851258",
"0.6831236",
"0.68033123",
"0.6797587",
"0.6795274",
"0.67868614",
"0.67610204",
"0.67426085",
"0.67303514",
"0.6727031",
"0.67257243",
"0.67257243",
"0.67257243",
"0.67195046",
"0.67067856",
"0.67063624",
"0.67045796",
"0.66655326",
"0.666383",
"0.66611767",
"0.66604036",
"0.66582054",
"0.6654805",
"0.6649084",
"0.6620993",
"0.66197145",
"0.6616024",
"0.66077465",
"0.6602853",
"0.6601494",
"0.6593894",
"0.65878326",
"0.6586189",
"0.6584675",
"0.65813804",
"0.65766823",
"0.65754175",
"0.657203",
"0.657202",
"0.65713936",
"0.65642136",
"0.6563951",
"0.6553249",
"0.6552584",
"0.6546312",
"0.6536654",
"0.6534106",
"0.6532539",
"0.6527516",
"0.6526785",
"0.6526042",
"0.65191233",
"0.6518727",
"0.6517732",
"0.6517689",
"0.65155584",
"0.6507816",
"0.65048593",
"0.6503226",
"0.6495243",
"0.6492096",
"0.6486592",
"0.64862204",
"0.6485348",
"0.6483991",
"0.64789015",
"0.6478804",
"0.64708763",
"0.6470304",
"0.64699143",
"0.6467142",
"0.646402",
"0.6463102",
"0.6460929",
"0.6458856",
"0.6454334",
"0.6453653",
"0.645357",
"0.6450551",
"0.64498454",
"0.64480853",
"0.64453584"
] | 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{
$kriteria['title'] = 'Tambah Kriteria';
$kriteria['atributs'] = ['benefit' => 'Benefit', 'cost' => 'Cost'];
return view('pages.kriteria.create', $kriteria);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view('resource.create');\n }",
"public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}",
"public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }",
"public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }",
"public function create()\n {\n return view ('forms.create');\n }",
"public function create ()\n {\n return view('forms.create');\n }",
"public function create()\n\t{\n\t\treturn view('faith.form');\n\t}",
"public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }",
"public function create()\n {\n return view(\"request_form.form\");\n }",
"public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }",
"public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle école'\n\t\t) ) );\n\t}",
"public function create()\n {\n return view($this->forms . '.create');\n }",
"public function create()\n {\n return view('restful.add');\n }",
"public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }",
"public function create()\n {\n return view('admin.createform');\n }",
"public function create()\n {\n return view('admin.forms.create');\n }",
"public function create()\n {\n return view('backend.student.form');\n }",
"public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function create()\n {\n return view('client.form');\n }",
"public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }",
"public function create()\n {\n return view('Form');\n }",
"public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }",
"public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}",
"public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }",
"public function create()\n {\n return view('backend.schoolboard.addform');\n }",
"public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}",
"public function create()\n {\n //\n return view('form');\n }",
"public function create()\n {\n return view('rests.create');\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return view(\"Add\");\n }",
"public function create(){\n return view('form.create');\n }",
"public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }",
"public function create()\n {\n\n return view('control panel.student.add');\n\n }",
"public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}",
"public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }",
"public function create()\n {\n return $this->cView(\"form\");\n }",
"public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }",
"public function create()\n {\n return view(\"dresses.form\");\n }",
"public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}",
"public function createAction()\n {\n// $this->view->form = $form;\n }",
"public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }",
"public function create()\n {\n return view('fish.form');\n }",
"public function create()\n {\n return view('users.forms.create');\n }",
"public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }",
"public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}",
"public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }",
"public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }",
"public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }",
"public function create()\n {\n return view('essentials::create');\n }",
"public function create()\n {\n return view('student.add');\n }",
"public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}",
"public function create()\n {\n return view('url.form');\n }",
"public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }",
"public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}",
"public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view('crud/add'); }",
"public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}",
"public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view(\"List.form\");\n }",
"public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}",
"public function create()\n {\n //load create form\n return view('products.create');\n }",
"public function create()\n {\n return view('article.addform');\n }",
"public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }",
"public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}",
"public function create()\n {\n return view('saldo.form');\n }",
"public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}",
"public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }",
"public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }",
"public function create()\n {\n return view('admin.inverty.add');\n }",
"public function create()\n {\n return view('Libro.create');\n }",
"public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }",
"public function create()\n {\n return view(\"familiasPrograma.create\");\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}",
"public function create()\n {\n return view(\"create\");\n }",
"public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}",
"public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n return view('forming');\n }",
"public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }",
"public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }",
"public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }",
"public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }",
"public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }",
"public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}",
"public function create()\n {\n return view('student::students.student.create');\n }",
"public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}"
] | [
"0.75948673",
"0.75948673",
"0.75863165",
"0.7577412",
"0.75727344",
"0.7500887",
"0.7434847",
"0.7433956",
"0.73892003",
"0.73531085",
"0.73364776",
"0.73125",
"0.7296102",
"0.7281891",
"0.72741455",
"0.72424185",
"0.7229325",
"0.7226713",
"0.7187349",
"0.7179176",
"0.7174283",
"0.7150356",
"0.71444064",
"0.71442676",
"0.713498",
"0.71283126",
"0.7123691",
"0.71158516",
"0.71158516",
"0.71158516",
"0.7112176",
"0.7094388",
"0.7085711",
"0.708025",
"0.70800644",
"0.70571953",
"0.70571953",
"0.70556754",
"0.70396435",
"0.7039549",
"0.7036275",
"0.703468",
"0.70305896",
"0.7027638",
"0.70265305",
"0.70199823",
"0.7018007",
"0.7004984",
"0.7003889",
"0.7000935",
"0.69973785",
"0.6994679",
"0.6993764",
"0.6989918",
"0.6986989",
"0.6966502",
"0.69656384",
"0.69564354",
"0.69518244",
"0.6951109",
"0.6947306",
"0.69444615",
"0.69423944",
"0.6941156",
"0.6937871",
"0.6937871",
"0.6936686",
"0.69345254",
"0.69318026",
"0.692827",
"0.69263744",
"0.69242257",
"0.6918349",
"0.6915889",
"0.6912884",
"0.691146",
"0.69103104",
"0.69085974",
"0.69040126",
"0.69014287",
"0.69012105",
"0.6900397",
"0.68951064",
"0.6893521",
"0.68932164",
"0.6891899",
"0.6891616",
"0.6891616",
"0.6889246",
"0.68880934",
"0.6887128",
"0.6884732",
"0.68822503",
"0.68809193",
"0.6875949",
"0.68739206",
"0.68739134",
"0.6870358",
"0.6869779",
"0.68696856",
"0.686877"
] | 0.0 | -1 |
Store a newly created resource in storage. | public function store(Request $request)
{
$validateData = $request->validate([
'kode_kriteria' => 'required|unique:tb_kriteria',
'nama_kriteria' => 'required',
'atribut' => 'required',
'bobot' => 'required',
],
[
'kode_kriteria.required' => 'Kode Kriteria harus di isi',
'kode_kriteria.unique' => 'kode kriteria harus unik',
'nama_kriteria.required' => 'Nama Kriteria harus di isi',
'atribut.required' => 'Atribut harus di isi',
'bobot.required' => 'Bobot harus di isi',
]);
$kriteria = [
'kode_kriteria' => $request->kode_kriteria,
'nama_kriteria' => $request->nama_kriteria,
'atribut' => $request->atribut,
'bobot' => $request->bobot,
];
$save = Kriteria::insert($kriteria);
DB::statement("INSERT INTO tb_rel_alternatif (kode_alternatif, kode_kriteria, kode_sub)
SELECT kode_alternatif, :kode_kriteria, 0 FROM tb_alternatif", array('kode_kriteria' => $request->kode_kriteria));
if($save)
return redirect('kriteria');
else
return redirect()->back()->withInput();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store($data, Resource $resource);",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }",
"public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }",
"public function createStorage();",
"public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"function storeAndNew() {\n $this->store();\n }",
"public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }",
"public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }",
"public function store()\n\t{\n\t\t\n\t\t//\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}"
] | [
"0.72865677",
"0.7145327",
"0.71325725",
"0.6640912",
"0.66209733",
"0.65685713",
"0.652643",
"0.65095705",
"0.64490104",
"0.637569",
"0.63736665",
"0.63657933",
"0.63657933",
"0.63657933",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437"
] | 0.0 | -1 |
Display the specified resource. | public function show($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }",
"private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }",
"function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}",
"public function show(ResourceSubject $resourceSubject)\n {\n //\n }",
"public function show(ResourceManagement $resourcesManagement)\n {\n //\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function retrieve(Resource $resource);",
"public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }",
"public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function show(Dispenser $dispenser)\n {\n //\n }",
"public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }",
"public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}",
"public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }",
"function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}",
"public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }",
"public function get(Resource $resource);",
"public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }",
"public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }",
"function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}",
"public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }",
"function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}",
"public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function show(rc $rc)\n {\n //\n }",
"public function show(Resolucion $resolucion)\n {\n //\n }",
"public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show(Resena $resena)\n {\n }",
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }",
"public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}",
"public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }",
"public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }",
"public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }",
"public function display()\n\t{\n\t\tparent::display();\n\t}",
"public function get_resource();",
"public function show()\n\t{\n\t\t\n\t}",
"function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}",
"public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }",
"public function display($title = null)\n {\n echo $this->fetch($title);\n }",
"public function display(){}",
"public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}",
"public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}",
"public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }",
"#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}",
"public function display() {\n echo $this->render();\n }",
"public function show($id)\n\t{\n\t//\n\t}",
"public function show($id)\n\t{\n\t//\n\t}",
"function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }",
"public function show($id)\n {\n //\n $this->_show($id);\n }",
"public function show()\n\t{\n\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {}",
"static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}",
"public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}",
"public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }",
"public abstract function display();",
"abstract public function resource($resource);",
"public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show(Response $response)\n {\n //\n }",
"public function show()\n {\n return auth()->user()->getResource();\n }",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}"
] | [
"0.8233718",
"0.8190437",
"0.6828712",
"0.64986944",
"0.6495974",
"0.6469629",
"0.6462615",
"0.6363665",
"0.6311607",
"0.62817234",
"0.6218966",
"0.6189695",
"0.61804265",
"0.6171014",
"0.61371076",
"0.61207956",
"0.61067593",
"0.6105954",
"0.6094066",
"0.6082806",
"0.6045245",
"0.60389996",
"0.6016584",
"0.598783",
"0.5961788",
"0.59606946",
"0.5954321",
"0.59295714",
"0.59182066",
"0.5904556",
"0.59036547",
"0.59036547",
"0.59036547",
"0.5891874",
"0.58688277",
"0.5868107",
"0.58676815",
"0.5851883",
"0.58144855",
"0.58124036",
"0.58112013",
"0.5803467",
"0.58012545",
"0.5791527",
"0.57901084",
"0.5781528",
"0.5779676",
"0.5757105",
"0.5756208",
"0.57561266",
"0.57453394",
"0.57435393",
"0.57422745",
"0.5736634",
"0.5736634",
"0.5730559",
"0.57259274",
"0.5724891",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5718969",
"0.5713412",
"0.57091093",
"0.5706405",
"0.57057405",
"0.5704541",
"0.5704152",
"0.57026845",
"0.57026845",
"0.56981397",
"0.5693083",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962"
] | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit($id)
{
$data = Kriteria::findOrFail($id);
// dd($items);
return view('pages.kriteria.edit')->with([
'data' => $data
]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function edit()\n {\n return view('hirmvc::edit');\n }",
"public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}",
"public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }",
"public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}",
"public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }",
"public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }",
"private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }",
"public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }",
"public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}",
"public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }",
"public function edit($model, $form);",
"function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}",
"public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}",
"public function edit()\n { \n return view('admin.control.edit');\n }",
"public function edit(Form $form)\n {\n //\n }",
"public function edit()\n {\n return view('common::edit');\n }",
"public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\r\n {\r\n return view('petro::edit');\r\n }",
"public function edit($id)\n {\n // show form edit user info\n }",
"public function edit()\n {\n return view('escrow::edit');\n }",
"public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }",
"public function edit()\n {\n return view('commonmodule::edit');\n }",
"public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit(form $form)\n {\n //\n }",
"public function actionEdit($id) { }",
"public function edit()\n {\n return view('admincp::edit');\n }",
"public function edit()\n {\n return view('scaffold::edit');\n }",
"public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }",
"public function edit()\n {\n return view('Person.edit');\n }",
"public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }",
"public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}",
"public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}",
"public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }",
"public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }",
"public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }",
"public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }",
"function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}",
"public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"protected function _edit(){\n\t\treturn $this->_editForm();\n\t}",
"public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }",
"public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }",
"public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}",
"public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}",
"public function edit($id)\n {\n return view('models::edit');\n }",
"public function edit()\n {\n return view('home::edit');\n }",
"public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }",
"public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }",
"public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }",
"public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('consultas::edit');\n }",
"public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }",
"public function edit()\n {\n return view('dashboard::edit');\n }",
"public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }",
"public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }",
"public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }",
"public function edit() {\n return view('routes::edit');\n }",
"public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }",
"public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }",
"public function edit($id)\n {\n return view('cataloguemodule::edit');\n }",
"public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }",
"public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }",
"public function edit()\n {\n return view('website::edit');\n }",
"public function edit()\n {\n return view('inventory::edit');\n }",
"public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }",
"public function edit()\n {\n return view('initializer::edit');\n }",
"public function edit($id)\n {\n return view('backend::edit');\n }",
"public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}",
"public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }",
"public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }",
"public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }",
"public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }",
"public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }",
"public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }",
"public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}"
] | [
"0.78560394",
"0.76944435",
"0.7274738",
"0.7242069",
"0.7171281",
"0.70639855",
"0.7054131",
"0.6983364",
"0.69478005",
"0.69461757",
"0.69413805",
"0.69277894",
"0.690145",
"0.68984276",
"0.68984276",
"0.68784773",
"0.68642735",
"0.68610847",
"0.6857929",
"0.684406",
"0.6834666",
"0.6812317",
"0.6806476",
"0.68056434",
"0.6802016",
"0.6796308",
"0.67925215",
"0.67925215",
"0.6788407",
"0.67854327",
"0.67798024",
"0.67778105",
"0.6768292",
"0.67620933",
"0.6746622",
"0.6746622",
"0.67451817",
"0.6744156",
"0.67404944",
"0.67362344",
"0.672656",
"0.67133087",
"0.66945624",
"0.66931814",
"0.6689649",
"0.6689253",
"0.66885525",
"0.668543",
"0.6683226",
"0.66704214",
"0.6670041",
"0.666635",
"0.666635",
"0.6661137",
"0.66608137",
"0.6659381",
"0.6657332",
"0.66547334",
"0.6653617",
"0.6643329",
"0.6632568",
"0.6632244",
"0.6628306",
"0.6628306",
"0.6620114",
"0.66194344",
"0.66173506",
"0.6616366",
"0.6611815",
"0.6609614",
"0.6606548",
"0.65972704",
"0.6595697",
"0.6595222",
"0.65914685",
"0.65912557",
"0.6588314",
"0.6581422",
"0.6581033",
"0.6580827",
"0.657766",
"0.6577083",
"0.6574992",
"0.6570292",
"0.65680474",
"0.65676284",
"0.6567584",
"0.65626866",
"0.6562467",
"0.6562467",
"0.65586925",
"0.6558524",
"0.6557367",
"0.65571094",
"0.6556675",
"0.6556111",
"0.6555878",
"0.6555186",
"0.6549289",
"0.6548959",
"0.65455836"
] | 0.0 | -1 |
Update the specified resource in storage. | public function update(Request $request, $id)
{
$validateData = $request->validate([
'nama_kriteria' => 'required',
'atribut' => 'required',
'bobot' => 'required',
],
[
'nama_kriteria.required' => 'Nama Kriteria harus di isi',
'atribut.required' => 'Atribut harus di isi',
'bobot.required' => 'Bobot harus di isi',
]);
$kriteria = [
'nama_kriteria' => $request->nama_kriteria,
'atribut' => $request->atribut,
'bobot' => $request->bobot,
];
$save = Kriteria::find($id)->update($kriteria);
if($save)
return redirect('kriteria');
else
return redirect()->back()->withInput();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }",
"public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }",
"public function update(Request $request, Resource $resource)\n {\n //\n }",
"public function updateStream($resource);",
"public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }",
"protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }",
"public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }",
"public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}",
"public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }",
"public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }",
"protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }",
"public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }",
"public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }",
"public function update($path);",
"public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }",
"public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }",
"public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}",
"public function updateStream($path, $resource, Config $config)\n {\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }",
"public function update($data) {}",
"public function update($data) {}",
"public function putStream($resource);",
"public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function update($entity);",
"public function update($entity);",
"public function setResource($resource);",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }",
"public function isUpdateResource();",
"public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }",
"public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }",
"public function store($data, Resource $resource);",
"public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }",
"public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }",
"public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }",
"public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }",
"public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }",
"public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }",
"public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }",
"public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }",
"public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }",
"public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }",
"public function update(Qstore $request, $id)\n {\n //\n }",
"public function update(IEntity $entity);",
"protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }",
"public function update($request, $id);",
"function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}",
"public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }",
"public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }",
"protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }",
"abstract public function put($data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function testUpdateSupplierUsingPUT()\n {\n }",
"public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }",
"public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }",
"public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }",
"public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }",
"public abstract function update($object);",
"public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }",
"public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }",
"public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }",
"public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }",
"public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }",
"public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }",
"public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }",
"public function update($entity)\n {\n \n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }",
"public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }",
"public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }",
"public function update($id, $input);",
"public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }",
"public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}",
"public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }",
"public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }",
"public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }",
"public function update($id);",
"public function update($id);",
"private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }",
"public function put($path, $data = null);",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }",
"public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }",
"public function update(Entity $entity);",
"public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }",
"public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}",
"public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }",
"public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }",
"public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }"
] | [
"0.7425105",
"0.70612276",
"0.70558053",
"0.6896673",
"0.6582159",
"0.64491373",
"0.6346954",
"0.62114537",
"0.6145042",
"0.6119944",
"0.61128503",
"0.6099993",
"0.6087866",
"0.6052593",
"0.6018941",
"0.60060275",
"0.59715486",
"0.5946516",
"0.59400934",
"0.59377414",
"0.5890722",
"0.5860816",
"0.5855127",
"0.5855127",
"0.58513457",
"0.5815068",
"0.5806887",
"0.57525045",
"0.57525045",
"0.57337505",
"0.5723295",
"0.5714311",
"0.5694472",
"0.5691319",
"0.56879413",
"0.5669989",
"0.56565005",
"0.56505877",
"0.5646085",
"0.5636683",
"0.5633498",
"0.5633378",
"0.5632906",
"0.5628826",
"0.56196684",
"0.5609126",
"0.5601397",
"0.55944353",
"0.5582592",
"0.5581908",
"0.55813426",
"0.5575312",
"0.55717176",
"0.55661047",
"0.55624634",
"0.55614686",
"0.55608666",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55573726",
"0.5556878",
"0.5554201",
"0.5553069",
"0.55530256",
"0.5543788",
"0.55435944",
"0.55412996",
"0.55393505",
"0.55368495",
"0.5535236",
"0.5534954",
"0.55237365",
"0.5520468",
"0.55163723",
"0.55125296",
"0.5511168",
"0.5508345",
"0.55072427",
"0.5502385",
"0.5502337",
"0.5501029",
"0.54995877",
"0.54979175",
"0.54949397",
"0.54949397",
"0.54946727",
"0.5494196",
"0.54941916",
"0.54925025",
"0.5491807",
"0.5483321",
"0.5479606",
"0.5479408",
"0.5478678",
"0.54667485",
"0.5463411",
"0.5460588",
"0.5458525"
] | 0.0 | -1 |
Remove the specified resource from storage. | public function destroy($id)
{
$data = Kriteria::findOrFail($id);
$data->delete();
return redirect()->route('kriteria.index');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }",
"public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }",
"public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }",
"public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }",
"protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }",
"public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }",
"public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }",
"public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}",
"public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}",
"public function delete(): void\n {\n unlink($this->getPath());\n }",
"public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }",
"public function remove($path);",
"function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}",
"public function delete(): void\n {\n unlink($this->path);\n }",
"private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }",
"public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function remove() {}",
"public function remove() {}",
"public function remove();",
"public function remove();",
"public function remove();",
"public function remove();",
"function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}",
"public function deleteImage(){\n\n\n Storage::delete($this->image);\n }",
"public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }",
"public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}",
"public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }",
"public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }",
"public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}",
"public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }",
"public function deleteImage(){\n \tStorage::delete($this->image);\n }",
"public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }",
"public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }",
"public function destroy($id)\n {\n Myfile::find($id)->delete();\n }",
"public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }",
"public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }",
"public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }",
"public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }",
"public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }",
"public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }",
"public function delete($path);",
"public function delete($path);",
"public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }",
"public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }",
"public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }",
"public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }",
"public function delete($path, $data = null);",
"public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }",
"public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }",
"public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }",
"public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }",
"public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }",
"public function del($path){\n\t\treturn $this->remove($path);\n\t}",
"public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }",
"public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}",
"public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }",
"public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }",
"public function revoke($resource, $permission = null);",
"public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }",
"function delete($path);",
"public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}",
"public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }",
"public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }",
"public function remove($filePath){\n return Storage::delete($filePath);\n }",
"public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }",
"public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }",
"public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }",
"public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }",
"function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }",
"public function remove($id);",
"public function remove($id);",
"public function deleted(Storage $storage)\n {\n //\n }",
"public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }",
"public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }",
"public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }",
"public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }",
"function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}",
"public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }",
"public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}",
"public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }",
"public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }"
] | [
"0.6672584",
"0.6659381",
"0.6635911",
"0.6632799",
"0.6626075",
"0.65424126",
"0.65416265",
"0.64648265",
"0.62882507",
"0.6175931",
"0.6129922",
"0.60893893",
"0.6054415",
"0.60428125",
"0.60064924",
"0.59337646",
"0.5930772",
"0.59199584",
"0.5919811",
"0.5904504",
"0.5897263",
"0.58962846",
"0.58951396",
"0.58951396",
"0.58951396",
"0.58951396",
"0.5880124",
"0.58690923",
"0.5863659",
"0.5809161",
"0.57735413",
"0.5760811",
"0.5753559",
"0.57492644",
"0.5741712",
"0.57334286",
"0.5726379",
"0.57144034",
"0.57096",
"0.5707689",
"0.5705895",
"0.5705634",
"0.5703902",
"0.5696585",
"0.5684331",
"0.5684331",
"0.56780374",
"0.5677111",
"0.5657287",
"0.5648262",
"0.5648085",
"0.5648012",
"0.5640759",
"0.5637738",
"0.5629985",
"0.5619264",
"0.56167465",
"0.5606877",
"0.56021434",
"0.5601949",
"0.55992156",
"0.5598557",
"0.55897516",
"0.5581397",
"0.5566926",
"0.5566796",
"0.55642897",
"0.55641",
"0.5556583",
"0.5556536",
"0.5550097",
"0.5543172",
"0.55422723",
"0.5540013",
"0.5540013",
"0.55371785",
"0.55365825",
"0.55300397",
"0.552969",
"0.55275744",
"0.55272335",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.5525997",
"0.5525624",
"0.5523911",
"0.5521122",
"0.5517412"
] | 0.0 | -1 |
Search the document history. | public function search(array $documentHistorySearchRequest)
{
return $this->_Search_operation->call(['documentHistorySearchRequest' => $documentHistorySearchRequest]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function search_history()\n{\n\tglobal $database, $url, $results_per_page, $p, $search_text, $t, $search_objects, $results, $total_results;\n\n\t// CONSTRUCT QUERY\n $sql = \"\n SELECT\n se_historyentries.historyentry_id,\n se_historyentries.historyentry_title,\n se_historyentries.historyentry_body,\n se_users.user_id,\n se_users.user_username,\n se_users.user_photo,\n se_users.user_fname,\n se_users.user_lname\n FROM\n se_historyentries,\n se_users,\n se_levels\n WHERE\n se_historyentries.historyentry_user_id=se_users.user_id &&\n se_users.user_level_id=se_levels.level_id &&\n (\n se_historyentries.historyentry_search='1' ||\n se_levels.level_history_search='0'\n ) \n \";\n \n $sql .= \" && MATCH (`historyentry_title`, `historyentry_body`) AGAINST ('{$search_text}' IN BOOLEAN MODE)\";\n \n /*\n $sql .= \" && (\n historyentry_title LIKE '%$search_text%' ||\n historyentry_body LIKE '%$search_text%'\n )\n \";\n */\n \n\t// GET TOTAL ENTRIES\n $sql2 = $sql . \" LIMIT 201\";\n $resource = $database->database_query($sql2);\n\t$total_entries = $database->database_num_rows($resource);\n \n\t// IF NOT TOTAL ONLY\n\tif( $t==\"history\" )\n {\n\t // MAKE history PAGES\n\t $start = ($p - 1) * $results_per_page;\n\t $limit = $results_per_page+1;\n \n\t // SEARCH historyS\n $sql3 = $sql . \" ORDER BY historyentry_id DESC LIMIT {$start}, {$limit}\";\n $resource = $database->database_query($sql3);\n \n\t while( $historyentry_info=$database->database_fetch_assoc($resource) )\n {\n\t // CREATE AN OBJECT FOR AUTHOR\n\t $profile = new se_user();\n\t $profile->user_info['user_id'] = $historyentry_info['user_id'];\n\t $profile->user_info['user_username'] = $historyentry_info['user_username'];\n\t $profile->user_info['user_photo'] = $historyentry_info['user_photo'];\n\t $profile->user_info['user_fname'] = $historyentry_info['user_fname'];\n\t $profile->user_info['user_lname'] = $historyentry_info['user_lname'];\n\t $profile->user_displayname();\n \n\t // IF EMPTY TITLE\n\t if( !trim($historyentry_info['historyentry_title']) )\n $historyentry_info['historyentry_title'] = SE_Language::get(589);\n \n $historyentry_info['historyentry_body'] = cleanHTML($historyentry_info['historyentry_body'], '');\n \n\t // IF BODY IS LONG\n\t if( strlen($historyentry_info['historyentry_body'])>150 )\n $historyentry_info['historyentry_body'] = substr($historyentry_info['historyentry_body'], 0, 147).\"...\";\n \n $result_url = $url->url_create('history_entry', $historyentry_info['user_username'], $historyentry_info['historyentry_id']);\n $result_name = 1500118;\n $result_desc = 1500119;\n \n\t $results[] = array(\n 'result_url' => $result_url,\n\t\t\t\t'result_icon' => './images/icons/history_history48.gif',\n\t\t\t\t'result_name' => $result_name,\n\t\t\t\t'result_name_1' => $historyentry_info['historyentry_title'],\n\t\t\t\t'result_desc' => $result_desc,\n\t\t\t\t'result_desc_1' => $url->url_create('profile', $historyentry_info['user_username']),\n\t\t\t\t'result_desc_2' => $profile->user_displayname,\n\t\t\t\t'result_desc_3' => $historyentry_info['historyentry_body']\n );\n\t }\n \n\t // SET TOTAL RESULTS\n\t $total_results = $total_entries;\n\t}\n\n\t// SET ARRAY VALUES\n\tSE_Language::_preload_multi(1500118, 1500119, 1500120);\n\tif( $total_albums>200 )\n $total_albums = \"200+\";\n \n\t$search_objects[] = array(\n 'search_type' => 'history',\n 'search_lang' => 1500120,\n 'search_total' => $total_entries\n );\n}",
"function getRecentSearches()\n {\n }",
"public function includeHistory(Document $document)\n {\n return $this->collection($document->history, new DocumentHistoryTransformer());\n }",
"function search() {}",
"public function search(){}",
"public function search();",
"public function search();",
"function findDocument(){\r\n\t\r\n\t\r\n\t\r\n\t//get the value form the textbox\r\n\tif ( ! empty($_GET['searchTextBox']) && isset($_GET['page']) && $_GET['page']==1){\r\n\t\t\r\n\t\tsession_start();\r\n\t\t$_SESSION['docNames'] = json_decode(file_get_contents('docIndex.json'), true);\r\n\t\t\r\n\t\t//read the stopwords\r\n\t\t$stopWords = file_get_contents(\"StopWords.txt\");\t\t\r\n\t\t$postingList = json_decode(file_get_contents('PL.json'), true);//$_SESSION['PL'];\r\n\t\t$stopW = explode(\" \",$stopWords);\r\n\t\t\r\n \t$query = $_GET['searchTextBox'];\r\n\t\t\r\n\t\t//clean the query\r\n\t\t$query = preg_replace(\"/[^a-zA-Z ]/\",\"\",$query);\r\n\t\t\r\n\t\t//change everything to lowercase\r\n\t\t$query = strtolower($query);\r\n\t\t$query = trim($query);\t\t\r\n\t\t$query = preg_replace(\"/\\s+$/\",\" \",$query);\r\n\t\t//echo $query;\r\n\t\t\r\n\t\t//parse the query\r\n\t\t$qTemp = explode(\" \",$query);\r\n\t\t$qArray = array();\r\n\t\t$j = 0;\r\n\t\t\r\n\t\t//remove stop words\r\n\t\tfor($i=0;$i<count($qTemp);$i++){\r\n\t\t\tif(!in_array($qTemp[$i],$stopW)){\r\n\t\t\t\t$qArray[$j] = $qTemp[$i];\r\n\t\t\t\t$j++;\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//print_r($qArray);\r\n\t\t$_SESSION['queryFinal'] = $qArray;\r\n\t\t\r\n\t\tif(count($qArray)==0 || !array_key_exists($qArray[0],$postingList)){\r\n\t\t\t\techo \"</br>\";\r\n\t\t\t\techo \"No Results Found\";\r\n\t\t\t\texit (0);\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$docIndex = $postingList[$qArray[0]][\"token\"];\r\n\t\t\t\r\n\t\t\t//collect document index\r\n\t\t\tfor($i=1;$i<count($qArray);$i++){\r\n\t\t\t\tif(!array_key_exists($qArray[$i],$postingList)){\r\n\t\t\t\t\techo \"</br>\";\r\n\t\t\t\t\techo \"No Results Found\";\r\n\t\t\t\t\texit (0);\r\n\t\t\t\t}\r\n\t\t\t\t$tempIndex = $postingList[$qArray[$i]][\"token\"];\r\n\t\t\t\t$docIndex = array_intersect($docIndex,$tempIndex);\r\n\t\t\t}\r\n\t\t}\r\n\t\t$_SESSION['docIndex'] = array_values($docIndex);\r\n\t\t$_SESSION['numD'] = count($docIndex);\r\n\t\techo \"<br />\";\r\n\t\techo $_SESSION['numD'].\",000,000\".\" results\";\r\n\t\techo \"<br /><br />\";\r\n\t\t//print_r($_SESSION['docIndex']);\r\n\t\t//exit(0);\r\n\t\r\n\t\treturnDoc();\r\n\t}\t\r\n\telse if(isset($_GET['page'])){\r\n\t\tsession_start();\r\n\t\techo \"<br />\";\r\n\t\techo $_SESSION['numD'].\",000,000\".\" relevant results\";\r\n\t\techo \"<br /><br />\";\r\n\t\treturnDoc();\r\n\t}\r\n\t\r\n}",
"public function getQueryHistory(): array;",
"function search()\n\t{}",
"function search()\n\t{}",
"public function search()\n\t{\n\t\t\n\t}",
"public function search_browsing_history( $query ) {\n\n\t\t// If not a search query, bail here\n\t\tif ( ! isset( $query->args[ 's' ] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Add meta_query to search browsing history\n\t\t$query->__set( 'meta_query', array(\n\t\t\t'key' => '_edd_payment_meta',\n\t\t\t'value' => trim( $query->args[ 's' ] ),\n\t\t\t'compare' => 'LIKE'\n\t\t) );\n\n\t\t// Unset search string to prevent searching of transaction title and content\n\t\t$query->__unset( 's' );\n\n\t}",
"public function testFinderHistory() {\n $MIN_LIFE = 90;\n $MAX_LIFE = 96;\n\n $array = $this->Links->find('history', ['min_life' => $MIN_LIFE , 'max_life' => $MAX_LIFE, 'user_id' => 1])\n ->toArray();\n $this->assertEquals(count($array), 1, 'Exactly 1 links is retrieved by views');\n\n $array = $this->Links->find('history', ['title' => 'I do not exist',\n 'min_life' => $MIN_LIFE ,\n 'max_life' => $MAX_LIFE, 'user_id' => 1])\n ->toArray();\n $this->assertEquals(count($array), 0, 'Test filter on title');\n\n $array = $this->Links->find('history', ['status' => 1,\n 'min_life' => $MIN_LIFE ,\n 'max_life' => $MAX_LIFE, 'user_id' => 1])\n ->toArray();\n $this->assertEquals(count($array), 1, 'Test filter on status');\n }",
"public function actionGetRecentSearches()\n\t{\n\t\t$logic = new SearchLogic();\n\t\t$searches = $logic->getRecentSearches();\n\n\t\t$this->setData($searches);\n\t}",
"public function search($q);",
"public function searchHistory($searchName,$input,$uID) {\n\t\t$query = 'SELECT queries.qid, `code`, `status`, url, quality, files.rname FROM queries ';\n\t\t$query .= 'INNER JOIN querydetails ';\n\t\t$query .= 'ON queries.qid = querydetails.qid ';\n\t\t$query .= 'INNER JOIN files ';\n\t\t$query .= 'ON queries.qid = files.fid ';\n\t\t$query .= $searchName === true ? 'WHERE queries.url LIKE %?% ' : 'WHERE files.rname LIKE %?% ';\n\t\t$query .= 'AND queries.uid = ? ';\n\t\t$query .= 'ORDER BY luc DESC;';\n\t\tif($query = $this->db->prepare( $query )){\n\t\t\t$query->bind_param ( 'si', $input, $uID );\n\t\t\t$query->execute ();\n\t\t\t$result = $query->get_result ();\n\t\t\t\n\t\t\tif (! $result) {\n\t\t\t\tthrow new dbException ( '500' );\n\t\t\t}\n\t\t\n\t\t\tif ($result->num_rows == 0) {\n\t\t\t\tthrow new dbException ( '404' );\n\t\t\t}\n\t\t\n\t\t\t$array = array ();\n\t\t\twhile ( $row = $result->fetch_assoc () ) {\n\t\t\t\t$array [] = [\n\t\t\t\t\t\t$row ['qid'],\n\t\t\t\t\t\t$row ['url'],\n\t\t\t\t\t\t$row ['rname'],\n\t\t\t\t\t\t$row ['code'],\n\t\t\t\t\t\t$row ['status'],\n\t\t\t\t\t\t$row ['quality'],\n\t\t\t\t];\n\t\t\t}\n\t\t\t\n\t\t\t$result->close ();\n\t\t\t$query->close();\n\t\t\treturn $array;\n\t\t}\n\t\treturn null;\n\t}",
"public function searchAction()\n {\n $user_id = $this->getSecurityContext()->getUser()->getId();\n $drive = $this->_driveHelper->getRepository()->getDriveByUserId($user_id);\n\n $q = $this->getScalarParam('q');\n // $hits = $this->getResource('drive.file_indexer')->searchInDrive($q, $drive->drive_id);\n $hits = $this->getResource('drive.file_indexer')->search($q);\n\n echo '<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />';\n echo '<strong>', $hits->hitCount, '</strong> hits<br/>';\n foreach ($hits->hits as $hit) {\n $file = $this->_driveHelper->getRepository()->getFile($hit->document->file_id);\n if (empty($file)) {\n echo 'Invalid file ID: ', $hit->document->file_id;\n }\n if ($file && $this->_driveHelper->isFileReadable($file)) {\n echo '<div>', '<strong>', $file->name, '</strong> ', $this->view->fileSize($file->size), '</div>';\n }\n }\n exit;\n }",
"function searchHistoryScreen($request) {\n\n DEFINE(\"RESULTS_ON_PAGE\", \"5\");\n \n $pageNumber = $request->form->get(\"pageNumber\", \"int\", 1);\n \n if( $pageNumber < 1 ) $pageNumber = 1;\n\n $searchHistory = new SearchLogList($request->config->mysqlConnection);\n $searchHistory->setOrder(\"search_date\");\n $searchHistory->setDirection(\"desc\");\n \n $pageCount = ceil($searchHistory->getCount()/RESULTS_ON_PAGE);\n \n $offset = (($pageNumber-1)*RESULTS_ON_PAGE);\n \n $searchHistory->setLimit($offset.\", \".RESULTS_ON_PAGE);\n \n $searchHistory->load();\n \n Leolos\\Status\\Status::OK();\n require_once \"templ/search_history.html\";\n return ;\n}",
"public function fetchHistory(): array;",
"function search() {\n // ...\n }",
"public function refresh_search() {\n\n if (!empty($this->search_string)) {\n\n $folder = (is_object($this->search_set) ? $this->search_set->get_parameters('MAILBOX') : '');\n\n $this->search($folder, $this->search_string, $this->search_charset, $this->search_sort_field);\n }\n\n return $this->get_search_set();\n }",
"function get_history() {\n\t\treturn $this->history;\n\t}",
"public function search($query);",
"public function search(Query $query);",
"public function getHistory()\r\r\n {\r\r\n return $this->history;\r\r\n }",
"public function getQueryHistory(): array\n {\n return $this->History;\n }",
"public function search($search);",
"public function searchNews (){\n $this->news = $this->daoJson->searchFeedDate($this->keyword, \"2014-09-01\", \"2014-11-30\");\n }",
"public function getHistory()\n {\n return $this->_history;\n }",
"public function logSearch( $criteria ) {\n $site = Craft::$app->getSites()->getCurrentSite();\n $user = Craft::$app->getUser();\n\n $hash = md5(serialize( $criteria ));\n $searchRecords = $this->getSearch( $hash );\n if( count($searchRecords) == 0 ) {\n $search = new SearchRecord;\n $search->siteId = $site->id;\n $search->criteria = $criteria;\n $search->hash = $hash;\n $search->userId = $user->id;\n $search->save();\n } elseif (is_array($searchRecords)) {\n $search = $searchRecords[0];\n } else {\n $search = $searchRecords;\n } \n return $search->hash;\n }",
"public function action_search_doc()\n\t{\n\t\tglobal $context;\n\n\t\t$context['doc_apiurl'] = 'https://github.com/elkarte/Elkarte/wiki/api.php';\n\t\t$context['doc_scripturl'] = 'https://github.com/elkarte/Elkarte/wiki/';\n\n\t\t// Set all the parameters search might expect.\n\t\t$postVars = explode(' ', $context['search_term']);\n\n\t\t// Encode the search data.\n\t\tforeach ($postVars as $k => $v)\n\t\t{\n\t\t\t$postVars[$k] = urlencode($v);\n\t\t}\n\n\t\t// This is what we will send.\n\t\t$postVars = implode('+', $postVars);\n\n\t\t// Get the results from the doc site.\n\t\trequire_once(SUBSDIR . '/Package.subs.php');\n\t\t// Demo URL:\n\t\t// https://github.com/elkarte/Elkarte/wiki/api.php?action=query&list=search&srprop=timestamp|snippet&format=xml&srwhat=text&srsearch=template+eval\n\t\t$search_results = fetch_web_data($context['doc_apiurl'] . '?action=query&list=search&srprop=timestamp|snippet&format=xml&srwhat=text&srsearch=' . $postVars);\n\n\t\t// If we didn't get any xml back we are in trouble - perhaps the doc site is overloaded?\n\t\tif (!$search_results || preg_match('~<' . '\\?xml\\sversion=\"\\d+\\.\\d+\"\\?' . '>\\s*(<api>.+?</api>)~is', $search_results, $matches) !== 1)\n\t\t{\n\t\t\tthrow new Exception('cannot_connect_doc_site');\n\t\t}\n\n\t\t$search_results = !empty($matches[1]) ? $matches[1] : '';\n\n\t\t// Otherwise we simply walk through the XML and stick it in context for display.\n\t\t$context['search_results'] = array();\n\n\t\t// Get the results loaded into an array for processing!\n\t\t$results = new XmlArray($search_results, false);\n\n\t\t// Move through the api layer.\n\t\tif (!$results->exists('api'))\n\t\t{\n\t\t\tthrow new Exception('cannot_connect_doc_site');\n\t\t}\n\n\t\t// Are there actually some results?\n\t\tif ($results->exists('api/query/search/p'))\n\t\t{\n\t\t\t$relevance = 0;\n\t\t\tforeach ($results->set('api/query/search/p') as $result)\n\t\t\t{\n\t\t\t\t$title = $result->fetch('@title');\n\t\t\t\t$context['search_results'][$title] = array(\n\t\t\t\t\t'title' => $title,\n\t\t\t\t\t'relevance' => $relevance++,\n\t\t\t\t\t'snippet' => str_replace('class=\\'searchmatch\\'', 'class=\"highlight\"', un_htmlspecialchars($result->fetch('@snippet'))),\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}",
"public function search()\n {\n // Start calculating the execution time.\n $start = microtime(true);\n\n $query = Document::sanitize(Input::get('query'));\n\n // Validate the input.\n $validator = Validator::make([\n 'query' => $query,\n ], [\n 'query' => 'required|min:4'\n ]);\n\n // Check the validation.\n if ($validator->fails())\n {\n return Redirect::home()->with('error_message', 'الرجاء إدخال كلمة البحث و التي لا تقل عن 3 أحرف.');\n }\n\n // Other than that, everything is great.\n // TODO: Maybe rank them then order them by the ranking.\n $results = Document::whereRaw('MATCH(title, content) AGAINST(?)', [$query])->get();\n\n if ($results->count() == 0)\n {\n return Redirect::home()->with('warning_message', 'لم يتم العثور على نتائج لبحثك.');\n }\n\n $keywords = explode(' ', $query);\n\n $finish = microtime(true);\n\n $taken_time = round(($finish-$start), 3);\n\n // If there is at least one result, show it.\n return View::make('pages.search')->with(compact('results', 'query', 'keywords', 'taken_time'));\n }",
"public function search()\n {\n\n }",
"public function search()\n {\n\n }",
"public function search_tag_by_key($info, $tag, $history, &$result)\n {\n }",
"public function getHistory()\n {\n if (0 == $this->_getCollection()->getSize()) {\n return false;\n }\n return $this->_collection;\n }",
"public function getHistory()\n {\n if (0 == $this->_getCollection()->getSize()) {\n return false;\n }\n return $this->_collection;\n }",
"public function getHistory()\n {\n return $this->history;\n }",
"public function getSearch();",
"public function indexCrawledDocuments() {\n\t\twhile ( $document = $this->oDbr->fetchObject( $this->documentsDb ) ) {\n\t\t\t$this->count++;\n\t\t\tif ( !$this->oMainControl->bCommandLineMode ) set_time_limit( $this->iTimeLimit );\n\n\t\t\tif ( $this->doesLinkedPathFilterMatch( $document->el_to ) ) continue;\n\n\t\t\t$path = urldecode( $document->el_to );\n\t\t\t$path = str_replace( \"file:///\", \"\", $path );\n\t\t\t$fileInfo = new SplFileInfo( $path );\n\t\t\tif ( !$fileInfo->isFile() ) continue;\n\n\t\t\t$filename = explode( '/', $path );\n\t\t\t$filename = array_pop( $filename );\n\n\t\t\tif ( $this->sizeExceedsMaxDocSize( $fileInfo->getSize(), $filename ) ) continue;\n\n\t\t\t$ext = preg_split( '#[/\\\\.]+#', $path );\n\t\t\t$ext = strtolower( array_pop( $ext ) );\n\t\t\t$docType = $this->mimeDecoding( $ext ); // really needed for file extensions? or is it a relict from mw images (repo)\n\t\t\tif ( !$this->checkDocType( $docType, $filename ) ) continue;\n\n\t\t\t$time = @filemtime( urldecode( $path ) );\n\t\t\t$date = date( \"YmdHis\", $time );\n\n\t\t\tif ( $this->checkExistence( $path, 'external', $date, $filename ) ) continue;\n\n\t\t\t$fileRealPath = $fileInfo->getRealPath();\n\t\t\t$fileText = $this->getFileText( $fileRealPath, $filename );\n\t\t\t$doc = $this->makeLinkedDocument( $docType, $filename, $fileText, $path, $date );\n\t\t\t$this->writeLog( $path );\n\t\t\tif ( $doc ) {\n\t\t\t\t// mode and ERROR_MSG_KEY are only passed for the case when addDocument fails\n\t\t\t\t$this->oMainControl->addDocument( $doc, $this->mode, self::S_ERROR_MSG_KEY );\n\t\t\t}\n\t\t}\n\t}",
"public function getSearchIndex();",
"public static function search () {\n\t\trequire_once ('apps/wiki/lib/markdown.php');\n\t\trequire_once ('apps/wiki/lib/Functions.php');\n\n\t\t$pages = self::query ()\n\t\t\t->fetch_orig ();\n\t\t\n\t\tforeach ($pages as $i => $page) {\n\t\t\t$url = 'wiki/' . $page->id;\n\t\t\tif (! Search::add (\n\t\t\t\t'wiki/' . $page->id,\n\t\t\t\tarray (\n\t\t\t\t\t'title' => str_replace ('-', ' ', $page->id),\n\t\t\t\t\t'text' => wiki_parse_body ($page->body),\n\t\t\t\t\t'url' => '/wiki/' . $page->id\n\t\t\t\t)\n\t\t\t)) {\n\t\t\t\treturn array (false, $i);\n\t\t\t}\n\t\t}\n\t\treturn array (true, count ($pages));\n\t}",
"function fullTextSearch($client, $html, $query)\n{\n if ($html) {echo \"<h2>Documents containing $query</h2>\\n\";}\n\n $feed = $client->getDocumentListFeed(\n 'https://docs.google.com/feeds/documents/private/full?q=' . $query);\n\n printDocumentsFeed($feed, $html);\n}",
"public function searchKeyword (){\n $this->res = $this->daoJson->searchKeywordDate($this->keyword, $this->from, $this->to);\n }",
"function action_history()\n{\n\tglobal $pagestore, $page, $full, $HistMax;\n\n\t$history = $pagestore->history($page);\n\n\tgen_headers($history[0][0]);\n\n\n\t$text = '';\n\t$latest_auth = '';\n\t$previous_ver = 0;\n\t$is_latest = 1;\n\n\tfor($i = 0; $i < count($history); $i++)\n\t{\n\t\tif($latest_auth == '')\n\t\t{\n\t\t\t$latest_auth = ($history[$i][3] == '' ? $history[$i][1]\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: $history[$i][3]);\n\t\t\t$latest_ver = $history[$i][2];\n\t\t}\n\n\t\tif($previous_ver == 0\n\t\t\t && $latest_auth != ($history[$i][3] == '' ? $history[$i][1]\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t : $history[$i][3]))\n\t\t\t{ $previous_ver = $history[$i][2]; }\n\n\t\tif($i < $HistMax || $full)\n\t\t{\n\t\t\t$text = $text . html_history_entry($page, $history[$i][2],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $history[$i][0], $history[$i][1],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $history[$i][3],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $previous_ver == $history[$i][2] || !$full && $i == count($history)-1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $is_latest, $history[$i][4]);\n\t\t}\n\n\t\t$is_latest = 0;\n\t}\n\n\tif($i >= $HistMax && !$full)\n\t\t{ $text = $text . html_fullhistory($page, count($history)); }\n\n\t$p1 = $pagestore->page($page);\n\t$p1->version = $previous_ver;\n\t$p2 = $pagestore->page($page);\n\t$p2->version = $latest_ver;\n\n\t$diff = diff_compute($p1->read(), $p2->read());\n\ttemplate_history(array('page' => $p2->as_array(),\n\t\t\t\t\t\t\t\t\t\t\t\t 'history' => $text,\n\t\t\t\t\t\t\t\t\t\t\t\t 'diff' => diff_parse($diff)));\n}",
"public function SearchRecord()\n {\n $this->UpdateActiveRecord(null);\n $this->m_QueryONRender = false;\n $this->SetDisplayMode(MODE_Q);\n return $this->ReRender(true,false);\n }",
"public function search(){\n\t\t$data = array();\n\t\t$pageIndex = $_POST['pageIndex'];\n\n\t\t$dataProcess = new DataProcess($_POST['ticketNumber'],\n\t\t\t$_POST['passengerName'],\n\t\t\t$_POST['rloc'],\n\t\t\t$_POST['fromDate'],\n\t\t\t$_POST['toDate'],\n\t\t\t$_POST['systemName']);\n\n\t\t$query = Document::query();\n\t\t$dataProcess->getQuery($query);\n\t\t$totalRecord = $query->count();\n\t\t$totalPage = ceil($totalRecord/$this->recordPerPage);\n\t\t$pageIndex = $pageIndex - 1; \n\t\t$model = $query->orderBy('dateString', 'asc')->orderBy('documents_id', 'asc')->skip($pageIndex * $this->recordPerPage)->take($this->recordPerPage)->get();\n\t\t//$model = $query->orderBy('dateString', 'asc')->orderBy('paxName', 'asc')->skip(1)->take(2)->get();\n\n\t\t$index = 0;\n\t\t/* If model only has one record, check if it's the first or last record within the same systemName to determine which prev/next button to enable or disable\n\t\t * If more than one model, next-record/prev-record button will be enabled\n\t\t */\n\t\tif(sizeof($model) == 1){\n\t\t\t$systemName = $model[0]->systemName; //Gets the systemName\n\n\t\t\tif(($dataProcess->getNewFromDate() != null) && ($dataProcess->getNewToDate() != null)){\n\t\t\t\t// If\n\t\t\t\t$getAllModel = Document::whereBetween('dateString', array($dataProcess->getNewFromDate(), $dataProcess->getNewToDate()))->where('systemName', '=', $systemName)->orderBy('documents_id', 'asc')->get();\n\t\t\t}else{\n\t\t\t\t//Getting all the same system number and stores the tickets in an array to find the max ticketNumber\n\t\t\t\t$getAllModel = Document::where('systemName', '=', $systemName)->orderBy('documents_id', 'asc')->get();\n\t\t\t}\n\n\t\t\t// $index variable to store the location of the current ticketNumber\n\t\t\t// Using this variable to locate the next ticketNumber in row\n\t\t\t$index = 0;\n\t\t\t$allIndex = [];\n\t\t\tif(sizeof($getAllModel) > 0){\n\t\t\t\tforeach($getAllModel as $key => $value){\n\t\t\t\t\tif(($value->ticketNumber) == $dataProcess->getTicketNumber()){\n\t\t\t\t\t\t$index = $key;\n\t\t\t\t\t}\n\t\t\t\t\t$allIndex[] = $key;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$maxIndex = max($allIndex); //Check the max index\n\t\t\t$minIndex = min($allIndex); //Check the min index usually 0\n\n\t\t\tif($minIndex == $maxIndex){\n\t\t\t\t$data[$index]['disable-both'] = 'disable-both';\n\t\t\t}else if($index == $maxIndex){\n\t\t\t\t$data[$index]['disable-next'] = 'disable-next';\n\t\t\t}else if($index == $minIndex){\n\t\t\t\t$data[$index]['disable-prev'] = 'disable-prev';\n\t\t\t}\n\n\t\t\t$data[$index]['content'] = $model[0]['fileContent'];\n\t\t\t$data[$index]['dateOfFile'] = $model[0]['dateOfFile'];\n\t\t\t$data[$index]['paxName'] = $model[0]['paxName'];\n\t\t\t$data[$index]['airlineName'] = $model[0]['airlineName'];\n\t\t\t$data[$index]['systemName'] = $model[0]['systemName'];\n\t\t\t$data[$index]['ticketNumber'] = $model[0]['ticketNumber'];\n\n\t\t\t$comments = array();\n\t\t\t$notes = Note::where('ticketNumber','=',$model[0]['ticketNumber'])->get();\n\t\t\tforeach ($notes as $key => $value) {\n\t\t\t\t$comments[$key]['time'] = $value->created_at->toDateTimeString();\n\t\t\t\t$comments[$key]['content'] = $value->note;\n\t\t\t}\n\t\t\t$data[$index]['comments'] = $comments;\n\t\t\tif( sizeof($comments) > 0){\n\t\t\t\t$data[$index]['hasComment'] = \"<span class='has-comment'>*R*</span>\";\n\t\t\t}else{\n\t\t\t\t$data[$index]['hasComment'] = \"\";\n\t\t\t}\n\t\t\tif(!$_POST['ticketNumber']){\n\t\t\t\t$data[$index]['disable-both'] = 'disable-both';\n\t\t\t}\n\t\t}else if(sizeof($model)>1){\n\t\t\tforeach ($model as $key => $value) {\n\t\t\t\t$data[$index]['content'] = $value->fileContent;\n\t\t\t\t$data[$index]['dateOfFile'] = $value->dateOfFile;\n\t\t\t\t$data[$index]['paxName'] = $value->paxName;\n\t\t\t\t$data[$index]['airlineName'] = $value->airlineName;\n\t\t\t\t$data[$index]['systemName'] = $value->systemName;\n\t\t\t\t\n\t\t\t\t$comments = array();\n\t\t\t\t$notes = Note::where('ticketNumber','=',$value->ticketNumber)->get();\n\t\t\t\tforeach ($notes as $key => $value) {\n\t\t\t\t\t$comments[$key]['time'] = $value->created_at->toDateTimeString();\n\t\t\t\t\t$comments[$key]['content'] = $value->note;\n\t\t\t\t}\n\t\t\t\t$data[$index]['comments'] = $comments;\n\t\t\t\tif( sizeof($comments) > 0){\n\t\t\t\t\t$data[$index]['hasComment'] = \"<span class='has-comment'>*R*</span>\";\n\t\t\t\t}else{\n\t\t\t\t\t$data[$index]['hasComment'] = \"\";\n\t\t\t\t}\n\t\t\t\t$index++;\n\t\t\t}\n\t\t\t\n\t\t\t$data[0]['totalPage'] = $totalPage;\n\t\t\t$data[0]['totalRecord'] = $totalRecord;\n\t\t\t\n\t\t\t//$document = $model[0]->getAttributes();\n\t\t\t//$data['content'] = $document['fileContent']; \t\n\t\t}else{\n\t\t\t$data['error'] = \"Sorry, the document doesn't exist or hasn't been updated. Please click the 'Update' Button and try again.\";\n\t\t}\n\n\t\techo json_encode($data);\n\t}",
"public function event_history(/* ... */)\n {\n return $this->_event_history;\n }",
"public function get_history()\n\t{\n return array(\n 'result' => array(\n 'error' => array(\n 'code' => '404',\n 'message' => 'Not Found'\n )\n )\n );\n\t}",
"public function searchAction() {\n $search = $this->getParam('search');\n\n\n $queryBuilder = new Application_Util_QueryBuilder($this->getLogger());\n\n $queryBuilderInput = array(\n 'searchtype' => 'simple',\n 'start' => '0',\n 'rows' => '10',\n 'sortOrder' => 'desc',\n 'sortField'=> 'score',\n 'docId' => null,\n 'query' => $search,\n 'author' => '',\n 'modifier' => 'contains_all',\n 'title' => '',\n 'titlemodifier' => 'contains_all',\n 'persons' => '',\n 'personsmodifier' => 'contains_all',\n 'referee' => '',\n 'refereemodifier' => 'contains_all',\n 'abstract' => '',\n 'abstractmodifier' => 'contains_all',\n 'fulltext' => '',\n 'fulltextmodifier' => 'contains_all',\n 'year' => '',\n 'yearmodifier' => 'contains_all',\n 'author_facetfq' => '',\n 'languagefq' => '',\n 'yearfq' => '',\n 'doctypefq' => '',\n 'has_fulltextfq' => '',\n 'belongs_to_bibliographyfq' => '',\n 'subjectfq' => '',\n 'institutefq' => ''\n );\n\n\n $query = $queryBuilder->createSearchQuery($queryBuilderInput, $this->getLogger());\n\n $result = array();\n\n $searcher = new Opus_SolrSearch_Searcher();\n try {\n $result = $searcher->search($query);\n }\n catch (Opus_SolrSearch_Exception $ex) {\n var_dump($ex);\n }\n\n $matches = $result->getReturnedMatches();\n\n $this->view->total = $result->getAllMatchesCount();\n $this->view->matches = $matches;\n }",
"private function search_bar()\n\t{\n\n\t\t# code...\n\t}",
"public function updatingSearch()\n {\n $this->gotoPage(1);\n }",
"public function func_search() {}",
"public function searchAction()\n {\n $search = $this->createSearchObject();\n $result = $search->searchWord($this->view->word);\n $this->view->assign($result);\n\n if (Model_Query::$debug) {\n $this->view->actionTrace = [\n 'action' => sprintf('%s::searchWord()', get_class($search)),\n 'result' => $result,\n ];\n\n $this->view->queryTrace = Model_Query::$trace;\n }\n\n }",
"public function searchTweets (){\n $this->tweets = $this->daoJson->searchTweetsKeywordDate($this->keyword, $this->from, $this->to); \n }",
"public function getSearchResults() {\n\t\t\n\t\t$pages = array();\n\t\n\t\tif ($query = Core\\Request::query('query')) {\n\t\t\n\t\t\t$collection = $this->Automad->getCollection();\n\t\t\n\t\t\tif (array_key_exists($query, $collection)) {\n\t\t\t\n\t\t\t\t// If $query matches an actual URL of an existing page, just get that page to be the only match in the $pages array.\n\t\t\t\t// Since $pages has only one element, the request gets directly redirected to the edit page (see below).\n\t\t\t\t$pages = array($this->Automad->getPage($query));\n\t\t\t\t\t\t\t\n\t\t\t} else {\n\t\t\t\n\t\t\t\t$Selection = new Core\\Selection($collection);\n\t\t\t\t$Selection->filterByKeywords($query);\n\t\t\t\t$Selection->sortPages(AM_KEY_MTIME . ' desc');\n\t\t\t\t$pages = $Selection->getSelection(false);\n\t\t\t\n\t\t\t}\n\t\n\t\t\t// Redirect to edit mode for a single result or in case $query represents an actually existing URL.\n\t\t\tif (count($pages) == 1) {\n\t\t\t\t$Page = reset($pages);\n\t\t\t\theader('Location: ' . AM_BASE_INDEX . AM_PAGE_DASHBOARD . '?context=edit_page&url=' . urlencode($Page->origUrl));\n\t\t\t\tdie;\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\treturn $pages;\n\t\t\n\t}",
"public function search() {\n\t\tif(isset($_GET['query'])) $this->query_str = $_GET['query'];\n\t\telse return;\n\n\t\t$raw = null;\n\n\t\t$cache = new Cache($this->query_str);\n\t\t//check if the result is cached\n\t\t\n\t\tif($cache->allow_cache()) {\n\t\t\t$raw = $cache->load_cache();\n\t\t\tif($raw === false) $raw = null;\n\t\t}\n\n\t\tif($raw === null) {\n\t\t\t//check if jar exists\n\t\t\tif(file_exists('../executable/app.jar')) $raw = shell_exec('cd ../executable/ && java -jar app.jar search ' . escapeshellarg($this->query_str));\n\t\t\telse return;\n\n\t\t\t//only save into cached when the escaped string equal to input string\n\t\t\tif($raw !== null && count($raw) > 0 && $cache->allow_cache()) \n\t\t\t\t$cache->save_cache($raw);\n\t\t}\n\n\t\t$this->results = json_decode($raw);\n\n\t\t$this->end_time = microtime(true);\n\t}",
"public function search() {\n if (!isset($this->params['searchText'])) {\n DooUriRouter::redirect(Doo::conf()->APP_URL);\n return FALSE;\n }\n $blog = new News();\n\n $data['title'] = $this->__('Search results');\n $data['body_class'] = 'index_news';\n $data['selected_menu'] = 'news';\n $data['left'] = PlayerHelper::playerLeftSide();\n $data['right'] = PlayerHelper::playerRightSide();\n\n $list = array();\n $this->appendCategories($list, $news, false);\n\n //crumb adding\n $this->addCrumb($this->__('Search results'));\n $list['crumb'] = $this->getCrumb();\n\n $totalResults = $news->getSearchTotal(urldecode($this->params['searchText']));\n $pager = $this->appendPagination($list, new stdClass(), $totalResults > 0 ? $totalResults : 1, MainHelper::site_url('news/search/' . urlencode($this->params['searchText'])));\n\n $list['hideHeader'] = true;\n $list['searchText'] = urldecode($this->params['searchText']);\n $list['resultCount'] = $totalResults;\n $list['newsList'] = $news->getSearch(urldecode($this->params['searchText']), $pager->limit);\n\n $data['content'] = $this->renderBlock('news/searchResults', $list);\n\n $data['footer'] = MainHelper::bottomMenu();\n $data['header'] = MainHelper::topMenu();\n $this->render3Cols($data);\n }",
"public function run()\r\r\n\t{\r\r\n\t\t$arrPages = array();\r\r\n\t\t$strCache = md5('search_index' . session_id());\r\r\n\r\r\n\t\t// Get cache file\r\r\n\t\tif (file_exists(TL_ROOT . '/system/tmp/' . $strCache))\r\r\n\t\t{\r\r\n\t\t\t$objFile = new File('system/tmp/' . $strCache);\r\r\n\r\r\n\t\t\tif ($objFile->mtime < time() + 3600)\r\r\n\t\t\t{\r\r\n\t\t\t\t$arrPages = deserialize($objFile->getContent());\r\r\n\t\t\t}\r\r\n\t\t}\r\r\n\r\r\n\t\t// Get all searchable pages\r\r\n\t\tif (count($arrPages) < 1)\r\r\n\t\t{\r\r\n\t\t\t$arrPages = $this->getSearchablePages();\r\r\n\r\r\n\t\t\t// HOOK: take additional pages\r\r\n\t\t\tif (array_key_exists('getSearchablePages', $GLOBALS['TL_HOOKS']) && is_array($GLOBALS['TL_HOOKS']['getSearchablePages']))\r\r\n\t\t\t{\r\r\n\t\t\t\tforeach ($GLOBALS['TL_HOOKS']['getSearchablePages'] as $callback)\r\r\n\t\t\t\t{\r\r\n\t\t\t\t\t$this->import($callback[0]);\r\r\n\t\t\t\t\t$arrPages = $this->$callback[0]->$callback[1]($arrPages);\r\r\n\t\t\t\t}\r\r\n\t\t\t}\r\r\n\r\r\n\t\t\t$objFile = new File('system/tmp/' . $strCache);\r\r\n\t\t\t$objFile->write(serialize($arrPages));\r\r\n\t\t\t$objFile->close();\r\r\n\t\t}\r\r\n\r\r\n\t\t$intStart = $this->Input->get('start') ? $this->Input->get('start') : 0;\r\r\n\t\t$intPages = $this->Input->get('ppc') ? $this->Input->get('ppc') : 10;\r\r\n\r\r\n\t\t// Rebuild search index\r\r\n\t\tif ($intPages && count($arrPages))\r\r\n\t\t{\r\r\n\t\t\t$this->import('Search');\r\r\n\r\r\n\t\t\tif ($intStart < 1)\r\r\n\t\t\t{\r\r\n\t\t\t\t$this->Database->execute(\"TRUNCATE TABLE tl_search\");\r\r\n\t\t\t\t$this->Database->execute(\"TRUNCATE TABLE tl_search_index\");\r\r\n\t\t\t\t$this->Database->execute(\"TRUNCATE TABLE tl_cache\");\r\r\n\t\t\t}\r\r\n\r\r\n\t\t\techo '<div style=\"font-family:Verdana, sans-serif; font-size:11px; line-height:16px; margin-bottom:12px;\">';\r\r\n\r\r\n\t\t\tfor ($i=$intStart; $i<$intStart+$intPages && $i<count($arrPages); $i++)\r\r\n\t\t\t{\r\r\n\t\t\t\techo 'File <strong>' . $arrPages[$i] . '</strong> has been indexed<br />';\r\r\n\r\r\n\t\t\t\t$objRequest = new Request();\r\r\n\t\t\t\t$objRequest->send($this->Environment->base . $arrPages[$i]);\r\r\n\t\t\t}\r\r\n\r\r\n\t\t\techo '<div style=\"margin-top:12px;\">';\r\r\n\r\r\n\t\t\t// Redirect to the next cycle\r\r\n\t\t\tif ($i < (count($arrPages) - 1))\r\r\n\t\t\t{\r\r\n\t\t\t\t$url = $this->Environment->base . 'typolight/indexer.php?start=' . ($intStart + $intPages) . '&ppc=' . $intPages;\r\r\n\r\r\n\t\t\t\techo '<script type=\"text/javascript\">setTimeout(\\'window.location=\"' . $url . '\"\\', 1000);</script>';\r\r\n\t\t\t\techo '<a href=\"' . $url . '\">Please click here to proceed if you are not using JavaScript</a>';\r\r\n\t\t\t}\r\r\n\r\r\n\t\t\t// Redirect back home\r\r\n\t\t\telse\r\r\n\t\t\t{\r\r\n\t\t\t\t$url = $this->Environment->base . 'typolight/main.php?do=maintenance';\r\r\n\r\r\n\t\t\t\t// Delete temporary file\r\r\n\t\t\t\t$objFile = new File('system/tmp/' . $strCache);\r\r\n\t\t\t\t$objFile->delete();\r\r\n\t\t\t\t$objFile->close();\r\r\n\r\r\n\t\t\t\techo '<script type=\"text/javascript\">setTimeout(\\'window.location=\"' . $url . '\"\\', 1000);</script>';\r\r\n\t\t\t\techo '<a href=\"' . $url . '\">Please click here to proceed if you are not using JavaScript</a>';\r\r\n\t\t\t}\r\r\n\r\r\n\t\t\techo '</div></div>';\r\r\n\t\t}\r\r\n\t}",
"public function actionHistory()\n {\n /*$auditdata = AuditTrailSearch::find()\n ->select(['entry_id', 'model_id', 'user_id', 'created', 'old_value'])\n ->where([\n 'action' => 'DELETE',\n 'model' => 'backend\\models\\Event',\n ])\n ->andFilterWhere(['>', 'old_value', \"''\"])\n ->orderBy(['model_id' => SORT_DESC])\n ->all();*/\n// $historyData = \\yii\\helpers\\ArrayHelper::map($auditdata, 'model_id', 'old_value');\n// \\yii\\helpers\\VarDumper::dump($historyData);\n\n $searchModel = new AuditTrailSearch;\n $searchFilter = [\n 'AuditTrailSearch' => [\n 'action' => 'DELETE',\n 'model' => 'backend\\models\\Event'\n ]\n ];\n $dataProvider = $searchModel->search(\\yii\\helpers\\ArrayHelper::merge(Yii::$app->request->get(), $searchFilter));\n //var_dump(Yii::$app->request->get());\n //\\yii\\helpers\\VarDumper::dump($searchModel);\n $message = \"<ol>恢复操作指引<li><删除内容>中输入内容筛选</li><li>点击复选框选中需要恢复的记录</li><li>点击<恢复记录>按钮</li></ol>\";\n Yii::$app->session->setFlash('info', $message);\n return $this->render('history', [\n 'dataProvider' => $dataProvider,\n 'searchModel' => $searchModel,\n ]);\n }",
"public function searchWithCriteria(){\n\n\n //change default message for required rule\n $this->unsetSessionData();\n $this->setSessionData();\n\n\n if(isset($_SESSION['searchKeyword']) && isset($_SESSION['timecon'])){\n $this->searchByLocationAndDay();\n }else if(isset($_SESSION['searchKeyword']) && isset($_SESSION['timecon'])==FALSE){\n $this->searchByLocation();\n }else if(isset($_SESSION['searchKeyword'])==FALSE && isset($_SESSION['timecon'])){\n $this->searchByCalendar();\n }\n }",
"protected function doIndexDocument() {\n if ($this->showRecordInSearch())\n {\n $this->service->index($this->owner);\n }\n }",
"public function cmn_history()\r\n\t{\r\n $content = $this->input->get(\"content\") ? trim($this->input->get(\"content\", TRUE)) : \"\";\r\n $start = $this->input->get(\"start\") ? trim($this->input->get(\"start\", TRUE)) : \"\";\r\n $end = $this->input->get(\"end\") ? trim($this->input->get(\"end\", TRUE)) : \"\";\r\n $date_arr = \"\";\r\n if (! empty($start) || ! empty($end))\r\n {\r\n $this->load->helper(\"common\");\r\n $date_arr = make_date_start_before_end($start, $end);\r\n }\r\n\r\n\t\t$limit = $this->_get_limit();\r\n\t\t$history = $this->model->get_cmn_history($limit, $content, $date_arr);\r\n\r\n\t\tif ( empty($history))\r\n\t\t\t$this->meret(NULL, MERET_EMPTY);\r\n\t\telse\r\n\t\t\t$this->meret($history);\r\n\t}",
"#[Pure]\n public function getHistory() {}",
"private function get_results() {\n $cache = new SearchCache();\n\n if ($this->cache and $cache->can_cache()) {\n if (!($resultdocs = $cache->cache($this->term))) {\n $resultdocs = $this->process_results();\n //cache the results so we don't have to compute this on every page-load\n $cache->cache($this->term, $resultdocs);\n //print \"Using new results.\";\n } else {\n //There was something in the cache, so we're using that to save time\n //print \"Using cached results.\";\n } \n } else {\n //no caching :(\n //print \"Caching disabled!\";\n $resultdocs = $this->process_results();\n } \n return $resultdocs;\n }",
"protected function parse_search(&$q)\n {\n }",
"public function getLogHistory() {\n\t\treturn $this->log;\n\t}",
"public static function search() {\r\n $result = lC_Default::find($_GET['q']);\r\n\r\n echo $result;\r\n }",
"public function actionHistory()\n {\n $this->pageTitle = 'Your Viewing History';\n\n $data['pageHistory'] = History::model()->all('page');\n $data['pdfHistory'] = History::model()->all('pdf');\n\n $this->render('//content/history', $data);\n }",
"function findCurrentTweets();",
"public function indexCrawledDocuments() {\n\t\tforeach ( $this->aFiles as $sFile ) {\n\t\t\t$oRepoFile = new SplFileInfo( $sFile );\n\t\t\tif ( !$oRepoFile->isFile() ) continue;\n\n\t\t\t$sFileName = $oRepoFile->getFilename();\n\t\t\t$sDocType = $this->mimeDecoding( $oRepoFile->getExtension() );\n\t\t\tif ( !$this->checkDocType( $sDocType, $sFileName ) ) continue;\n\n\t\t\tif ( !$this->oMainControl->bCommandLineMode ) set_time_limit( $this->iTimeLimit );\n\n\t\t\tif ( $this->sizeExceedsMaxDocSize( $oRepoFile->getSize(), $sFileName ) ) continue;\n\n\t\t\t//Insert URL to Filename\n\t\t\t$rURL = BsConfig::get( 'MW::ExtendedSearch::ExternalRepo' );\n\t\t\t$sURL = BsConfig::get( 'MW::ExtendedSearch::ExternalRepoUrl' );\n\t\t\t//Replace realpath with webserver url only if $sUrl is set, otherwise work as before\n\t\t\tif($sURL == \"\"){\n\t\t\t $sRepoFileRealPath = \"file:///\" . $oRepoFile->getRealPath();\n\t\t\t}else{\n\t\t\t $sRepoFileRealPath = $this->getFilePath( $rURL, $sURL, $oRepoFile );\n\t\t\t}\n\n\t\t\t$timestampImage = wfTimestamp( TS_ISO_8601, $oRepoFile->getMTime() );\n\n\t\t\tif ( $this->checkExistence( $oRepoFile->getRealPath(), 'external', $timestampImage, $sFileName ) ) continue;\n\n\t\t\t$text = $this->getFileText( $oRepoFile->getRealPath(), $sFileName );\n\n\t\t\t$doc = $this->makeRepoDocument( $sDocType, utf8_encode( $sFileName ), $text, utf8_encode( $sRepoFileRealPath ), $timestampImage );\n\t\t\t$this->writeLog( $sFileName );\n\n\t\t\twfRunHooks( 'BSExtendedSearchBeforeAddExternalFile', array( $this, $oRepoFile, &$doc ) );\n\n\t\t\tif ( $doc ) {\n\t\t\t\t// mode and ERROR_MSG_KEY are only passed for the case when addsFile fails\n\t\t\t\t$this->oMainControl->addDocument( $doc, $this->mode, self::S_ERROR_MSG_KEY );\n\t\t\t}\n\t\t}\n\t}",
"public function search(){ \n\t\t$this->layout = false;\t \n\t\t$q = trim(Sanitize::escape($_GET['q']));\t\n\t\tif(!empty($q)){\n\t\t\t// execute only when the search keywork has value\t\t\n\t\t\t$this->set('keyword', $q);\n\t\t\t$data = $this->BdSpoc->find('all', array('fields' => array('HrEmployee.first_name'),\n\t\t\t'group' => array('first_name'), 'conditions' => \tarray(\"OR\" => array ('first_name like' => '%'.$q.'%'),\n\t\t\t'AND' => array('HrEmployee.status' => '1', 'HrEmployee.is_deleted' => 'N','BdSpoc.is_deleted' => 'N'))));\t\t\n\t\t\t$this->set('results', $data);\n\t\t}\n }",
"public function indexAction() {\n $locationLog = getcwd() . \"/public/static/performance/home\" . $this->userInfo[\"username\"] . date(\"Y-m-d\") . \".log\";\n $message = \" \\n ======================================== \\n\";\n if ($this->getRequest()->isPost()){\n $message .= \"[\" . date(\"Y-m-d H:i:s\") . \" \" . end(explode(\".\", microtime(true))) . \"][Start search in home screen]\\n\"; \n } else {\n $message .= \"[\" . date(\"Y-m-d H:i:s\") . \" \" . end(explode(\".\", microtime(true))) . \"][Start action home]\\n\"; \n }\n if (\\Application\\Utils\\ApplicationConst::DEBUG) @error_log($message, 3, $locationLog);\n \n try {\n $currentUrl = $this->getRequest()->getRequestUri();\n $request = $this->getRequest();\n $searchParams = null;\n $query = $this->params()->fromQuery();\n $filter = $this->params()->fromQuery('filter', 'new');\n $page = isset($query['page']) && intval($query['page']) > 1 ? intval($query['page']) : 1;\n $resultPerPage = ApplicationConst::RESULT_PER_PAGE;\n $userId = $this->userInfo['userId'];\n $referQuery = $this->getRequest()->getHeader('Referer') ? $this->getRequest()->getHeader('Referer')->uri()->getQueryAsArray() : null;\n $referPath = $this->getRequest()->getHeader('Referer') ? $this->getRequest()->getHeader('Referer')->uri()->getPath() : null;\n\n $isKeepPage = $referPath == '/'\n && ((!isset($referQuery['filter']) && $filter == 'new') || (isset($referQuery['filter']) && $referQuery['filter'] == $filter))\n && in_array($filter, array('new', 'access', 'deadline'));\n // keep search param\n if ($request->isPost()) {\n $searchParams = $this->params()->fromPost();\n $searchParams['searchText'] = trim($searchParams['searchText']);\n $searchParams['searchBoxStatus'] = !empty($searchParams['searchBoxStatus']) ? $searchParams['searchBoxStatus'] : 'box0';\n PrivateSession::setData('homeSearchParams', json_encode($searchParams));\n\n $currentUrl = $this->replacePage($currentUrl, $page, 1);\n return $this->redirect()->toUrl($currentUrl);\n } elseif ($isKeepPage){\n $searchParams = !PrivateSession::isEmpty('homeSearchParams') ? json_decode(PrivateSession::getData('homeSearchParams'), true) : null;\n } else {\n PrivateSession::clear('homeSearchParams');\n }\n\n list($data, $totalPages, $totalResults) = $this->homeService->queryPublishPolicies($searchParams, $filter, $page, $resultPerPage, $userId);\n\n if ($totalPages >= 1 && $page > $totalPages) {\n $currentUrl = $this->replacePage($currentUrl, $page, $totalPages);\n\n return $this->redirect()->toUrl($currentUrl);\n }\n\n $allAttributes = $this->homeService->getAllAttributes();\n $searchAttributes = array();\n foreach ($allAttributes as $row) {\n $attributes[\"id\"] = $row[\"id\"];\n $attributes[\"value\"] = $row[\"valueOfSearch\"];\n $searchAttributes[$row[\"attributeType\"]][] = $attributes;\n }\n\n $searchHistories = $this->homeService->getListHistories($this->userInfo['userId']);\n\n $errorMsg = $this->flashMessenger()->hasErrorMessages() ? $this->flashMessenger()->getErrorMessages()[0] : null;\n\n $this->viewModel->setVariables(array(\n 'username' => $this->userInfo['username'],\n 'data' => $data,\n 'totalPages' => $totalPages,\n 'totalResults' => $totalResults,\n 'page' => $page,\n 'resultPerPage' => $resultPerPage,\n 'currentUrl' => $currentUrl,\n 'filter' => $filter,\n 'searchAttributes' => $searchAttributes,\n 'searchParams' => $searchParams,\n 'searchHistories' => $searchHistories,\n 'errorMsg' => $errorMsg,\n 'translator' => $this->getMessages(),\n ));\n \n if (!empty($searchParams)){\n $message = \"[\" . date(\"Y-m-d H:i:s\") . \" \" . end(explode(\".\", microtime(true))) . \"][Stop search in home screen]\\n\";\n } else {\n $message = \"[\" . date(\"Y-m-d H:i:s\") . \" \" . end(explode(\".\", microtime(true))) . \"][Stop action home]\\n\";\n }\n \n if (\\Application\\Utils\\ApplicationConst::DEBUG) @error_log($message, 3, $locationLog);\n }catch (\\Exception $ex){\n throw $ex;\n }\n return $this->viewModel;\n }",
"public function search() {\n if (!Request::get('s')) {\n return view('home.layout');\n }\n\n SearchHistory::record_user_search(\n Request::get('s'),\n Auth::user() ? Auth::user()->id : -1\n );\n\n return view('search.layout', [\n 'results' => $this->get_search_results(\n Request::get('s')\n )\n ]);\n }",
"protected function search()\n\t{\n\t\treturn Phpfox::getLib('search');\t\n\t}",
"public function search()\n\t{\n\t\treturn self::extraSearch($this);\n\t}",
"public function canShowHistory() {}",
"public function actionCron_jobs_history()\n {\n $request = Yii::app()->request;\n $model = new ConsoleCommandListHistory('search');\n $model->unsetAttributes();\n\n $model->attributes = (array)$request->getQuery($model->modelName, array());\n \n $this->setData(array(\n 'pageMetaTitle' => $this->data->pageMetaTitle . ' | '. Yii::t('cronjobs', 'View cron jobs history'),\n 'pageHeading' => Yii::t('cronjobs', 'View cron jobs history'),\n 'pageBreadcrumbs' => array(\n Yii::t('cronjobs', 'Cron jobs history'),\n )\n ));\n\n $this->render('cron-jobs-history', compact('model'));\n }",
"public function searchAction() {\n parent::searchAction();\n }",
"public function index()\n\t{\n $search = Input::get(\"search\");\n $from = date(\"Y-m-d H:i:s\",strtotime(Input::get(\"from\")) );\n $to = date(\"Y-m-d H:i:s\",strtotime(Input::get(\"to\")) );\n\n\t\t$documents = Document::orderBy('created_at','desc')->with('fromUnit')\n ->search($search)\n ->dateBetween($from,$to)\n ->paginate(5);\n\n\n\t\treturn View::make('documents.index', compact('documents'));\n\t}",
"public function search_lookbook() {\n\n\t\tif ( ! current_user_can( 'manage_woocommerce' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$keyword = isset($_GET['keyword'])? sanitize_text_field($_GET['keyword']):'';\n\n\t\tif ( empty( $keyword ) ) {\n\t\t\tdie();\n\t\t}\n\t\t$arg = array(\n\t\t\t'post_status' => 'publish',\n\t\t\t'post_type' => 'woocommerce-lookbook',\n\t\t\t'posts_per_page' => 50,\n\t\t\t's' => $keyword\n\n\t\t);\n\t\t$the_query = new WP_Query( $arg );\n\t\t$found_products = array();\n\t\tif ( $the_query->have_posts() ) {\n\t\t\twhile ( $the_query->have_posts() ) {\n\t\t\t\t$the_query->the_post();\n\n\t\t\t\t$product = array( 'id' => get_the_ID(), 'text' => get_the_title() );\n\t\t\t\t$found_products[] = $product;\n\t\t\t}\n\t\t}\n\t\twp_send_json( $found_products );\n\t\tdie;\n\t}",
"public function history()\n\t{\n\t\t$migration = new \\Hubzero\\Content\\Migration();\n\t\t$history = $migration->history();\n\t\t$items = [];\n\t\t$maxFile = 0;\n\t\t$maxUser = 0;\n\t\t$maxScope = 0;\n\n\n\t\tif ($history && count($history) > 0)\n\t\t{\n\t\t\t$items[] = [\n\t\t\t\t'File',\n\t\t\t\t'By',\n\t\t\t\t'Direction',\n\t\t\t\t'Date'\n\t\t\t];\n\n\t\t\tforeach ($history as $entry)\n\t\t\t{\n\t\t\t\t$items[] = [\n\t\t\t\t\t$entry->scope . DS . $entry->file,\n\t\t\t\t\t$entry->action_by,\n\t\t\t\t\t$entry->direction,\n\t\t\t\t\t$entry->date\n\t\t\t\t];\n\t\t\t}\n\n\t\t\t$this->output->addTable($items, true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->addLine('No history to display.');\n\t\t}\n\t}",
"function globalSearch()\n{\n global $app, $globalSettings;\n\n // TODO check search paramater?\n\n $filter = getFilter();\n $search = $app->request()->get('search');\n $tlb = $app->calibre->titlesSlice($globalSettings['lang'], 0, $globalSettings[PAGE_SIZE], $filter, trim($search));\n $tlb_books = array_map('checkThumbnail', $tlb['entries']);\n $tla = $app->calibre->authorsSlice(0, $globalSettings[PAGE_SIZE], trim($search));\n $tla_books = array_map('checkThumbnail', $tla['entries']);\n $tlt = $app->calibre->tagsSlice(0, $globalSettings[PAGE_SIZE], trim($search));\n $tlt_books = array_map('checkThumbnail', $tlt['entries']);\n $tls = $app->calibre->seriesSlice(0, $globalSettings[PAGE_SIZE], trim($search));\n $tls_books = array_map('checkThumbnail', $tls['entries']);\n $app->render('global_search.html', [\n 'page' => mkPage(getMessageString('pagination_search'), 0),\n 'books' => $tlb_books,\n 'books_total' => $tlb['total'] == -1 ? 0 : $tlb['total'],\n 'more_books' => ($tlb['total'] > $globalSettings[PAGE_SIZE]),\n 'authors' => $tla_books,\n 'authors_total' => $tla['total'] == -1 ? 0 : $tla['total'],\n 'more_authors' => ($tla['total'] > $globalSettings[PAGE_SIZE]),\n 'tags' => $tlt_books,\n 'tags_total' => $tlt['total'] == -1 ? 0 : $tlt['total'],\n 'more_tags' => ($tlt['total'] > $globalSettings[PAGE_SIZE]),\n 'series' => $tls_books,\n 'series_total' => $tls['total'] == -1 ? 0 : $tls['total'],\n 'more_series' => ($tls['total'] > $globalSettings[PAGE_SIZE]),\n 'search' => $search]);\n}",
"public function getHistory(): array\n {\n return $this->history;\n }",
"public function getHistory(): array\n {\n return $this->history;\n }",
"function search($expression) {\n $this->set_error('search is not implemented');\n return false;\n }",
"public function search_document($keyword)\n {\n try {\n if ($keyword == \"\") {\n return DB::table('study_document')\n ->join('user', 'study_document.id_lecturer', 'user.id')\n ->select('study_document.*', 'user.full_name as author')\n ->orderBy('created_at', 'desc');\n } else {\n return DB::table('study_document')\n ->join('user', 'study_document.id_lecturer', 'user.id')\n ->where(function ($query) use ($keyword) {\n $query->where('study_document.name', 'like', \"%$keyword%\")\n ->orWhere('user.full_name', 'like', \"%$keyword%\");\n })\n ->select('study_document.*', 'user.full_name as author')\n ->orderBy('created_at', 'desc');\n }\n } catch (\\Exception $ex) {\n return $ex;\n }\n }",
"public function get_history()\n {\n return view('content.history')\n ->with('pages', History::page_all())\n ->with('pdfs', History::pdf_all());\n }",
"public function scopeGetHistory($query, $model)\n {\n \t$class = class_basename(get_class($model));\n\n \treturn $query\n \t\t->where('type_id', $model->id)\n \t\t->where('type', $class);\n }",
"public function actionIndex() {\n\n if (($term = Yii::app()->getRequest()->getParam('s'))) {\n \n $index = new Zend_Search_Lucene(Yii::getPathOfAlias('application.' . $this->_indexFiles));\n Zend_Search_Lucene_Search_QueryParser::setDefaultEncoding(\"UTF-8\");\n $results = $index->find($term);\n $query = Zend_Search_Lucene_Search_QueryParser::parse($term);\n $dataProvider = new CArrayDataProvider($results, array(\n 'pagination' => array(\n 'pageSize' => 1,\n 'params'=>array('s'=>$term),\n ),\n ));\n \n \n $this->render('search', array('results' => $results, 'term' => $term, 'query' => $query, 'data' => $dataProvider));\n } else {\n $this->redirect(array('site/index'));\n }\n }",
"public function search() {\r\n //retrieve query terms from search form\r\n $query_terms = trim($_GET['query-terms']);\r\n\r\n //if search term is empty, list all vacations\r\n if ($query_terms == \"\") {\r\n $this->index();\r\n }\r\n\r\n //search the database for matching movies\r\n $vacations = $this->vacation_model->search_vacation($query_terms);\r\n\r\n if ($vacations === false) {\r\n //handle error\r\n $message = \"An error has occurred.\";\r\n $this->error($message);\r\n return;\r\n }\r\n //display matched movies\r\n $search = new VacationSearch();\r\n $search->display($query_terms, $vacations);\r\n }",
"public function is_search()\n {\n }",
"public function Search($objeto);",
"public function getSearch( $hash ) {\n $records = SearchRecord::find()\n ->where( ['hash' => $hash] )->one();\n return $records;\n\n }",
"public function initHistorys()\n\t{\n\t\t$this->collHistorys = array();\n\t}",
"public function search_history($merge = null) {\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->with = array('card0','host0', 'visitor0', 'company0','visitor1');\n\t\t//$criteria->with .= 'visitor0';\n\t\t$criteria->compare('CONCAT(visitor0.first_name, \\' \\', visitor0.last_name)', $this->visitor, true);\n\t\t$criteria->compare('visitor0.first_name', $this->firstname, true);\n\t\t$criteria->compare('visitor0.last_name', $this->lastname, true);\n\t\t$criteria->compare('visitor0.contact_number', $this->contactnumber, true);\n\t\t$criteria->compare('visitor0.email', $this->contactemail, true);\n\t\t$criteria->compare('date_check_in', $this->datecheckin1, true);\n\t\t$criteria->compare('company0.name', $this->company, true);\n\t\t$criteria->compare('card0.card_number', $this->cardnumber, true);\n\n\t\t$criteria->compare('t.id', $this->id, true);\n\t\t// $criteria->compare('visitor', $this->visitor, true);\n\t\t$criteria->compare('card', $this->card, true);\n\t\t$criteria->compare('card_type', $this->card_type, true);\n\t\t$criteria->compare('t.visitor_type', $this->visitor_type, true);\n\t\t$criteria->compare('reason', $this->reason, true);\n\t\t$criteria->compare('t.visitor_status', $this->visitor_status, true);\n\t\t$criteria->compare('host', $this->host, true);\n\t\t$criteria->compare('patient', $this->patient, true);\n\t\t$criteria->compare('created_by', $this->created_by, true);\n\n\t\t$criteria->compare('date_in', $this->date_in, true);\n\t\t//$criteria->compare(\"DATE_FORMAT(date_in,'%Y-%m-%d')\",$this->date_in);\n\n\t\t$criteria->compare('time_in', $this->time_in, true);\n\t\t$criteria->compare('date_out', $this->date_out, true);\n\t\t$criteria->compare('time_out', $this->time_out, true);\n\n\t\t// $criteria->compare('date_check_in', $this->date_check_in, true);\n\t\t$criteria->mergeWith($this->dateRangeSearchCriteria('DATE_FORMAT(date_check_in, \"%d-%m-%Y\")', $this->date_check_in));\n\t\t$criteria->mergeWith($this->dateRangeSearchCriteria('DATE_FORMAT(date_check_out, \"%d-%m-%Y\")', $this->date_check_out));\n\n\t\t$criteria->compare('time_check_in', $this->time_check_in, true);\n\t\t// $criteria->compare('date_check_out', $this->date_check_out, true);\n\t\t$criteria->compare('time_check_out', $this->time_check_out, true);\n\t\t$criteria->compare('tenant', $this->tenant, true);\n\t\t$criteria->compare('tenant_agent', $this->tenant_agent, true);\n\t\t$criteria->compare('t.is_deleted', $this->is_deleted, \"0\");\n\t\t$criteria->compare('visit_status', $this->visit_status);\n\t\t$criteria->compare('workstation', $this->workstation);\n\n\t\t$criteria->compare('company0.code', $this->companycode, true);\n\t\t$criteria->compare('company0.contact', $this->contactperson, true);\n\t\t$criteria->compare('company0.email_address', $this->contactemail, true);\n\t\t$criteria->compare('company0.mobile_number', $this->contactphone, true);\n\n\t\t//$criteria->compare('visitor0.date_of_birth',$this->date_of_birth,true);\n\t\t$criteria->mergeWith($this->dateRangeSearchCriteria('DATE_FORMAT(visitor0.date_of_birth, \"%d-%m-%Y\")', $this->date_of_birth));\n\n\t\t$criteria->compare('visitor0.contact_street_no', $this->contact_street_no, true);\n\t\t$criteria->compare('visitor0.contact_street_name', $this->contact_street_name, true);\n\t\t$criteria->compare('visitor0.contact_street_type', $this->contact_street_type, true);\n\t\t$criteria->compare('visitor0.contact_suburb', $this->contact_suburb, true);\n\t\t$criteria->compare('visitor0.contact_postcode', $this->contact_postcode, true);\n\t\t$criteria->compare('visitor0.identification_type', $this->identification_type, true);\n\t\t$criteria->compare('visitor0.identification_document_no', $this->identification_document_no, true);\n\t\t$criteria->compare('visitor0.identification_document_expiry', $this->identification_document_expiry, true);\n\t\tswitch($this->card_type){\n\t\t\tcase CardType::SAME_DAY_VISITOR:\n\t\t\tcase CardType::MULTI_DAY_VISITOR:\n\t\t\tcase CardType::MANUAL_VISITOR:\n\t\t\tcase CardType::CONTRACTOR_VISITOR:\n\t\t\t\t$criteria->compare('CONCAT(host0.first_name,\\' \\',host0.last_name)',$this->asicname,true);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$criteria->compare('CONCAT(visitor1.first_name,\\' \\',visitor1.last_name)',$this->asicname,true);\n\t\t\t\tbreak;\n\t\t}\n\t\t$criteria->compare('visitor0.asic_no', $this->asic_no, true);\n\t\t$criteria->compare('visitor0.asic_expiry', $this->asic_expiry, true);\n\t\t$criteria->compare('finish_date', $this->finish_date, true);\n\t\t$criteria->compare('card_returned_date', $this->card_returned_date, true);\n\n\t\tif ($merge !== null) {\n\t\t\t$criteria->mergeWith($merge);\n\t\t}\n\n\t\tif ($this->date_check_out) {\n\t\t\tif (Yii::app()->db->driverName == 'mssql') {\n\t\t\t\t$criteria->addCondition(\"CONVERT(date, t.date_check_out, 102) > DATEADD(day, -2, GETDATE())\");\n\t\t\t} else {\n\t\t\t\t$criteria->addCondition(\"str_to_date(t.date_check_out,'%Y-%m-%d') > DATE_ADD(now(),interval -2 day)\");\n\t\t\t}\n\t\t}\n\n\t\tif ($this->filterProperties) {\n\t\t\t$query = \"t.id LIKE CONCAT('%', :filterProperties , '%')\n OR visitor0.first_name LIKE CONCAT('%', :filterProperties , '%')\n OR visitor0.last_name LIKE CONCAT('%', :filterProperties , '%')\n OR company0.code LIKE CONCAT('%', :filterProperties , '%')\n OR company0.name LIKE CONCAT('%', :filterProperties , '%')\n OR company0.contact LIKE CONCAT('%', :filterProperties , '%')\n OR company0.mobile_number LIKE CONCAT('%', :filterProperties , '%')\n OR company0.email_address LIKE CONCAT('%', :filterProperties , '%')\n\n OR visitor0.date_of_birth LIKE CONCAT('%', :filterProperties , '%')\n\n OR visitor0.contact_number LIKE CONCAT('%', :filterProperties , '%')\n OR visitor0.contact_street_no LIKE CONCAT('%', :filterProperties , '%')\n OR visitor0.contact_street_name LIKE CONCAT('%', :filterProperties , '%')\n OR visitor0.contact_street_type LIKE CONCAT('%', :filterProperties , '%')\n OR visitor0.contact_suburb LIKE CONCAT('%', :filterProperties , '%')\n OR visitor0.contact_postcode LIKE CONCAT('%', :filterProperties , '%')\n OR visitor0.identification_type LIKE CONCAT('%', :filterProperties , '%')\n OR visitor0.identification_document_no LIKE CONCAT('%', :filterProperties , '%')\n OR visitor0.identification_document_expiry LIKE CONCAT('%', :filterProperties , '%')\n OR visitor0.asic_no LIKE CONCAT('%', :filterProperties , '%')\n OR visitor0.asic_expiry LIKE CONCAT('%', :filterProperties , '%')\";\n\t\t\tswitch($this->card_type){\n\t\t\t\tcase CardType::SAME_DAY_VISITOR:\n\t\t\t\tcase CardType::MULTI_DAY_VISITOR:\n\t\t\t\tcase CardType::MANUAL_VISITOR:\n\t\t\t\tcase CardType::CONTRACTOR_VISITOR:\n\t\t\t\t\t$query .= \" OR host0.first_name LIKE CONCAT('%', :filterProperties , '%')\n OR host0.last_name LIKE CONCAT('%', :filterProperties , '%')\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$query .= \" OR visitor1.first_name LIKE CONCAT('%', :filterProperties , '%')\n OR visitor1.last_name LIKE CONCAT('%', :filterProperties , '%')\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$criteria->addCondition($query);\n\t\t\t$criteria->params = array(':filterProperties' => $this->filterProperties);\n\t\t}\n\n\t\tif (Yii::app()->user->role == Roles::ROLE_STAFFMEMBER && Yii::app()->controller->action->id != 'view' && Yii::app()->controller->action->id != 'evacuationReport') {\n\t\t\t$criteria->addCondition('host = ' . Yii::app()->user->id . ' and visit_status = ' . VisitStatus::PREREGISTERED);\n\t\t}\n\n\t\tswitch (Yii::app()->user->role) {\n\t\t\tcase Roles::ROLE_STAFFMEMBER:\n\t\t\t\t$criteria->addCondition('host = ' . Yii::app()->user->id);\n\t\t\t\tbreak;\n\n\t\t\tcase Roles::ROLE_SUPERADMIN:\n\t\t\t\t$criteria->addCondition(\"t.id != ''\");\n\t\t\t\tbreak;\n\n\t\t\tcase Roles::ROLE_ADMIN:\n\t\t\tcase Roles::ROLE_ISSUING_BODY_ADMIN:\n\t\t\t\t$criteria->addCondition('t.tenant = ' . Yii::app()->user->tenant);\n\t\t\t\tbreak;\n\n\t\t\tcase Roles::ROLE_AGENT_ADMIN:\n\t\t\t\t$criteria->addCondition('t.tenant = ' . Yii::app()->user->tenant . ' and t.tenant_agent = ' . Yii::app()->user->tenant_agent);\n\t\t\t\tbreak;\n\n\t\t\t// Airport Operator, Agent Airport Operator & Agent Airport Administrator can not see other's visit except their own visits created by them.\n\t\t\tcase Roles::ROLE_AGENT_AIRPORT_ADMIN:\n\t\t\tcase Roles::ROLE_AGENT_AIRPORT_OPERATOR:\n\t\t\tcase Roles::ROLE_AIRPORT_OPERATOR:\n\t\t\t\t$criteria->addCondition(\"t.tenant = \" . Yii::app()->user->tenant . \" AND t.created_by = \" . Yii::app()->user->id);\n\t\t\t\tbreak;\n\n\t\t\tcase Roles::ROLE_OPERATOR:\n\t\t\tcase Roles::ROLE_AGENT_OPERATOR:\n\t\t\t\t$workstations = Workstation::model()->findWorkstationAvailableForUser(Yii::app()->user->id);\n\t\t\t\tif (!empty($workstations)) {\n\t\t\t\t\t$text = \"\";\n\t\t\t\t\tforeach ($workstations as $key => $value) {\n\t\t\t\t\t\t$text .=\"\" . $value['id'] . \",\";\n\t\t\t\t\t}\n\t\t\t\t\t$workstations = \"IN (\" . rtrim($text, ',') . \")\";\n\n\t\t\t\t\t$criteria->addCondition('t.workstation ' . $workstations . '');\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$criteria->addCondition('t.is_deleted = 0');\n\n\t\t/*\n\t\t * this condition is a hack to show only CORPORATE VISITOR in the listing report\n\t\t *\n\t\t */\n\t\tif (Yii::app()->controller->action->id == 'visitorRegistrationHistory') {\n\t\t\t$criteria->addCondition(\"visitor0.profile_type ='\" . Visitor::PROFILE_TYPE_CORPORATE . \"'\");\n\t\t}\n\n\t\tif (Yii::app()->controller->action->id == 'view' && (!empty($this->date_check_in) || !empty($this->date_check_out))) {\n\t\t\t$criteria->addCondition(\"visit_status =\" . VisitStatus::ACTIVE . \"\");\n\t\t}\n\n\t\tif (Yii::app()->controller->action->id == 'admindashboard') {\n\t\t\tYii::app()->user->setState('pageSize', (int) '5');\n\t\t} else {\n\t\t\tYii::app()->user->setState('pageSize', (int) '');\n\t\t}\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'pagination' => array(\n\t\t\t\t'pageSize' => Yii::app()->user->getState('pageSize', Yii::app()->params['defaultPageSize']),\n\t\t\t),\n\t\t\t'criteria' => $criteria,\n\t\t\t'sort' => array(\n\t\t\t\t'defaultOrder' => 't.ID DESC',\n\t\t\t\t'attributes' => array(\n\t\t\t\t\t'firstname' => array(\n\t\t\t\t\t\t'asc' => 'visitor0.first_name',\n\t\t\t\t\t\t'desc' => 'visitor0.first_name DESC',\n\t\t\t\t\t),\n\t\t\t\t\t'lastname' => array(\n\t\t\t\t\t\t'asc' => 'visitor0.last_name',\n\t\t\t\t\t\t'desc' => 'visitor0.last_name DESC',\n\t\t\t\t\t),\n\t\t\t\t\t'contactnumber' => array(\n\t\t\t\t\t\t'asc' => 'visitor0.contact_number',\n\t\t\t\t\t\t'desc' => 'visitor0.contact_number DESC',\n\t\t\t\t\t),\n\t\t\t\t\t'contactemail' => array(\n\t\t\t\t\t\t'asc' => 'visitor0.email',\n\t\t\t\t\t\t'desc' => 'visitor0.email DESC',\n\t\t\t\t\t),\n\t\t\t\t\t'cardnumber' => array(\n\t\t\t\t\t\t'asc' => 'card0.card_number',\n\t\t\t\t\t\t'desc' => 'card0.card_number DESC',\n\t\t\t\t\t),\n\t\t\t\t\t'company' => array(\n\t\t\t\t\t\t'asc' => 'company0.name',\n\t\t\t\t\t\t'desc' => 'company0.name DESC',\n\t\t\t\t\t),\n\t\t\t\t\t'*',\n\t\t\t\t),\n\t\t\t),\n\t\t\t'pagination' => array(\n\t\t\t\t'pageSize' => 10,\n\t\t\t),\n\t\t));\n\t}",
"function _admin_search_query()\n {\n }",
"function clsRecordalquileresSearch($RelativePath, & $Parent)\n {\n\n global $FileName;\n global $CCSLocales;\n global $DefaultDateFormat;\n $this->Visible = true;\n $this->Parent = & $Parent;\n $this->RelativePath = $RelativePath;\n $this->Errors = new clsErrors();\n $this->ErrorBlock = \"Record alquileresSearch/Error\";\n $this->ReadAllowed = true;\n if($this->Visible)\n {\n $this->ComponentName = \"alquileresSearch\";\n $this->Attributes = new clsAttributes($this->ComponentName . \":\");\n $CCSForm = split(\":\", CCGetFromGet(\"ccsForm\", \"\"), 2);\n if(sizeof($CCSForm) == 1)\n $CCSForm[1] = \"\";\n list($FormName, $FormMethod) = $CCSForm;\n $this->FormEnctype = \"application/x-www-form-urlencoded\";\n $this->FormSubmitted = ($FormName == $this->ComponentName);\n $Method = $this->FormSubmitted ? ccsPost : ccsGet;\n $this->s_keyword = & new clsControl(ccsTextBox, \"s_keyword\", \"s_keyword\", ccsText, \"\", CCGetRequestParam(\"s_keyword\", $Method, NULL), $this);\n $this->Button_DoSearch = & new clsButton(\"Button_DoSearch\", $Method, $this);\n }\n }",
"public function getDocuments();"
] | [
"0.68784714",
"0.6104553",
"0.59918636",
"0.59591234",
"0.5950694",
"0.5950129",
"0.5950129",
"0.580864",
"0.5808256",
"0.5746928",
"0.5746928",
"0.57243377",
"0.56966686",
"0.55908686",
"0.5521908",
"0.54962724",
"0.5430041",
"0.5417419",
"0.5406597",
"0.54057777",
"0.5403429",
"0.53724897",
"0.5371765",
"0.5356949",
"0.53386235",
"0.5325266",
"0.5318685",
"0.5286888",
"0.52674776",
"0.5264156",
"0.52400273",
"0.5233649",
"0.5230417",
"0.52210486",
"0.52210486",
"0.5216345",
"0.5213086",
"0.5213086",
"0.5211836",
"0.52000993",
"0.51945573",
"0.51842797",
"0.5179324",
"0.5178446",
"0.5171287",
"0.51624364",
"0.51562506",
"0.5135811",
"0.51141036",
"0.5112744",
"0.51065904",
"0.5089179",
"0.50888145",
"0.50842816",
"0.5075219",
"0.5068299",
"0.50663936",
"0.50461376",
"0.5044961",
"0.5041004",
"0.5040654",
"0.50370204",
"0.50312227",
"0.50309837",
"0.5020033",
"0.50050575",
"0.5004308",
"0.5003458",
"0.49961442",
"0.49931702",
"0.49878776",
"0.49787658",
"0.49775794",
"0.49768564",
"0.49766946",
"0.4962437",
"0.49610433",
"0.49597052",
"0.4959071",
"0.49557215",
"0.49504375",
"0.49386573",
"0.4935733",
"0.49251133",
"0.49244097",
"0.49244097",
"0.4915682",
"0.49133632",
"0.49121365",
"0.49107406",
"0.49039963",
"0.4903504",
"0.48975077",
"0.48870134",
"0.48847914",
"0.48830372",
"0.48807278",
"0.48769978",
"0.48740664",
"0.4869688"
] | 0.5837603 | 7 |
Gets the latest version of a document. | public function get($id)
{
return $this->_Get_operation->call(['id' => $id]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getLatestVersion()\n {\n $latestVersion = trim($this->rfs->getContents($this->getOriginName(), $this->getBaseUrl() . '/version', false));\n\n return $latestVersion;\n }",
"function getLatestRev() {\n\t\t$rev = $this->LatestRevPacked;\n\t\tif(!$rev && $this->URL) {\n\t\t\t$this->NeedsLatestRev = 1;\n\t\t\t$this->update();\n\t\t\t$rev = $this->LatestRevPacked;\n\t\t}\n\t\treturn $rev;\n\t}",
"public function latest_version();",
"public function getLatestVersion()\n {\n return $this->version;\n }",
"public function findLatest()\n {\n foreach ($this->versions as $version) {\n if ($version->getVersion() === 'Unreleased') {\n continue;\n }\n\n return $version;\n }\n }",
"public function retrieveVersion()\n {\n return $this->start()->uri(\"/api/system/version\")\n ->get()\n ->go();\n }",
"public function getRevision();",
"public function currentVersion()\n {\n return $this->versions()->orderBy(Version::CREATED_AT, 'DESC')->first();\n }",
"public function getRevision() {}",
"public function getLastRevision();",
"public function getVersion() {\n $logRepo = \\Env::get('em')->getRepository('Cx\\Core\\ContentManager\\Model\\Entity\\LogEntry');\n return $logRepo->getLatestLog($this);\n }",
"public function getRevision() ;",
"public function latestReleaseVersion()\n {\n // in order to correctly format relative URLs in the readme\n return Arr::get($this->latestRelease(), 'tag_name', 'master');\n }",
"public function getRevision()\n {\n return $this->result[\"revision\"];\n }",
"public function getLastVersionId()\n {\n return $this->createQueryBuilder('v')\n ->select('MAX(v.id)')\n ->getQuery()\n ->getSingleScalarResult();\n }",
"public function getRevision()\n {\n return $this->sys->getRevision();\n }",
"public function getVersion()\n {\n return $this->sendrequest('version', null);\n }",
"function getLatestDate() {\n\t\t$date = $this->LatestDatePacked;\n\t\tif(!$date && $this->URL) {\n\t\t\t$this->NeedsLatestRev = 1;\n\t\t\t$this->update();\n\t\t\t$date = $this->LatestDatePacked;\n\t\t}\n\t\treturn $date;\n\t}",
"public function getVersion()\n {\n return $this->get(self::_VERSION);\n }",
"private function getLatestVersion() {\n if (php_sapi_name() == 'cli' && isset($_SERVER['argv']) && is_foreachable($_SERVER['argv']) && array_key_exists(1, $_SERVER['argv'])) {\n return $_SERVER['argv'][1];\n } else {\n if(is_dir(ROOT . '/current')) {\n return 'current';\n } else {\n $latest_version = null;\n\n if($h = @opendir(ROOT)) {\n while(false !== ($version = readdir($h))) {\n if(substr($version, 0, 1) == '.') {\n continue;\n } // if\n\n if($this->isValidVersionNumber($version)) {\n if(empty($latest_version)) {\n $latest_version = $version;\n } else {\n if(version_compare($latest_version, $version, '<')) {\n $latest_version = $version;\n } // if\n } // if\n } // if\n } // while\n } // if\n\n return $latest_version;\n } // if\n } // if\n }",
"public function getVersion()\n {\n return $this->get(self::VERSION);\n }",
"public function getLatest()\n\t{\n\t\t$query = $this->getEntityManager()->createQuery('\n\t\t\tSELECT e\n\t\t\tFROM Btw\\Bundle\\PersistenceBundle\\Entity\\Election e\n\t\t\tORDER BY e.date DESC');\n\n\t\t$query->setMaxResults(1);\n\t\t$results = $query->getResult();\n\t\treturn is_array($results) ? $results[0] : null;\n\t}",
"public function getVersion() {\n return isset($this->data['version']) ? $this->data['version'] : null;\n }",
"public function get_version();",
"public static function latest($obj) {\n\t\treturn DB::table(Version::getVersionsTable())->where('object_id', '=', $obj->attributes['id'])->where('object_table', '=', strtolower(get_class($obj)))->order_by('created_at', 'desc')->first();\n\t}",
"public function getCurrentVersion()\n {\n $versions = $this->getVersions();\n\n return count($versions) > 0 ? $versions[0] : 0;\n }",
"public function latest()\n {\n $cache_for = self::CACHE_TIME_IN_HOURS * 60;\n\n $release = $this->cache->remember('fixhub_latest_version', $cache_for, function () {\n $request = Request::get($this->github_url)\n ->expectsJson()\n ->withAccept('application/vnd.github.v3+json');\n\n if (config('fixhub.github_oauth_token')) {\n $request->withAuthorization('token ' . config('fixhub.github_oauth_token'));\n }\n\n $response = $request->send();\n\n if ($response->hasErrors()) {\n return false;\n }\n\n return $response->body;\n });\n\n if (is_object($release)) {\n return $release->tag_name;\n }\n\n return false;\n }",
"public function getRevision()\n {\n return $this->_rev;\n }",
"function requirement_get_latest_version( $req_id ) {\n\n\tglobal $db;\n\t$tbl_req_ver\t\t\t\t= REQ_VERS_TBL;\n\t$f_req_ver_uid\t\t\t\t= $tbl_req_ver .\".\". REQ_VERS_UNIQUE_ID;\n\t$f_req_ver_req_id\t\t\t= $tbl_req_ver .\".\". REQ_VERS_REQ_ID;\n\t$f_req_ver_latest\t\t\t= $tbl_req_ver .\".\". REQ_VERS_LATEST;\n\n\t$q = \"SELECT\n\t\t $f_req_ver_uid\n\t\t FROM $tbl_req_ver\n\t\t WHERE $f_req_ver_req_id = '$req_id'\n\t\t AND $f_req_ver_latest = 'Y'\";\n\n\t//print\"$q<br>\";\n\n\treturn db_get_one($db, $q);\n}",
"public function getCurrent()\n {\n /**\n * Retrieve latest version number\n */\n $sql = new Sql($this->getAdapter());\n $select = $sql->select(self::VERSION_TABLE);\n $select->limit(1)->order(\"id DESC\");\n\n try {\n $row = $sql->prepareStatementForSqlObject($select)->execute()->current();\n } catch (\\Exception $exception) {\n return null;\n }\n\n return $row ? $row['version'] : null;\n }",
"public static function getCurrent() {\n global $CFG;\n\n if ($data = file_get_contents(\"$CFG->dirroot/mod/amvonetroom/revision\"))\n return new amvonetroom_Version($data);\n else\n return new amvonetroom_Version(0);\n }",
"public function getRev() : string;",
"public function getVersion()\n {\n return new Types\\Version($this->request('GET', 'version'));\n }",
"public function last()\n {\n return $this->execGetRequest(['allow_state' => true], UrlBuilder::RESOURCE_GET_LATEST_NEWS);\n }",
"public function get_version(){\n\n\t\t\tswitch( $this->method ){\n\n\t\t\t\tcase 'commit-message':\n\t\t\t\tdefault:\n\t\t\t\t\treturn $this->get_version_from_commit_message();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'file':\n\t\t\t\t\treturn $this->get_version_from_file();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'tag':\n\t\t\t\t\treturn $this->get_version_from_tag();\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}",
"function get_version() {\n\n\t\treturn $this->version;\n\n\t}",
"public function getSpecifiedVersion();",
"public function getCurrentVersion();",
"public function getRev()\n {\n return $this->data['fields']['rev'];\n }",
"function getFileVersion()\n\t{\n\t\treturn $this->fileVersion;\n\t}",
"public function getRevision()\n {\n return $this->systemProperties->getRevision();\n }",
"function acf_get_post_latest_revision($post_id)\n{\n}",
"public function lastest_version(): self {\n\t\tif ( $this->does_file_exist( $this->src ) ) {\n\t\t\t$this->ver = strtotime( get_headers( $this->src, 1 )['Last-Modified'] );\n\t\t}\n\t\treturn $this;\n\t}",
"protected function getUllrightCurrentRevision()\n {\n // TODO: implement setting somehow in the upgrade/refresh procedure\n $path = sfConfig::get('sf_data_dir') .\n DIRECTORY_SEPARATOR .\n 'ullright_svn_revision.txt';\n \n if (file_exists($path))\n {\n return file_get_contents($path);\n } \n else\n {\n $command = 'svn info plugins/ullCorePlugin';\n $output = reset($this->getFilesystem()->execute($command));\n preg_match('#Revision: ([\\d]+)#', $output, $matches);\n \n return $matches[1];\n }\n }",
"function getFileRevision() {\n\t\treturn $this->getData('fileRevision');\n\t}",
"public function get_version() {\n\t\treturn $this->version;\n\t}",
"public function get_version() {\n\t\treturn $this->version;\n\t}",
"public function get_version() {\n\t\treturn $this->version;\n\t}",
"public function get_version() {\n\t\treturn $this->version;\n\t}",
"public function get_version() {\n\t\treturn $this->version;\n\t}",
"public function get_version() {\n\t\treturn $this->version;\n\t}",
"public function get_version() {\n\t\treturn $this->version;\n\t}",
"public function get_version() {\n\t\treturn $this->version;\n\t}",
"public function get_version() {\n\t\treturn $this->version;\n\t}",
"public function get_version() {\n\t\treturn $this->version;\n\t}",
"public function get_version() { \n\n\t\treturn $this->version; \n\n\t}",
"public function getVersionReference()\n {\n return $this->version;\n }",
"public function getVersion() {\r\n return $this->versione;\r\n }",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getRevision()\n {\n return $this->revision;\n }",
"abstract public function get_version();",
"function getVersion() {\n\t\treturn $this->_Version;\n\t}",
"public static function mostRecent()\n {\n return self::latest()->published()->first();\n }",
"public function getVersion() {\n\t\treturn $this->version;\n\t}",
"public function get_version_from_file(){\n\n\t\t\t$result = '';\n\n\t\t\tif( empty( $this->file_contains_version ) )\n\t\t\t\t$this->file_contains_version = 'readme.md';\n\n\t\t\t$query = $this->api_urls['rawurl'] . '/' . $this->file_contains_version;\n\n\t\t\tif( ! empty( $this->access_token ) )\n\t\t\t\t$query = add_query_arg( array( 'access_token' => $this->access_token ), $query );\n\n\t\t\t$raw_response = wp_remote_get( $query, array('sslverify' => $this->config['sslverify']) );\n\t\t\t//TODO: Error handling for status-code != 200\n\n\t\t\tif ( is_wp_error( $raw_response ) ){\n\n\t\t\t\t$this->error = TRUE;\n\t\t\t\t$this->set_error(\n\t\t\t\t\t\t'warning',\n\t\t\t\t\t\tsprintf( '%s: %s', __( 'Error while fetching version from file', self::LANG ), $raw_response->get_error_message() )\n\t\t\t\t);\n\n\t\t\t} else {\n\n\t\t\t\tpreg_match( $this->search_pattern, $raw_response['body'], $version );\n\n\t\t\t\t$result = &$version[1];\n\n\t\t\t}\n\n\t\t\treturn ( isset( $result ) && ! empty( $result ) ) ? trim( $result ) : NULL;\n\n\t\t}",
"public function getVersion()\n {/*{{{*/\n return $this->_version;\n }",
"private function getOneAppVersion() {\n $this->app_version->findOne();\n }",
"private function _fetchCurrentRelease()\n {\n $version = $this->getNodeText('/p:package/p:version/p:release');\n foreach ($this->findNodes('/p:package/p:changelog/p:release') as $release) {\n if ($this->getNodeTextRelativeTo('./p:version/p:release', $release) == $version) {\n return $release;\n }\n }\n }",
"public static function getLatestVersion(): ?string\n {\n $availableVersions = self::getAvailableVersions();\n\n if (!$availableVersions) {\n return null;\n }\n\n return end($availableVersions);\n }",
"protected function getFromVersion()\n {\n $version = $this->loadFromVersion();\n $this->log('The from version is detected as ' . implode(' ', $version));\n return $version;\n }",
"public function getVersion(){\n\t\treturn $this->version;\n\t}",
"function getVersion ()\n {\n return $this->_version;\n }",
"public function getVersion(): Version\n {\n return $this->version;\n }",
"public function get_version()\n\t{\n\t\treturn $this->version;\n\t}",
"function getLatestVersion() {\n global $CONF;\n\n if (!function_exists('curl_init')) return false;\n\n // response version text , last request time\n foreach(array('LatestVerText','LatestVerReqTime') as $key)\n if (!array_key_exists($key,$CONF))\n {\n // `name` varchar(20)\n $query = sprintf(\"INSERT INTO %s (name,value) VALUES ('%s', '')\", sql_table('config'), sql_real_escape_string($key));\n sql_query($query);\n $CONF[$key] = '';\n }\n\n $t = (!empty($CONF['LatestVerReqTime']) ? intval($CONF['LatestVerReqTime']):0);\n $l_ver = (!empty($CONF['LatestVerText']) ? $CONF['LatestVerText']:'');\n $elapsed_time = time()-$t;\n // cache 180 minutes ,\n if ($t>0 && ($elapsed_time > -60) && ($elapsed_time<60*180))\n {\n return $l_ver;\n }\n\n $crl = curl_init();\n $timeout = 5;\n curl_setopt ($crl, CURLOPT_URL,'http://nucleuscms.org/version_check.php');\n curl_setopt ($crl, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt ($crl, CURLOPT_CONNECTTIMEOUT, $timeout);\n $ret = curl_exec($crl);\n curl_close($crl);\n\n if (empty($ret))\n $ret = '';\n\n ADMIN::updateConfig('LatestVerText', $ret);\n ADMIN::updateConfig('LatestVerReqTime', strval(time()) );\n\n return $ret;\n}",
"public function latest();",
"public function getVersion()\n\t{\n\t\treturn $this->version;\n\t}",
"public function getRevision() {\n return $this->revision;\n }",
"public function get_version()\n {\n return $this->version;\n }",
"public function get_version()\n {\n return $this->version;\n }"
] | [
"0.6914199",
"0.69129026",
"0.68626344",
"0.68365955",
"0.6797504",
"0.65455997",
"0.6522566",
"0.6484227",
"0.6444369",
"0.63579017",
"0.6323662",
"0.62717307",
"0.6267685",
"0.62169206",
"0.6216835",
"0.62009734",
"0.6198458",
"0.61822283",
"0.61756754",
"0.6162422",
"0.612194",
"0.61060655",
"0.6089245",
"0.6050544",
"0.6049691",
"0.6049288",
"0.6032448",
"0.60083455",
"0.59906965",
"0.59800786",
"0.5976251",
"0.5972728",
"0.59633946",
"0.59390825",
"0.5919252",
"0.5918918",
"0.59027153",
"0.58629036",
"0.58506465",
"0.5846761",
"0.58449125",
"0.5844842",
"0.58434683",
"0.5841372",
"0.5841368",
"0.5831604",
"0.5831604",
"0.5831604",
"0.5831604",
"0.5831604",
"0.5831604",
"0.5831604",
"0.5831604",
"0.5831604",
"0.5831604",
"0.58036727",
"0.58016837",
"0.5801473",
"0.5800697",
"0.5800697",
"0.5800697",
"0.5800697",
"0.5800697",
"0.5800697",
"0.5800697",
"0.5800697",
"0.5800697",
"0.5800697",
"0.5800697",
"0.5800697",
"0.5800697",
"0.5800697",
"0.5800697",
"0.5800697",
"0.5800697",
"0.5800697",
"0.5800697",
"0.5800697",
"0.5800697",
"0.5800697",
"0.5799577",
"0.57923186",
"0.5790176",
"0.5788138",
"0.5785398",
"0.57811284",
"0.5769501",
"0.576923",
"0.5764916",
"0.5752932",
"0.57331246",
"0.5732671",
"0.57320803",
"0.57296765",
"0.57178193",
"0.5716193",
"0.57150203",
"0.5713179",
"0.57103056",
"0.57095575",
"0.57095575"
] | 0.0 | -1 |
Gets the latest version of a document by specifiying a specific document version. | public function getVersion(
$id,
$version
)
{
return $this->_GetVersion_operation->call([
'id' => $id,
'version' => $version
]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function findLatest()\n {\n foreach ($this->versions as $version) {\n if ($version->getVersion() === 'Unreleased') {\n continue;\n }\n\n return $version;\n }\n }",
"public function getSpecifiedVersion();",
"public function getRelease($version);",
"protected function getLatestVersion()\n {\n $latestVersion = trim($this->rfs->getContents($this->getOriginName(), $this->getBaseUrl() . '/version', false));\n\n return $latestVersion;\n }",
"function getLatestRev() {\n\t\t$rev = $this->LatestRevPacked;\n\t\tif(!$rev && $this->URL) {\n\t\t\t$this->NeedsLatestRev = 1;\n\t\t\t$this->update();\n\t\t\t$rev = $this->LatestRevPacked;\n\t\t}\n\t\treturn $rev;\n\t}",
"function requirement_get_latest_version( $req_id ) {\n\n\tglobal $db;\n\t$tbl_req_ver\t\t\t\t= REQ_VERS_TBL;\n\t$f_req_ver_uid\t\t\t\t= $tbl_req_ver .\".\". REQ_VERS_UNIQUE_ID;\n\t$f_req_ver_req_id\t\t\t= $tbl_req_ver .\".\". REQ_VERS_REQ_ID;\n\t$f_req_ver_latest\t\t\t= $tbl_req_ver .\".\". REQ_VERS_LATEST;\n\n\t$q = \"SELECT\n\t\t $f_req_ver_uid\n\t\t FROM $tbl_req_ver\n\t\t WHERE $f_req_ver_req_id = '$req_id'\n\t\t AND $f_req_ver_latest = 'Y'\";\n\n\t//print\"$q<br>\";\n\n\treturn db_get_one($db, $q);\n}",
"public function latest_version();",
"private function getLatestVersion() {\n if (php_sapi_name() == 'cli' && isset($_SERVER['argv']) && is_foreachable($_SERVER['argv']) && array_key_exists(1, $_SERVER['argv'])) {\n return $_SERVER['argv'][1];\n } else {\n if(is_dir(ROOT . '/current')) {\n return 'current';\n } else {\n $latest_version = null;\n\n if($h = @opendir(ROOT)) {\n while(false !== ($version = readdir($h))) {\n if(substr($version, 0, 1) == '.') {\n continue;\n } // if\n\n if($this->isValidVersionNumber($version)) {\n if(empty($latest_version)) {\n $latest_version = $version;\n } else {\n if(version_compare($latest_version, $version, '<')) {\n $latest_version = $version;\n } // if\n } // if\n } // if\n } // while\n } // if\n\n return $latest_version;\n } // if\n } // if\n }",
"public function getLatestVersion()\n {\n return $this->version;\n }",
"private function getVersionFromDatabase($version)\n {\n $rows = $this->database->getRecords(\n array('id', 'downloaded'),\n 'versions',\n array('version' => $version),\n '',\n '',\n 1\n );\n\n $row = false;\n if (count($rows) === 1) {\n $row = array_shift($rows);\n unset($rows);\n }\n\n return $row;\n }",
"public function retrieveVersion()\n {\n return $this->start()->uri(\"/api/system/version\")\n ->get()\n ->go();\n }",
"public function get_version_from_file(){\n\n\t\t\t$result = '';\n\n\t\t\tif( empty( $this->file_contains_version ) )\n\t\t\t\t$this->file_contains_version = 'readme.md';\n\n\t\t\t$query = $this->api_urls['rawurl'] . '/' . $this->file_contains_version;\n\n\t\t\tif( ! empty( $this->access_token ) )\n\t\t\t\t$query = add_query_arg( array( 'access_token' => $this->access_token ), $query );\n\n\t\t\t$raw_response = wp_remote_get( $query, array('sslverify' => $this->config['sslverify']) );\n\t\t\t//TODO: Error handling for status-code != 200\n\n\t\t\tif ( is_wp_error( $raw_response ) ){\n\n\t\t\t\t$this->error = TRUE;\n\t\t\t\t$this->set_error(\n\t\t\t\t\t\t'warning',\n\t\t\t\t\t\tsprintf( '%s: %s', __( 'Error while fetching version from file', self::LANG ), $raw_response->get_error_message() )\n\t\t\t\t);\n\n\t\t\t} else {\n\n\t\t\t\tpreg_match( $this->search_pattern, $raw_response['body'], $version );\n\n\t\t\t\t$result = &$version[1];\n\n\t\t\t}\n\n\t\t\treturn ( isset( $result ) && ! empty( $result ) ) ? trim( $result ) : NULL;\n\n\t\t}",
"protected function getFromVersion()\n {\n $version = $this->loadFromVersion();\n $this->log('The from version is detected as ' . implode(' ', $version));\n return $version;\n }",
"public function currentVersion()\n {\n return $this->versions()->orderBy(Version::CREATED_AT, 'DESC')->first();\n }",
"function readFileVersion()\n\t{\n\t\treset($this->lastfilecontent);\n\t\t$regs = array();\n\t\tforeach ($this->lastfilecontent as $row)\n\t\t{\n\t\t\tif (ereg(\"^<#([0-9]+)>\", $row, $regs))\n\t\t\t{\n\t\t\t\t$version = $regs[1];\n\t\t\t}\n\t\t}\n\n\t\t$this->fileVersion = (integer) $version;\n\t\treturn $this->fileVersion; \n\t}",
"public function latestReleaseVersion()\n {\n // in order to correctly format relative URLs in the readme\n return Arr::get($this->latestRelease(), 'tag_name', 'master');\n }",
"private function getOneAppVersion() {\n $this->app_version->findOne();\n }",
"public function getRevision();",
"function pm_get_release($request, $project) {\n $minor = '';\n $version_patch_changed = '';\n if ($request['version']) {\n // The user specified a specific version - try to find that exact version\n foreach($project['releases'] as $version => $release) {\n // Ignore unpublished releases.\n if ($release['status'] != 'published') {\n continue;\n }\n\n // Straight match\n if (!isset($recommended_version) && $release['version'] == $request['version']) {\n $recommended_version = $version;\n }\n }\n }\n else {\n // No version specified - try to find the best version we can\n foreach($project['releases'] as $version => $release) {\n // Ignore unpublished releases.\n if ($release['status'] != 'published') {\n continue;\n }\n\n // If we haven't found a recommended version yet, put the dev\n // version as recommended and hope it gets overwritten later.\n // Look for the 'latest version' if we haven't found it yet.\n // Latest version is defined as the most recent version for the\n // default major version.\n if (!isset($latest_version) && $release['version_major'] == $project['default_major']) {\n $latest_version = $version;\n }\n\n if (!isset($recommended_version) && $release['version_major'] == $project['default_major']) {\n if ($minor != $release['version_patch']) {\n $minor = $release['version_patch'];\n $version_patch_changed = $version;\n }\n if (empty($release['version_extra']) && $minor == $release['version_patch']) {\n $recommended_version = $version_patch_changed;\n }\n continue;\n }\n }\n }\n if (isset($recommended_version)) {\n return $project['releases'][$recommended_version];\n }\n else if (isset($latest_version)) {\n return $project['releases'][$latest_version];\n }\n else {\n return false;\n }\n}",
"abstract public function get_version();",
"public function get_version(){\n\n\t\t\tswitch( $this->method ){\n\n\t\t\t\tcase 'commit-message':\n\t\t\t\tdefault:\n\t\t\t\t\treturn $this->get_version_from_commit_message();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'file':\n\t\t\t\t\treturn $this->get_version_from_file();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'tag':\n\t\t\t\t\treturn $this->get_version_from_tag();\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}",
"private function _fetchCurrentRelease()\n {\n $version = $this->getNodeText('/p:package/p:version/p:release');\n foreach ($this->findNodes('/p:package/p:changelog/p:release') as $release) {\n if ($this->getNodeTextRelativeTo('./p:version/p:release', $release) == $version) {\n return $release;\n }\n }\n }",
"public function getVersion()\n {\n return new Types\\Version($this->request('GET', 'version'));\n }",
"public function get_version();",
"public function read(string $path, string $version): Release;",
"public static function latest($obj) {\n\t\treturn DB::table(Version::getVersionsTable())->where('object_id', '=', $obj->attributes['id'])->where('object_table', '=', strtolower(get_class($obj)))->order_by('created_at', 'desc')->first();\n\t}",
"function getServerApiVersion()\n {\n try\n {\n $result = $this->apiCall('get',\"{$this->api['syndication_base']}/swagger/api\",array(),'json');\n if ( !empty($result['content']) && is_array($result['content']) && isset($result['content']['apiVersion']) )\n {\n return $result['content']['apiVersion'];\n }\n return null;\n } catch ( Exception $e ) {\n return null;\n }\n }",
"public function getCurrentVersion()\n {\n $versions = $this->getVersions();\n\n return count($versions) > 0 ? $versions[0] : 0;\n }",
"public static function getApiVersion();",
"public function getVersion()\n {\n return $this->get(self::_VERSION);\n }",
"public function getRevision() {}",
"function requirement_get_release( $req_version ) {\n\n\tglobal $db;\n\t\n\t$req_rel_tbl\t\t= REQ_VERS_ASSOC_REL;\n\t$f_version_id\t\t= $req_rel_tbl .\".\". REQ_VERS_ASSOC_REL_REQ_ID;\n\t$f_release_id\t\t= $req_rel_tbl .\".\". REQ_VERS_ASSOC_REL_REL_ID;\n\t$release_name\t\t= \"\";\n\n\t$q = \"SELECT\n\t\t\t$f_release_id\n\t\t FROM\n\t\t\t$req_rel_tbl\n\t\t WHERE\n\t\t\t$f_version_id = '$req_version'\";\n\t\n\t$release_id = db_get_one($db, $q);\n\t\t\n\tif( $release_id != '' ) {\n\t\t$release_name = admin_get_release_name( $release_id );\n\t}\n\t\n\n\treturn $release_name;\n}",
"public function getCurrent()\n {\n /**\n * Retrieve latest version number\n */\n $sql = new Sql($this->getAdapter());\n $select = $sql->select(self::VERSION_TABLE);\n $select->limit(1)->order(\"id DESC\");\n\n try {\n $row = $sql->prepareStatementForSqlObject($select)->execute()->current();\n } catch (\\Exception $exception) {\n return null;\n }\n\n return $row ? $row['version'] : null;\n }",
"public function getVersion() {\n return isset($this->data['version']) ? $this->data['version'] : null;\n }",
"protected function getVersion()\n {\n return $this->getRequest()->args('version') ?: strftime('%y%m%d.%H%M.%S');\n }",
"public function get($key, $ver=false);",
"private function selectResourceVersion()\n {\n $result = $this->sdb->query('select nextval(\\'resource_version_id_seq\\') as id',array());\n $row = $this->sdb->fetchrow($result);\n return $row['id'];\n }",
"public static function getLatestVersion(): ?string\n {\n $availableVersions = self::getAvailableVersions();\n\n if (!$availableVersions) {\n return null;\n }\n\n return end($availableVersions);\n }",
"public function getVersion()\n {\n return $this->get(self::VERSION);\n }",
"public function getRevision($round = true) {}",
"public static function getCurrent() {\n global $CFG;\n\n if ($data = file_get_contents(\"$CFG->dirroot/mod/amvonetroom/revision\"))\n return new amvonetroom_Version($data);\n else\n return new amvonetroom_Version(0);\n }",
"public function getVersion()\n {\n return $this->sendrequest('version', null);\n }",
"public function getVersion() {\n $logRepo = \\Env::get('em')->getRepository('Cx\\Core\\ContentManager\\Model\\Entity\\LogEntry');\n return $logRepo->getLatestLog($this);\n }",
"function get_customer_trans_version($type, $trans_no)\n{\n if (!is_array($trans_no))\n $trans_no = array($trans_no);\n\n $sql = 'SELECT trans_no, version FROM ' . TB_PREF . 'debtor_trans\n\t\t\tWHERE type=' . db_escape($type) . ' AND (';\n\n foreach ($trans_no as $key => $trans)\n $trans_no[$key] = 'trans_no=' . db_escape($trans_no[$key]);\n\n $sql .= implode(' OR ', $trans_no) . ')';\n\n $res = db_query($sql, 'document version retreival');\n\n $vers = array();\n while ($mysql = db_fetch($res)) {\n $vers[$mysql['trans_no']] = $mysql['version'];\n }\n return $vers;\n}",
"public function getVersion($name) {\n\t\t\treturn $this->versions[$name];\n }",
"public function getNextRevDocNumber(){\n $lastDoc = File::orderBy('id', 'desc')->first();\n\n /*\n In a case where no record is found get 1 as a\n virtual record to generate document number.\n */\n if(is_null($lastDoc)){\n /*\n create an object counter (number) to store document ID and\n initialiaze it to 1.\n */\n $id = File::find(1);\n $number = $id;\n\n //assign and add the number with Doc ID\n $number += File::find(1);\n\n /*\n concatenate BRS-DFT- with the last inserted Doc ID\n that will end with 3 numbers.\n */\n\n return 'BRS-DFT-' . sprintf('%03d', intval($number) + 1);\n\n }else{\n /*\n The document exists then\n create variable number to store document ID\n initialiaze it to 0.\n */\n $number = 0;\n\n //assign and add the number with Doc ID\n $number += $lastDoc->id;\n\n /*\n concatenate BRS-DFT- with the last inserted Doc ID\n that will end with 3 numbers.\n */\n return 'BRS-DFT-' . sprintf('%03d', intval($number) + 1);\n }\n\n }",
"function getLatestVersion() {\n global $CONF;\n\n if (!function_exists('curl_init')) return false;\n\n // response version text , last request time\n foreach(array('LatestVerText','LatestVerReqTime') as $key)\n if (!array_key_exists($key,$CONF))\n {\n // `name` varchar(20)\n $query = sprintf(\"INSERT INTO %s (name,value) VALUES ('%s', '')\", sql_table('config'), sql_real_escape_string($key));\n sql_query($query);\n $CONF[$key] = '';\n }\n\n $t = (!empty($CONF['LatestVerReqTime']) ? intval($CONF['LatestVerReqTime']):0);\n $l_ver = (!empty($CONF['LatestVerText']) ? $CONF['LatestVerText']:'');\n $elapsed_time = time()-$t;\n // cache 180 minutes ,\n if ($t>0 && ($elapsed_time > -60) && ($elapsed_time<60*180))\n {\n return $l_ver;\n }\n\n $crl = curl_init();\n $timeout = 5;\n curl_setopt ($crl, CURLOPT_URL,'http://nucleuscms.org/version_check.php');\n curl_setopt ($crl, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt ($crl, CURLOPT_CONNECTTIMEOUT, $timeout);\n $ret = curl_exec($crl);\n curl_close($crl);\n\n if (empty($ret))\n $ret = '';\n\n ADMIN::updateConfig('LatestVerText', $ret);\n ADMIN::updateConfig('LatestVerReqTime', strval(time()) );\n\n return $ret;\n}",
"function getFileVersion()\n\t{\n\t\treturn $this->fileVersion;\n\t}",
"public function getCurrentVersion();",
"public function chooseRevision(Request $request, $doc)\n\t{\n\t\t$doc = Document::findBySlug($doc);\n\n\t\tif (!$doc) {\n\t\t\treturn response(view('docs.404'), 404);\n\t\t}\n\n\t\t$this->authorize('manage', $doc);\n\n\t\t$doc->load('updatedBy', 'createdBy');\n\n\t\t$results = $doc->revisionHistory->sortByDesc('created_at');\n\n\t\t$paginator = new LengthAwarePaginator(\n\t\t\t$results->forPage(LengthAwarePaginator::resolveCurrentPage(), 10),\n\t\t\t$results->count(),\n\t\t\t10\n\t\t);\n\n\t\t$paginator->setPath(route('docs.revisions', $doc->url))\n\t\t\t->appends($request->all());\n\n\t\treturn view('docs.revisions', ['doc' => $doc, 'revisions' => $paginator]);\n\t}",
"public function getRevision() ;",
"public function getRevision()\n {\n return $this->result[\"revision\"];\n }",
"public function getApiVersion();",
"public function index(\\App\\Models\\Version $version)\n {\n // load documents accordingly\n return view('administration.documentation.index', [\n 'version' => $version,\n 'documents' => $version->documents()->orderBy('title')->get()\n ]);\n }",
"function _wp_get_post_revision_version($revision)\n {\n }",
"function requirement_get_version_number( $req_id, $req_version_id ) {\n\n\tglobal $db;\n\t$tbl_req_ver\t\t\t\t= REQ_VERS_TBL;\n\t$f_version_id\t\t\t\t= $tbl_req_ver .\".\". REQ_VERS_UNIQUE_ID;\n\t$f_version_req_id\t\t\t= $tbl_req_ver .\".\". REQ_VERS_REQ_ID;\n\t$f_version_number\t\t\t= $tbl_req_ver .\".\". REQ_VERS_VERSION;\n\n\t$q = \"SELECT\n\t\t $f_version_number\n\t\t FROM $tbl_req_ver\n\t\t WHERE $f_version_req_id = '$req_id'\n\t\t AND $f_version_id = '$req_version_id'\";\n\n\t//print\"$q<br>\";\n\n\treturn db_get_one($db, $q);\n}",
"public function getSchemaVersion() {\n\t\t$result = \"No Schema Version Found\"; \n\t\t$sql = \"select versionnumber, dateapplied from schemaversion order by dateapplied desc limit 1 \";\n\t\t$statement = $this->conn->prepare($sql);\n\t\t$statement->execute();\n\t\t$statement->bind_result($version,$dateapplied);\n\t\twhile ($statement->fetch()) { \n\t\t\t$result = $version;\n\t\t}\n\t\t$statement->close();\n\t\treturn $result;\t\t\n\t}",
"public function DeleteVersion() {\n\n\t\tif ($this->parameter_check) {\n\n\t\t\t/* DATABASE CONNECTION */\n\t\t\t$db=$GLOBALS['db'];\n\n\t\t\t/* DESCRIPTION MUST ALWAYS COME FIRST BEFORE WE DELETE THE RECORDS er */\n\t\t\t$description=GetColumnValue(\"filename\",\"document_files\",\"document_id\",$this->document_id,\"\"). \" - version deleted\";\n\n\t\t\t/* PROCESS LOGGING BEFORE DELETION TO PROTECT FOREIGN KEY CONSTRAINT */\n\t\t\tLogDocumentFileHistory($this->GetColVal(\"filename\"),$this->GetColVal(\"category_id\"),$this->GetColVal(\"version_number\"),$description);\n\n\t\t\t/* AVOID SUB QUERY HERE FOR MYSQL */\n\t\t\t$sql=\"SELECT document_id, version_number\n\t\t\t\t\t\tFROM \".$GLOBALS['database_prefix'].\"document_files\n\t\t\t\t\t\tWHERE filename = '\".$this->GetColVal(\"filename\").\"'\n\t\t\t\t\t\tAND category_id = \".$this->GetColVal(\"category_id\").\"\n\t\t\t\t\t\tORDER BY version_number DESC\n\t\t\t\t\t\tLIMIT 1\n\t\t\t\t\t\t\";\n\t\t\t//echo $sql.\"<br>\";\n\t\t\t$result = $db->Query($sql);\n\t\t\tif ($db->NumRows($result) > 0) {\n\t\t\t\twhile($row = $db->FetchArray($result)) {\n\t\t\t\t \t$document_id_delete = $row['document_id'];\n\t\t\t\t \t/* THE VERSION TO UPDATE TO THE LATEST */\n\t\t\t\t \t$document_id_latest_version=($row['version_number']-1);\n\t\t\t }\n\t\t\t}\n\n\t\t\t/* DELETE DOCUMENT */\n\t\t\t$sql=\"DELETE FROM \".$GLOBALS['database_prefix'].\"document_files\n\t\t\t\t\t\tWHERE document_id IN (\n\t\t\t\t\t\t\t\".$document_id_delete.\"\n\t\t\t\t\t\t)\n\t\t\t\t\t\t\";\n\t\t\t//echo $sql.\"<br>\";\n\t\t\t$result=$db->Query($sql);\n\t\t\tif ($db->AffectedRows($result) > 0) {\n\t\t\t\t/* UPDATE THE PREVIOUS VERSION TO THE LATEST VERSION */\n\t\t\t\t$sql_upd=\"UPDATE \".$GLOBALS['database_prefix'].\"document_files\n\t\t\t\t\t\t\t\t\tSET latest_version = 'y',\n\t\t\t\t\t\t\t\t\tchecked_out = 'n'\n\t\t\t\t\t\t\t\t\tWHERE document_id IN (\n\t\t\t\t\t\t\t\t\t\t\".$document_id_latest_version.\"\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\";\n\t\t\t\t//echo $sql_upd.\"<br>\";\n\t\t\t\t$result_upd=$db->Query($sql_upd);\n\t\t\t\tif ($db->AffectedRows($result_upd) > 0) {\n\t\t\t\t\treturn True;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$this->Errors(\"Delete version failed\");\n\t\t\t\t\treturn False;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn False;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$this->Errors(\"Parameter check failed\");\n\t\t\treturn False;\n\t\t}\n\t}",
"function ff_hh_getlatest( $branch_url, $domain, $branch ) {\n\t// Caching\n\t$cache_key = 'ff_hh_latestversion_' . $domain . '_' . $branch;\n\tif ( false === ( $sw_ver = get_transient( $cache_key ) ) ) {\n\t\t$sw_ver = 'unknown';\n\t\t$url = $branch_url . '/sysupgrade/' . $branch . '.manifest';\n\t\t$input = wp_remote_retrieve_body( wp_remote_get( $url ) );\n\t\tforeach ( explode( \"\\n\", $input ) as $line ) {\n\t\t\t$ret = sscanf( $line, '%s %s %s %s', $hw, $sw_ver, $hash, $filename );\n\t\t\tif ( $ret === 4 ) {\n\t\t\t\t// break processing on first matching line\n\t\t\t\t$cachetime = FF_HH_CACHETIME * MINUTE_IN_SECONDS;\n\t\t\t\tset_transient( $cache_key, $sw_ver, $cachetime );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\treturn $sw_ver;\n}",
"public function latest()\n {\n $cache_for = self::CACHE_TIME_IN_HOURS * 60;\n\n $release = $this->cache->remember('fixhub_latest_version', $cache_for, function () {\n $request = Request::get($this->github_url)\n ->expectsJson()\n ->withAccept('application/vnd.github.v3+json');\n\n if (config('fixhub.github_oauth_token')) {\n $request->withAuthorization('token ' . config('fixhub.github_oauth_token'));\n }\n\n $response = $request->send();\n\n if ($response->hasErrors()) {\n return false;\n }\n\n return $response->body;\n });\n\n if (is_object($release)) {\n return $release->tag_name;\n }\n\n return false;\n }",
"public function getLatest()\n\t{\n\t\t$query = $this->getEntityManager()->createQuery('\n\t\t\tSELECT e\n\t\t\tFROM Btw\\Bundle\\PersistenceBundle\\Entity\\Election e\n\t\t\tORDER BY e.date DESC');\n\n\t\t$query->setMaxResults(1);\n\t\t$results = $query->getResult();\n\t\treturn is_array($results) ? $results[0] : null;\n\t}",
"public function getRev() : string;",
"function getLatestDate() {\n\t\t$date = $this->LatestDatePacked;\n\t\tif(!$date && $this->URL) {\n\t\t\t$this->NeedsLatestRev = 1;\n\t\t\t$this->update();\n\t\t\t$date = $this->LatestDatePacked;\n\t\t}\n\t\treturn $date;\n\t}",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getRevision()\n {\n return $this->sys->getRevision();\n }",
"function get_version() {\n\n\t\treturn $this->version;\n\n\t}",
"public function getVersion()\n {\n if (array_key_exists(\"version\", $this->_propDict)) {\n return $this->_propDict[\"version\"];\n } else {\n return null;\n }\n }",
"function currentVersion() {\n if($this->current_version === false) {\n $this->current_version = DB::executeFirstCell('SELECT version FROM ' . TABLE_PREFIX . 'update_history ORDER BY created_on DESC LIMIT 0, 1');\n if(empty($this->current_version)) {\n $this->current_version = '1.0';\n } // if\n \t \n \t // activeCollab 2.0.2 failed to record proper version into update \n \t // history so we need to manually check if we have 2.0.2. This is done \n \t // by checking if acx_attachments table exists (introduced in aC 2).\n \t if((version_compare($this->current_version, '2.0') < 0) && DB::tableExists(TABLE_PREFIX . 'attachments')) {\n \t $this->current_version = '2.0.2';\n \t } // if\n } // if\n return $this->current_version;\n }",
"abstract public function getVersion();",
"abstract public function getVersion();",
"abstract public function getVersion();",
"abstract public function getVersion();",
"public function getVersion() {\r\n\t\t$response = $this->Client->execute('show version');\r\n\t\tpreg_match('/Version:\\s+VyOS\\s([0-9\\.]+)/', $response, $matches );\r\n\t\t$version = $matches[1];\r\n\t\treturn $version;\r\n\t}",
"function &getLatestRevision($fileId, $fileStage = null, $submissionId = null) {\n\t\tif (!$fileId) {\n\t\t\t$nullVar = null;\n\t\t\treturn $nullVar;\n\t\t}\n\t\t$revisions =& $this->_getInternally($submissionId, $fileStage, $fileId, null, null, null, null, null, null, null, null, true);\n\t\treturn $this->_checkAndReturnRevision($revisions);\n\t}",
"private function last_version($file_name){ \n if (file_exists($file_name)){\n return $file_name.\"?v=\".filemtime($file_name); \n } \n }",
"public function getVersion(): Version\n {\n return $this->version;\n }",
"function fetch_linux_distro_latest_version($linux_distro_name) \n { \n // Fetch linux distribution details from DistroWatch\n $url = \"http://distrowatch.com/table.php?distribution=$linux_distro_name\";\n \n $html_page = file_get_contents($url); \n\n // Match anything in the form <a href=\"<a href=\"8394\">Distribution Release: Fedora 21</a>\n $pattern = \"/<a href=\\\"[\\d]*\\\">(Distribution Release:|BSD Release:)(.+?)(\\d+(.\\d+)?(-\\d+)?)<\\/a>/\";\n\t\n preg_match_all($pattern, $html_page, $matches);\n // Get key of the biggest version number\n\t//print_r($matches[3]);\n $max_version = array_search(max($matches[3]),$matches[3]);\n \n return $matches[3][$max_version];\n \n }",
"public function queryVersion()\n {/*{{{*/\n $this->write(pack('C',\n Firmata::REPORT_VERSION));\n $this->_eval();\n return $this->_version;\n }",
"public function getLastRevision();",
"public function getPdfVersion();"
] | [
"0.65142757",
"0.63607687",
"0.6295082",
"0.61648923",
"0.61577463",
"0.6088241",
"0.6072338",
"0.6018055",
"0.599255",
"0.5987464",
"0.59642947",
"0.5892331",
"0.5822036",
"0.58051234",
"0.5743499",
"0.5736164",
"0.57211477",
"0.56865555",
"0.5683265",
"0.5652545",
"0.5615302",
"0.5606765",
"0.559712",
"0.5589318",
"0.555435",
"0.5540607",
"0.55357677",
"0.55183",
"0.55168724",
"0.55108607",
"0.5492826",
"0.5487593",
"0.54850906",
"0.5479085",
"0.54699725",
"0.5454886",
"0.5438854",
"0.5428343",
"0.542301",
"0.5419498",
"0.5414369",
"0.5397936",
"0.53898174",
"0.53826106",
"0.53786135",
"0.537615",
"0.53690547",
"0.53551495",
"0.53533477",
"0.53469867",
"0.5344978",
"0.534245",
"0.53395486",
"0.5327862",
"0.5321587",
"0.5320483",
"0.5319909",
"0.53183705",
"0.5312982",
"0.5305746",
"0.5300933",
"0.5283092",
"0.5274113",
"0.5268794",
"0.5268794",
"0.5268794",
"0.5268794",
"0.5268794",
"0.5268794",
"0.5268794",
"0.5268794",
"0.5268794",
"0.5268794",
"0.5268794",
"0.5268794",
"0.5268794",
"0.5268794",
"0.5268794",
"0.5268794",
"0.5268794",
"0.5268794",
"0.5268794",
"0.5268794",
"0.5268794",
"0.5268794",
"0.52686936",
"0.5261266",
"0.52574164",
"0.5247631",
"0.5225887",
"0.5225887",
"0.5225887",
"0.5225887",
"0.52221406",
"0.5217994",
"0.52179587",
"0.52073085",
"0.5201133",
"0.51996166",
"0.51957643",
"0.51929426"
] | 0.0 | -1 |
Gets the difference on a document by comparing the provided version against the latest versions | public function getDifferenceLatest(
$id,
$oldVersion
)
{
return $this->_GetDifferenceLatest_operation->call([
'id' => $id,
'oldVersion' => $oldVersion
]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getDiff($from_version, $to_version = null)\n\t{\n\t\tinclude_once 'Text/Diff.php';\n\t\t\n\t\t$info = array();\n\t\t\n\t\t// from\n\t\t$tmp = $this->store->getPage($this->area, $this->page, $from_version);\n\t\t$tmp['body'] = htmlspecialchars($tmp['body']);\n\t\t$from_lines = explode(\"\\n\", $tmp['body']);\n\t\t$info['from']['dt'] = $tmp['dt'];\n\t\t$info['from']['username'] = $tmp['username'];\n\t\t\n\t\t// to\n\t\t$tmp = $this->store->getPage($this->area, $this->page, $to_version);\n\t\t$tmp['body'] = htmlspecialchars($tmp['body']);\n\t\t$to_lines = explode(\"\\n\", $tmp['body']);\n\t\t$info['to']['dt'] = $tmp['dt'];\n\t\t$info['to']['username'] = $tmp['username'];\n\t\t\n\t\t// diff and return\n\t\t$diff =& new Text_Diff($from_lines, $to_lines);\n\t\treturn array(\n\t\t\t'info' => $info,\n\t\t\t'diff' => $diff->getDiff()\n\t\t);\n\t}",
"function action_diff()\n{\n\tglobal $pagestore, $page, $ver1, $ver2, $ParseEngine;\n\n\t$p1 = $pagestore->page($page);\n\t$p1->version = $ver1;\n\t$p2 = $pagestore->page($page);\n\t$p2->version = $ver2;\n\n\t$diff = diff_compute($p1->read(), $p2->read());\n\n\ttemplate_diff(array('page' => $p2->as_array(),\n\t\t\t\t\t\t\t\t\t\t\t'diff_html' => diff_parse($diff),\n\t\t\t\t\t\t\t\t\t\t\t'html' => parseText($p2->text, $ParseEngine, $page),\n\t\t\t\t\t\t\t\t\t\t\t'editable' => $p2->acl_check(),\n\t\t\t\t\t\t\t\t\t\t\t'timestamp' => $p2->time));\n}",
"function getRevisiondifference($from_text, $to_text)\n{\n // limit input\n if (!empty($from_text) && is_string($from_text)) {\n $from_text = substr($from_text, 0, 1024 * 100);\n } else {\n return false;\n }\n if (!empty($to_text) && is_string($to_text)) {\n $to_text = substr($to_text, 0, 1024 * 100);\n } else {\n return false;\n }\n $granularity = 2; // 0: Paragraph/lines, 1: Sentence, 2: Word, 3: Character\n $granularityStacks = array(\n FineDiff::$paragraphGranularity,\n FineDiff::$sentenceGranularity,\n FineDiff::$wordGranularity,\n FineDiff::$characterGranularity\n );\n $diff_opcodes = FineDiff::getDiffOpcodes($from_text, $to_text, $granularityStacks[$granularity]);\n $difference = FineDiff::renderDiffToHTMLFromOpcodes($from_text, $diff_opcodes);\n return $difference;\n}",
"function wp_get_revision_ui_diff($post, $compare_from, $compare_to)\n {\n }",
"function wp_ajax_get_revision_diffs()\n {\n }",
"public function getRevisionDelta() {\n $currentRevision = $this->owner->getRevision();\n\n if ($currentRevision == null)\n return null;\n\n $currentRevision = $this->owner->getRevision()->Revision;\n\n $publishedRevision = ItemEnvironment::find()->where([\n \"DocumentId\" => $this->owner->getDocumentId()->getId(),\n \"Status\" => Yii::$app->getModule(\"environment\")->getLiveEnvironment(),\n ])->orderBy(\"Revision DESC\")->one();\n\n if ($publishedRevision)\n return $currentRevision - $publishedRevision->Revision;\n\n return 0;\n }",
"public function DeleteVersion() {\n\n\t\tif ($this->parameter_check) {\n\n\t\t\t/* DATABASE CONNECTION */\n\t\t\t$db=$GLOBALS['db'];\n\n\t\t\t/* DESCRIPTION MUST ALWAYS COME FIRST BEFORE WE DELETE THE RECORDS er */\n\t\t\t$description=GetColumnValue(\"filename\",\"document_files\",\"document_id\",$this->document_id,\"\"). \" - version deleted\";\n\n\t\t\t/* PROCESS LOGGING BEFORE DELETION TO PROTECT FOREIGN KEY CONSTRAINT */\n\t\t\tLogDocumentFileHistory($this->GetColVal(\"filename\"),$this->GetColVal(\"category_id\"),$this->GetColVal(\"version_number\"),$description);\n\n\t\t\t/* AVOID SUB QUERY HERE FOR MYSQL */\n\t\t\t$sql=\"SELECT document_id, version_number\n\t\t\t\t\t\tFROM \".$GLOBALS['database_prefix'].\"document_files\n\t\t\t\t\t\tWHERE filename = '\".$this->GetColVal(\"filename\").\"'\n\t\t\t\t\t\tAND category_id = \".$this->GetColVal(\"category_id\").\"\n\t\t\t\t\t\tORDER BY version_number DESC\n\t\t\t\t\t\tLIMIT 1\n\t\t\t\t\t\t\";\n\t\t\t//echo $sql.\"<br>\";\n\t\t\t$result = $db->Query($sql);\n\t\t\tif ($db->NumRows($result) > 0) {\n\t\t\t\twhile($row = $db->FetchArray($result)) {\n\t\t\t\t \t$document_id_delete = $row['document_id'];\n\t\t\t\t \t/* THE VERSION TO UPDATE TO THE LATEST */\n\t\t\t\t \t$document_id_latest_version=($row['version_number']-1);\n\t\t\t }\n\t\t\t}\n\n\t\t\t/* DELETE DOCUMENT */\n\t\t\t$sql=\"DELETE FROM \".$GLOBALS['database_prefix'].\"document_files\n\t\t\t\t\t\tWHERE document_id IN (\n\t\t\t\t\t\t\t\".$document_id_delete.\"\n\t\t\t\t\t\t)\n\t\t\t\t\t\t\";\n\t\t\t//echo $sql.\"<br>\";\n\t\t\t$result=$db->Query($sql);\n\t\t\tif ($db->AffectedRows($result) > 0) {\n\t\t\t\t/* UPDATE THE PREVIOUS VERSION TO THE LATEST VERSION */\n\t\t\t\t$sql_upd=\"UPDATE \".$GLOBALS['database_prefix'].\"document_files\n\t\t\t\t\t\t\t\t\tSET latest_version = 'y',\n\t\t\t\t\t\t\t\t\tchecked_out = 'n'\n\t\t\t\t\t\t\t\t\tWHERE document_id IN (\n\t\t\t\t\t\t\t\t\t\t\".$document_id_latest_version.\"\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\";\n\t\t\t\t//echo $sql_upd.\"<br>\";\n\t\t\t\t$result_upd=$db->Query($sql_upd);\n\t\t\t\tif ($db->AffectedRows($result_upd) > 0) {\n\t\t\t\t\treturn True;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$this->Errors(\"Delete version failed\");\n\t\t\t\t\treturn False;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn False;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$this->Errors(\"Parameter check failed\");\n\t\t\treturn False;\n\t\t}\n\t}",
"public function latest_version();",
"public function previousVersion()\n {\n return $this->versions()->orderBy(Version::CREATED_AT, 'DESC')->limit(1)->offset(1)->first();\n }",
"private function getPreviousVersion() {\n\t\t$query = DB::select()->from('settings')->where('key', '=', 'version');\n\t\t$result = $query->execute();\n\n\t\tif ($result->count() == 0 || (isset($result[0]) && $result[0]['value'] == false)) {\n\t\t\t$this->previous_version = false;\n\t\t\t// reset($this->versions);\n\t\t\t// current($this->versions);\n\t\t\t$this->actual_version = key($this->versions);\n\t\t} else {\n\t\t\t$this->acutal_version = $result[0]['value'];\n\t\t}\n\t}",
"public function getRevision();",
"public function getRevision() {}",
"private function getUnifiedDiff() {\n\t\t$currentText = $this->toEditText( $this->getCurrentContent() );\n\t\t$yourText = $this->textbox1;\n\n\t\t$currentLines = explode( \"\\n\", $currentText );\n\t\t$yourLines = explode( \"\\n\", str_replace( \"\\r\\n\", \"\\n\", $yourText ) );\n\n\t\treturn $this->getLineBasedUnifiedDiff( $currentLines, $yourLines );\n\t}",
"public function getPreviousVersion()\n {\n $versions = $this->getVersions();\n\n return count($versions) > 1 ? $versions[1] : 0;\n }",
"function getDiff()\n {\n }",
"function diff2( $page1, $page2 ) {\n\t\t$page1 = split( \"\\n\", $page1 );\n\t\t$page2 = split( \"\\n\", $page2 );\n\t\t$z = new WikiDiff( $page1, $page2 );\n\t\tif( $z->isEmpty() ) {\n\t\t\t$html = '<hr /><br />['.tra(\"Versions are identical\").']<br /><br />';\n\t\t} else {\n\t\t\t//$fmt = new WikiDiffFormatter;\n\t\t\t$fmt = new WikiUnifiedDiffFormatter;\n\t\t\t$html = $fmt->format( $z, $page1 );\n\t\t}\n\t\treturn $html;\n\t}",
"public function wp_check_update()\n\t{\n\t\t$content = file_get_contents('https://raw.githubusercontent.com/emulsion-io/wp-migration-url/master/version.json'.'?'.mt_rand());\n\t\t$version = json_decode($content);\n\n\t\t//var_dump($version); exit;\n\n\t\t$retour['version_courante'] = $this->_version;\n\t\t$retour['version_enligne'] = $version->version;\n\n\t\tif($retour['version_courante'] != $retour['version_enligne']) {\n\t\t\t$retour['maj_dipso'] = TRUE;\n\t\t} else {\n\t\t\t$retour['maj_dipso'] = FALSE;\n\t\t}\n\n\t\treturn $retour;\n\t}",
"public function getVersions();",
"public function getVersions();",
"public function getVersions();",
"public function getSchemaVersion() {\n\t\t$result = \"No Schema Version Found\"; \n\t\t$sql = \"select versionnumber, dateapplied from schemaversion order by dateapplied desc limit 1 \";\n\t\t$statement = $this->conn->prepare($sql);\n\t\t$statement->execute();\n\t\t$statement->bind_result($version,$dateapplied);\n\t\twhile ($statement->fetch()) { \n\t\t\t$result = $version;\n\t\t}\n\t\t$statement->close();\n\t\treturn $result;\t\t\n\t}",
"public function laterThan($version);",
"public function getRevision() ;",
"public function findLatest()\n {\n foreach ($this->versions as $version) {\n if ($version->getVersion() === 'Unreleased') {\n continue;\n }\n\n return $version;\n }\n }",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function test_library_version() {\n\t\t$path = route('v2_api_versionLatest',[],false);\n\t\t$params = implode('&', array_map(function ($v, $k) { return sprintf(\"%s=%s\", $k, $v); }, $this->params, array_keys($this->params)));\n\n\t\t$this->log(\"\\nTesting: \" . route('v2_api_versionLatest', $this->params),'light_cyan',true);\n\t\t$response = $this->get(route('v2_api_versionLatest'), $this->params);\n\t\t$response->assertSuccessful();\n\t\t$response->assertJsonStructure($this->getSchemaKeys('v2_api_versionLatest'));\n\t\t$this->compareToOriginal($path,$this->getSchemaKeys('v2_api_versionLatest'));\n\t}",
"public function get_version();",
"public function getVersion() {\n $logRepo = \\Env::get('em')->getRepository('Cx\\Core\\ContentManager\\Model\\Entity\\LogEntry');\n return $logRepo->getLatestLog($this);\n }",
"function getDifference()\n{\n\n $url = explode('/', getcwd());\n array_pop($url);\n $url = implode('/', $url);//die;\n $dir1 = GetDir($url.'/v1'); \n $dir2 = GetDir($url.'/v2');\n $modified = get_File_difference($dir1,$dir2);\n $resp['root'] = $dir2;\n $resp['removed'] = array_diff($dir1,$dir2);\n $resp['added'] = array_diff($dir2,$dir1);\n $resp['modified'] = $modified;\n echo json_encode($resp);\n}",
"public function getDifference(\n $id,\n $oldVersion,\n $newVersion\n )\n {\n return $this->_GetDifference_operation->call([\n 'id' => $id,\n 'oldVersion' => $oldVersion,\n 'newVersion' => $newVersion\n ]);\n }",
"function nucleus_version_compare($version1, $version2, $operator = '')\n{\n $args = func_get_args();\n for($i = 0; $i<=1; $i++)\n {\n $args[$i] = str_replace(array('_','-','+','/'), '.', $args[$i]);\n $args[$i] = preg_replace('#^[^0-9]+#', '', $args[$i]);\n $ver = explode('.', $args[$i]);\n $major = intval($ver[0]);\n if ($major <= 3)\n { // minor version\n $x = @intval($ver[1]);\n if ($x >= 10)\n $ver[1] = sprintf('%d.%d', $x / 10 , $x % 10);\n else\n $ver[1] = sprintf('%d.0', $x);\n }\n $args[$i] = implode('.', $ver);\n }\n return call_user_func_array('version_compare', $args);\n}",
"abstract public function get_version();",
"abstract public function getVersion();",
"abstract public function getVersion();",
"abstract public function getVersion();",
"abstract public function getVersion();",
"public function getPdfVersion();",
"public function getRevision($round = true) {}",
"function get_customer_trans_version($type, $trans_no)\n{\n if (!is_array($trans_no))\n $trans_no = array($trans_no);\n\n $sql = 'SELECT trans_no, version FROM ' . TB_PREF . 'debtor_trans\n\t\t\tWHERE type=' . db_escape($type) . ' AND (';\n\n foreach ($trans_no as $key => $trans)\n $trans_no[$key] = 'trans_no=' . db_escape($trans_no[$key]);\n\n $sql .= implode(' OR ', $trans_no) . ')';\n\n $res = db_query($sql, 'document version retreival');\n\n $vers = array();\n while ($mysql = db_fetch($res)) {\n $vers[$mysql['trans_no']] = $mysql['version'];\n }\n return $vers;\n}",
"function getLatestRev() {\n\t\t$rev = $this->LatestRevPacked;\n\t\tif(!$rev && $this->URL) {\n\t\t\t$this->NeedsLatestRev = 1;\n\t\t\t$this->update();\n\t\t\t$rev = $this->LatestRevPacked;\n\t\t}\n\t\treturn $rev;\n\t}",
"protected function getLatestVersion()\n {\n $latestVersion = trim($this->rfs->getContents($this->getOriginName(), $this->getBaseUrl() . '/version', false));\n\n return $latestVersion;\n }",
"public function getDiffs() {\n return $this->findDiffs();\n }",
"public function getSpecifiedVersion();",
"public function get_version_from_file(){\n\n\t\t\t$result = '';\n\n\t\t\tif( empty( $this->file_contains_version ) )\n\t\t\t\t$this->file_contains_version = 'readme.md';\n\n\t\t\t$query = $this->api_urls['rawurl'] . '/' . $this->file_contains_version;\n\n\t\t\tif( ! empty( $this->access_token ) )\n\t\t\t\t$query = add_query_arg( array( 'access_token' => $this->access_token ), $query );\n\n\t\t\t$raw_response = wp_remote_get( $query, array('sslverify' => $this->config['sslverify']) );\n\t\t\t//TODO: Error handling for status-code != 200\n\n\t\t\tif ( is_wp_error( $raw_response ) ){\n\n\t\t\t\t$this->error = TRUE;\n\t\t\t\t$this->set_error(\n\t\t\t\t\t\t'warning',\n\t\t\t\t\t\tsprintf( '%s: %s', __( 'Error while fetching version from file', self::LANG ), $raw_response->get_error_message() )\n\t\t\t\t);\n\n\t\t\t} else {\n\n\t\t\t\tpreg_match( $this->search_pattern, $raw_response['body'], $version );\n\n\t\t\t\t$result = &$version[1];\n\n\t\t\t}\n\n\t\t\treturn ( isset( $result ) && ! empty( $result ) ) ? trim( $result ) : NULL;\n\n\t\t}",
"function admin_check_version()\n{\n global $app, $globalSettings;\n $versionAnswer = [];\n $contents = file_get_contents(VERSION_URL);\n if ($contents == false) {\n $versionClass = 'error';\n $versionAnswer = sprintf(getMessageString('admin_new_version_error'), $globalSettings['version']);\n } else {\n $versionInfo = json_decode($contents);\n $version = $globalSettings['version'];\n if (strpos($globalSettings['version'], '-') === false) {\n $v = preg_split('/-/', $globalSettings['version']);\n $version = $v[0];\n }\n $result = version_compare($version, $versionInfo->{'version'});\n if ($result === -1) {\n $versionClass = 'success';\n $msg1 = sprintf(getMessageString('admin_new_version'), $versionInfo->{'version'}, $globalSettings['version']);\n $msg2 = sprintf(\"<a href=\\\"%s\\\">%s</a>\", $versionInfo->{'url'}, $versionInfo->{'url'});\n $msg3 = sprintf(getMessageString('admin_check_url'), $msg2);\n $versionAnswer = $msg1 . '. ' . $msg3;\n } else {\n $versionClass = '';\n $versionAnswer = sprintf(getMessageString('admin_no_new_version'), $globalSettings['version']);\n }\n }\n $app->render('admin_version.html', [\n 'page' => mkPage(getMessageString('admin_check_version'), 0, 2),\n 'versionClass' => $versionClass,\n 'versionAnswer' => $versionAnswer,\n 'isadmin' => true,\n ]);\n}",
"function pfs_version_compare($cur_time, $cur_text, $remote) {\n\t$v = version_compare_dates($cur_time, $remote);\n\tif ($v === FALSE) {\n\t\t// If that fails, try to compare by string\n\t\t// Before anything else, simply test if the strings are equal\n\t\tif (($cur_text == $remote) || ($cur_time == $remote)) {\n\t\t\treturn 0;\n\t\t}\n\t\tlist($cur_num, $cur_str) = explode('-', $cur_text);\n\t\tlist($rem_num, $rem_str) = explode('-', $remote);\n\n\t\t// First try to compare the numeric parts of the version string.\n\t\t$v = version_compare_numeric($cur_num, $rem_num);\n\n\t\t// If the numeric parts are the same, compare the string parts.\n\t\tif ($v == 0) {\n\t\t\treturn version_compare_string($cur_str, $rem_str);\n\t\t}\n\t}\n\treturn $v;\n}",
"private function compareVersions($a, $b)\n {\n if ($a == $b) {\n //var_dump(\"Equal!\");\n return 0;\n }\n $partsA = explode('.', $a);\n //var_dump($partsA);\n $partsB = explode('.', $b);\n $more = null;\n //var_dump($partsB);\n foreach ($partsA as $key => $partA) {\n //Console::output(\"Process \" . $partA);\n if ($more !== null) {\n //Console::output(\"Already found\");\n continue;\n }\n if (array_key_exists($key, $partsB)) {\n if ((int)$partA > (int)$partsB[$key]) {\n //Console::output($partA . \" more than \" . $partsB[$key]);\n $more = true;\n } elseif ((int)$partA < (int)$partsB[$key]) {\n //Console::output($partA . \" less than \" . $partsB[$key]);\n $more = false;\n }\n //Console::output($partA . \" equal \" . $partsB[$key]);\n } else {\n //Console::output($key . \" doesn't exist in partsB\");\n $more = true;\n }\n }\n\n //Console::output(\"Result \" . ($more) ? \"more\" : \"less\");\n return $more ? 1 : -1;\n }",
"function get_File_difference($dir1,$dir2)\n{\n$url = explode('/', getcwd());\narray_pop($url);\n$url = implode('/', $url);//die;\n\n foreach($dir1 as $file1)\n {\n if(!is_dir($url.'/v1'.\"/\".$file1))\n {\n $st1[] = $file1;\n }\n \n }\n\n foreach($dir2 as $file2)\n {\n if(!is_dir($url.'/v2'.\"/\".$file2))\n {\n $st2[] = $file2;\n }\n \n }\n\n $common_files = array_intersect($st1,$st2);\n foreach($common_files as $diff)\n {\n\n if(md5(file_get_contents($url.'/v2'.\"/\".ltrim($diff,'-')))!=md5(file_get_contents($url.'/v1'.\"/\".ltrim($diff,'-'))))\n $mod[] = $diff;\n }\n\n return $mod;\n\n}",
"public function diff()\n {\n return $this->diff;\n }",
"protected static function _versionCompare($version = \"\", $reference = \"\", $operator = null){\nt_e('deprecated',__FUNCTION__);\n\t\t/*\n\t\t * will soon replace the code of following methods:\n\t\t * - we_util_Sys_Webedition::versionCompare()\n\t\t * - we_util_Sys_Webedition::toolVersionCompare()\n\t\t * - we_util_Sys_Php::versionCompare()\n\t\t * - we_util_Sys_Db_Mysql::versionCompare()\n\t\t * they'll call this method here insead of implementing the functionality themselves.\n\t\t */\n\t\treturn (!$version || !$reference ?\n\t\t\t\tfalse :\n\t\t\t\tversion_compare($version, $reference, $operator)\n\t\t\t);\n\t}",
"public function get_version(){\n\n\t\t\tswitch( $this->method ){\n\n\t\t\t\tcase 'commit-message':\n\t\t\t\tdefault:\n\t\t\t\t\treturn $this->get_version_from_commit_message();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'file':\n\t\t\t\t\treturn $this->get_version_from_file();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'tag':\n\t\t\t\t\treturn $this->get_version_from_tag();\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}",
"protected function getFromVersion()\n {\n $version = $this->loadFromVersion();\n $this->log('The from version is detected as ' . implode(' ', $version));\n return $version;\n }",
"public function currentVersion()\n {\n return $this->versions()->orderBy(Version::CREATED_AT, 'DESC')->first();\n }",
"function _wp_get_post_revision_version($revision)\n {\n }",
"public function getDiff()\n {\n $original = $this->_reconstructFromTokens($this->_tokensOriginal);\n $mutated = $this->_reconstructFromTokens($this->_tokensMutated);\n $difference = \\Mutateme\\Utility\\Diff::difference($original, $mutated);\n return $difference;\n }",
"public function getVersion() {}",
"public function getVersion() {}",
"public function getVersion() {}",
"public function getVersion() {}",
"public function getVersion() {}",
"public function getDiff()\n {\n if (!$this->checkDiff()) {\n return '';\n }\n\n $original = $this->reconstructFromTokens($this->tokensOriginal);\n $mutated = $this->reconstructFromTokens($this->tokensMutated);\n\n return $this->getDiffProvider()->difference($original, $mutated);\n }",
"public function testVersionCompare(): void\n {\n $bag = Bag::create($this->tmpdir);\n $method = $this->getReflectionMethod('\\whikloj\\BagItTools\\Bag', 'compareVersion');\n\n // Current version is 1.0\n $this->assertEquals(-1, $method->invokeArgs($bag, ['0.97']));\n $this->assertEquals(0, $method->invokeArgs($bag, ['1.0']));\n $this->assertEquals(1, $method->invokeArgs($bag, ['1.1']));\n }",
"public static function show_diff() {\r\n\t\tcheck_admin_referer('plugin-name-action_wpidenonce'); \r\n\t\tif ( !is_super_admin() )\r\n\t\t\twp_die('<p>'.__('You do not have sufficient permissions to edit templates for this site. SORRY').'</p>');\r\n\t\t\r\n error_reporting(E_ALL);\r\n ini_set(\"display_errors\", 1);\r\n \r\n require_once('git/autoload.php.dist');\r\n //use TQ\\Git\\Cli\\Binary;\r\n //use TQ\\Git\\Repository\\Repository;\r\n \r\n $root = apply_filters( 'wpide_filesystem_root', WP_CONTENT_DIR ) . \"/\"; \r\n \r\n //check repo path entered or die\r\n if ( !strlen($_POST['gitpath']) ) \r\n die(\"Error: Path to your git repository is required!\");\r\n \r\n \r\n $repo_path = $root . sanitize_text_field( $_POST['gitpath'] );\r\n $gitbinary = sanitize_text_field( stripslashes($_POST['gitbinary']) );\r\n \r\n if ( $gitbinary===\"I'll guess..\" ){ //the binary path\r\n \r\n $thebinary = TQ\\Git\\Cli\\Binary::locateBinary();\r\n $git = TQ\\Git\\Repository\\Repository::open($repo_path, new TQ\\Git\\Cli\\Binary( $thebinary ) );\r\n \r\n }else{\r\n \r\n $git = TQ\\Git\\Repository\\Repository::open($repo_path, new TQ\\Git\\Cli\\Binary( $_POST['gitbinary'] ) );\r\n \r\n }\r\n \r\n $file = sanitize_text_field( base64_decode( $_POST['file']) );\r\n \r\n //generate a diff using the built in WordPress code\r\n $args = array(\r\n 'title' => 'Differences',\r\n 'title_left' => 'Old Version',\r\n \t'title_right' => 'New Version'\r\n );\r\n \r\n $contents = file_get_contents($repo_path . \"/\" . $file); //the git library isn't using the WP filesystem API so should we here? should we fullstop?\r\n $contents2 = $git->showFile( $file, 'HEAD@{1}');\r\n \r\n $diff_table = wp_text_diff($contents2, $contents, $args); \r\n echo \"<strong>Diff</strong>\" . $diff_table;\r\n\r\n \r\n\t\tdie(); // this is required to return a proper result\r\n\t}",
"public function getPdfVersion() {}",
"public function getPdfVersion() {}",
"public function getPdfVersion() {}",
"function version_comparison($check_ver, $base_ver)\n{\n $ret = 0;\n\n // determine the parts of the version to compare to\n $base_tmp = split('\\.', $base_ver);\n $base = array();\n $base['major'] = $base_tmp[0] != '' ? $base_tmp[0]:0;\n $base['minor'] = $base_tmp[1] != '' ? $base_tmp[1]:0;\n $base['patch'] = $base_tmp[2] != '' ? $base_tmp[2]:0;\n $base['build'] = $base_tmp[3] != '' ? $base_tmp[3]:0;\n\n // determine the parts of the version to check\n $check_tmp = split('\\.', $check_ver);\n $check = array();\n $check['major'] = $check_tmp[0] != '' ? $check_tmp[0]:0;\n $check['minor'] = $check_tmp[1] != '' ? $check_tmp[1]:0;\n $check['patch'] = $check_tmp[2] != '' ? $check_tmp[2]:0;\n $check['build'] = $check_tmp[3] != '' ? $check_tmp[3]:0;\n\n // loop through each part of the version number\n foreach ($base as $key => $val)\n {\n if ($check[$key] != $val)\n {\n // determine higher or lower and set return var\n if ($check[$key] > $val)\n {\n\n $ret = 1;\n }\n else\n {\n $ret = -1;\n }\n\n // and break out of loop\n break;\n }\n }\n\n // return the verdict\n return $ret;\n}",
"public function getLastRevision();",
"public function getVersionReference()\n {\n return $this->version;\n }",
"function currentVersion() {\n if($this->current_version === false) {\n $this->current_version = DB::executeFirstCell('SELECT version FROM ' . TABLE_PREFIX . 'update_history ORDER BY created_on DESC LIMIT 0, 1');\n if(empty($this->current_version)) {\n $this->current_version = '1.0';\n } // if\n \t \n \t // activeCollab 2.0.2 failed to record proper version into update \n \t // history so we need to manually check if we have 2.0.2. This is done \n \t // by checking if acx_attachments table exists (introduced in aC 2).\n \t if((version_compare($this->current_version, '2.0') < 0) && DB::tableExists(TABLE_PREFIX . 'attachments')) {\n \t $this->current_version = '2.0.2';\n \t } // if\n } // if\n return $this->current_version;\n }",
"public function getLatestVersion()\n {\n return $this->version;\n }",
"public function getRevision()\n {\n return $this->result[\"revision\"];\n }",
"private function getCurrentVersion() {\n\t\t\n\t\t// Migration from SB3 to SB4\n\t\tif ($this->previous_version = false && $this->actual_version == key($this->versions)) {\n\t\t\treturn;\n\t\t}\n\t}",
"public function diff($new,$old)\n\t{\n \t\t/*global $sourceFolder;\n\t\tglobal $uploadFolder;\n\n\n\t\t$uploadDir = $sourceFolder.\"/\".$uploadFolder;\n\n \t\t if (!file_exists($uploadDir.\"/tmp\"))\n\t\t {\n\t\t \tmkdir($uploadDir .\"/tmp\", 0755);\n\n\t\t }\n\t\t// $new=htmlspecialchars($new, ENT_QUOTES);\n\t\t// $old=htmlspecialchars($old, ENT_QUOTES);\n\t\t $fileNew = \"newFile\";\n\t\t $fileOld=\"oldFile\";\n\t\t$fpn = fopen($uploadDir .\"/tmp/\".$fileNew, 'w') or die(\"can't open new file for writing ARTICLE L:105\");\n\t\tfwrite($fpn,$new);\n\t\tfclose($fpn);\n\n\t\t$fpo = fopen($uploadDir .\"/tmp/\".$fileOld, 'w') or die(\"can't open old file for writing ARTICLE L:109\");\n\t\tfwrite($fpo,$old);\n\t\tfclose($fpo);\n\n\t\t$cmd=\"diff \".$uploadDir .\"/tmp/\".$fileNew.' '.$uploadDir .\"/tmp/\".$fileOld.\"\";\n\n\t\t$diff = shell_exec(''.$cmd.'');\n\n\t\t$fpo = fopen($uploadDir .\"/tmp/diffGenerated\", 'w') or die(\"can't open old file for writing ARTICLE L:109\");\n\t\tfwrite($fpo,$diff);\n\t\tfclose($fpo);\n\t\t$diff=addslashes($diff);*/\n\t\treturn $old;\n\t}",
"function getLatestVersion() {\n global $CONF;\n\n if (!function_exists('curl_init')) return false;\n\n // response version text , last request time\n foreach(array('LatestVerText','LatestVerReqTime') as $key)\n if (!array_key_exists($key,$CONF))\n {\n // `name` varchar(20)\n $query = sprintf(\"INSERT INTO %s (name,value) VALUES ('%s', '')\", sql_table('config'), sql_real_escape_string($key));\n sql_query($query);\n $CONF[$key] = '';\n }\n\n $t = (!empty($CONF['LatestVerReqTime']) ? intval($CONF['LatestVerReqTime']):0);\n $l_ver = (!empty($CONF['LatestVerText']) ? $CONF['LatestVerText']:'');\n $elapsed_time = time()-$t;\n // cache 180 minutes ,\n if ($t>0 && ($elapsed_time > -60) && ($elapsed_time<60*180))\n {\n return $l_ver;\n }\n\n $crl = curl_init();\n $timeout = 5;\n curl_setopt ($crl, CURLOPT_URL,'http://nucleuscms.org/version_check.php');\n curl_setopt ($crl, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt ($crl, CURLOPT_CONNECTTIMEOUT, $timeout);\n $ret = curl_exec($crl);\n curl_close($crl);\n\n if (empty($ret))\n $ret = '';\n\n ADMIN::updateConfig('LatestVerText', $ret);\n ADMIN::updateConfig('LatestVerReqTime', strval(time()) );\n\n return $ret;\n}",
"public function retrieveVersion()\n {\n return $this->start()->uri(\"/api/system/version\")\n ->get()\n ->go();\n }",
"public function getRemote_version()\n {\n $request = wp_remote_post( $this->update_path, array( 'body' => array( 'action' => 'version' ) ) );\n if ( !is_wp_error( $request ) || wp_remote_retrieve_response_code( $request ) === 200 ) {\n return $request['body'];\n }\n return false;\n }",
"public function diff(DocumentInterface $other)\n {\n // TODO: Implement diff() method.\n }",
"public static function order_documents_by_last_updated($response)\n\t{\n\t\t$length = count($response['document']);\n\t\tfor ($start_item = 0; $start_item < $length; $start_item++)\n\t\t{\n\t\t\t$aux_date = 0;\n\t\t\tfor ($i = $start_item; $i < $length; $i++)\n\t\t\t{\n\t\t\t\tif (strtotime($response['document'][$i]['last modified']) > $aux_date)\n\t\t\t\t{\n\t\t\t\t\t$aux_date = strtotime($response['document'][$i]['last modified']);\n\t\t\t\t\t$pos = $i;\n\n\t\t\t\t}\n\t\t\t}\n\t\t\t$aux_array = $response['document'][$start_item];\n\t\t\t$response['document'][$start_item] = $response['document'][$pos];\n\t\t\t$response['document'][$pos] = $aux_array;\n\t\t}\n\t\treturn $response;\n\t}"
] | [
"0.6586234",
"0.6466178",
"0.6179907",
"0.6070726",
"0.59414625",
"0.5813486",
"0.5793491",
"0.5780064",
"0.5658973",
"0.5653192",
"0.5622007",
"0.5588661",
"0.55751586",
"0.5565256",
"0.5520495",
"0.55090815",
"0.5497159",
"0.5492641",
"0.5492641",
"0.5492641",
"0.54787904",
"0.5471546",
"0.5435461",
"0.5401241",
"0.5396283",
"0.5396283",
"0.5396283",
"0.5396283",
"0.5396283",
"0.5396283",
"0.5396283",
"0.5396283",
"0.5396283",
"0.5396283",
"0.5396283",
"0.5396283",
"0.5396283",
"0.5396283",
"0.5396283",
"0.5396283",
"0.5396283",
"0.5396283",
"0.5396283",
"0.5396283",
"0.5396283",
"0.5396283",
"0.5366975",
"0.5362248",
"0.535922",
"0.53552526",
"0.5324848",
"0.53227323",
"0.5314355",
"0.53056186",
"0.53056186",
"0.53056186",
"0.53056186",
"0.5300931",
"0.5283121",
"0.5282098",
"0.5263711",
"0.5248663",
"0.5247529",
"0.52438945",
"0.5235311",
"0.5231757",
"0.5231325",
"0.5224556",
"0.5212708",
"0.5210804",
"0.52070457",
"0.5203806",
"0.52027357",
"0.5183397",
"0.5181332",
"0.5172566",
"0.5171328",
"0.5171328",
"0.5171328",
"0.5171328",
"0.5170136",
"0.513801",
"0.5131217",
"0.51301074",
"0.5129753",
"0.5129753",
"0.5129753",
"0.5126871",
"0.51224667",
"0.51158035",
"0.51101136",
"0.50944597",
"0.50928533",
"0.5065899",
"0.50496256",
"0.50460035",
"0.5043906",
"0.5037691",
"0.503441",
"0.502914"
] | 0.521144 | 69 |
Gets the difference on a document by comparing two document versions | public function getDifference(
$id,
$oldVersion,
$newVersion
)
{
return $this->_GetDifference_operation->call([
'id' => $id,
'oldVersion' => $oldVersion,
'newVersion' => $newVersion
]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function action_diff()\n{\n\tglobal $pagestore, $page, $ver1, $ver2, $ParseEngine;\n\n\t$p1 = $pagestore->page($page);\n\t$p1->version = $ver1;\n\t$p2 = $pagestore->page($page);\n\t$p2->version = $ver2;\n\n\t$diff = diff_compute($p1->read(), $p2->read());\n\n\ttemplate_diff(array('page' => $p2->as_array(),\n\t\t\t\t\t\t\t\t\t\t\t'diff_html' => diff_parse($diff),\n\t\t\t\t\t\t\t\t\t\t\t'html' => parseText($p2->text, $ParseEngine, $page),\n\t\t\t\t\t\t\t\t\t\t\t'editable' => $p2->acl_check(),\n\t\t\t\t\t\t\t\t\t\t\t'timestamp' => $p2->time));\n}",
"function getDiff($from_version, $to_version = null)\n\t{\n\t\tinclude_once 'Text/Diff.php';\n\t\t\n\t\t$info = array();\n\t\t\n\t\t// from\n\t\t$tmp = $this->store->getPage($this->area, $this->page, $from_version);\n\t\t$tmp['body'] = htmlspecialchars($tmp['body']);\n\t\t$from_lines = explode(\"\\n\", $tmp['body']);\n\t\t$info['from']['dt'] = $tmp['dt'];\n\t\t$info['from']['username'] = $tmp['username'];\n\t\t\n\t\t// to\n\t\t$tmp = $this->store->getPage($this->area, $this->page, $to_version);\n\t\t$tmp['body'] = htmlspecialchars($tmp['body']);\n\t\t$to_lines = explode(\"\\n\", $tmp['body']);\n\t\t$info['to']['dt'] = $tmp['dt'];\n\t\t$info['to']['username'] = $tmp['username'];\n\t\t\n\t\t// diff and return\n\t\t$diff =& new Text_Diff($from_lines, $to_lines);\n\t\treturn array(\n\t\t\t'info' => $info,\n\t\t\t'diff' => $diff->getDiff()\n\t\t);\n\t}",
"function getRevisiondifference($from_text, $to_text)\n{\n // limit input\n if (!empty($from_text) && is_string($from_text)) {\n $from_text = substr($from_text, 0, 1024 * 100);\n } else {\n return false;\n }\n if (!empty($to_text) && is_string($to_text)) {\n $to_text = substr($to_text, 0, 1024 * 100);\n } else {\n return false;\n }\n $granularity = 2; // 0: Paragraph/lines, 1: Sentence, 2: Word, 3: Character\n $granularityStacks = array(\n FineDiff::$paragraphGranularity,\n FineDiff::$sentenceGranularity,\n FineDiff::$wordGranularity,\n FineDiff::$characterGranularity\n );\n $diff_opcodes = FineDiff::getDiffOpcodes($from_text, $to_text, $granularityStacks[$granularity]);\n $difference = FineDiff::renderDiffToHTMLFromOpcodes($from_text, $diff_opcodes);\n return $difference;\n}",
"function wp_get_revision_ui_diff($post, $compare_from, $compare_to)\n {\n }",
"function diff2( $page1, $page2 ) {\n\t\t$page1 = split( \"\\n\", $page1 );\n\t\t$page2 = split( \"\\n\", $page2 );\n\t\t$z = new WikiDiff( $page1, $page2 );\n\t\tif( $z->isEmpty() ) {\n\t\t\t$html = '<hr /><br />['.tra(\"Versions are identical\").']<br /><br />';\n\t\t} else {\n\t\t\t//$fmt = new WikiDiffFormatter;\n\t\t\t$fmt = new WikiUnifiedDiffFormatter;\n\t\t\t$html = $fmt->format( $z, $page1 );\n\t\t}\n\t\treturn $html;\n\t}",
"public function diff(DocumentInterface $other)\n {\n // TODO: Implement diff() method.\n }",
"function getDiff()\n {\n }",
"function wp_ajax_get_revision_diffs()\n {\n }",
"public function getDiff()\n {\n $original = $this->_reconstructFromTokens($this->_tokensOriginal);\n $mutated = $this->_reconstructFromTokens($this->_tokensMutated);\n $difference = \\Mutateme\\Utility\\Diff::difference($original, $mutated);\n return $difference;\n }",
"private function compareVersions($a, $b)\n {\n if ($a == $b) {\n //var_dump(\"Equal!\");\n return 0;\n }\n $partsA = explode('.', $a);\n //var_dump($partsA);\n $partsB = explode('.', $b);\n $more = null;\n //var_dump($partsB);\n foreach ($partsA as $key => $partA) {\n //Console::output(\"Process \" . $partA);\n if ($more !== null) {\n //Console::output(\"Already found\");\n continue;\n }\n if (array_key_exists($key, $partsB)) {\n if ((int)$partA > (int)$partsB[$key]) {\n //Console::output($partA . \" more than \" . $partsB[$key]);\n $more = true;\n } elseif ((int)$partA < (int)$partsB[$key]) {\n //Console::output($partA . \" less than \" . $partsB[$key]);\n $more = false;\n }\n //Console::output($partA . \" equal \" . $partsB[$key]);\n } else {\n //Console::output($key . \" doesn't exist in partsB\");\n $more = true;\n }\n }\n\n //Console::output(\"Result \" . ($more) ? \"more\" : \"less\");\n return $more ? 1 : -1;\n }",
"function diff($text1, $text2) {\n__autoload('TextDiff');\ninclude_once 'Text/Diff.php';\ninclude_once 'Text/Diff/Renderer.php';\ninclude_once 'Text/Diff/Renderer/unified.php';\n\n\n $vtext1 = chunk_split(strip_tags($text1, '<p><div>'), 1, \"\\n\");\n $vtext2 = chunk_split(strip_tags($text2, '<p><div>'), 1, \"\\n\");\n\n $vlines1 = str_split($vtext1, 2);\n $vlines2 = str_split($vtext2, 2);\n $text1 = str_replace(\"\\n\",\" \\n\",$text1);\n $text2 = str_replace(\"\\n\",\" \\n\",$text2);\n\n $vlines1 = explode(\" \", $text1);\n $vlines2 = explode(\" \", $text2);\n $diff = new Text_Diff($vlines1, $vlines2);\n $renderer = new Text_Diff_Renderer_inline();\n $html = html_entity_decode($renderer->render($diff));\n\n return preg_replace(array('#(<ins>|<del>)(<[^\\>]+>)#i', '#(</[^\\>]+>)(</ins>|</del>)#i'), '$2$1', $html);\n}",
"protected function _calculateDifference() {\n\t\tif (is_null($this->_difference)) {\n\t\t\t$updatedParams = $newParams = $sameParams = $difference = array();\n\t\t\t$newOriginalData = $origData = $this->getOriginalData();\n\t\t\t$newResultData = $resultData = $this->getResultData();\n\t\t\tif (!is_array($origData)) {\n\t\t\t\t$origData = array();\n\t\t\t}\n\t\t\tif (!is_array($resultData)) {\n\t\t\t\t$resultData = array();\n\t\t\t}\n\n\t\t\tif (!$origData && $resultData) {\n\t\t\t\t$newOriginalData = array('__was_created' => true);\n\t\t\t\t$difference = $resultData;\n\t\t\t}\n\t\t\telse if ($origData && !$resultData) {\n\t\t\t\t$newResultData = array('__was_deleted' => true);\n\t\t\t\t$difference = $origData;\n\t\t\t}\n\t\t\telse if ($origData && $resultData) {\n\t\t\t\t$newParams = array_diff_key($resultData, $origData);\n\t\t\t\t$sameParams = array_intersect_key($origData, $resultData);\n\t\t\t\tforeach ($sameParams as $key => $value) {\n\t\t\t\t\tif ($origData[$key] != $resultData[$key]){\n\t\t\t\t\t\t$updatedParams[$key] = $resultData[$key];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$newOriginalData = array_intersect_key($origData, $updatedParams);\n\t\t\t\t$difference = $newResultData = array_merge($updatedParams, $newParams);\n\t\t\t\tif ($difference && !$updatedParams) {\n\t\t\t\t\t$newOriginalData = array('__no_changes' => true);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->setOriginalData($newOriginalData);\n\t\t\t$this->setResultData($newResultData);\n\t\t\t$this->_difference = $difference;\n\t\t}\n\t\treturn $this->_difference;\n\t}",
"public function diff()\n {\n return $this->diff;\n }",
"public function getDiff()\n {\n if (!$this->checkDiff()) {\n return '';\n }\n\n $original = $this->reconstructFromTokens($this->tokensOriginal);\n $mutated = $this->reconstructFromTokens($this->tokensMutated);\n\n return $this->getDiffProvider()->difference($original, $mutated);\n }",
"function nucleus_version_compare($version1, $version2, $operator = '')\n{\n $args = func_get_args();\n for($i = 0; $i<=1; $i++)\n {\n $args[$i] = str_replace(array('_','-','+','/'), '.', $args[$i]);\n $args[$i] = preg_replace('#^[^0-9]+#', '', $args[$i]);\n $ver = explode('.', $args[$i]);\n $major = intval($ver[0]);\n if ($major <= 3)\n { // minor version\n $x = @intval($ver[1]);\n if ($x >= 10)\n $ver[1] = sprintf('%d.%d', $x / 10 , $x % 10);\n else\n $ver[1] = sprintf('%d.0', $x);\n }\n $args[$i] = implode('.', $ver);\n }\n return call_user_func_array('version_compare', $args);\n}",
"public function getRevisionDelta() {\n $currentRevision = $this->owner->getRevision();\n\n if ($currentRevision == null)\n return null;\n\n $currentRevision = $this->owner->getRevision()->Revision;\n\n $publishedRevision = ItemEnvironment::find()->where([\n \"DocumentId\" => $this->owner->getDocumentId()->getId(),\n \"Status\" => Yii::$app->getModule(\"environment\")->getLiveEnvironment(),\n ])->orderBy(\"Revision DESC\")->one();\n\n if ($publishedRevision)\n return $currentRevision - $publishedRevision->Revision;\n\n return 0;\n }",
"function get_File_difference($dir1,$dir2)\n{\n$url = explode('/', getcwd());\narray_pop($url);\n$url = implode('/', $url);//die;\n\n foreach($dir1 as $file1)\n {\n if(!is_dir($url.'/v1'.\"/\".$file1))\n {\n $st1[] = $file1;\n }\n \n }\n\n foreach($dir2 as $file2)\n {\n if(!is_dir($url.'/v2'.\"/\".$file2))\n {\n $st2[] = $file2;\n }\n \n }\n\n $common_files = array_intersect($st1,$st2);\n foreach($common_files as $diff)\n {\n\n if(md5(file_get_contents($url.'/v2'.\"/\".ltrim($diff,'-')))!=md5(file_get_contents($url.'/v1'.\"/\".ltrim($diff,'-'))))\n $mod[] = $diff;\n }\n\n return $mod;\n\n}",
"public function getDiffs() {\n return $this->findDiffs();\n }",
"private function getUnifiedDiff() {\n\t\t$currentText = $this->toEditText( $this->getCurrentContent() );\n\t\t$yourText = $this->textbox1;\n\n\t\t$currentLines = explode( \"\\n\", $currentText );\n\t\t$yourLines = explode( \"\\n\", str_replace( \"\\r\\n\", \"\\n\", $yourText ) );\n\n\t\treturn $this->getLineBasedUnifiedDiff( $currentLines, $yourLines );\n\t}",
"public function getPdfVersion();",
"function getDifference()\n{\n\n $url = explode('/', getcwd());\n array_pop($url);\n $url = implode('/', $url);//die;\n $dir1 = GetDir($url.'/v1'); \n $dir2 = GetDir($url.'/v2');\n $modified = get_File_difference($dir1,$dir2);\n $resp['root'] = $dir2;\n $resp['removed'] = array_diff($dir1,$dir2);\n $resp['added'] = array_diff($dir2,$dir1);\n $resp['modified'] = $modified;\n echo json_encode($resp);\n}",
"public function diff($new,$old)\n\t{\n \t\t/*global $sourceFolder;\n\t\tglobal $uploadFolder;\n\n\n\t\t$uploadDir = $sourceFolder.\"/\".$uploadFolder;\n\n \t\t if (!file_exists($uploadDir.\"/tmp\"))\n\t\t {\n\t\t \tmkdir($uploadDir .\"/tmp\", 0755);\n\n\t\t }\n\t\t// $new=htmlspecialchars($new, ENT_QUOTES);\n\t\t// $old=htmlspecialchars($old, ENT_QUOTES);\n\t\t $fileNew = \"newFile\";\n\t\t $fileOld=\"oldFile\";\n\t\t$fpn = fopen($uploadDir .\"/tmp/\".$fileNew, 'w') or die(\"can't open new file for writing ARTICLE L:105\");\n\t\tfwrite($fpn,$new);\n\t\tfclose($fpn);\n\n\t\t$fpo = fopen($uploadDir .\"/tmp/\".$fileOld, 'w') or die(\"can't open old file for writing ARTICLE L:109\");\n\t\tfwrite($fpo,$old);\n\t\tfclose($fpo);\n\n\t\t$cmd=\"diff \".$uploadDir .\"/tmp/\".$fileNew.' '.$uploadDir .\"/tmp/\".$fileOld.\"\";\n\n\t\t$diff = shell_exec(''.$cmd.'');\n\n\t\t$fpo = fopen($uploadDir .\"/tmp/diffGenerated\", 'w') or die(\"can't open old file for writing ARTICLE L:109\");\n\t\tfwrite($fpo,$diff);\n\t\tfclose($fpo);\n\t\t$diff=addslashes($diff);*/\n\t\treturn $old;\n\t}",
"protected function getDatabaseDifferences() {}",
"function date_compare($a, $b)\n\t\t{\n\t\t\tif (date($a[\"updated_at\"]) == date($b[\"updated_at\"]))\n\t\t\t\treturn 0;\n\n\t\t\treturn (date($a['updated_at']) < date($b['updated_at'])) ? -1 : 1;\n\n\t\t}",
"public function DeleteVersion() {\n\n\t\tif ($this->parameter_check) {\n\n\t\t\t/* DATABASE CONNECTION */\n\t\t\t$db=$GLOBALS['db'];\n\n\t\t\t/* DESCRIPTION MUST ALWAYS COME FIRST BEFORE WE DELETE THE RECORDS er */\n\t\t\t$description=GetColumnValue(\"filename\",\"document_files\",\"document_id\",$this->document_id,\"\"). \" - version deleted\";\n\n\t\t\t/* PROCESS LOGGING BEFORE DELETION TO PROTECT FOREIGN KEY CONSTRAINT */\n\t\t\tLogDocumentFileHistory($this->GetColVal(\"filename\"),$this->GetColVal(\"category_id\"),$this->GetColVal(\"version_number\"),$description);\n\n\t\t\t/* AVOID SUB QUERY HERE FOR MYSQL */\n\t\t\t$sql=\"SELECT document_id, version_number\n\t\t\t\t\t\tFROM \".$GLOBALS['database_prefix'].\"document_files\n\t\t\t\t\t\tWHERE filename = '\".$this->GetColVal(\"filename\").\"'\n\t\t\t\t\t\tAND category_id = \".$this->GetColVal(\"category_id\").\"\n\t\t\t\t\t\tORDER BY version_number DESC\n\t\t\t\t\t\tLIMIT 1\n\t\t\t\t\t\t\";\n\t\t\t//echo $sql.\"<br>\";\n\t\t\t$result = $db->Query($sql);\n\t\t\tif ($db->NumRows($result) > 0) {\n\t\t\t\twhile($row = $db->FetchArray($result)) {\n\t\t\t\t \t$document_id_delete = $row['document_id'];\n\t\t\t\t \t/* THE VERSION TO UPDATE TO THE LATEST */\n\t\t\t\t \t$document_id_latest_version=($row['version_number']-1);\n\t\t\t }\n\t\t\t}\n\n\t\t\t/* DELETE DOCUMENT */\n\t\t\t$sql=\"DELETE FROM \".$GLOBALS['database_prefix'].\"document_files\n\t\t\t\t\t\tWHERE document_id IN (\n\t\t\t\t\t\t\t\".$document_id_delete.\"\n\t\t\t\t\t\t)\n\t\t\t\t\t\t\";\n\t\t\t//echo $sql.\"<br>\";\n\t\t\t$result=$db->Query($sql);\n\t\t\tif ($db->AffectedRows($result) > 0) {\n\t\t\t\t/* UPDATE THE PREVIOUS VERSION TO THE LATEST VERSION */\n\t\t\t\t$sql_upd=\"UPDATE \".$GLOBALS['database_prefix'].\"document_files\n\t\t\t\t\t\t\t\t\tSET latest_version = 'y',\n\t\t\t\t\t\t\t\t\tchecked_out = 'n'\n\t\t\t\t\t\t\t\t\tWHERE document_id IN (\n\t\t\t\t\t\t\t\t\t\t\".$document_id_latest_version.\"\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\";\n\t\t\t\t//echo $sql_upd.\"<br>\";\n\t\t\t\t$result_upd=$db->Query($sql_upd);\n\t\t\t\tif ($db->AffectedRows($result_upd) > 0) {\n\t\t\t\t\treturn True;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$this->Errors(\"Delete version failed\");\n\t\t\t\t\treturn False;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn False;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$this->Errors(\"Parameter check failed\");\n\t\t\treturn False;\n\t\t}\n\t}",
"function differences($a1, $a2, $same = true){\n\t \n\t\t$result = new stdClass();\n\n\t\t$result->add = array_diff_key($a2, $a1);\n\t\t$result->delete = array_diff_key($a1, $a2);\n\n\t\t$both = array_intersect_key($a1, $a2);\n\t\tif($same) $result->same = array();\n\t\t$result->update = array();\n\t\tforeach($both as $id=>$val){\n\t\t\tif($a1[$id] !== $a2[$id])\n\t\t\t\t$result->update[$id] = $a2[$id];\n\t\t\telseif($same)\n\t\t\t\t$result->same[$id] = $a2[$id];\n\t\t}\n\n\t\t$result->differences = count($result->add) + count($result->update) + count($result->delete);\n\n\t\treturn $result;\n\t}",
"protected function getDifferencesObject() {}",
"function compare_func($a, $b)\n\t\t{\n\t\t\t$t1 = strtotime($a[\"org_date_added\"]);\n\t\t\t$t2 = strtotime($b[\"org_date_added\"]);\n\t\t\n\t\t\treturn ($t2 - $t1);\n\t\t}",
"function pfs_version_compare($cur_time, $cur_text, $remote) {\n\t$v = version_compare_dates($cur_time, $remote);\n\tif ($v === FALSE) {\n\t\t// If that fails, try to compare by string\n\t\t// Before anything else, simply test if the strings are equal\n\t\tif (($cur_text == $remote) || ($cur_time == $remote)) {\n\t\t\treturn 0;\n\t\t}\n\t\tlist($cur_num, $cur_str) = explode('-', $cur_text);\n\t\tlist($rem_num, $rem_str) = explode('-', $remote);\n\n\t\t// First try to compare the numeric parts of the version string.\n\t\t$v = version_compare_numeric($cur_num, $rem_num);\n\n\t\t// If the numeric parts are the same, compare the string parts.\n\t\tif ($v == 0) {\n\t\t\treturn version_compare_string($cur_str, $rem_str);\n\t\t}\n\t}\n\treturn $v;\n}",
"public function getVersions();",
"public function getVersions();",
"public function getVersions();",
"function sort_by_updated ($a, $b) {\n\t\treturn strtotime($b['LASTCHANGEDDATE']) - strtotime($a['LASTCHANGEDDATE']);\n\t}",
"abstract public function getVersion();",
"abstract public function getVersion();",
"abstract public function getVersion();",
"abstract public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function getVersion();",
"public function previousVersion()\n {\n return $this->versions()->orderBy(Version::CREATED_AT, 'DESC')->limit(1)->offset(1)->first();\n }",
"function get_customer_trans_version($type, $trans_no)\n{\n if (!is_array($trans_no))\n $trans_no = array($trans_no);\n\n $sql = 'SELECT trans_no, version FROM ' . TB_PREF . 'debtor_trans\n\t\t\tWHERE type=' . db_escape($type) . ' AND (';\n\n foreach ($trans_no as $key => $trans)\n $trans_no[$key] = 'trans_no=' . db_escape($trans_no[$key]);\n\n $sql .= implode(' OR ', $trans_no) . ')';\n\n $res = db_query($sql, 'document version retreival');\n\n $vers = array();\n while ($mysql = db_fetch($res)) {\n $vers[$mysql['trans_no']] = $mysql['version'];\n }\n return $vers;\n}",
"public function testVersionConstraintWithVersionedReferenceToVersionedEntity(): void\n {\n $documentDefinition = $this->definitionInstanceRegistry->get(DocumentDefinition::class);\n $orderDefinition = $this->definitionInstanceRegistry->get(OrderDefinition::class);\n $documentAssociationField = $documentDefinition->getField('order');\n\n static::assertNotNull($documentAssociationField);\n $resolverContext = new FieldResolverContext(\n '',\n 'document',\n $documentAssociationField,\n $documentDefinition,\n $orderDefinition,\n $this->queryBuilder,\n $this->context,\n null,\n );\n\n $this->resolver->join($resolverContext);\n\n static::assertSame([\n '`document`' => [\n [\n 'joinType' => 'left',\n 'joinTable' => '`order`',\n 'joinAlias' => '`document.order`',\n 'joinCondition' => '`document`.`order_id` = `document.order`.`id` AND `document`.`order_version_id` = `document.order`.`version_id`',\n ],\n ],\n ], $this->queryBuilder->getQueryPart('join'));\n }",
"public static function show_diff() {\r\n\t\tcheck_admin_referer('plugin-name-action_wpidenonce'); \r\n\t\tif ( !is_super_admin() )\r\n\t\t\twp_die('<p>'.__('You do not have sufficient permissions to edit templates for this site. SORRY').'</p>');\r\n\t\t\r\n error_reporting(E_ALL);\r\n ini_set(\"display_errors\", 1);\r\n \r\n require_once('git/autoload.php.dist');\r\n //use TQ\\Git\\Cli\\Binary;\r\n //use TQ\\Git\\Repository\\Repository;\r\n \r\n $root = apply_filters( 'wpide_filesystem_root', WP_CONTENT_DIR ) . \"/\"; \r\n \r\n //check repo path entered or die\r\n if ( !strlen($_POST['gitpath']) ) \r\n die(\"Error: Path to your git repository is required!\");\r\n \r\n \r\n $repo_path = $root . sanitize_text_field( $_POST['gitpath'] );\r\n $gitbinary = sanitize_text_field( stripslashes($_POST['gitbinary']) );\r\n \r\n if ( $gitbinary===\"I'll guess..\" ){ //the binary path\r\n \r\n $thebinary = TQ\\Git\\Cli\\Binary::locateBinary();\r\n $git = TQ\\Git\\Repository\\Repository::open($repo_path, new TQ\\Git\\Cli\\Binary( $thebinary ) );\r\n \r\n }else{\r\n \r\n $git = TQ\\Git\\Repository\\Repository::open($repo_path, new TQ\\Git\\Cli\\Binary( $_POST['gitbinary'] ) );\r\n \r\n }\r\n \r\n $file = sanitize_text_field( base64_decode( $_POST['file']) );\r\n \r\n //generate a diff using the built in WordPress code\r\n $args = array(\r\n 'title' => 'Differences',\r\n 'title_left' => 'Old Version',\r\n \t'title_right' => 'New Version'\r\n );\r\n \r\n $contents = file_get_contents($repo_path . \"/\" . $file); //the git library isn't using the WP filesystem API so should we here? should we fullstop?\r\n $contents2 = $git->showFile( $file, 'HEAD@{1}');\r\n \r\n $diff_table = wp_text_diff($contents2, $contents, $args); \r\n echo \"<strong>Diff</strong>\" . $diff_table;\r\n\r\n \r\n\t\tdie(); // this is required to return a proper result\r\n\t}",
"public function getRevision();",
"public function getPreviousVersion()\n {\n $versions = $this->getVersions();\n\n return count($versions) > 1 ? $versions[1] : 0;\n }",
"public static function compare(Version $a, Version $b)\n {\n $aValues = $a->numeric();\n $bValues = $b->numeric();\n\n foreach (array_keys(self::$ordinality) as $key) {\n $aVal = $aValues[$key];\n $bVal = $bValues[$key];\n\n if ($aVal < $bVal) {\n return -1;\n } elseif ($aVal > $bVal) {\n return 1;\n }\n }\n return 0;\n }",
"public function getPdfVersion() {}",
"public function getPdfVersion() {}",
"public function getPdfVersion() {}",
"public function wp_check_update()\n\t{\n\t\t$content = file_get_contents('https://raw.githubusercontent.com/emulsion-io/wp-migration-url/master/version.json'.'?'.mt_rand());\n\t\t$version = json_decode($content);\n\n\t\t//var_dump($version); exit;\n\n\t\t$retour['version_courante'] = $this->_version;\n\t\t$retour['version_enligne'] = $version->version;\n\n\t\tif($retour['version_courante'] != $retour['version_enligne']) {\n\t\t\t$retour['maj_dipso'] = TRUE;\n\t\t} else {\n\t\t\t$retour['maj_dipso'] = FALSE;\n\t\t}\n\n\t\treturn $retour;\n\t}",
"public function diff(array $a, array $b): array;",
"function phorum_api_diff($a, $b, $min=3, $i=0)\n{\n $diff = array();\n\n if ($a == \"\" && $b == \"\") return $diff;\n\n $a = str_replace(array(\"\\r\\n\", \"\\r\"), \"\\n\", $a);\n $b = str_replace(array(\"\\r\\n\", \"\\r\"), \"\\n\", $b);\n\n if ($a == \"\") {\n array_push($diff, \"$i+\".$b);\n return $diff;\n }\n if ($b == \"\") {\n array_push($diff, \"$i-\".$a);\n return $diff;\n }\n\n $match = phorum_api_diff_match($a, $b);\n if (strlen($match) < $min) {\n array_push($diff, \"$i-\".$a);\n array_push($diff, \"$i+\".$b);\n return $diff;\n }\n\n $ap = strpos($a, $match);\n $bp = strpos($b, $match);\n $diff = phorum_api_diff(substr($a, 0, $ap), substr($b, 0, $bp), $min, $i);\n return array_merge(\n $diff,\n phorum_api_diff(\n substr($a, $ap+strlen($match)),\n substr($b, $bp+strlen($match)),\n $min, $i+$bp+strlen($match)\n )\n );\n}",
"abstract public function get_version();",
"public function getRevision() {}",
"public function testVersionCompare(): void\n {\n $bag = Bag::create($this->tmpdir);\n $method = $this->getReflectionMethod('\\whikloj\\BagItTools\\Bag', 'compareVersion');\n\n // Current version is 1.0\n $this->assertEquals(-1, $method->invokeArgs($bag, ['0.97']));\n $this->assertEquals(0, $method->invokeArgs($bag, ['1.0']));\n $this->assertEquals(1, $method->invokeArgs($bag, ['1.1']));\n }",
"function _getPurchaseDifferences($a, $b, $users) {\n \n //d($a,'a');\n //d($b,'b');\n //d($users, 'users');\n\n $diffs = array();\n \n // Description\n if ($a['description'] != $b['description']) {\n $diffs[] = \"changed description from '<b>\" . $a['description'] . \"</b>' to '<b>\" . $b['description'] . \"</b>'.\";\n }\n \n // Date\n if ($a['date'] != $b['date']) {\n $diffs[] = \"changed purchase date from '<b>\" . $a['date'] . \"</b>' to '<b>\" . $b['date'] . \"</b>'.\";\n }\n \n // Payer\n if ($a['payer'] != $b['payer']) {\n $diffs[] = \"changed payer from '<b>\" . $users[$a['payer']]['user_name'] . \"</b>' to '<b>\" . $users[$b['payer']]['user_name'] . \"</b>'.\";\n }\n \n // Split Type\n if ($a['split_type'] != $b['split_type']) {\n $diffs[] = \"changed split type from '<b>\" . $a['split_type'] . \"</b>' to '<b>\" . $b['split_type'] . \"</b>'.\";\n }\n\n // Payees\n foreach (array_unique(array_merge(array_keys($a['payees']),array_keys($b['payees']))) as $payee_id) {\n if (isset($a['payees'][$payee_id])) {\n if (isset($b['payees'][$payee_id])) {\n // in BOTH - check if amounts have changed\n if ($a['payees'][$payee_id] != $b['payees'][$payee_id]) {\n if ($a['payees'][$payee_id] > $b['payees'][$payee_id]) {\n $diff = \"decreased\";\n } else {\n $diff = \"increased\";\n } \n $diffs[] = $diff . \" amount '<b>\" . $users[$payee_id]['user_name'] . \"</b>' owes from <b>\" . render_price($a['payees'][$payee_id]) . \"</b> to <b>\" . render_price($b['payees'][$payee_id]) . \"</b>.\";\n }\n } else {\n // in A only\n $diffs[] = \"removed '<b>\" . $users[$payee_id]['user_name'] . \"</b>' from the list of payees.\";\n }\n } else {\n // in B only\n $diffs[] = \"added '<b>\" . $users[$payee_id]['user_name'] . \"</b>' to the list of payees, for <b>\" . render_price($b['payees'][$payee_id]) . \"</b>.\";\n }\n }\n\n if (count($diffs) == 0) {\n $diffs[] = 'No changes were made to the purchase.';\n }\n\n \n return $diffs;\n \n }",
"function version_compare($version1, $version2, $operator = NULL)\n{\n}",
"function sortRelOld($a, $b)\n{\n\tif($a['relevance'] == $b['relevance']) \n\t{ \n\t\tif($a['reviewnumber'] == $b['reviewnumber']) { return 0; }\n\t\treturn ($a['reviewnumber'] > $b['reviewnumber']) ? 1 : -1;\n\t}\n\treturn ($a['relevance'] < $b['relevance']) ? 1 : -1;\n}",
"public function getRevision() ;",
"protected static function _versionCompare($version = \"\", $reference = \"\", $operator = null){\nt_e('deprecated',__FUNCTION__);\n\t\t/*\n\t\t * will soon replace the code of following methods:\n\t\t * - we_util_Sys_Webedition::versionCompare()\n\t\t * - we_util_Sys_Webedition::toolVersionCompare()\n\t\t * - we_util_Sys_Php::versionCompare()\n\t\t * - we_util_Sys_Db_Mysql::versionCompare()\n\t\t * they'll call this method here insead of implementing the functionality themselves.\n\t\t */\n\t\treturn (!$version || !$reference ?\n\t\t\t\tfalse :\n\t\t\t\tversion_compare($version, $reference, $operator)\n\t\t\t);\n\t}",
"public function getDifference(DepositCollection $collection1, DepositCollection $collection2)\n {\n return $collection1->diff($collection2);\n }",
"function return_diff()\n\t{\n\t\t$args = func_get_args();\n\t\t$three_way_diff = (func_num_args() > 2) ? true : false;\n\n\t\t$file1 = array_shift($args);\n\t\t$file2 = array_shift($args);\n\n\t\t$tmp['file1'] = (!empty($file1) && is_string($file1)) ? file_get_contents($file1) : $file1;\n\t\t$tmp['file2'] = (!empty($file2) && is_string($file2)) ? file_get_contents($file2) : $file2;\n\n\t\tif ($three_way_diff)\n\t\t{\n\t\t\t$file3 = array_shift($args);\n\t\t\t$tmp['file3'] = (!empty($file3) && is_string($file3)) ? file_get_contents($file3) : $file3;\n\n\t\t\t$diff = new diff3($tmp['file1'], $tmp['file2'], $tmp['file3']);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$diff = new diff($tmp['file1'], $tmp['file2']);\n\t\t}\n\n\t\tunset($tmp);\n\n\t\treturn $diff;\n\t}",
"public function filter_wp_get_revision_ui_diff (array $diff, $compare_from, $compare_to) {\r\n\t\t$eal_From = new EAL_ItemSC();\r\n\t\t$eal_To = new EAL_ItemSC();\r\n\t\t\r\n\t\t// check type and try to load item revision from database\r\n\t\tif ($compare_from instanceof WP_Post) {\r\n\t\t\tif (get_post ($compare_from->post_parent)->post_type != $this->type) return $diff;\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\t$eal_From = DB_ItemSC::loadFromDB($compare_from->ID);\r\n\t\t\t} catch (Exception $e) { \r\n\t\t\t\t// could not find revision in the database anymore\r\n\t\t\t}\r\n \t\t}\r\n\t\tif ($compare_to instanceof WP_Post) {\r\n\t\t\tif (get_post ($compare_to->post_parent)->post_type != $this->type) return $diff;\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\t$eal_To = DB_ItemSC::loadFromDB($compare_to->ID);\r\n\t\t\t} catch (Exception $e) {\r\n\t\t\t\t// could not find revision in the database anymore\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$diff[0] = HTML_Item::compareTitle($eal_From, $eal_To);\r\n\t\t$diff[1] = HTML_Item::compareDescription($eal_From, $eal_To);\r\n\t\t$diff[2] = HTML_Item::compareQuestion($eal_From, $eal_To);\r\n\t\t$diff[3] = HTML_ItemSC::compareAnswers($eal_From, $eal_To);\r\n\t\t$diff[4] = HTML_Item::compareLevel($eal_From, $eal_To);\r\n\t\t$diff[5] = HTML_Item::compareNoteFlag($eal_From, $eal_To);\r\n\t\t$diff[6] = HTML_Item::compareLearningOutcome($eal_From, $eal_To);\r\n\t\t\r\n\t\treturn $diff;\r\n\t}",
"public function get_version();",
"public function docSimilarity($doc_1, $doc_2) {\n $parameters=array(\n 'doc_1'=>$doc_1,\n 'doc_2'=>$doc_2\n );\n $content = json_encode($parameters);\n \n $jsonreply=$this->CallWebService('docSimilarity',$content);\n \n return $this->ParseReply($jsonreply);\n }",
"private function getPreviousVersion() {\n\t\t$query = DB::select()->from('settings')->where('key', '=', 'version');\n\t\t$result = $query->execute();\n\n\t\tif ($result->count() == 0 || (isset($result[0]) && $result[0]['value'] == false)) {\n\t\t\t$this->previous_version = false;\n\t\t\t// reset($this->versions);\n\t\t\t// current($this->versions);\n\t\t\t$this->actual_version = key($this->versions);\n\t\t} else {\n\t\t\t$this->acutal_version = $result[0]['value'];\n\t\t}\n\t}",
"public static function cmp($version1, $version2) {\r\n list($N1, $M1, $K1) = explode(self::SEPARATOR, $version1);\r\n list($N2, $M2, $K2) = explode(self::SEPARATOR, $version2);\r\n if($N1 == $N2) {\r\n if($M1 == $M2) {\r\n if($K1 == $K2) {\r\n return 0; \r\n } else if(!is_numeric($K1) || !is_numeric($K2)) {\r\n throw new VersionComparisonException(sprintf(\"Versions %s and %s are not comparable\", $version1, $version2));\r\n } else if($K1 < $K2) {\r\n return -1;\r\n } else if($K1 > $K2) {\r\n return 1;\r\n } \r\n } else if(!is_numeric($M1) || !is_numeric($M2)) {\r\n throw new VersionComparisonException(sprintf(\"Versions %s and %s are not comparable\", $version1, $version2));\r\n } else if($M1 < $M2) {\r\n return -1;\r\n } else if($M1 > $M2) {\r\n return 1;\r\n } \r\n } else if($N1 < $N2) {\r\n return -1;\r\n } else if($N1 > $N2) {\r\n return 1;\r\n } \r\n }",
"function compare_citations($x, $y)\n{\n\n if( !$x->sources[0]->citation->uuid){// && !$y->sources[0]->citation->uuid){\n $res = -1;\n //var_dump($y->sources[0]->citation->uuid);\n }elseif(!$y->sources[0]->citation->uuid){\n $res = 1;\n //var_dump($x->sources[0]->citation->uuid);\n }\n else{\n\n\n $author_team_x = cdm_ws_get(CDM_WS_REFERENCE_AUTHORTEAM, $x->sources[0]->citation->uuid);\n $author_team_y = cdm_ws_get(CDM_WS_REFERENCE_AUTHORTEAM, $y->sources[0]->citation->uuid);\n\n //same author, and different year\n if($author_team_x->titleCache == $author_team_y->titleCache){\n $x_year = substr(\n $x->sources[0]->citation->datePublished->start,\n 0,\n strpos($x->sources[0]->citation->datePublished->start,'-'));\n $y_year = substr(\n $y->sources[0]->citation->datePublished->start,\n 0,\n strpos($y->sources[0]->citation->datePublished->start,'-'));\n if ($x_year < $y_year){//the year of the first publication is smaller\n $res = -1;\n }\n else if($x_year == $y_year){ //if same year check the page\n $x_page = $x->sources[0]->citationMicroReference;\n $y_page = $y->sources[0]->citationMicroReference;\n if($x_page < $y_page){\n $res = -1;\n }\n else{\n $res = 1;\n }\n }else\n $res = 1;\n }\n //different author and the first one is alphabetically smaller\n //else if($x->sources[0]->citation->authorship->teamMembers[0]->lastname <\n //$y->sources[0]->citation->authorship->teamMembers[0]->lastname){\n else if ($author_team_x->titleCache < $author_team_y->titleCache)\t{\n $res = -1;\n }\n //different author and the second one is alphabetically smaller\n else{\n $res = 1;\n }\n\n }\n //var_dump($res);\n //var_dump(' ============ ');\n return $res;\n}",
"function drush_btranslator_btr_project_diff_get($origin, $project, $lng, $nr) {\n // Check parameters $origin, $project, $lng.\n _btranslator_drush_check_params($origin, $project, $lng);\n\n // Get the options.\n $format = drush_get_option('format');\n $format = ($format == 'ediff' ? 'ediff' : 'diff');\n $file = drush_get_option('output', NULL);\n\n // Get the diff.\n $diff = btr::project_diff_get($origin, $project, $lng, $nr, $format);\n\n // Output it.\n if ($file === NULL) {\n print $diff;\n }\n else {\n file_put_contents($file, $diff);\n }\n}",
"function acf_version_compare($left = '', $compare = '>', $right = '')\n{\n}",
"public function getSpecifiedVersion();",
"public function getDiffHtml($a, $b)\n\t{\n\t\tpreg_match_all(\"/(<.*?>\\\\s*|\\\\s+)([^\\\\s<]*)/\", \" \".$a, $matchA);\n\t\tpreg_match_all(\"/(<.*?>\\\\s*|\\\\s+)([^\\\\s<]*)/\", \" \".$b, $matchB);\n\n\t\t$diffScript = $this->getDiffScript($matchA[2], $matchB[2]);\n\t\tif(count($diffScript) == 0)\n\t\t{\n\t\t\t// no difference found\n\t\t\treturn $a;\n\t\t}\n\n\t\t$positionA = 0;\n\n\t\t$result = '';\n\t\tforeach($diffScript as $diffItem)\n\t\t{\n\t\t\twhile($positionA < $diffItem['startA'])\n\t\t\t{\n\t\t\t\t$result .= $matchA[0][$positionA];\n\t\t\t\t$positionA++;\n\t\t\t}\n\n\t\t\t//deleted items\n\t\t\tif($diffItem['deletedA'] > 0)\n\t\t\t{\n\t\t\t\t$result .= $matchA[1][$positionA] . '<s style=\"color:red\">' . $matchA[2][$positionA];\n\t\t\t\tfor($i = 1; $i < $diffItem['deletedA']; $i++)\n\t\t\t\t\t$result .= $matchA[0][$positionA + $i];\n\n\t\t\t\t$result .= '</s>';\n\t\t\t\t$positionA = $positionA + $diffItem['deletedA'];\n\t\t\t}\n\n\t\t\tif($diffItem['insertedB'] > 0)\n\t\t\t{\n\t\t\t\t$result .= $matchB[1][$diffItem['startB']] . '<b style=\"color:green\">' . $matchB[2][$diffItem['startB']];\n\t\t\t\tfor($i = 1; $i < $diffItem['insertedB']; $i++)\n\t\t\t\t\t$result .= $matchB[0][$diffItem['startB'] + $i];\n\n\t\t\t\t$result .= '</b>';\n\t\t\t}\n\t\t}\n\n\t\twhile($positionA < count($matchA[0]))\n\t\t{\n\t\t\t$result .= $matchA[0][$positionA];\n\t\t\t$positionA++;\n\t\t}\n\n\t\treturn $result;\n\t}",
"function diff($diff, $mode = 'autodetect')\n {\n }",
"protected function createDiff(array $a, array $b)\n\t{\n\t\t$indexA = 0;\n\t\t$indexB = 0;\n\t\t$result = array();\n\t\twhile ($indexA < count($a) || $indexB < count($b))\n\t\t{\n\t\t\tif (($indexA < count($a)) && (!$this->modifiedA[$indexA]) && ($indexB < count($b)) && (!$this->modifiedB[$indexB]))\n\t\t\t{\n\t\t\t\t// equal lines\n\t\t\t\t$indexA++;\n\t\t\t\t$indexB++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// maybe deleted and/or inserted lines\n\t\t\t\t$startA = $indexA;\n\t\t\t\t$startB = $indexB;\n\n\t\t\t\twhile ($indexA < count($a) && ($indexB >= count($b) || $this->modifiedA[$indexA]))\n\t\t\t\t{\n\t\t\t\t\t$indexA++;\n\t\t\t\t}\n\n\t\t\t\twhile ($indexB < count($b) && ($indexA >= count($a) || $this->modifiedB[$indexB]))\n\t\t\t\t{\n\t\t\t\t\t$indexB++;\n\t\t\t\t}\n\n\t\t\t\tif (($startA < $indexA) || ($startB < $indexB))\n\t\t\t\t{\n\t\t\t\t\t// store a new difference-item\n\t\t\t\t\t$result[] = array(\"startA\" => $startA, \"startB\" => $startB, \"deletedA\" => $indexA - $startA, \"insertedB\" => $indexB - $startB);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}",
"public function compareVersionNumbers($ver1, $ver2) {\n\t\t$ver1Array = explode('.', $ver1);\n\t\t$ver2Array = explode('.', $ver2);\n\n\t\tfor ($i = 0; $i < count($ver1Array) && $i < count($ver2Array); $i++) {\n\t\t\tif ($ver1Array[$i] > $ver2Array[$i]) {\n\t\t\t\treturn 1;\n\t\t\t} else if ($ver1Array[$i] < $ver2Array[$i]) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\n\t\tif (count($ver1Array) > count($ver2Array)) {\n\t\t\treturn 1;\n\t\t} else if (count($ver1Array) < count($ver2Array)) {\n\t\t\treturn -1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}",
"function diff($array1,$array2,$options=array('strict'=>false,'numberChange'=>false)) {\n\t\t$changes=array();\n\n\t\tforeach ($array2 as $columnName=>$columnValue) {\n\t\t\t$oldColumnValue=$array1[$columnName];\n\t\t\tif ($columnValue!=$oldColumnValue) {\n\t\t\t\tif ($options['numberChange']===true and (is_numeric($columnValue) or empty($columnValue)) and \n\t\t\t\t\t(is_numeric($oldColumnValue) or empty($oldColumnValue))) {\n\t\t\t\t\t$changes[$columnName]=intval($columnValue)-intval($oldColumnValue);\n\t\t\t\t} else {\n\t\t\t\t\t$changes[$columnName]=$columnValue;\n\t\t\t\t}\n\t\t\t\t// $columnName.'='.$changes[$columnName].'|'.$oldColumnValue.' -> '.$columnValue.'<br/>';\n\t\t\t}\n\t\t}\n\n\t\treturn $changes;\n\t}",
"public function get_difference($id)\n {\n $version = DataManager::retrieve_by_id(ContentObject::class_name(), $id);\n\n return ContentObjectDifference::factory($this, $version);\n }",
"function compareByRecentIncrement ($a, $b) {\n\t\t\t\treturn $b[\"tracking\"][0][\"increment\"] - $a[\"tracking\"][0][\"increment\"];\n\t\t\t}",
"private function parseDiffXml( SimpleXMLElement $xml )\n {\n $newTables = array();\n foreach ( $xml->{'new-tables'}->table as $table )\n {\n $tableName = (string) $table->name;\n $newTables[$tableName] = $this->parseTable( $table );\n }\n\n $changedTables = array();\n foreach ( $xml->{'changed-tables'}->table as $table )\n {\n $tableName = (string) $table->name;\n $changedTables[$tableName] = $this->parseChangedTable( $table );\n }\n\n $removedTables = array();\n foreach ( $xml->{'removed-tables'}->table as $table )\n {\n $tableName = (string) $table->name;\n if ( (string) $table->removed == 'true' )\n {\n $removedTables[$tableName] = true;\n }\n }\n\n return new ezcDbSchemaDiff( $newTables, $changedTables, $removedTables );\n }",
"function &fetch_diff()\n\t{\n\t\t$table =& $this->fetch_table();\n\t\t$output = array();\n\n\t\t$match = array();\n\t\t$nonmatch1 = array();\n\t\t$nonmatch2 = array();\n\n\t\t$data_old_key = $this->data_old_len - 1;\n\t\t$data_new_key = $this->data_new_len - 1;\n\n\t\t$this_row = $this->decompress_row($table[$data_old_key]);\n\t\t$above_row = $this->decompress_row($table[$data_old_key - 1]);\n\n\t\twhile ($data_old_key >= 0 AND $data_new_key >= 0)\n\t\t{\n\t\t\tif ($this_row[$data_new_key] != $above_row[$data_new_key - 1] AND $this->data_old[$data_old_key] == $this->data_new[$data_new_key])\n\t\t\t{\n\t\t\t\t// this is a non changed entry\n\t\t\t\t$this->process_nonmatches($output, $nonmatch1, $nonmatch2);\n\t\t\t\tarray_unshift($match, $this->data_old[$data_old_key]);\n\n\t\t\t\t$data_old_key--;\n\t\t\t\t$data_new_key--;\n\n\t\t\t\t$this_row = $above_row;\n\t\t\t\t$above_row = $this->decompress_row($table[$data_old_key - 1]);\n\t\t\t}\n\t\t\telse if ($above_row[$data_new_key] > $this_row[$data_new_key - 1])\n\t\t\t{\n\t\t\t\t$this->process_matches($output, $match);\n\t\t\t\tarray_unshift($nonmatch1, $this->data_old[$data_old_key]);\n\n\t\t\t\t$data_old_key--;\n\n\t\t\t\t$this_row = $above_row;\n\t\t\t\t$above_row = $this->decompress_row($table[$data_old_key - 1]);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->process_matches($output, $match);\n\t\t\t\tarray_unshift($nonmatch2, $this->data_new[$data_new_key]);\n\n\t\t\t\t$data_new_key--;\n\t\t\t}\n\t\t}\n\n\t\t$this->process_matches($output, $match);\n\t\tif ($data_old_key > -1 OR $data_new_key > -1)\n\t\t{\n\t\t\tfor (; $data_old_key > -1; $data_old_key--)\n\t\t\t{\n\t\t\t\tarray_unshift($nonmatch1, $this->data_old[$data_old_key]);\n\t\t\t}\n\t\t\tfor (; $data_new_key > -1; $data_new_key--)\n\t\t\t{\n\t\t\t\tarray_unshift($nonmatch2, $this->data_new[$data_new_key]);\n\t\t\t}\n\t\t\t$this->process_nonmatches($output, $nonmatch1, $nonmatch2);\n\t\t}\n\n\t\treturn $output;\n\t}"
] | [
"0.6793132",
"0.6594342",
"0.6522758",
"0.6179135",
"0.6016554",
"0.5849854",
"0.5835805",
"0.58346933",
"0.550674",
"0.54699445",
"0.5448858",
"0.54215956",
"0.54055065",
"0.5385214",
"0.536672",
"0.5356235",
"0.5355161",
"0.532292",
"0.5321455",
"0.5295176",
"0.52845144",
"0.5259726",
"0.5220695",
"0.52200794",
"0.52120566",
"0.5208705",
"0.52010804",
"0.5194775",
"0.51895696",
"0.51882076",
"0.51882076",
"0.51882076",
"0.51703984",
"0.51597726",
"0.51597726",
"0.51597726",
"0.51597726",
"0.5139744",
"0.5139744",
"0.5139744",
"0.5139744",
"0.5139744",
"0.5139744",
"0.5139744",
"0.5139744",
"0.5139744",
"0.5139744",
"0.5139744",
"0.5139744",
"0.5139744",
"0.5139744",
"0.5139744",
"0.5139744",
"0.5139744",
"0.5139744",
"0.5139744",
"0.5139744",
"0.5139744",
"0.5139744",
"0.513889",
"0.5132125",
"0.5128363",
"0.5125848",
"0.5125785",
"0.5108062",
"0.51077044",
"0.5105671",
"0.5105671",
"0.5105671",
"0.50952744",
"0.5094226",
"0.50667214",
"0.50603235",
"0.50548863",
"0.5054579",
"0.5054107",
"0.5053368",
"0.50396067",
"0.5032827",
"0.50314504",
"0.50297457",
"0.5021277",
"0.5018012",
"0.4998958",
"0.4998376",
"0.49966615",
"0.49935636",
"0.4993098",
"0.4988518",
"0.49586248",
"0.4958146",
"0.4954848",
"0.49394023",
"0.49245203",
"0.49198908",
"0.49198738",
"0.48933324",
"0.48905924",
"0.48770192",
"0.48684627"
] | 0.54530925 | 10 |
/ If the unit testing doesn't work. Please open the route and comment out the middleware that I'm using. And lastly remove the Header Authorization here in the unit testing. /clients [GET] | public function testShouldReturnAllClients(){
$this->get("clients", ["Authorization" => "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6Ik56WTRPREkyUVVJNU5VSTNRa05ETWpaRlF6RTNOREUwTlRrd09UZEJSVVkzTVVGRE16RXhPUSJ9.eyJpc3MiOiJodHRwczovL3Nvbm55MTk4Ny5hdXRoMC5jb20vIiwic3ViIjoiVVRYUTV1eEYwMzYyMVdHMGp2RkllSzBrbW0xemVoUUJAY2xpZW50cyIsImF1ZCI6Imh0dHA6Ly9sb2NhbGhvc3Q6ODAwMCIsImlhdCI6MTUzNzc1ODU3NSwiZXhwIjoxNTM3ODQ0OTc1LCJhenAiOiJVVFhRNXV4RjAzNjIxV0cwanZGSWVLMGttbTF6ZWhRQiIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.gVBOw_tK1aBrQW880QAFCfEWcXMr4ADIdWBb8NtYEZ6gkE81WCBTsTUZak5PHVm3lFqPBTYJ8_ffTpRPwcetheumyFftBP3AAXAlssMWCgVgNMefCkAVx4pARgPGvNgwZXrSYl6e4CGuk_L-en6j7pqZTVHR0qvJiMsf0zqab3_IrTAT4eu_4pZGOqZwwVoF5XI2coAfnJjm5YC9lTqaM-nPhPLklSvXQvhM2vooi98cCMhgV2D18e7qaEMv8pUtpCO35NC7ewC975zcr8xS9YQ00xACk6wo2l-jwqnzBeRXiKGgdtmfiC4ODVHx_WarUp06W-MvMkN7Z05sWvS3zw"]);
$this->seeStatusCode(200);
$this->seeJsonStructure([
'data' => ['*' =>
[
'name',
'address',
'active',
'created_at',
'updated_at',
'links'
]
],
'meta' => [
'*' => [
'total',
'count',
'per_page',
'current_page',
'total_pages',
'links',
]
]
]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function test_client_page_auth_check()\n {\n $response = $this->get(route('client.index'))->assertStatus(302);\n }",
"public function getHelicopterAppApi()\n {\n $client = new \\GuzzleHttp\\Client();\n $url = \"http://localhost:8000/api/helicopters\";\n $res = $client->request('GET',$url, \n ['headers' => [\n 'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjgwNzdkODc2ZjQyNjRkZDZjYzkzZTUyZWNhMmI3YmMyMTBmMzQ1NjBkNDdhZWVmZGI1NDg0Y2U1Nzc3M2I2MWJmOGI5M2NjODhkMzNiMjZkIn0.eyJhdWQiOiIyIiwianRpIjoiODA3N2Q4NzZmNDI2NGRkNmNjOTNlNTJlY2EyYjdiYzIxMGYzNDU2MGQ0N2FlZWZkYjU0ODRjZTU3NzczYjYxYmY4YjkzY2M4OGQzM2IyNmQiLCJpYXQiOjE1NDM4NTUxMTAsIm5iZiI6MTU0Mzg1NTExMCwiZXhwIjoxNTc1MzkxMTA5LCJzdWIiOiIzIiwic2NvcGVzIjpbXX0.CrANY_mIeprQ4MiHURKlErLPCKHhsVYKtn8iAD5e4vzHJyEUKKsYIyBYVfFhVqxeYe9u2-iAieksq9lvHfNRSpOBWukC6jHu894ww715d9Buw96UTeAWphiQSdzhFwhr4OrQdWJ-0AHOXvgyc6ZNweZE3SAuiW3nd9z_AR3rB2HuVszny7k9qUxs5ssoY6mT-W9JvcIwijUCQKFfhysbla6imOTRmHuiAuxdpVy_J9vP-MbATg4Vcyjnlod3tF8lMkCBMizY8SQP68taRxHYRuzmsSvJL_cyxTI2MnBe2CvBPSHHGxGsE82vU7rFZ0a2k0FCbnfy6Jgwr1GLRTdz7IYaxXPD3xGFj8ennZ_mvF_lenGppB6-RKeCt47bQOH3DRxyiXIkcmvvC77paPzJO4_YetbehEABrxNNSv5XppR5m9syotlA2IsJSTVpwIgRRovvLpJ1hfxMtu7Ns_UG9GdErGTYL8QMHWmlvvLIfniz_6rmZanCfQDdikBlPvb5IvB_K_t9ffS0zudOebvRkI0pzAAGmSXh48gSAbzb8K5R-UWDKtooNqS6_MJNjUHzPvBGdN7HDUOFhujBEAN5kCx_ZgUVTo2_pBBIOgxoCPz3vf5wA8O7J9yjebmCF1yslzGrNGVwklQ484NBA2Kwy4riNahH-bVaT-6Jlj3fQUw',\n 'Accept' => 'application/json']]);\n \n echo $res->getStatusCode();\n // \"200\"\n //echo $request->getHeader('content-type');\n // 'application/json; charset=utf8'\n echo $res->getBody();\n // {\"type\":\"User\"...'\n\n }",
"public function __construct()\n {\n// $this->middleware('client.credentials')->only(['index', 'show']);\n /**\n * The rest use the auth.api middleware\n */\n// $this->middleware('auth:api')->except(['index', 'show']);\n }",
"public function test_authorization_header()\n {\n }",
"public function __construct()\n {\n $this->middleware('auth:client');\n }",
"public function __construct()\n {\n $this->middleware('auth:client');\n }",
"public function __construct()\n {\n $this->middleware('auth:client');\n }",
"public function testLogin(){\n $client00 = static::createClient();\n $client00->request('POST', '/booking/calendar');\n \n $this->assertEquals(\n 405, //METHOD NOT ALLOWED\n $client00->getResponse()->getStatusCode()\n );\t\t\n \n $client01 = $this->createAuthorizedClient();\n $client01->request('POST','/booking/calendar');\n $this->assertEquals(\n 405, //METHOD NOT ALLOWED\n $client01->getResponse()->getStatusCode()\n );\t\n //Requests con GET\n $client02 = $this->createAuthorizedClient();\n $client02->request('GET','/booking/calendar');\n $this->assertEquals(\n 200, //OK\n $client02->getResponse()->getStatusCode()\n ); \n //Usuario no autorizado\n $client03 = static::createClient();\n $client03->request('GET', '/booking/calendar');\n \n //redireccionado porque no tiene los permisos necesarios\n $this->assertTrue($client03->getResponse()->isRedirect()); \n }",
"public function __construct()\n {\n $this->middleware('client.guest');\n }",
"public function testIndexAuthenticated()\n {\n // cria um usuário\n $user = factory(User::class)->create([\n 'password' => bcrypt('123456'),\n ]);\n\n // cria um contato\n $contact = factory(Contact::class)->make();\n\n // salva um contato para o usuário\n $user->contacts()->save($contact);\n\n // tenta fazer o login\n $response = $this->post('/api/auth/login', [\n 'email' => $user->email,\n 'password' => '123456'\n ]);\n\n // verifica se foi gerado o token\n $response->assertJson([\n \"status\" => \"success\",\n ]);\n\n // pega token de resposta\n $token = $response->headers->get('Authorization');\n\n // tenta acessar a rota\n $response = $this->withHeaders([\n 'Authorization' => \"Bearer $token\",\n ])->get('/api/v1/contacts');\n\n //verifica se o método foi acessado\n $response->assertStatus(200);\n }",
"public function testAdminApp()\n {\n $client = static::createClient();\n $client->request('GET', '/admin');\n $this->assertEquals(301, $client->getResponse()->getStatusCode());\n\n //regular user should be redirected\n $client = $this->createAuthClient('[email protected]', 'user');\n $client->request('GET', '/admin', [], [], ['HTTPS' => true]);\n $this->assertEquals(403, $client->getResponse()->getStatusCode());\n\n //admins are allowed\n $client = $this->createAuthClient('[email protected]', 'admin');\n $crawler = $client->request('GET', '/admin');\n $response = $client->getResponse();\n $this->assertEquals(301, $response->getStatusCode());\n $this->assertTrue(0 === strpos($response->getTargetUrl(), 'https'));\n\n\n //https and authentication loads page\n $client = $this->createAuthClient('[email protected]', 'admin');\n $crawler = $client->request('GET', '/admin', [], [], ['HTTPS' => true]);\n $this->assertTrue($crawler->filter('html:contains(\"Loading ...\")')->count() > 0);\n }",
"public function testConfigureAuth()\n {\n $Auth = new AuthController();\n $this->Client->setAuth($Auth);\n $this->Client->mockResponses->append(new Response(200));\n $Ping = new PingEndpoint();\n $Ping->setClient($this->Client);\n $Ping->setProperty(AbstractEndpoint::PROPERTY_AUTH,AbstractEndpoint::AUTH_NOAUTH);\n $this->Client->current($Ping);\n $Ping->execute();\n $this->assertEmpty(current($this->Client->container)['request']->getHeader('token'));\n $Ping->setProperty(AbstractEndpoint::PROPERTY_AUTH,AbstractEndpoint::AUTH_REQUIRED);\n $this->Client->container = [];\n $this->Client->mockResponses->append(new Response(200));\n $Ping->execute();\n $this->assertEquals(true,current($this->Client->container)['request']->hasHeader('token'));\n }",
"public function __construct()\n\t\t{\n\t\t\t$this->middleware('auth:client');\n\t\t}",
"public function test_AllRoutesAsUserAvailable()\n {\n //fill DB with demo data to act like a User\n $this->artisan('demo:createDemoClient');\n\n //session\n Session::start();\n $token = session('_token');\n $credentials = array(\n 'email' => '[email protected]',\n 'password' => 'user',\n '_token' => $token\n );\n\n //act as User\n $user = User::where('name', '=', \"User\")->first();\n\n //Login as User\n //GET|HEAD | login\n $this->get('/login')->assertStatus(200)\n ->assertViewIs('auth.login')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //POST | login\n $this->followingRedirects()->post('/login', $credentials)->assertStatus(200)\n ->assertViewIs('service.index')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //Login: redirect to home\n $this->actingAs($user)->followingRedirects()->get('/login')\n ->assertStatus(200)->assertViewIs('home.index')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n\n //GET|HEAD|POST|PUT|PATCH|DELETE|OPTIONS | /\n $this->actingAs($user)->followingRedirects()->get('/')\n ->assertStatus(200)->assertViewIs('service.index')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n $this->actingAs($user)->followingRedirects()->post('/', ['_token' => $token])\n ->assertStatus(200)->assertViewIs('service.index')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n $this->actingAs($user)->followingRedirects()->put('/', ['_token' => $token])\n ->assertStatus(200)->assertViewIs('service.index')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n $this->actingAs($user)->followingRedirects()->patch('/', ['_token' => $token])\n ->assertStatus(200)->assertViewIs('service.index')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n $this->actingAs($user)->followingRedirects()->delete('/', ['_token' => $token])\n ->assertStatus(200)->assertViewIs('service.index')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n $this->actingAs($user)->followingRedirects()->options('/', ['_token' => $token])\n ->assertStatus(200)->assertViewIs('service.index')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //GET|HEAD | auth/success\n $this->actingAs($user)->followingRedirects()->get('/auth/success')\n ->assertStatus(200)->assertViewIs('home.index')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //GET|HEAD | captcha/api/{config?}\n $this->actingAs($user)->followingRedirects()->get('/captcha/api/')\n ->assertStatus(200);\n\n //GET|HEAD | captcha/{config?}\n $this->actingAs($user)->followingRedirects()->get('/captcha')\n ->assertStatus(200);\n\n //GET|HEAD | changeclient/{client}\n $this->actingAs($user)->followingRedirects()->get('/changeclient/'.($user->currentclient_id))->assertStatus(200);\n $this->actingAs($user)->followingRedirects()->get('/changeclient/'.($user->currentclient_id+1))->assertStatus(500);\n\n //POST | client\n $this->actingAs($user)->followingRedirects()->post('/client', ['_token' => $token])->assertStatus(402); //not allowed in demo mode\n\n //GET|HEAD | client\n $this->actingAs($user)->followingRedirects()->get('/client')->assertStatus(402); //only as superadmin\n\n //GET|HEAD | client/create\n $this->actingAs($user)->followingRedirects()->get('/client/create')->assertStatus(402); //only as superadmin\n\n //GET|HEAD|POST|PUT|PATCH|DELETE|OPTIONS | client/module\n $this->actingAs($user)->followingRedirects()->get('/client/module')->assertStatus(402); //only as superadmin\n $this->actingAs($user)->followingRedirects()->post('/client/module', ['_token' => $token,])->assertStatus(402); //only as superadmin\n $this->actingAs($user)->followingRedirects()->put('/client/module', ['_token' => $token])->assertStatus(402); //only as superadmin\n $this->actingAs($user)->followingRedirects()->patch('/client/module', ['_token' => $token])->assertStatus(402); //only as superadmin\n $this->actingAs($user)->followingRedirects()->delete('/client/module', ['_token' => $token])->assertStatus(402); //only as superadmin\n $this->actingAs($user)->followingRedirects()->options('/client/module')->assertStatus(402); //only as superadmin\n\n //GET|HEAD|POST|PUT|PATCH|DELETE|OPTIONS | client/{clientid}/apply\n $this->actingAs($user)->get('/client/'.$user->currentclient_id.'/apply')->assertStatus(302);\n $this->actingAs($user)->post('/client/'.$user->currentclient_id.'/apply', ['_token' => $token])->assertStatus(302);\n $this->actingAs($user)->put('/client/'.$user->currentclient_id.'/apply', ['_token' => $token])->assertStatus(302);\n $this->actingAs($user)->patch('/client/'.$user->currentclient_id.'/apply', ['_token' => $token])->assertStatus(302);\n $this->actingAs($user)->delete('/client/'.$user->currentclient_id.'/apply', ['_token' => $token])->assertStatus(302);\n $this->actingAs($user)->options('/client/'.$user->currentclient_id.'/apply')->assertStatus(302);\n\n //GET|HEAD|POST|PUT|PATCH|DELETE|OPTIONS | client/{clientid}/apply/revert\n $this->actingAs($user)->get('/client/'.$user->currentclient_id.'/apply/revert')->assertStatus(302);\n $this->actingAs($user)->post('/client/'.$user->currentclient_id.'/apply/revert', ['_token' => $token])->assertStatus(302);\n $this->actingAs($user)->put('/client/'.$user->currentclient_id.'/apply/revert', ['_token' => $token])->assertStatus(302);\n $this->actingAs($user)->patch('/client/'.$user->currentclient_id.'/apply/revert', ['_token' => $token])->assertStatus(302);\n $this->actingAs($user)->delete('/client/'.$user->currentclient_id.'/apply/revert', ['_token' => $token])->assertStatus(302);\n $this->actingAs($user)->options('/client/'.$user->currentclient_id.'/apply/revert')->assertStatus(302);\n\n //GET|HEAD|POST|PUT|PATCH|DELETE|OPTIONS | client/{clientid}/removeuser/{userid}\n $this->actingAs($user)->get('/client/'.$user->currentclient_id.'/removeuser/'.$user->id)->assertStatus(402); //only if admin of client and not in demo mode\n $this->actingAs($user)->post('/client/'.$user->currentclient_id.'/removeuser/'.$user->id, ['_token' => $token])->assertStatus(402); //only if admin of client and not in demo mode\n $this->actingAs($user)->put('/client/'.$user->currentclient_id.'/removeuser/'.$user->id, ['_token' => $token])->assertStatus(402); //only if admin of client and not in demo mode\n $this->actingAs($user)->patch('/client/'.$user->currentclient_id.'/removeuser/'.$user->id, ['_token' => $token])->assertStatus(402); //only if admin of client and not in demo mode\n $this->actingAs($user)->delete('/client/'.$user->currentclient_id.'/removeuser/'.$user->id, ['_token' => $token])->assertStatus(402); //only if admin of client and not in demo mode\n $this->actingAs($user)->options('/client/'.$user->currentclient_id.'/removeuser/'.$user->id)->assertStatus(402); //only if admin of client and not in demo mode\n\n //PUT|PATCH | client/{client}\n $this->actingAs($user)->put('/client/'.$user->currentclient_id, ['_token' => $token])->assertStatus(402); //only if admin of client or superadmin and not in demo mode\n $this->actingAs($user)->patch('/client/'.$user->currentclient_id, ['_token' => $token])->assertStatus(402); //only if admin of client or superadmin and not in demo mode\n\n //GET|HEAD | client/{client}\n $this->actingAs($user)->get('/client/'.$user->currentclient_id)->assertStatus(402); //only if admin of client or superadmin\n\n //DELETE | client/{client}\n $this->actingAs($user)->delete('/client/'.$user->currentclient_id, ['_token' => $token])->assertStatus(402); //only if superadmin and not in demo mode\n\n //GET|HEAD | client/{client}/edit\n $this->actingAs($user)->get('/client/'.$user->currentclient_id.'/edit')->assertStatus(402); //only if admin of client or superadmin\n\n //POST | client_user/admin\n $this->actingAs($user)->post('/client_user/admin', ['_token' => $token, 'client_id' => $user->currentclient_id, 'user_id' => $user->id])\n ->assertStatus(402); //only if admin of client or superadmin\n\n //POST | client_user/trainingeditor\n $this->actingAs($user)->post('/client_user/trainingeditor', ['_token' => $token, 'client_id' => $user->currentclient_id, 'user_id' => $user->id])\n ->assertStatus(402); //only if admin of client or superadmin\n\n //GET|HEAD | clientapply\n $this->actingAs($user)->get('/clientapply')\n ->assertStatus(200)->assertViewIs('client.apply')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //GET|HEAD | datenschutz\n $this->actingAs($user)->get('/datenschutz')\n ->assertStatus(200)->assertViewIs('legal.datenschutz')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //POST | holiday\n $this->actingAs($user)->followingRedirects()->post('/holiday', ['_token' => $token, 'from' => Carbon::now(), 'to' => Carbon::now()->addDay()])\n ->assertStatus(200);\n\n //GET|HEAD | holiday\n $this->actingAs($user)->get('/holiday')\n ->assertStatus(200)->assertViewIs('holiday.index')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //GET|HEAD | holiday/create\n $this->actingAs($user)->get('/holiday/create')\n ->assertStatus(200)->assertViewIs('holiday.create')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //GET|HEAD | holiday/storeservice/{service}\n $this->actingAs($user)->followingRedirects()->get('/holiday/storeservice/'.Service::first()->id)\n ->assertStatus(200)->assertViewIs('service.index')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //GET|HEAD | holiday/storetraining/{training}\n $this->actingAs($user)->followingRedirects()->get('/holiday/storetraining/'.Training::first()->id)\n ->assertStatus(200)->assertViewIs('training.index')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //GET|HEAD | holiday/{holiday}\n $this->actingAs($user)->get('/holiday/'.Holiday::first()->id)\n ->assertStatus(200);\n\n //PUT|PATCH | holiday/{holiday}\n $this->actingAs($user)->followingRedirects()->put('/holiday/'.Holiday::first()->id, ['_token' => $token])\n ->assertStatus(200);\n $this->actingAs($user)->followingRedirects()->patch('/holiday/'.Holiday::first()->id, ['_token' => $token])\n ->assertStatus(200);\n\n //GET|HEAD | holiday/{holiday}/edit\n $this->actingAs($user)->followingRedirects()->get('/holiday/'.Training::first()->id.'/edit')\n ->assertStatus(200)->assertViewIs('holiday.edit')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //DELETE | holiday/{holiday}\n $this->actingAs($user)->get('/holiday/'.Holiday::first()->id)\n ->assertStatus(200);\n\n //GET|HEAD | home\n $this->actingAs($user)->get('/home')\n ->assertStatus(200)->assertViewIs('home.index')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //GET|HEAD | impressum\n $this->actingAs($user)->get('/impressum')\n ->assertStatus(200)->assertViewIs('legal.impressum')\n ->assertSee('Impressum')->assertSee('Datenschutz')\n ->assertSee('Inhaltlich Verantwortlicher gem. ');\n\n //GET|HEAD | mailtest\n $this->actingAs($user)->followingRedirects()->get('/mailtest')\n ->assertStatus(200)->assertViewIs('email.serviceslist')\n ->assertSee('Stand')->assertSee('Uhr')->assertSee('Datum');\n\n //GET|HEAD | news\n $this->actingAs($user)->get('/news')\n ->assertStatus(200)->assertViewIs('news.index');\n\n //POST | news\n $this->actingAs($user)->post('/news', ['_token' => $token])->assertStatus(402); //only admin of client\n\n //GET|HEAD | news/create\n $this->actingAs($user)->get('/news/create')->assertStatus(402); //only admin of client\n\n //GET|HEAD | news/{news}\n $this->actingAs($user)->get('/news/'.News::first()->id)->assertStatus(200);\n\n //DELETE | news/{news}\n $this->actingAs($user)->delete('/news/'.News::first()->id, ['_token' => $token])->assertStatus(402); //only admin of client\n\n //PUT|PATCH | news/{news}\n $this->actingAs($user)->put('/news/'.News::first()->id, ['_token' => $token])->assertStatus(402); //only admin of client\n $this->actingAs($user)->patch('/news/'.News::first()->id, ['_token' => $token])->assertStatus(402); //only admin of client\n\n //GET|HEAD | news/{news}/delete\n $this->actingAs($user)->get('/news/'.News::first()->id.'/delete')->assertStatus(402); //only admin of client\n\n //GET|HEAD | news/{news}/edit\n $this->actingAs($user)->get('/news/'.News::first()->id.'/edit')->assertStatus(402); //only admin of client\n\n //GET|HEAD | order\n $this->actingAs($user)->get('/order')\n ->assertStatus(200)->assertViewIs('order.index')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //GET|HEAD | order/create/{package}\n $this->actingAs($user)->get('/order/create/basic')\n ->assertStatus(200)->assertViewIs('order.order')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //POST | order/{package}\n\n //POST | password/email\n $this->actingAs($user)->followingRedirects()->post('/password/email', ['_token' => $token])\n ->assertStatus(200)->assertViewIs('home.index')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //GET|HEAD | password/reset\n $this->actingAs($user)->followingRedirects()->get('/password/reset')\n ->assertStatus(200)->assertViewIs('home.index')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //POST | password/reset\n $this->actingAs($user)->followingRedirects()->post('/password/reset', ['_token' => $token])\n ->assertStatus(200)->assertViewIs('home.index')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //GET|HEAD | password/reset/{token}\n\n //GET|HEAD | pdf\n $response = $this->actingAs($user)->get('/pdf');\n self::assertTrue($response->headers->get(\"content-type\") == \"application/pdf\");\n\n //GET|POST|HEAD | position/list_notAuthorized\n $this->actingAs($user)->get('/position/list_notAuthorized')->assertStatus(402);//only as admin\n $this->actingAs($user)->post('/position/list_notAuthorized', ['_token' => $token])->assertStatus(402); //only as admin\n\n //GET|POST|HEAD | position/{id}/authorize\n $this->actingAs($user)->get('/position/1/authorize')->assertStatus(402);//only as admin\n $this->actingAs($user)->post('/position/1/authorize', ['_token' => $token])->assertStatus(402); //only as admin\n\n //GET|POST|HEAD | position/{id}/deauthorize\n $this->actingAs($user)->get('/position/1/deauthorize')->assertStatus(402);//only as admin\n $this->actingAs($user)->post('/position/1/deauthorize', ['_token' => $token])->assertStatus(402); //only as admin\n\n //GET|POST|HEAD | position/{id}/position_user\n $this->actingAs($user)->get('/position/1/position_user')->assertStatus(402);//only as admin\n $this->actingAs($user)->post('/position/1/position_user', ['_token' => $token])->assertStatus(402); //only as admin\n\n //GET|POST|HEAD | position/{id}/subscribe\n $this->actingAs($user)->get('/position/1/subscribe')->assertStatus(200);\n $this->actingAs($user)->post('/position/1/subscribe', ['_token' => $token])->assertStatus(200);\n\n //GET|POST|HEAD | position/{id}/unsubscribe\n $this->actingAs($user)->get('/position/1/unsubscribe')->assertStatus(200);\n $this->actingAs($user)->post('/position/1/unsubscribe', ['_token' => $token])->assertStatus(200);\n\n //GET|POST|HEAD | position/{positionid}/subscribe_user/{userid}\n $this->actingAs($user)->get('/position/1/subscribe_user/1')->assertStatus(402);//only as admin\n $this->actingAs($user)->post('/position/1/subscribe_user/1', ['_token' => $token])->assertStatus(402); //only as admin\n\n //GET|POST|HEAD | position/{positionid}/unsubscribe_user/{userid}\n $this->actingAs($user)->get('/position/1/subscribe_user/1')->assertStatus(402);//only as admin\n $this->actingAs($user)->post('/position/1/subscribe_user/1', ['_token' => $token])->assertStatus(402); //only as admin\n\n //POST | qualification\n $this->actingAs($user)->post('/qualification', ['_token' => $token])->assertStatus(402); //only as admin\n\n //GET|HEAD | qualification\n $this->actingAs($user)->get('/qualification')->assertStatus(402);//only as admin\n\n //GET|HEAD | qualification/create\n $this->actingAs($user)->get('/qualification/create')->assertStatus(402);//only as admin\n\n //PUT|PATCH | qualification/{qualification}\n $this->actingAs($user)->put('/qualification/1', ['_token' => $token])->assertStatus(402); //only as admin\n\n //DELETE | qualification/{qualification}\n $this->actingAs($user)->delete('/qualification/1', ['_token' => $token])->assertStatus(402); //only as admin\n\n //GET|HEAD | qualification/{qualification}\n $this->actingAs($user)->get('/qualification/1')->assertStatus(402);//only as admin\n\n //GET|HEAD | qualification/{qualification}/edit\n $this->actingAs($user)->get('/qualification/1/edit')->assertStatus(402);//only as admin\n\n //POST | qualification_user/create\n $this->actingAs($user)->post('/qualification_user/create', ['_token' => $token])->assertStatus(402); //only as admin\n\n //GET|POST|HEAD | qualification_user/delete/{user_id}/{qualification_id}\n $this->actingAs($user)->get('/qualification_user/delete/1/1')->assertStatus(402);//only as admin\n $this->actingAs($user)->post('/qualification_user/delete/1/1', ['_token' => $token])->assertStatus(402); //only as admin\n\n //GET|HEAD | register\n $this->actingAs($user)->followingRedirects()->get('/register')\n ->assertStatus(200)->assertViewIs('home.index')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //POST | register\n $this->actingAs($user)->followingRedirects()->post('/register', ['_token' => $token])\n ->assertStatus(200)->assertViewIs('home.index')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //GET|POST|HEAD | sendServicePDF\n $this->actingAs($user)->get('/sendServicePDF')->assertStatus(402);//only as admin\n $this->actingAs($user)->post('/sendServicePDF', ['_token' => $token])->assertStatus(402); //only as admin\n\n //GET|HEAD | service\n $this->actingAs($user)->get('/service')\n ->assertStatus(200)->assertViewIs('service.index')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //GET|HEAD\n $this->actingAs($user)->get('/servicehistory')->assertStatus(402); //only as admin\n //GET|HEAD\n $this->actingAs($user)->get('/service/finalize/1')->assertStatus(402); //only as admin\n\n //POST | service\n $this->actingAs($user)->post('/service', ['_token' => $token])->assertStatus(403); //only as admin\n\n //GET|HEAD | service/create\n $this->actingAs($user)->get('/service/create')->assertStatus(402);//only as admin\n\n //DELETE | service/{service}\n $this->actingAs($user)->delete('/service/1', ['_token' => $token])->assertStatus(402); //only as admin\n\n //PUT|PATCH | service/{service}\n $this->actingAs($user)->put('/service/1', ['_token' => $token])->assertStatus(402); //only as admin\n\n //GET|HEAD | service/{service}\n $this->actingAs($user)->get('/service/1')->assertStatus(402);//only as admin\n\n //GET|HEAD | service/{service}/delete\n $this->actingAs($user)->get('/service/1/delete')->assertStatus(402);//only as admin\n\n //GET|HEAD | service/{service}/edit\n $this->actingAs($user)->get('/service/1/edit')->assertStatus(402);//only as admin\n\n //GET|POST|HEAD | statistic\n $this->actingAs($user)->get('/statistic')->assertStatus(402);//only as admin\n $this->actingAs($user)->post('/statistic', ['_token' => $token])->assertStatus(402); //only as admin\n\n //GET|HEAD | superadmin/user\n $this->actingAs($user)->get('/superadmin/user')->assertStatus(402);//only as superadmin\n\n //POST | training\n $this->actingAs($user)->followingRedirects()->post('/training', ['_token' => $token])->assertStatus(402); //only as admin or trainingseditor\n\n //GET|HEAD | training\n $this->actingAs($user)->get('/training')\n ->assertStatus(200)->assertViewIs('training.index')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //GET|HEAD | training/create\n $this->actingAs($user)->get('/training/create')->assertStatus(402);//only as admin\n\n //GET|HEAD|POST|PUT|PATCH|DELETE|OPTIONS | training/training_user/{training_userid}/delete\n $training_user = Training_user::first();\n $this->actingAs($user)->followingRedirects()->get('/training/training_user/'.$training_user->id.'/delete')\n ->assertStatus(402);//only as admin\n $this->actingAs($user)->followingRedirects()->post('/training/training_user/'.$training_user->id.'/delete', ['_token' => $token])\n ->assertStatus(402);//only as admin\n $this->actingAs($user)->followingRedirects()->put('/training/training_user/'.$training_user->id.'/delete', ['_token' => $token])\n ->assertStatus(402);//only as admin\n $this->actingAs($user)->followingRedirects()->patch('/training/training_user/'.$training_user->id.'/delete', ['_token' => $token])\n ->assertStatus(402);//only as admin\n $this->actingAs($user)->followingRedirects()->delete('/training/training_user/'.$training_user->id.'/delete', ['_token' => $token])\n ->assertStatus(402);//only as admin\n\n //GET|HEAD | training/{training}\n $this->actingAs($user)->get('/training/1')->assertStatus(402);//only as admin or trainingeditor\n\n //PUT|PATCH | training/{training}\n $this->actingAs($user)->put('/training/1', ['_token' => $token])->assertStatus(402);//only as admin or trainingeditor\n\n //DELETE | training/{training}\n $this->actingAs($user)->delete('/training/1', ['_token' => $token])->assertStatus(402);//only as admin or trainingeditor\n\n //GET|HEAD | training/{training}/delete\n $this->actingAs($user)->get('/training/1/delete')->assertStatus(402);//only as admin or trainingeditor\n\n //GET|HEAD | training/{training}/edit\n $this->actingAs($user)->get('/training/1/edit')->assertStatus(402);//only as admin or trainingeditor\n\n //POST | user\n $this->actingAs($user)->post('/user', ['_token' => $token])->assertStatus(402);//not implemented\n\n //GET|HEAD | user\n $this->actingAs($user)->get('/user')->assertStatus(402);//only as admin\n\n //GET|POST|HEAD | user/approve/{id}\n $this->actingAs($user)->get('/user/approve/1')->assertStatus(402);//only as admin\n $this->actingAs($user)->post('/user/approve/1', ['_token' => $token])->assertStatus(402);//only as admin\n\n //GET|HEAD | user/create\n $this->actingAs($user)->get('/user/create')->assertStatus(402);//not implemented\n\n //PUT|PATCH | user/{user}\n //Not allowed in Demo Mode :(\n\n //GET|HEAD | user/{user}\n $this->actingAs($user)->get('/user/1')\n ->assertStatus(200)->assertViewIs('user.profile')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //DELETE | user/{user}\n $this->actingAs($user)->delete('/user/1', ['_token' => $token])->assertStatus(402);//only as superadmin\n\n //GET|HEAD | user/{user}/edit\n $this->actingAs($user)->get('/user/1/edit')->assertStatus(402);//only as admin\n\n //GET|HEAD | userguide\n $response = $this->actingAs($user)->get('/userguide');\n self::assertTrue($response->headers->get(\"content-type\") == \"application/pdf\");\n\n //Calendar\n //GET|HEAD | calendar\n $this->actingAs($user)->followingRedirects()->get('/calendar')\n ->assertStatus(200)->assertViewIs('calendar.index')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n //POST | Calendar\n $this->actingAs($user)->followingRedirects()->post('/calendar', ['_token' => $token])->assertStatus(200)->assertViewIs('calendar.index'); //only as admin or trainingseditor\n //GET | calendar/{calendar}\n $this->actingAs($user)->get('/calendar/1')->assertStatus(402); //only as admin or trainingseditor\n //PUT | calendar/{calendar}\n $this->actingAs($user)->put('/calendar/1', ['_token' => $token])->assertStatus(402); //only as admin or trainingseditor\n //DELETE | calendar/{calendar}\n $this->actingAs($user)->delete('/calendar/1', ['_token' => $token])->assertStatus(402); //only as admin or trainingseditor\n //GET | calendar/{calendar}\n $this->actingAs($user)->get('/calendar/1/edit')->assertStatus(402); //only as admin or trainingseditor\n //GET | calendar/{calendar}\n $this->actingAs($user)->get('/calendar/1/delete')->assertStatus(402); //only as admin or trainingseditor\n //GET|HEAD | alendar/create\n $this->actingAs($user)->get('/calendar/create')->assertStatus(402); //only as admin or trainingseditor\n\n //Survey\n //GET|HEAD survey\n $this->actingAs($user)->get('/survey')->assertStatus(402); //only if admin of client\n //POST survey\n $this->actingAs($user)->post('/survey', ['_token' => $token])->assertStatus(402); //only if admin of client\n //GET|HEAD survey/create\n $this->actingAs($user)->get('/survey/create')->assertStatus(402); //only if admin of client\n //GET|HEAD survey/postpone/{surveyid}\n $this->actingAs($user)->get('/survey/postpone/1')->assertRedirect()->assertCookieMissing('errormessage'); //redirect back on success\n //POST survey/vote/{surveyid}\n $this->actingAs($user)->post('/survey/vote/1', ['_token' => $token, 'value' => \"accept\"])->assertRedirect('/survey/1');\n //GET|HEAD survey/{survey} //set dateStart to yesterday to access a currently activ survey\n $survey = Survey::find(1);\n $survey->dateStart = Carbon::yesterday();\n $survey->save();\n $this->actingAs($user)->get('/survey/1')->assertOk();\n //PUT|PATCH survey/{survey}\n $this->actingAs($user)->put('/survey/1', ['_token' => $token])->assertStatus(402); //only if admin of client\n //DELETE survey/{survey}\n $this->actingAs($user)->delete('/survey/1', ['_token' => $token])->assertStatus(402); //only if admin of client\n //GET|HEAD survey/{survey}/edit\n $this->actingAs($user)->get('/survey/1/edit')->assertStatus(402); //only if admin of client\n\n //POST | logout\n $this->actingAs($user)->followingRedirects()->post('/logout', ['_token' => $token])\n ->assertStatus(200)->assertViewIs('auth.login');\n\n //GET|HEAD | logout\n $this->actingAs($user)->followingRedirects()->get('/logout')\n ->assertStatus(200)->assertViewIs('auth.login');\n }",
"public function test_it_must_be_authenticated_user()\n {\n $this->json('post' , 'api/orders')->assertStatus(401);\n }",
"public function test_AllRoutesNoAuthAvailable()\n {\n //should be possible without any DB entry\n\n Session::start();\n $token = session('_token');\n\n $credentials = array(\n 'email' => '[email protected]',\n 'password' => 'wrongpass',\n '_token' => $token\n );\n\n $session = array(\n '_token' => $token\n );\n\n //index has redirect\n $this->get('/')->assertStatus(302);\n\n //index redirect to login page\n $this->followingRedirects()->get('/')\n ->assertStatus(200)\n ->assertViewIs('auth.login')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //Auth Login\n $this->get('/login')->assertStatus(200)\n ->assertViewIs('auth.login')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n $this->followingRedirects()->post('/login', $credentials)->assertStatus(200)\n ->assertViewIs('auth.login');\n\n //Auth Logout POST\n $this->followingRedirects()->post('/logout', ['_token' => $token])->assertStatus(200)\n ->assertViewIs('auth.login')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //Auth Logout GET\n $this->get('/logout')->assertStatus(302);\n $this->followingRedirects()->get('/logout')->assertStatus(200)\n ->assertViewIs('auth.login')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //Register Message GET\n $this->get('/auth/success')->assertStatus(200)\n ->assertSee('Dein Benutzer muss erst freigeschaltet werden. Du wirst per E-Mail benachrichtigt.')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n // impressum\n $this->get('/impressum')->assertStatus(200)->assertSee('Impressum')->assertSee('Datenschutz');;\n\n // datenschutz\n $this->get('/datenschutz')->assertStatus(200)->assertSee('Impressum')->assertSee('Datenschutz');\n\n // order\n $this->get('/order')->assertStatus(200)\n ->assertSee('Dein Dienstplan')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n $this->get('/order/create/basic')->assertStatus(200)\n ->assertSee('Basis Paket')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n $this->get('/order/create/module')->assertStatus(200)\n ->assertSee('Modulares Paket')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n $this->get('/order/create/support')->assertStatus(200)\n ->assertSee('Support Paket')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //following sites should not be available for guests and redirect to login\n\n //home\n $this->followingRedirects()->get('/home')->assertStatus(200)->assertViewIs('auth.login');\n\n //mailtest\n $this->followingRedirects()->get('/mailtest')->assertStatus(200)->assertViewIs('auth.login');\n\n //pdf extract\n $this->followingRedirects()->get('/pdf')->assertStatus(200)->assertViewIs('auth.login');\n\n //sendService PDF\n $this->followingRedirects()->get('/sendServicePDF')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/sendServicePDF', $session)->assertStatus(419);\n\n //userguide\n $this->followingRedirects()->get('/userguide')->assertStatus(200)->assertViewIs('auth.login');\n\n //superadmin user\n $this->followingRedirects()->get('/superadmin/user')->assertStatus(200)->assertViewIs('auth.login');\n\n //qualification (resource)\n $this->followingRedirects()->get('/qualification')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/qualification', $session)->assertStatus(419);\n $this->followingRedirects()->get('/qualification/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->put('/qualification/1', $session)->assertStatus(419);\n $this->delete('/qualification/1', $session)->assertStatus(419);\n $this->followingRedirects()->get('/qualification/1/edit')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->get('/qualification/create')->assertStatus(200)->assertViewIs('auth.login');\n\n //user (resource)\n $this->followingRedirects()->get('/user')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/user', $session)->assertStatus(419);\n $this->followingRedirects()->get('/user/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->put('/user/1', $session)->assertStatus(419);\n $this->delete('/user/1', $session)->assertStatus(419);\n $this->followingRedirects()->get('/user/1/edit')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->get('/user/create')->assertStatus(200)->assertViewIs('auth.login');\n\n //user approve\n $this->followingRedirects()->get('/user/approve/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/user/approve/1', $session)->assertStatus(419);\n\n //client (resource)\n $this->followingRedirects()->get('/client')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/client', $session)->assertStatus(419);\n $this->followingRedirects()->get('/client/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->put('/client/1', $session)->assertStatus(419);\n $this->delete('/client/1', $session)->assertStatus(419);\n $this->followingRedirects()->get('/client/1/edit')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->get('/client/create')->assertStatus(200)->assertViewIs('auth.login');\n\n // client apply\n $this->followingRedirects()->get('/clientapply')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->get('/client/1/apply')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/client/1/apply', $session)->assertStatus(419);\n $this->delete('/client/1/apply', $session)->assertStatus(419);\n $this->put('/client/1/apply', $session)->assertStatus(419);\n $this->followingRedirects()->get('/client/1/apply/revert')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/client/1/apply/revert', $session)->assertStatus(419);\n $this->delete('/client/1/apply/revert', $session)->assertStatus(419);\n $this->put('/client/1/apply/revert', $session)->assertStatus(419);\n $this->followingRedirects()->get('/client/1/removeuser/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/client/1/removeuser/1', $session)->assertStatus(419);\n $this->delete('/client/1/removeuser/1', $session)->assertStatus(419);\n $this->put('/client/1/removeuser/1', $session)->assertStatus(419);\n\n //client update module\n $this->followingRedirects()->get('/client/module')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/client/module', $session)->assertStatus(419);\n $this->delete('/client/module', $session)->assertStatus(419);\n $this->put('/client/module', $session)->assertStatus(419);\n\n //change client\n $this->followingRedirects()->get('/changeclient/1')->assertStatus(200)->assertViewIs('auth.login');\n\n //service (resource)\n $this->followingRedirects()->get('/service')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->get('/servicehistory')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->get('/service/finalize/1')->assertStatus(200)->assertViewIs('auth.login');\n\n $this->post('/service', $session)->assertStatus(419);\n $this->followingRedirects()->get('/service/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->put('/service/1', $session)->assertStatus(419);\n $this->delete('/service/1', $session)->assertStatus(419);\n $this->followingRedirects()->get('/service/1/edit')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->get('/service/create')->assertStatus(200)->assertViewIs('auth.login');\n\n $this->followingRedirects()->get('/service/1/delete')->assertStatus(200)->assertViewIs('auth.login');\n\n //training (resource)\n $this->followingRedirects()->get('/training')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/training', $session)->assertStatus(419);\n $this->followingRedirects()->get('/training/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->put('/training/1', $session)->assertStatus(419);\n $this->delete('/training/1', $session)->assertStatus(419);\n $this->followingRedirects()->get('/training/1/edit')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->get('/training/create')->assertStatus(200)->assertViewIs('auth.login');\n\n $this->followingRedirects()->get('/training/1/delete')->assertStatus(200)->assertViewIs('auth.login');\n\n //training user\n $this->followingRedirects()->get('/training/training_user/1/delete')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/training/training_user/1/delete', $session)->assertStatus(419);\n $this->delete('/training/training_user/1/delete', $session)->assertStatus(419);\n $this->put('/training/training_user/1/delete', $session)->assertStatus(419);\n\n //news (resource)\n $this->followingRedirects()->get('/news')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/news', $session)->assertStatus(419);\n $this->followingRedirects()->get('/news/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->put('/news/1', $session)->assertStatus(419);\n $this->delete('/news/1', $session)->assertStatus(419);\n $this->followingRedirects()->get('/news/1/edit')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->get('/news/create')->assertStatus(200)->assertViewIs('auth.login');\n\n $this->followingRedirects()->get('/news/1/delete')->assertStatus(200)->assertViewIs('auth.login');\n\n //holiday (resource)\n $this->followingRedirects()->get('/holiday')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/holiday', $session)->assertStatus(419);\n $this->followingRedirects()->get('/holiday/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->put('/holiday/1', $session)->assertStatus(419);\n $this->delete('/holiday/1', $session)->assertStatus(419);\n $this->followingRedirects()->get('/holiday/1/edit')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->get('/holiday/create')->assertStatus(200)->assertViewIs('auth.login');\n\n $this->followingRedirects()->get('/holiday/storeservice/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->get('/holiday/storetraining/1')->assertStatus(200)->assertViewIs('auth.login');\n\n // Qualification <-> User\n $this->post('/qualification_user/create', $session)->assertStatus(419);\n $this->followingRedirects()->get('/qualification_user/delete/1/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/qualification_user/delete/1/1', $session)->assertStatus(419);\n\n // Client <-> User\n $this->post('/client_user/admin', $session)->assertStatus(419);\n $this->post('/client_user/trainingeditor', $session)->assertStatus(419);\n\n //Position\n $this->followingRedirects()->get('/position/1/subscribe')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/position/1/subscribe', $session)->assertStatus(419);\n\n $this->followingRedirects()->get('/position/1/subscribe_user/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/position/1/subscribe_user/1', $session)->assertStatus(419);\n\n $this->followingRedirects()->get('/position/1/unsubscribe')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/position/1/unsubscribe', $session)->assertStatus(419);\n\n $this->followingRedirects()->get('/position/1/unsubscribe_user/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/position/1/unsubscribe_user/1', $session)->assertStatus(419);\n\n $this->followingRedirects()->get('/position/1/authorize')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/position/1/authorize', $session)->assertStatus(419);\n\n $this->followingRedirects()->get('/position/1/deauthorize')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/position/1/deauthorize', $session)->assertStatus(419);\n\n $this->followingRedirects()->get('/position/list_notAuthorized')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/position/list_notAuthorized', $session)->assertStatus(419);\n\n $this->followingRedirects()->get('/position/1/position_user')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/position/1/position_user', $session)->assertStatus(419);\n\n //Statistic\n $this->followingRedirects()->get('/statistic')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/statistic', $session)->assertStatus(419);\n\n //Calendar\n $this->followingRedirects()->get('/calendar')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/calendar', $session)->assertStatus(419);\n $this->followingRedirects()->get('/calendar/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->put('/calendar/1', $session)->assertStatus(419);\n $this->delete('/calendar/1', $session)->assertStatus(419);\n $this->followingRedirects()->get('/calendar/1/edit')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->get('/calendar/1/delete')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->get('/calendar/create')->assertStatus(200)->assertViewIs('auth.login');\n\n //Survey\n $this->followingRedirects()->get('/survey')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/survey', $session)->assertStatus(419);\n $this->followingRedirects()->get('/survey/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->put('/survey/1', $session)->assertStatus(419);\n $this->delete('/survey/1', $session)->assertStatus(419);\n $this->followingRedirects()->get('/survey/1/edit')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->get('/survey/create')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->post('/survey/vote/1')->assertStatus(419);\n $this->followingRedirects()->get('/survey/postpone/1')->assertStatus(200)->assertViewIs('auth.login');\n }",
"public function testIndexForGuest()\n {\n // Request\n $response = $this->get('api/v1/outroCards');\n\n // Check response status\n $response->assertStatus(401);\n }",
"public function testCreateClientAsVisitor() {\n\n $this->withoutMiddleware();\n\n // Generate client\n $client = factory(App\\Client::class)->make();\n\n $this->post('/clients/create', ['name' => $client->name, 'phone' => $client->phone_number])\n ->seeJson(['success' => false]);\n\n }",
"public function testRouteIndexClienteOk()\n {\n $this->call('GET', 'cliente');\n $this->assertResponseOk();\n }",
"public function test_you_have_to_be_authenticated()\n {\n $this->json('get' , 'api/cart')->assertStatus(401);\n\n }",
"private function prepareAuth()\n {\n $this->client->setHeaders(\n [\n 'Content-Type' => 'application/json',\n 'Authorization' => 'Bearer ' . $this->zendeskHelper->getToken()\n ]\n );\n }",
"public function _before(ApiTester $I){\n $config = \\Codeception\\Configuration::config();\n $apiSettings = \\Codeception\\Configuration::suiteSettings('api', $config);\n\n $this->tokenFromUserA = $apiSettings[\"tokens\"][\"bearerUserA\"];\n $this->tokenFromUserB = $apiSettings[\"tokens\"][\"bearerUserB\"];\n\n $this->clientsEndpoint = '/clients';\n $this->createClientRequest = [\n 'own_id' => '999128',\n 'name' => \"Shopping Online\",\n 'url' => \"https://www.loja.com\",\n 'email' => '[email protected]',\n 'document' => '87620890000112',\n 'address' => [\n 'postal_code'=> '96020150',\n 'street' => 'Rua X',\n 'number' => '123',\n 'complement' => 'Sala X',\n 'district' => 'Bairro',\n 'city' => 'Pelotas',\n 'state' => 'RS'\n ],\n ];\n\n $I->haveHttpHeader('Content-Type', 'application/json');\n $I->haveHttpHeader('Accept', 'application/json');\n $I->amBearerAuthenticated($this->tokenFromUserA);\n }",
"public function testClienteIndex()\n {\n $this->withoutExceptionHandling();\n $response = $this->get('/cliente');\n $response->assertStatus(200);\n $response->assertViewIs('cliente.index');\n }",
"public function testCreateClient() {\n\n $this->withoutMiddleware();\n\n // Generate one user and one client\n $user = factory(App\\User::class)->create();\n $client = factory(App\\Client::class)->make(['phone_number' => '0725433317']);\n\n $this->actingAs($user)\n ->post('/clients/create', ['name' => $client->name, 'phone' => $client->phone_number])\n ->seeJson(['success' => true]);\n\n }",
"public function user_route_api()\n {\n $this->withoutExceptionHandling();\n $response = $this->get('/api/test-user');\n\n $response->assertStatus(200);\n }",
"public function testGetListActionWithoutToken()\n {\n // Create an un-authenticated client\n $client = static::createClient();\n // Test the route\n $client->request('GET', '/api/products');\n // Check the response\n $this->assertSame(Response::HTTP_UNAUTHORIZED, $client->getResponse()->getStatusCode());\n }",
"public function testLeaseRequestViewNoAuthencation()\n {\n $this->get(route('lease.request'))->assertStatus(200);\n }",
"public function setUp()\n {\n $this->client = new Client(['base_uri' => 'http://127.0.0.1:8000/']);\n }",
"public function test_vessels_route_without_token()\n {\n $response = $this->get('/api/vessels');\n\n $response->assertStatus(401);\n }",
"public function testEndPoint()\n {\n\n $user = Auth::loginUsingId(1);\n\n// $response = $this->actingAs($user)\n// ->get('dashboard/orders/create');\n $response = $this->get('dashboard/orders/create');\n\n $response->assertStatus(200);\n }",
"public function seeUrlClient()\n {\n $this->get('/clientes')\n \t->assertStatus(200);\n $this->get('/clientes/crear')\n \t->assertStatus(200);\n $this->post('/clientes')\n \t->assertStatus(200);\n $this->get('/clientes/1')\n \t->assertStatus(200);\n $this->get('/clientes/1/editar')\n \t->assertStatus(200);\n $this->put('/clientes/1')\n \t->assertStatus(200);\n $this->delete('/clientes/1')\n \t->assertStatus(200);\n }",
"public function testShow()\n\t{\n\t\t$client = static::createClient(array(), array(\n\t\t 'PHP_AUTH_USER' => 'jr',\n\t\t 'PHP_AUTH_PW' => 'jr',\n\t\t));\n\n\t\t$crawler = $client->request('GET', '/clients');\n\t\t$this->assertGreaterThan(0, $crawler->filter('html:contains(\".client\")')->count());\n\t}",
"public function test_show_with_non_existent_client()\n {\n $response = $this->get(route('admin.clients.show', ['id' => '1234']));\n $response->assertStatus(404);\n }",
"public function testGetListActionWithToken()\n {\n // Get an authenticated client\n $client = $this->createAuthenticatedClient('sjouan', '1GreatP@ssword');\n // Test the route\n $client->request('GET', '/api/products');\n\n // Check the response\n $this->assertSame(Response::HTTP_OK, $client->getResponse()->getStatusCode());\n // asserts that the response status code is 2xx\n $this->assertTrue($client->getResponse()->isSuccessful(), 'response status is 2xx');\n }",
"public function setUp()\n {\n $this->client = static::createClient();\n $this->client->setServerParameters(\n array(\n 'PHP_AUTH_USER' => 'nicolas',\n 'PHP_AUTH_PW' => 'nicolas',\n ),\n array('HTTP_HOST' => 'www.openorchestra.dev')\n );\n $this->client->followRedirects();\n }",
"public function testImplicitClient()\n {\n $reqData = [\n 'response_type' => AccessToken::RESPONSE_IMPLICIT,\n 'client_id' => 1,\n 'scope' => 'default',\n 'redirect_uri' => ClientsSeeder::REDIRECT_URI_TEST_CLIENT,\n ];\n /** @var \\Tests\\Functional\\AuthTest $data */\n $data = $this->get('/authorize?'.\\http_build_query($reqData));\n\n $data->seeHeader('location');\n $url = \\parse_url($data->response->headers->get('location'));\n\n $this->assertContains('access_token', $url['fragment'], true);\n $this->assertContains('bearer', \\mb_strtolower($url['fragment']), true);\n $this->assertContains('token_type', $url['fragment'], true);\n $this->assertContains('expires_in', $url['fragment'], true);\n }",
"public function testClient()\n {\n $app = new \\Duality\\App(dirname(__FILE__), null);\n $client = $app->call('client');\n\n $expected = 'dummy';\n $client->setUserAgent($expected);\n $result = $client->getUserAgent();\n $this->assertEquals($expected, $result);\n\n $url = new Url('http://google.pt/');\n $request = $client->createRequest($url);\n $response = $client->execute($request);\n $this->assertInstanceOf('\\Duality\\Structure\\Http\\Response', $response);\n\n $expected = 'Moved Permanently';\n $result = $response->getCodeString();\n $this->assertEquals($expected, $result);\n\n $url = new Url('http://google.pt/');\n $request = $client->createRequest($url);\n $request->addHeader('Accept', 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8');\n $response = $client->execute($request);\n $client->getCurlHandler();\n\n $client->terminate();\n }",
"public function __construct(\\Solarium\\Client $client)\n {\n $this->middleware('auth');\n $this->middleware('abonnement');\n\n $this->client = $client;\n }",
"public function testDashboardApp()\n {\n $client = static::createClient();\n $client->request('GET', '/candidate/dashboard');\n $this->assertEquals(301, $client->getResponse()->getStatusCode());\n\n //users are forced to https\n $client = $this->createAuthClient('[email protected]', 'user');\n $crawler = $client->request('GET', '/candidate/dashboard');\n $response = $client->getResponse();\n $this->assertEquals(301, $response->getStatusCode());\n $this->assertTrue(0 === strpos($response->getTargetUrl(), 'https'));\n\n //https and authentication loads page\n $client = $this->createAuthClient('[email protected]', 'user');\n $crawler = $client->request('GET', '/candidate/dashboard', [], [], ['HTTPS' => true]);\n $this->assertTrue($crawler->filter('html:contains(\"Loading ...\")')->count() > 0);\n }",
"public function test_authenticated_users_can_see_detailed_customer_list()\n {\n $this->actingAs(factory(User::class)->create());\n\n // If the route customers/detailedlist can be visited(i.e get), assert \"true\"\n $response = $this->get('/customers/detailedlist')->assertOk();\n\n }",
"public function __construct()\n {\n $this->middleware('auth');// if the user not registred and his role not client he can't see the client view\n }",
"public function testRequiredAuthentication()\n {\n $response = $this->get('/');\n\n $response->assertStatus(Response::HTTP_FOUND);\n $response->assertRedirect(route('auth.login'));\n }",
"public function clientTest(): Response\n {\n return $this->templating->renderResponse('client/index.html.twig');\n }",
"public function test_admin_auth_routes(){\n Event::fake();\n $this->get('admin/dashboard')->assertStatus(403);\n }",
"public function testIndexAuthTest()\n {\n $response = $this->get('/images');\n\n $this->assertGuest($guard = null);\n $response->assertStatus(302);\n }",
"public function user_route()\n {\n $response = $this->get('/');\n\n $response->assertStatus(200);\n }",
"public function testGetAllHospitals(){\r\n\t\t$this->http = new Client(['base_uri' => 'http://localhost/casecheckapp/public/index.php/']);\r\n\t\r\n\t\t//Test HTTP status ok\r\n\t\t$response= $this->http->request('GET','api/v1/hospitals');\r\n\t\t$this->assertEquals(200,$response->getStatusCode());\r\n\t\r\n\t\t//Test JSON content\r\n\t\t$contentType = $response->getHeaders()[\"Content-Type\"][0];\r\n\t\t$this->assertEquals(\"application/json\", $contentType);\r\n\t\r\n\t\t//Stopping the connexion with Guzzle\r\n\t\t$this->http = null;\r\n\t\r\n\t}",
"public function testAuthorization(){\n $this->client->request('POST', '/api',[\n 'method' => 'createTransaction',\n 'user_id' => '0',\n 'token' => 'xxxxx',\n 'category_id' => '2',\n 'cost' => '123123',\n 'note' => 'asdadasgfa asfas ',\n ]);\n $data = json_decode($this->client->getResponse()->getContent(), true);\n $this->assertEquals(0, $data['success']);\n $this->assertEquals('User not found', $data['message']);\n\n $this->client->request('POST', '/api',[\n 'method' => 'createTransaction',\n 'user_id' => '-1',\n 'token' => 'xxxxx',\n 'category_id' => '2',\n 'cost' => '123123',\n 'note' => '',\n ]);\n $data = json_decode($this->client->getResponse()->getContent(), true);\n $this->assertEquals(0, $data['success']);\n $this->assertEquals('User not found', $data['message']);\n\n $this->client->request('POST', '/api',[\n 'method' => 'createTransaction',\n 'user_id' => '1',\n 'token' => 'xxxxx',\n 'category_id' => '2',\n 'cost' => '123123',\n 'note' => 'Test note',\n ]);\n $data = json_decode($this->client->getResponse()->getContent(), true);\n $this->assertEquals(0, $data['success']);\n $this->assertEquals('Request Fail,logout or sign in again', $data['message']);\n\n //Token of user already in database\n $this->client->request('POST', '/api',[\n 'method' => 'createTransaction',\n 'user_id' => '1',\n 'token' => '73a395f4b62a75ba12512e2d2b3b6dac',\n 'category_id' => '2',\n 'cost' => '123123',\n 'note' => 'Test note',\n ]);\n $data = json_decode($this->client->getResponse()->getContent(), true);\n $this->assertEquals(1, $data['success']);\n }",
"public function testAllCardsAcess()\n {\n $response = $this->withHeader('Accept', 'application/json')\n ->get(route('api.cards.index'));\n\n $response->assertStatus(401);\n\n $card = factory('App\\Card')->create();\n\n $response = $this->actingAs($card->owner, 'api')\n ->withHeader('Accept', 'application/json')\n ->get(route('api.cards.index'));\n }",
"public function test_example()\n {\n Artisan::call('passport:install');\n $user = User::factory()->make();\n Passport::actingAs($user);\n $token = $user->generateToken();\n $headers = [ 'Authorization' => \"Bearer $token\"];\n $payload = [];\n\n $response = $this->json('GET', '/api/product/list', $payload, $headers);\n\n $response->assertStatus(200);\n }",
"public function __construct()\n {\n $this->middlewere('api.auth', ['except'=>['index','show']]);\n }",
"public function testLoginController() {\n $user = $this->createUser(true);\n\n // Try to fail the login controller.\n $client = static::createClient();\n $client->request('POST', '/api/user/login');\n\n $this->assertEquals($client->getResponse()->getContent(), '{\"error\":\"The payload is not correct.\"}');\n\n $client = static::createClient();\n $client->request('POST', '/api/user/login', array(), array(), array('CONTENT_TYPE' => 'application/json'), '{\"auth\":\"pizza\"}');\n\n $this->assertEquals($client->getResponse()->getContent(), '{\"error\":\"The payload is not correct.\"}');\n\n // Create access token and start to check it's attached to the correct user.\n $auth = $this->getAuthString($user->username);\n\n $client = static::createClient();\n $client->request('POST', '/api/user/login', array(), array(), array('CONTENT_TYPE' => 'application/json'), '{\"auth\":\"' . $auth . '\"}');\n\n $response = $client->getResponse()->getContent();\n $decoded_response = json_decode($response);\n\n // Checking the access token belong to the user.\n $this->assertEquals($user->id, $decoded_response->user_id);\n\n // Checking the expires is valid for 1 day.\n $this->assertTrue($decoded_response->expires - time() > 86000);\n\n // Making sure we got the access token belongs to the user we created.\n $this->assertEquals($user->id, $this->getTahiniAccessToken()->loadByAccessToken($decoded_response->access_token)->user->id);\n }",
"public function testGetDetailActionWithoutToken()\n {\n // Create an un-authenticated client\n $client = static::createClient();\n // Test the route\n $client->request('GET', '/api/products/'.$this->product->getId());\n // Check the response\n $this->assertSame(Response::HTTP_UNAUTHORIZED, $client->getResponse()->getStatusCode());\n }",
"public function testClientsPageAsLoggedInUser() {\n\n // Generate user\n $user = factory(App\\User::class)->create();\n\n $this->actingAs($user)\n ->visit('/clients')\n ->see($user->email);\n\n }",
"public function testLeaseIndexFrontEnd()\n {\n $this->get(route('lease'))->assertStatus(200);\n }",
"function authenticate(\\Slim\\Route $route) {\n // Getting request headers\n $headers = apache_request_headers();\n $response = array();\n $app = \\Slim\\Slim::getInstance();\n\n // Verifying Authorization Header\n if (isset($headers['Authorization'])) {\n $db = new DbHandler();\n\n // get the api key\n $api_key = $headers['Authorization'];\n // validating api key\n if (!$db->isValidApiKey($api_key)) {\n // api key is not present in users table\n $response[\"error\"] = true;\n $response[\"message\"] = \"Access Denied. Invalid Api key\";\n echoRespnse(401, $response);\n $app->stop();\n } else {\n global $client_id;\n // get user primary key id\n $client_id = $db->getUserId($api_key);\n }\n } else {\n // api key is missing in header\n $response[\"error\"] = true;\n $response[\"message\"] = \"Api key is misssing\";\n echoRespnse(400, $response);\n $app->stop();\n }\n}",
"public function testLeaseBackendIndex()\n {\n $user = factory(User::class)->create();\n\n $this->actingAs($user)\n ->seeIsAuthenticatedAs($user)\n ->get(route('lease.backend'))\n ->assertStatus(200);\n }",
"public function __construct()\n {\n $this->middleware('auth');\n $this->middleware('client');\n }",
"public function testApiIndex()\n {\n $user = User::find(1);\n\n $response = $this->actingAs($user)->get('/api/comptes');\n\n $response->assertStatus(200)\n ->assertJson([\n\n 'comptes' => true,\n \n ]);\n }",
"public function testLeaseDomainAccessFrontEnd()\n {\n $this->get(route('lease.access'))->assertStatus(200);\n }",
"public function testNoAuth() : void\n {\n $response = $this->get(action('HomeController@index'));\n\n $response->assertStatus(200);\n }",
"public function adminBasicTest()\n {\n $response = $this->get('admin');\n\n $response->assertStatus(401);\n }",
"public function testIndexRouteAdmin(): void\n {\n // given\n $expectedStatusCode = 200;\n $adminUser = $this->createUser([User::ROLE_USER, User::ROLE_ADMIN]);\n $this->logIn($adminUser);\n\n // when\n $this->httpClient->request('GET', '/tag');\n $resultStatusCode = $this->httpClient->getResponse()->getStatusCode();\n\n // then\n $this->assertEquals($expectedStatusCode, $resultStatusCode);\n }",
"public function testCreateClientWithEmptyFields() {\n\n $this->withoutMiddleware();\n\n // Generate user\n $user = factory(App\\User::class)->create();\n\n $this->actingAs($user)\n ->post('/clients/create')\n ->seeJson(['success' => false]);\n\n }",
"public function setUpRoutes()\n {\n Route::group(['middleware' => AddCustomProvider::class], function () {\n Passport::routes(function ($router) {\n return $router->forAccessTokens();\n });\n });\n\n Route::middleware('auth:api')->get('/user', function (Request $request) {\n return $request->user();\n });\n\n Route::middleware('auth:company')->get('/company', function (Request $request) {\n return $request->user();\n });\n\n Route::middleware('auth:api,company')->get('/users', function (Request $request) {\n return [\n $request->user('api'),\n $request->user('company'),\n $request->user(),\n Auth::user(),\n Auth::guard('api')->user(),\n Auth::guard('company')->user(),\n Auth::check(),\n Auth::id(),\n ];\n });\n\n Route::middleware('auth:api')->get('/just_user', function (Request $request) {\n return [\n $request->user('api'),\n $request->user('company'),\n $request->user(),\n Auth::user(),\n Auth::guard('api')->user(),\n Auth::guard('company')->user(),\n Auth::check(),\n Auth::id(),\n ];\n });\n\n Route::middleware('auth:company')->get('/just_company', function (Request $request) {\n return [\n $request->user('api'),\n $request->user('company'),\n $request->user(),\n Auth::user(),\n Auth::guard('api')->user(),\n Auth::guard('company')->user(),\n Auth::check(),\n Auth::id(),\n ];\n });\n\n Route::middleware('auth')->get('/no_guards', function (Request $request) {\n return $request->user();\n });\n }",
"public function test_only_logged_in_users_can_see_detailed_customer_list()\n {\n // the login page, assert \"true\"\n $response = $this->get('/customers/detailedlist')->assertRedirect('/login');\n\n }",
"public function testCreateClientWithoutName() {\n\n $this->withoutMiddleware();\n\n // Generate user\n $user = factory(App\\User::class)->create();\n\n $this->actingAs($user)\n ->post('/clients/create', ['phone' => '0725433317'])\n ->seeJson(['success' => false]);\n\n }",
"public function __construct()\n {\n \tauth()->setDefaultDriver('api');\n $this->middleware('auth:api', ['except' => ['me','login','registration','refresh','logouttest']]);\n // $this->middleware('cors');\n }",
"public function toto()\n {\n// //$client->followRedirects(FALSE);\n// $crawler = $client->request('GET', '/login');\n// $this->assertTrue($client->getResponse()->isRedirect('/'));\n// $crawler = $client->request('GET', '/register/');\n// $this->assertTrue($client->getResponse()->isRedirect('/'));\n }",
"public function testUbicaciontracker()\n {\n // $response = $this->get('/');\n // $response->assertStatus(200);\n //$this->visit('buque/store');\n // $response = $this->get('/');\n // $this->assertTrue(true);\n $response = $this->withHeaders([\n 'X-Header' => 'Value',\n ])->json('POST', '/user', ['name' => 'Sally']);\n\n $response\n ->assertStatus(201)\n ->assertJson([\n 'created' => true,\n ]);\n }",
"public function testAuthenticationsInweboIdGet()\n {\n }",
"public function testProtected()\n {\n $response = $this->json('post', '/api/logout');\n $response->assertUnauthorized();\n }",
"public function testIndex()\n {\n $requestInstance = null;\n\n $this->router->get('/customers/{id}/relationships/{relationship}', [\n 'middleware' => ['request', 'response'],\n function(\\Luminary\\Http\\Requests\\Index $request, $id, $relationship) use(&$requestInstance) {\n $requestInstance = $request;\n }\n ]);\n\n $this->get('/customers/1234/relationships/location');\n\n $this->assertResponseOk();\n $this->assertInstanceOf(\\Luminary\\Http\\Requests\\Index::class, $requestInstance);\n $this->assertInstanceOf(CustomerAuthorize::class, $requestInstance->getAuthorize());\n }",
"public function get_test_authorization_header()\n {\n }",
"public function testApiRedirect()\n {\n $_SERVER['HTTP']['Token'] = Session::get('Token');\n\n $response = $this->call('GET', '/api/');\n\n $this->assertEquals(200, $response->getStatusCode());\n\n $decoded = json_decode($response->getContent());\n\n $this->assertEquals('error', $decoded->status);\n }",
"protected function setUp()\n {\n $this->client = new Client([\n 'base_uri' => 'http://api'\n ]);\n }",
"public function test()\n {\n $this->getAuthenticatedUser();\n return response()->json(['data' => ['status' => 'OK']], 200);\n }",
"public function testGETRoute()\n {\n\n $response = $this->get('/api/role');\n\n $response->assertStatus(200);\n// $response->assertSee(\"Role management page\");\n }",
"public function __construct()\n {\n $this->middleware('auth:api', ['except' => []]);\n header(\"Access-Control-Allow-Origin: \" . getOrigin($_SERVER));\n }",
"public function test_teams_show_authenticated_leader_returns_403(){\n $this->signInLeader();\n $response = $this->get(route('teams.show', ['team' => 1]));\n $response->assertStatus(403);\n }",
"public function testDashboardAdminRequire()\n {\n $client = $this->makeClient();\n $crawler = $client->request('GET', '/login');\n $form = $crawler->selectButton('Login')->form();\n $form->setValues(['_username' => '[email protected]', '_password' => 'password']);\n $client->submit($form);\n\n\n $client->request('GET', '/admin/dashboard');\n $this->assertStatusCode(403, $client);\n\n $client->request('GET', '/logout');\n\n\n $crawler = $client->request('GET', '/login');\n $form = $crawler->selectButton('Login')->form();\n $form->setValues(['_username' => '[email protected]', '_password' => 'password']);\n $client->submit($form);\n\n $client->request('GET', '/admin/dashboard');\n $this->assertStatusCode(200, $client);\n\n }",
"public function testPostAuthorizationDivisions()\n {\n }",
"public function testLoginRoute()\n {\n $response = $this->get('/login');\n $response->assertStatus(200);\n }",
"public function testValidCredentialsInHeader()\n {\n $server = $this->getTestServer();\n $headers = array('HTTP_AUTHORIZATION' => 'Basic '.base64_encode('Test Client ID:TestSecret'), 'REQUEST_METHOD' => 'POST');\n $params = array('grant_type' => 'client_credentials');\n $request = new Request(array(), $params, array(), array(), array(), $headers);\n $token = $server->grantAccessToken($request, new Response());\n\n $this->assertNotNull($token);\n $this->assertArrayHasKey('access_token', $token);\n $this->assertNotNull($token['access_token']);\n\n // create using PHP Authorization Globals\n $headers = array('PHP_AUTH_USER' => 'Test Client ID', 'PHP_AUTH_PW' => 'TestSecret', 'REQUEST_METHOD' => 'POST');\n $params = array('grant_type' => 'client_credentials');\n $request = new Request(array(), $params, array(), array(), array(), $headers);\n $token = $server->grantAccessToken($request, new Response());\n\n $this->assertNotNull($token);\n $this->assertArrayHasKey('access_token', $token);\n $this->assertNotNull($token['access_token']);\n }",
"public function testShowSpecificOutroCardsForGuest(): void\n {\n // Request\n $response = $this->get('api/v1/outroCards/tenants/1');\n\n // Check response status\n $response->assertStatus(401);\n }",
"public function test_teams_index_authenticated_leader_returns_403(){\n $this->signInLeader();\n $response = $this->get(route('teams.index'));\n $response->assertStatus(403);\n }",
"public function __construct()\n {\n $this->middleware('guest:admin-api');\n\n }",
"public function testNotAuthenticated()\n {\n $response = $this->get('/api/v1/contacts');\n\n $response->assertStatus(302);\n\n $response = $this->get('/api/v1/contacts/1');\n\n $response->assertStatus(302);\n\n $response = $this->get('/api/v1/contacts/search/asdad');\n\n $response->assertStatus(302);\n }",
"public function test_making_sure_that_get_requests_redirects_to_login_if_user_is_not_authenticated(){\n $response = $this->get('/home');\n $response->assertRedirect('/login');\n }",
"public function testAdminGetListadoAction()\n {\n $headers = $this->getHeaders('[email protected]');\n $client = static::createClient();\n $client->followRedirects();\n $client->request('GET', '/api/v1.0/usuarios', [], [], $headers);\n self::assertEquals(200, $client->getResponse()->getStatusCode());\n }",
"public function testAclMiddleware():void\n {\n $generator = Factory::create();\n $em = $this->em();\n $conn = $em->getConnection();\n $conn->beginTransaction();\n try {\n /** Register user via the guest endpoint **/\n $response = $this->json(\n 'POST', '/contexts/guest/users',\n [\n \"params\" => [\n 'email' => $generator->safeEmail,\n 'firstName'=> $generator->firstName,\n 'middleInitial'=>'X',\n 'lastName'=> $generator->lastName,\n 'age' => $generator->randomNumber(2),\n 'gender' => 1,\n 'weight' => 210,\n 'height' => 180.34,\n 'phoneNumber' => \"+1 757-571-2711\",\n 'lifestyle' => 1,\n 'password' => $this->password,\n 'job' => $generator->jobTitle,\n 'address' => $generator->address,\n 'locale' => \"en\"\n ],\n \"options\" => [\n \"email\" => false,\n \"g-recaptcha-response-omit\" => env('GOOGLE_RECAPTCHA_SKIP_CODE') /** skipping recaptcha with a key **/\n ]\n ]\n );\n $userResult = $response->decodeResponseJson();\n $this->assertArrayHasKey('id', $userResult);\n\n /** Making sure user has email verification entry **/\n $emailVerificationRepository = new EmailVerificationRepository();\n $emailVerification = $emailVerificationRepository->findOneBy([\"user\" => $userResult[\"id\"]]);\n $this->assertEquals( $emailVerification->getUser()->getId(), $userResult['id']);\n $this->assertEquals( $emailVerification->getVerified(), false);\n\n /** Email verification endpoint **/\n $response = $this->json(\n 'PUT', \"/contexts/guest/email-verification/\" . $emailVerification->getId(),\n [\n \"params\" => [ \"verified\" => true ],\n \"options\" => [ \"simplifiedParams\" => true ]\n ]\n );\n $response->assertResponseStatus(200);\n\n /** Making sure user has user has role entry of 'user' **/\n $userRepository = new UserRepository();\n /** @var User $user */\n $user = $userRepository->find($userResult[\"id\"]);\n $this->assertEquals( $user->getId(), $userResult['id']);\n $this->assertEquals( $user->getRoles()[0]->getName(), 'user');\n\n /** Login with wrong password **/\n $response = $this->json('POST', '/auth/authenticate', ['email' => $user->getEmail(), 'password' => 'wrong_password']);\n $response->assertResponseStatus(401);\n\n /** Login with right password **/\n $response = $this->json('POST', '/auth/authenticate', ['email' => $user->getEmail(), 'password' => $this->password]);\n $tokenResult = $response->decodeResponseJson();\n $response->assertResponseStatus(200);\n\n /** Free port acl **/\n $response = $this->json('GET', '/auth/me', [], ['HTTP_AUTHORIZATION'=>'Bearer ' . $tokenResult['token']]);\n $result = $response->decodeResponseJson();\n $this->assertEquals($result['email'], $user->getEmail());\n\n $data = [\n \"params\" => [\n \"name\" => $generator->name\n ],\n \"options\" => [\n \"simplifiedParams\" => true\n ]\n ];\n\n /** Posting artist as a quest **/\n $response = $this->json('POST', '/contexts/guest/artists', $data, ['HTTP_AUTHORIZATION'=>'Bearer ' . $tokenResult['token']]);\n $response->assertResponseStatus(405);\n\n /** Posting artist as a user **/\n $response = $this->json('POST', '/contexts/user/artists', $data, ['HTTP_AUTHORIZATION'=>'Bearer ' . $tokenResult['token']]);\n $result = $response->decodeResponseJson();\n $response->assertResponseStatus(500);\n\n /** Posting artist as a admin **/\n $response = $this->json('POST', '/contexts/admin/artists', $data, ['HTTP_AUTHORIZATION'=>'Bearer ' . $tokenResult['token']]);\n $response->assertResponseStatus(403);\n\n /** Posting artist as a super-admin **/\n $response = $this->json('POST', '/contexts/super-admin/artists', $data, ['HTTP_AUTHORIZATION'=>'Bearer ' . $tokenResult['token']]);\n $response->assertResponseStatus(404);\n $conn->rollBack();\n } catch (Exception $e) {\n $conn->rollBack();\n throw $e;\n }\n }",
"public function testAuthenticated()\n {\n $this->assertFalse($this->auth->authenticate(new ServerRequest(), $this->response));\n }",
"public function testDeleteNotExistentClient() {\n\n // Generate user\n $user = factory(App\\User::class)->create();\n\n $this->actingAs($user)\n ->get('/clients/' . rand(1,999) . '/delete')\n ->seeJson(['success' => false]);\n\n }",
"public function index()\n {\n // dd(Auth::user());\n\n // dd(auth('api')->user());\n // $user = Auth::user();\n // return $this->returnOne($user, 200);\n\n }",
"public function setUp(){\n $this->client = static::createClient();\n }",
"public function testIndex(){\n\t\t\n\t\t$this->mock->shouldReceive('all')->once();\n\n\t\t$this->call('GET', 'users'); //get: Method , user: url\n\n\t\t$this->assertResponseOk();\n\t}",
"public function testAuthTest()\n {\n $response = $this->post('posts', array());\n $response->assertStatus(401);\n }",
"public function testSetsCorrectAuthenticationHeader()\n {\n /** @var \\Koren\\ErplyBooks\\Resource\\Invoices $invoicesResource */\n $invoicesResource = $this->client->Invoices();\n\n $request = new Request('GET', $invoicesResource->getEndpointUrl());\n\n $request = $this->client->authenticate($request);\n $this->assertInstanceOf(\n RequestInterface::class,\n $request\n );\n\n $this->assertTrue(\n $request->hasHeader('Accept')\n );\n\n $this->assertTrue(\n $request->hasHeader('Content-Type')\n );\n\n $this->assertEquals(\n $request->getHeader('Accept')[0],\n 'application/json'\n );\n\n $this->assertEquals(\n $request->getHeader('Content-Type')[0],\n 'application/json'\n );\n }",
"public function testFrontendOverView()\n {\n $this->authentication();\n $this->visit(route('rental.frontend.index'));\n $this->seeStatusCode(200);\n $this->see('Verhuur info.');\n }",
"public function testRestfulStrategyRouteReturnsResponseWhenControllerDoes()\n {\n $mockResponse = $this->getMock('Symfony\\Component\\HttpFoundation\\JsonResponse');\n\n $collection = new Route\\RouteCollection;\n\n $collection->setStrategy(new RestfulStrategy);\n\n $collection->get('/route/{id}/{name}', function ($request) use ($mockResponse) {\n $this->assertInstanceOf('Symfony\\Component\\HttpFoundation\\Request', $request);\n return $mockResponse;\n });\n\n $dispatcher = $collection->getDispatcher();\n $response = $dispatcher->dispatch('GET', '/route/2/phil');\n\n $this->assertSame($mockResponse, $response);\n }"
] | [
"0.69592667",
"0.6668017",
"0.6476774",
"0.6405571",
"0.6392435",
"0.6392435",
"0.6392435",
"0.6388582",
"0.63487405",
"0.6288389",
"0.6267343",
"0.6255872",
"0.6237533",
"0.6233118",
"0.623307",
"0.6232956",
"0.6232662",
"0.6218714",
"0.62155664",
"0.6213458",
"0.6212194",
"0.6155847",
"0.6150795",
"0.61486334",
"0.6144123",
"0.6143351",
"0.6122794",
"0.612189",
"0.6119356",
"0.6113223",
"0.6040591",
"0.6029527",
"0.6026627",
"0.6025415",
"0.6022814",
"0.5999546",
"0.5971749",
"0.5958508",
"0.59578985",
"0.5944689",
"0.59361154",
"0.59326816",
"0.59266984",
"0.59227324",
"0.5909616",
"0.5907217",
"0.59060377",
"0.5899926",
"0.5899099",
"0.5887056",
"0.5882208",
"0.587696",
"0.58721685",
"0.58709556",
"0.5870575",
"0.58679867",
"0.58525795",
"0.5850797",
"0.58355856",
"0.58285004",
"0.58105206",
"0.58078885",
"0.5795883",
"0.57939327",
"0.5788619",
"0.57881814",
"0.5787577",
"0.5761287",
"0.575494",
"0.5751166",
"0.574848",
"0.5745623",
"0.57423675",
"0.5740596",
"0.5739577",
"0.5710457",
"0.57095957",
"0.5682553",
"0.5680205",
"0.5676569",
"0.5674394",
"0.5672648",
"0.56698966",
"0.56688106",
"0.5664406",
"0.56597465",
"0.56591576",
"0.5657715",
"0.5656776",
"0.5653709",
"0.5653595",
"0.56526226",
"0.5650867",
"0.56503284",
"0.56492203",
"0.564853",
"0.5641763",
"0.5639969",
"0.56395113",
"0.56376547"
] | 0.7264086 | 0 |
/ GETTERS AND SETTERS | public function getId () : int
{
return $this -> id;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function setters();",
"abstract protected function setRequiredGetters();",
"abstract public function set();",
"function doGetterSetter() {\n\tglobal $description_obj;\n\tglobal $table_name, $class_name;\n\tglobal $tabs, $tab2, $tab3;\n\n\tfComment($tabs,\"Getters and Setters\");\n\tforeach($description_obj as $obj) {\n\t\t//print_r($obj);\n\n\t\techo $tabs,\"/// getter for '$obj->Field'\\n\",\n\t\t\t $tabs,\"public function get_{$obj->Field}()\\t\\t{return \\$this->$obj->Field;}\\n\",\n\t\t\t $tabs,\"/// setter for '$obj->Field'\\n\",\n\t\t\t $tabs,\"public function set_{$obj->Field}(\\$val)\\t{\\$this->$obj->Field = \",assignEscape($obj),\";}\\n\",\n\t\t\t \"\\n\";\n\t}\n\techo $tabs,\"public function get_last_error()\\t\\t{return \\$this->_last_error;}\\n\";\n\techo \"\\n\\n\";\n}",
"abstract public function get();",
"abstract public function get();",
"abstract public function get();",
"abstract public function get();",
"abstract public function get();",
"abstract public function get();",
"function read_set()\n\t{\n\t\tglobal $REQUEST;\n\t\tif (!$this->writeable)\n\t\t{\n\t\t\tpage_error('Read only attribute ' . $this->name);\n\t\t}\n\t\t$this->value = $REQUEST->read($this->id, $this->mandatory);\n\t\t\n\t\tUtilLogging::getInstance()->debug(\"read_set - Attribute: \". $this->id . \" - value set: \" . $this->value);\n\t}",
"abstract public function get() ;",
"public static function setters()\n {\n return parent::setters() + self::$setters;\n }",
"public static function setters()\n {\n return parent::setters() + self::$setters;\n }",
"public static function setters()\n {\n return parent::setters() + self::$setters;\n }",
"public static function setters()\n {\n return parent::setters() + self::$setters;\n }",
"public static function setters()\n {\n return parent::setters() + self::$setters;\n }",
"public static function setters()\n {\n return parent::setters() + self::$setters;\n }",
"public static function setters()\n {\n return parent::setters() + self::$setters;\n }",
"public static function setters()\n {\n return parent::setters() + self::$setters;\n }",
"public static function setters()\n {\n return parent::setters() + self::$setters;\n }",
"public static function setters()\n {\n return parent::setters() + self::$setters;\n }",
"public static function setters()\n {\n return parent::setters() + self::$setters;\n }",
"public static function setters()\n {\n return parent::setters() + self::$setters;\n }",
"public static function setters()\n {\n return parent::setters() + self::$setters;\n }",
"abstract protected function getDirectGetters();",
"public static function getters();",
"protected function setProperties()\n {\n foreach ($this->data as $key => $value) {\n $this->$key = $value;\n }\n }",
"abstract protected function handle_set($name,$value);",
"function set_property(){\n }",
"function properties()\n {\n }",
"abstract function get();",
"function get()\n {\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters()\r\n {\r\n return self::$setters;\r\n }",
"public static function setters() {\n return self::$setters;\n }",
"public function __get($value);",
"function __set ( $name , $value )\n {\n $this->$name=$value;\n }",
"abstract protected function properties();",
"abstract public function set($in): void;",
"public function get();",
"public function get();",
"public function get();",
"public function get();",
"public function get();"
] | [
"0.70764416",
"0.6947404",
"0.67814124",
"0.6570092",
"0.63334507",
"0.63334507",
"0.63334507",
"0.63334507",
"0.63334507",
"0.63334507",
"0.6331191",
"0.62754875",
"0.6253727",
"0.6253727",
"0.6253727",
"0.6253727",
"0.6253727",
"0.6253727",
"0.6253727",
"0.6253727",
"0.6253727",
"0.6253727",
"0.6253727",
"0.6253727",
"0.6253727",
"0.6221866",
"0.6220191",
"0.6162682",
"0.6147566",
"0.6135435",
"0.6116268",
"0.6075336",
"0.6069216",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.60237116",
"0.6016202",
"0.60139626",
"0.6007989",
"0.59498674",
"0.59477025",
"0.59321654",
"0.59321654",
"0.59321654",
"0.59321654",
"0.59321654"
] | 0.0 | -1 |
Registering function for the aspect Joinpoints. | public function registerJoinPoints(\Core\Aspect\AspectManager &$aspectManager)
{
$aspectManager->registerThrow("Core\MVC\CoreModel->*()"
, '$this->manageException()');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function decoratorAdded() {}",
"abstract protected function registerFunctions();",
"public function addAspect(IAspect $aspect);",
"function Piwik_AddAction( $hookName, $function )\n{\n\tPiwik_PluginsManager::getInstance()->dispatcher->addObserver( $function, $hookName );\n}",
"function activate_plugin() {\n\t$logger = get_logger();\n\t$logger->activate();\n\n\t/**\n\t * Trigger custom capabilities required by the plugin to be registered.\n\t */\n\tdo_action( 'mcavoy_register_caps' );\n}",
"public function registerPhpFunctions ($restrict = null) {}",
"function register_hook($event, $advise, &$obj, $method, $param=NULL) {\n $this->_hooks[$event.'_'.$advise][] = array(&$obj, $method, $param);\n }",
"public function attach()\n {\n // dummy implementation\n }",
"abstract public function onRegister(): void;",
"public function registerOn(Environment $workflowEnv)\n {\n //Nothing to do for this plugin\n }",
"public function attachEvents();",
"public function attachEvents();",
"public function onRegister();",
"public function register_endpoints() {\n\n foreach (static::$endpoints as $endpoint => $function) {\n\n $regular = 'wp_ajax_' . $endpoint;\n $nopriv = 'wp_ajax_nopriv_' . $endpoint;\n\n add_action( $regular, array( $this, $function ) );\n add_action( $nopriv, array( $this, $function ) );\n\n }\n }",
"public function registerActivity() {\n }",
"function wp_oembed_register_route()\n {\n }",
"function partial_zoomwebinarhost (callable $func, ...$args): callable\n{\n return function () use ($func, $args) {\n return call_user_func_array($func, array_merge($args, func_get_args()));\n };\n}",
"public function register_activation();",
"abstract public function register_plugin();",
"abstract public function registerPlugin(Swift_Events_EventListener $plugin);",
"public function attach_hooks() {\n\n\t\t$this->define_hooks();\n\n\t}",
"public function add_endpoint() {\r\n add_rewrite_rule('^api/films/?(\\w+)?/?','index.php?__api=1&films=$matches[1]','top');\r\n }",
"public function register() {\n\t\tadd_action( 'admin_init', [ $this, 'schedule_event' ] );\n\t\tadd_action( $this->get_event_name(), [ $this, 'process' ] );\n\n\t\t$this->plugin_file = plugin_basename( dirname( dirname( __DIR__ ) ) . '/amp.php' );\n\t\tadd_action( \"network_admin_plugin_action_links_{$this->plugin_file}\", [ $this, 'add_warning_sign_to_network_deactivate_action' ], 10, 1 );\n\t\tadd_action( 'plugin_row_meta', [ $this, 'add_warning_to_plugin_meta' ], 10, 2 );\n\t}",
"abstract protected function register_hook_callbacks();",
"abstract public function register_hook_callbacks();",
"public function attach_hooks() {\n\t\t$this->define_hooks();\n\t}",
"public function register(){\n\t\t$this->registerOptimusAsAlias();\n\t\t$this->registerCommand();\n\t}",
"function registerAt($step, $method, $args, $action) {\n $args = $this->replaceWildcards($args);\n $method = strtolower($method);\n if (! isset($this->at[$method])) {\n $this->at[$method] = array();\n }\n if (! isset($this->at[$method][$step])) {\n $this->at[$method][$step] = new SimpleSignatureMap();\n }\n $this->at[$method][$step]->add($args, $action);\n }",
"function add_endpoint_trigger( $vars ) {\n\t\t$vars[] = 'pt_endpoint';\n\t\t$vars[] = 'ptgetinfo';\n\t\treturn $vars;\n\n\t}",
"private function attach_external_plugin_integration() {\n\t\t$daos = ShoutemStandardDaoFactory :: instance()->get_external_plugin_integration_daos();\n\t\tforeach ($daos as $dao) {\n\t\t\t$dao->attach_to_hooks();\n\t\t}\n\t}",
"function on_activation ()\n{\n}",
"function on_activation ()\n{\n}",
"public function register( \\Aimeos\\MW\\Observer\\Publisher\\Iface $p );",
"public function register(){}",
"function Core_AddAction( $hookName, $function )\n{\n\tCore_ModuleManager::getInstance()->dispatcher->addObserver( $function, $hookName );\n}",
"public function registerExternalEndpoints()\n {\n Route::post('encode/notify', [\n 'as' => 'decoy::encode@notify',\n 'uses' => '\\Bkwld\\Decoy\\Controllers\\Encoder@notify',\n ]);\n }",
"public function register();",
"public function register();",
"public function register();",
"public function register();",
"public function register();",
"public function register();",
"public function register();",
"public function register();",
"public function on(string $scenario, array $arguments = []);",
"public function addPointcut(Pointcut $pointcut): void\n {\n $this->pointcuts[] = $pointcut;\n }",
"public function addAggregate($name, $field, $function, array $parameters = []);",
"public function register() {}",
"function setup() {\n\t$n = function ( $function ) {\n\t\treturn __NAMESPACE__ . \"\\\\$function\";\n\t};\n\n\t// NOTE: Uncomment to activate post type\n\tadd_action( 'init', $n( 'register_work' ) );\n\n}",
"protected static function register() {}",
"public function register(): void;",
"protected function registerMiddleware()\n {\n \\Route::middleware('hsign', ApiSign::class);\n }",
"public function registerActions() {\n $this->addAction('wp_footer', array('Chayka\\\\LinkedIn\\\\HtmlHelper', 'renderJsInit'));\n \t/* chayka: registerActions */\n }",
"protected function registered()\n {\n //\n }",
"function RegisterFunction( $function, $params = array() )\r\n {\r\n $this->_functions[$function] = $params;\r\n }",
"public function registerCallbacks()\n {\n parent::registerCallbacks();\n }",
"function wp_embed_register_handler($id, $regex, $callback, $priority = 10)\n {\n }",
"public function register() {\n\t\tadd_action( 'plugins_loaded', [ $this, 'register_services' ] );\n\t\tadd_action( 'init', [ $this, 'register_assets_handler' ] );\n\t}",
"function setHook($hookPoint, $function) {\n\t\t\t$this->hooks[$hookPoint] = $function;\n\t\t}",
"function setup() {\n\t$n = function( $function ) {\n\t\treturn __NAMESPACE__ . \"\\\\$function\";\n\t};\n\n\tadd_action( 'after_setup_theme', $n( 'vincentragosta_setup' ) );\n\tadd_action( 'wp_enqueue_scripts', $n( 'scripts' ) );\n\tadd_action( 'wp_enqueue_scripts', $n( 'styles' ) );\n}",
"public function register(): void\n {\n\n }",
"function setup(){\n\t\t$n = function( $function ){\n\t\t\treturn __NAMESPACE__ . '\\\\' . $function;\n\t\t};\n\t\t\n\t\t//add the hooks and filters here\n\t\tadd_action( \"init\", $n(\"register_block\") );\n\t}",
"function runkit_function_add($funcname, $arglist, $code)\n{\n}",
"abstract protected function registerHandlers();",
"function register_vc_add_on(){\r\n\r\n vc_map( array(\r\n \"name\" => $this->name,\r\n \"base\" => $this->id,\r\n \"icon\" => $this->icon,\r\n \"description\" => $this->description,\r\n \"weight\" => 1,\r\n\r\n \"wrapper_height\"=> 'full',\r\n\r\n \"category\" => __( 'BetterMag Addons', 'better-studio' ),\r\n \"params\" => array(\r\n\r\n array(\r\n \"type\" => 'textfield',\r\n \"admin_label\" => true,\r\n \"heading\" => __( 'Title', 'better-studio' ),\r\n \"param_name\" => 'title',\r\n \"value\" => $this->defaults['title'],\r\n ),\r\n array(\r\n \"type\" => 'bf_switchery',\r\n \"heading\" => __( 'Show Title?', 'better-studio'),\r\n \"param_name\" => 'show_title',\r\n \"value\" => $this->defaults['show_title'],\r\n ),\r\n array(\r\n 'heading' => __( 'Instructions', 'better-studio' ),\r\n 'param_name' => 'help',\r\n 'type' => 'bf_info',\r\n 'value' => __('<ol>\r\n <li>Copy the link to you facebook page</li>\r\n <li>Paste it in the \"Link to you Facebook page\" input box below</li>\r\n </ol>\r\n ', 'better-studio' ),\r\n 'state' => 'open',\r\n 'info-type' => 'help',\r\n 'section_class' => 'widefat',\r\n ),\r\n array(\r\n \"type\" => 'textfield',\r\n \"admin_label\" => true,\r\n \"heading\" => __( 'Link to you Facebook page', 'better-studio' ),\r\n \"param_name\" => 'url',\r\n \"value\" => $this->defaults['url'],\r\n ),\r\n array(\r\n \"type\" => 'bf_select',\r\n \"heading\" => __( 'Style', 'better-studio' ),\r\n \"param_name\" => 'style',\r\n 'section_class' => 'style-floated-left',\r\n \"admin_label\" => true,\r\n \"options\" => array(\r\n 'light' => __( 'Light Schema', 'better-studio' ),\r\n 'dark' => __( 'Style Schema', 'better-studio' ),\r\n ),\r\n \"value\" => $this->defaults['style'],\r\n ),\r\n array(\r\n \"type\" => 'bf_switchery',\r\n \"admin_label\" => false,\r\n \"heading\" => __( 'Show Posts?', 'better-studio' ),\r\n \"param_name\" => 'show_posts',\r\n \"value\" => $this->defaults['show_posts'],\r\n ),\r\n array(\r\n \"type\" => 'bf_switchery',\r\n \"admin_label\" => false,\r\n \"heading\" => __( 'Show faces?', 'better-studio' ),\r\n \"param_name\" => 'show_faces',\r\n \"value\" => $this->defaults['show_faces'],\r\n ),\r\n array(\r\n \"type\" => 'bf_switchery',\r\n \"admin_label\" => false,\r\n \"heading\" => __( 'Show Header?', 'better-studio' ),\r\n \"param_name\" => 'show_header',\r\n \"value\" => $this->defaults['show_header'],\r\n ),\r\n array(\r\n \"type\" => 'bf_switchery',\r\n \"admin_label\" => false,\r\n \"heading\" => __( 'Show Border?', 'better-studio' ),\r\n \"param_name\" => 'show_border',\r\n \"value\" => $this->defaults['show_border'],\r\n ),\r\n\r\n\r\n )\r\n ) );\r\n\r\n }",
"public function _register()\n {\n }",
"public function register(): void\n {\n }",
"public function register(): void\n {\n }",
"public function register(): void\n {\n }",
"public function register(): void\n {\n }",
"public function register(): void\n {\n }",
"function registerFunction( $event, $function )\n\t{\n\t\t JApplication::registerEvent( $event, $function );\n\t}",
"public function activate() {\n\n\t\t$this->registration_handler->register();\n\t\t\n\t}",
"public function decorate();",
"protected function add()\n {\n $this->numArgs = $this->findNumArgs($this->callback);\n if (is_string($this->callback) && class_exists($this->callback)) {\n $this->useCallbackManager('invoke', $this->callback);\n }\n foreach ((array) $this->hook as $hook) {\n \\add_filter($hook, $this->callback, $this->priority, $this->numArgs);\n }\n }",
"function mgd_register_filter($name, $function)\n{\n $GLOBALS['midgard_filters'][\"x{$name}\"] = $function;\n}",
"public function register(){\r\n\r\n }",
"public function register()\n {\n return [T_FUNCTION];\n\n }",
"protected function registerRouteMiddleware()\n {\n // register route middleware.\n foreach ($this->routeMiddleware as $key => $middleware) {\n app('router')->aliasMiddleware($key, $middleware);\n }\n }",
"protected function registerRouteMiddleware()\n {\n // register route middleware.\n foreach ($this->routeMiddleware as $key => $middleware) {\n app('router')->aliasMiddleware($key, $middleware);\n }\n }",
"protected function registeringDomain()\n {\n }",
"abstract public function register();",
"abstract public function register();",
"abstract public function register();",
"protected function registerRouteBindings()\n {\n //\n }",
"public function activatePlugin();",
"function routes_install()\r\n{\r\n\tregister_hook('init_1', 'addon/routes/routes.php', 'routes_init_1');\r\n\tregister_hook('post_local', 'addon/routes/routes.php', 'routes_post_local_end_hook');\r\n\tregister_hook('profile_tabs', 'addon/routes/routes.php', 'routes_profile_tabs_hook');\r\n}",
"function apply(...$args): void {\n\n if (empty($args)) {\n throw new BadFunctionCallException('Unsupported function call.');\n }\n\n $regexp = array_shift($args);\n $record = is_string($regexp)\n ? [\"@{$regexp}@\", ...$args]\n : ['@.+@', $regexp];\n\n $mwares = stash(DISPATCH_MIDDLEWARE_KEY) ?? [];\n $mwares[] = $record;\n stash(DISPATCH_MIDDLEWARE_KEY, $mwares);\n}",
"public function plugin_activate(){\n\t\t\n\t\t//call our custom content type function\n\t \t$this->register_location_content_type();\n\t\t//flush permalinks\n\t\tflush_rewrite_rules();\n\t}",
"abstract protected function registerCallback();",
"public function register(){\n\n\t}",
"function acf()\n{\n}",
"public function inject_event( $event_name, $params, $method = 'track' ) {\n\t\t\t$code = self::build_event( $event_name, $params, $method );\n\t\t\t$this->last_event = $event_name;\n\n\t\t\tif ( WC_Facebookcommerce_Utils::isWoocommerceIntegration() ) {\n\t\t\t\tWC_Facebookcommerce_Utils::wc_enqueue_js( $code );\n\t\t\t} else {\n\t\t\t\tprintf(\n\t\t\t\t\t'\n<!-- Facebook Pixel Event Code -->\n<script>\n%s\n</script>\n<!-- End Facebook Pixel Event Code -->\n ',\n\t\t\t\t\t$code\n\t\t\t\t);\n\t\t\t}\n\t\t}",
"public static function onRegistration() {\n\t\tif ( isset( $GLOBALS['wgWikimediaJenkinsCI'] ) && $GLOBALS['wgWikimediaJenkinsCI'] === true ) {\n\t\t\t$GLOBALS['wgPFEnableStringFunctions'] = true;\n\t\t}\n\t}",
"function add_route($route, callable $closure)\n\n {\n// $route = self::APP_PREFIX.$route;\n// die($route);\n $this->routes[$route] = $closure;\n }",
"public function registerGates(): void\n {\n $gate = Gate::getFacadeRoot();\n\n foreach ($this->gates ?? [] as $action => $handler) {\n $gate->define($action, $handler);\n }\n }",
"public function register(): void\n {\n //\n }",
"public function register(): void\n {\n //\n }",
"public function register(): void\n {\n //\n }",
"public function register(): void\n {\n //\n }"
] | [
"0.5858761",
"0.5532196",
"0.5505618",
"0.52666104",
"0.51904213",
"0.5153683",
"0.5119845",
"0.5117701",
"0.50484097",
"0.50355124",
"0.5029312",
"0.5029312",
"0.49917266",
"0.49790698",
"0.49757907",
"0.4962656",
"0.4961618",
"0.49439794",
"0.49418497",
"0.49386638",
"0.49168012",
"0.49152067",
"0.4908921",
"0.48989928",
"0.48984352",
"0.4895309",
"0.48836845",
"0.48778877",
"0.487555",
"0.48482928",
"0.48459613",
"0.48459613",
"0.4844532",
"0.48407412",
"0.4837627",
"0.48197857",
"0.4813421",
"0.4813421",
"0.4813421",
"0.4813421",
"0.4813421",
"0.4813421",
"0.4813421",
"0.4813421",
"0.48068914",
"0.4797756",
"0.47616208",
"0.47603047",
"0.47596154",
"0.4758861",
"0.47537127",
"0.47486624",
"0.47370476",
"0.47267002",
"0.47263953",
"0.4724189",
"0.47143734",
"0.47062737",
"0.47008047",
"0.46899718",
"0.4676738",
"0.466369",
"0.46621525",
"0.4659388",
"0.4649127",
"0.4642885",
"0.46311697",
"0.46311697",
"0.46311697",
"0.46311697",
"0.46311697",
"0.46260855",
"0.4625464",
"0.46107778",
"0.46085602",
"0.46085316",
"0.4607439",
"0.4602077",
"0.460177",
"0.460177",
"0.4601001",
"0.46006075",
"0.46006075",
"0.46006075",
"0.45958167",
"0.45934653",
"0.4590014",
"0.45803618",
"0.4574581",
"0.4574249",
"0.45737633",
"0.45621976",
"0.45614833",
"0.45591176",
"0.45537806",
"0.45508668",
"0.45502853",
"0.45502853",
"0.45502853",
"0.45502853"
] | 0.48919684 | 26 |
Manage any lifted exceptions in the class by adding the lifted exception to the class' internal exception and log it. | private function manageException(\Throwable $ex)
{
$this->exception = $ex;
$logger = Container::getInstance()->set("\Core\Exceptions\Logger")->create();
$logger->logException($ex);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function logException()\n {\n switch ($this->classShortName) {\n case 'IndexException':\n case 'CreateException':\n case 'ReadException':\n case 'UpdateException':\n case 'DeleteException':\n Log::error($this->message);\n Log::error(print_r($this->getExceptionData(), true));\n break;\n default:\n Log::error($this->message);\n }\n }",
"abstract protected function logException(\\Exception $ex);",
"public function apply(Exception $ex);",
"protected function setErrorClassAttribute() {}",
"public function makeException()\n {\n $this->thrownException = ResponseException::create($this);\n }",
"public function catchException()\n {\n // get the current exception\n $e = $this->getException();\n\n // throw a copy, with the original as the previous exception so that\n // we can see a full trace.\n $class = get_class($e);\n throw new $class($e->getMessage(), $e->getCode(), $e);\n }",
"public function defineLoggingAndExceptionConstants() {}",
"public function enable_signaled_exceptions()\n {\n $this->_engine_exceptions = true;\n $this->_register_exception_handler();\n }",
"public function raise() {\n throw $this;\n }",
"public function enableExceptions()\n {\n $this->setExceptions(true);\n }",
"public function enableExceptions()\n {\n $this->throwException = true;\n }",
"public function UnhandeldException(){\n\t\t$this -> message = \"An unhandeld exception was thrown. Please infrom...\";\n\t}",
"protected function logException(Exception $ex) { $this->_traiat_errorLogger->logException($ex, TRUE); }",
"protected function tossIfException()\n\t{\n\t\tif ($this->exception) {\n\t\t\tthrow $this->exception;\n\t\t}\n\t}",
"function __construct() {\n\t\t$this->exception_method = [];\n\t\tparent::__construct();\n\t\t\n\t}",
"public function __construct()\n {\n set_exception_handler(array($this, 'handleException'));\n }",
"public function setExceptionClass($className){\n $this->exceptionClass = $className;\n return $this;\n }",
"protected function initializeErrorHandling() {}",
"function raise(\\Exception $ex);",
"protected function throwInaccessibleException() {}",
"protected function resetXMLInternalErrorsSettingAndThrowIfXMLErrorOccured()\n {\n if ($this->hasXMLErrorOccured()) {\n $this->resetXMLInternalErrorsSetting();\n throw new XMLProcessingException($this->getLastXMLErrorMessage());\n }\n\n $this->resetXMLInternalErrorsSetting();\n }",
"function act() {\n throw $this->exception;\n }",
"public function startExceptionHandling()\n\t{\n\t\t// By registering the error handler with a level of -1, we state that we want\n\t\t// all PHP errors converted to ErrorExceptions and thrown, which provides\n\t\t// a quite strict development environment, but prevents unseen errors.\n\t\t$this['kernel.error']->register(-1);\n\n\t\t$me = $this;\n\n\t\treturn $this->setExceptionHandler(function($exception) use ($me)\n\t\t{\n\t\t\t$handlers = $me->getErrorHandlers();\n\n\t\t\t$response = $me['exception']->handle($exception, $handlers);\n\n\t\t\t// If one of the custom error handlers returned a response, we will send that\n\t\t\t// response back to the client after preparing it. This allows a specific\n\t\t\t// type of exceptions to handled by a Closure giving great flexibility.\n\t\t\tif ( ! is_null($response))\n\t\t\t{\n\t\t\t\t$response = $me->prepareResponse($response, $me['request']);\n\n\t\t\t\t$response->send();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$me['kernel.exception']->handle($exception);\n\t\t\t}\n\t\t});\n\t}",
"public function fourthExampleMethod() {\n\t\ttry {\n\t\t\tthrow new Exception( \"Dummy Exception\" );\n\t\t} catch ( Exception $exception ) {\n\t\t\t$this->_log->exception( $exception , __METHOD__ );\n\t\t}\n\t\t\n\t\t//Artificial exception\n\t\tthrow new Exception( \"Artificial Exception\" );\n\t}",
"protected function disableExceptionHandling()\n {\n $this->oldExceptionHandler = $this->app->make(ExceptionHandler::class);\n $this->app->instance(ExceptionHandler::class, new class extends Handler {\n public function __construct() {}\n public function report(\\Exception $e) {}\n public function render($request, \\Exception $e) {\n throw $e;\n }\n });\n }",
"public function logErrors()\n {\n $this->ravenErrorHandler->registerErrorHandler();\n return $this;\n }",
"protected function setExceptionHandler()\n {\n new ExceptionHandler();\n }",
"protected function throwRedirectException() {}",
"protected function raisedException (Throwable $t) : void {\n return;\n }",
"protected function _setExceptionHandler($cls) {\n ExceptionProcessor::getInstance()->setHandler($cls);\n }",
"function add_exception($text) {\n $this->errors->add_msj($text);\n }",
"private function processException(\\Throwable $e): void\n {\n LoggerHelper::logRawException($this->logger, $e);\n }",
"function api_error_setup() {\n\tset_exception_handler(function(Throwable $e) {\n\t\ttry {\n\t\t\techo APIException::make_json_string(APIException::map_to_code($e), $e);\n\t\t\tls_log($e->__toString(), LOGERR);\n\t\t} catch (Exception $e) {\n\t\t\t/*\n\t\t\t* Exceptions thrown in the exception handler\n\t\t\t* cause hard to debug fatal errors. Handle them.\n\t\t\t*/\n\t\t\techo '{\"error\":'.API_E_INTERNAL.', \"e_msg\":\"'.$e->getMessage().\n\t\t\t\t' (in exception handler, '.$e->getFile().' '.$e->getLine().')\"}';\n\t\t}\n\t\texit(1);\n\t});\n}",
"protected function manageError( string $message )\n {\n $this->logger->error($message);\n throw new \\Exception($message);\n }",
"protected function check_errors()\n {\n if (true === $this->error_flag) {\n throw new \\Exception($this->get_error( true ));\n }\n }",
"function captureException(Th $t, array $data):void {\n\t\t$tOriginal = $t; /** @var Th $tOriginal */\n\t\tdo {\n\t\t\t$isDFE = $t instanceof DFE; /** @var bool $isDFE */\n\t\t\t$dataI = [\n\t\t\t\t'type' => $isDFE ? $t->sentryType() : get_class($t)\n\t\t\t\t,'value' => $this->serializer->serialize(df_xtsd($t))\n\t\t\t];\n\t\t\t$trace = $t->getTrace();\n\t\t\t$needAddCurrentFrame = !self::needSkipFrame($trace[0]); /** @var bool $needAddCurrentFrame */\n\t\t\twhile (self::needSkipFrame($trace[0])) {\n\t\t\t\tarray_shift($trace);\n\t\t\t}\n\t\t\tif ($needAddCurrentFrame) {\n\t\t\t\tarray_unshift($trace, ['file' => $t->getFile(), 'line' => $t->getLine()]);\n\t\t\t}\n\t\t\t$dataI['stacktrace'] = ['frames' => Trace::info($trace)];\n\t\t\t$exceptions[] = $dataI;\n\t\t} while ($t = $t->getPrevious());\n\t\t$data['exception'] = ['values' => array_reverse($exceptions)];\n\t\tif (empty($data['level'])) {\n\t\t\tif (method_exists($tOriginal, 'getSeverity')) {\n\t\t\t\t/** 2020-06-28 @uses \\ErrorException::getSeverity() */\n\t\t\t\t$data['level'] = $this->translateSeverity($tOriginal->getSeverity());\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$data['level'] = self::ERROR;\n\t\t\t}\n\t\t}\n\t\t$this->capture($data, $trace);\n\t}",
"private function throwException()\n {\n throw new CacheException(\\odbc_errormsg(), (int) \\odbc_error());\n }",
"public function __construct()\n {\n throw new Exception('This class is not intended to be instantiated.');\n }",
"function default_exception_handler($ex) {\n $backtrace = $ex->getTrace();\n $place = array('file'=>$ex->getFile(), 'line'=>$ex->getLine(), 'exception'=>get_class($ex));\n array_unshift($backtrace, $place);\n\n if ($ex instanceof moodle_exception) {\n _print_normal_error($ex->errorcode, $ex->module, $ex->a, $ex->link, $backtrace, $ex->debuginfo);\n } else {\n _print_normal_error('generalexceptionmessage', 'error', $ex->getMessage(), '', $backtrace);\n }\n}",
"public function getException();",
"public function setException(){\n $this->dbConnection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n }",
"public function report()\n {\n $this->logException();\n }",
"public static function setExceptionHandler(){\n //Set the Pokelio exception handler\n set_exception_handler('Pokelio_Exception::PokelioExceptionHandler');\n }",
"public function logException(FlattenException $exception, Request $request)\n {\n $ex = new Exception5xx();\n $ex->setStatusCode($this->getStatusCode($exception));\n $ex->setFile($exception->getFile());\n $ex->setLine($exception->getLine());\n $ex->setTrace($this->getTrace($exception->getTrace()));\n $ex->setMessage($exception->getMessage());\n $ex->setRequestUrl($request->getRequestUri());\n $ex->setReferrer($request->server->get('HTTP_REFERER'));\n $ex->setUserAgent($request->server->get('HTTP_USER_AGENT'));\n $ex->setRemoteIp($request->server->get('REMOTE_ADDR'));\n $ex->setMethod($request->server->get('REQUEST_METHOD'));\n $ex->setQueryString($request->server->get('QUERY_STRING'));\n $ex->setHostname($request->getHttpHost());\n $ex->setRequest(Flattener::flattenArrayToString($request->request->all()));\n $ex->setLogged(new \\DateTime(\"now\"));\n try {\n $manager = $this->registry->getManagerForClass('EXSErrorBundle:Exception5xx');\n $manager->persist($ex);\n //you dont want to flush the full entity manager. only the error.\n $manager->flush($ex);\n } catch (\\Exception $e) {\n //silence\n }\n }",
"public function support(\\Exception $exception);",
"public function stacktrace() {\n\n if ( true === WP_DEBUG ) {\n\n $e = new \\Exception;\n $this->log( $e->getTraceAsString() );\n }\n }",
"public function getSuppressedException()\n {\n return $this->suppressedException_ExceptionSuppressedTaskInfoTrait;\n }",
"public function init() {\n\t\terror_reporting(E_ALL & ~E_STRICT & ~E_DEPRECATED);\n\t\tini_set('display_errors', 'Off');\n\t\tini_set('log_errors', 'Off');\n\t\tini_set('html_errors', 'Off');\n\n\t\tset_exception_handler(array($this, 'handleException'));\n\t\tset_error_handler(array($this, 'handleError'));\n\t\tregister_shutdown_function(array($this, 'shutdownFunction'));\n\n\t\t// Init the sly_Log instance so we don't fail when loading classes result\n\t\t// in errors like E_STRICT. See PHP Bug #54054 for details.\n\t\t$this->log = sly_Log::getInstance('errors');\n\t\t$this->log->setFormat('[%date% %time%] %message%');\n\t\t$this->log->enableRotation(self::MAX_LOGFILE_SIZE, self::MAX_LOGFILES);\n\t}",
"function _exception_handler($severity, $message, $filepath, $line) {\n\n // Catch typehint errors and check if they are really errors\n if ($severity == E_RECOVERABLE_ERROR) { \n if (preg_match('/^Argument (\\d)+ passed to (?:(\\w+)::)?(\\w+)\\(\\) must be an instance of (\\w+), (instance of )?(\\w+) given/', $message, $match)) {\n // $match[4] is the required type\n // $match[6] is the provided type\n\n if ($match[4] == $match[6]) \n return; // This was not an error\n\n // Multiple type choices: $match[4] is xxx__OR__yyy__OR__zzz where xxx, yyy and zzz are the allowed types\n \n $allowed_types = explode('__OR__', $match[4]);\n foreach ($allowed_types as $at)\n if ($at == $match[6])\n return; // This was not an error\n }\n } \n\n // The rest of this code is identical to the one found in CodeIgniter\n\n\n // We don't bother with \"strict\" notices since they tend to fill up\n // the log file with excess information that isn't normally very helpful.\n // For example, if you are running PHP 5 and you use version 4 style\n // class functions (without prefixes like \"public\", \"private\", etc.)\n // you'll get notices telling you that these have been deprecated.\n if ($severity == E_STRICT)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n $_error =& load_class('Exceptions', 'core');\n\n // Should we display the error? We'll get the current error_reporting\n // level and add its bits with the severity bits to find out.\n if (($severity & error_reporting()) == $severity)\n\t\t{\n\t\t\t$_error->show_php_error($severity, $message, $filepath, $line);\n\t\t}\n\n // Should we log the error? No? We're done...\n if (config_item('log_threshold') == 0)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n $_error->log_exception($severity, $message, $filepath, $line);\n}",
"abstract protected function handleError(\\Exception $e);",
"public function logError(){\n AbstractLoggedException::$dbMessage .= \"Invalid URI requestd; \";\n parent::log();\n }",
"public function logThrowable(\\Throwable $throwable, array $additionalData = []);",
"protected function registerErrorHandling()\n {\n error_reporting(E_ALL);\n set_error_handler(function ($level, $message, $file = '', $line = 0) {\n if (error_reporting() & $level) {\n throw new \\ErrorException($message, 403, $level, $file, $line);\n }\n });\n\n set_exception_handler(function ($e) {\n echo($e);\n });\n\n register_shutdown_function(function () {\n echo(error_get_last());\n });\n }",
"public static function setException($v)\n {\n self::$exception = $v;\n }",
"public function listenExceptions(): Debug\n {\n set_exception_handler([$this, 'onUncaughtException']);\n\n return $this;\n }",
"#[ArrayShape(['request' => \"array\", 'debugBackTrace' => \"array|mixed\"])]\n private static function getExtraStaticExceptionSupplement() : array\n {\n return [\n 'request' => [\n request()->method() => static::getRequest(),\n 'queryParams' => request()->query->all()\n ],\n 'debugBackTrace' => AppContainer::has(Constants::debugBackTrace)\n ? AppContainer::get(Constants::debugBackTrace)\n : debug_backtrace()\n ];\n }",
"function raise($message) {\n\t\t\t$error_message = \"Model Class: \".$this->get_class_name().\"<br />\";\n\t\t\t$error_message .= \"Error Message: \".$message;\n\t\t\tthrow new ActiveRecordException($error_message, \"500\");\n\t\t}",
"public function testUnannotatedMethodInUnannotatedClassWithException()\n {\n $class = new ReflectionClass(InterceptedClass::class);\n $instance = $class->newInstance();\n\n $this->reader->expects(static::once())->method('getMethodAnnotation')->willReturn(null);\n $this->reader->expects(static::once())->method('getClassAnnotation')->willReturn(null);\n $this->logger->expects(static::once())->method('warning');\n $this->entityManager->expects(static::never())->method('beginTransaction');\n $this->entityManager->expects(static::never())->method('commit');\n $this->entityManager->expects(static::never())->method('rollback');\n\n $hasException = false;\n try {\n $this->assertNull(\n $this->transactionalInterceptor->intercept(\n new MethodInvocation(\n $class->getMethod('bMethodThrowException'),\n $instance,\n array(Exception::class),\n array()\n )\n )\n );\n } catch (Exception $e) {\n $hasException = true;\n }\n $this->assertTrue($hasException);\n }",
"function log_exception(Throwable $e) // for php => 7.0\n{\n $message = \"Line {$e->getLine()} in \" . basename($e->getFile()) . \", {$e->getMessage()} (\" . get_class($e) . \")\";\n append_message($message);\n exit();\n}",
"public function toException()\n {\n if ($this->failed()) {\n return new RequestException($this);\n }\n }",
"protected function withoutExceptionHandling()\n {\n $this->previousExceptionHandler = app(ExceptionHandler::class);\n\n $this->app->instance(ExceptionHandler::class, new class implements ExceptionHandler\n {\n public function __construct()\n {\n }\n\n public function report(Throwable $e)\n {\n }\n\n public function shouldReport(Throwable $e)\n {\n return false;\n }\n\n public function render($request, Throwable $e)\n {\n if ($e instanceof NotFoundHttpException) {\n throw new NotFoundHttpException(\n \"{$request->method()} {$request->url()}\", null, $e->getCode()\n );\n }\n\n throw $e;\n }\n\n public function renderForConsole($output, Throwable $e)\n {\n (new ConsoleApplication)->renderThrowable($e, $output);\n }\n });\n\n return $this;\n }",
"protected function disableExceptionHandling()\n {\n $this->app->instance(ExceptionHandler::class, new class extends Handler {\n public function __construct() {}\n public function report(Exception $e) {}\n public function render($request, Exception $e) {\n throw $e;\n }\n });\n }",
"protected static function exception()\n {\n foreach (self::fetch('exceptions') as $file) {\n Bus::need($file);\n }\n }",
"protected function registerErrorHandling()\n {\n error_reporting(-1);\n\n set_error_handler(function ($level, $message, $file = '', $line = 0) {\n if (error_reporting() & $level) {\n throw new ErrorException($message, 0, $level, $file, $line);\n }\n });\n\n set_exception_handler(function ($e) {\n $this->handleUncaughtException($e);\n });\n\n register_shutdown_function(function () {\n $this->handleShutdown();\n });\n }",
"function uncaught_exception($o){\n $o['message'] = Trace::exceptionToText($o['exception']);\n $o['trace'] = Trace::exFullTrace($o['exception']);\n unexpected_failure($o);\n }",
"protected function withoutExceptionHandling()\n {\n $this->app->instance(ExceptionHandler::class, new class extends Handler {\n public function __construct() {}\n public function report(Exception $e) {}\n public function render($request, Exception $e) {\n throw $e;\n }\n });\n }",
"public function logError() {}",
"public function handleExceptions($e)\n {\n if (!$e instanceof Exception) {\n $e = new FatalThrowableError($e);\n }\n }",
"public function __construct(){\n throw new Exception(\"Cannot instantiate this class. Please use the static methods validateLogin() and logout() instead.\");\n }",
"public function doConvert()\n {\n try {\n //trigger_error('hello', E_USER_ERROR);\n $this->doConvertImplementation();\n } catch (WebPConvertException $e) {\n $this->logLn('');\n /*\n if (isset($e->description) && ($e->description != '')) {\n $this->log('Error: ' . $e->description . '. ', 'bold');\n } else {\n $this->log('Error: ', 'bold');\n }\n */\n $this->log('Error: ', 'bold');\n $this->logLn($e->getMessage(), 'bold');\n throw $e;\n } catch (\\Exception $e) {\n $className = get_class($e);\n\n $classNameParts = explode(\"\\\\\", $className);\n $shortClassName = array_pop($classNameParts);\n\n $this->logLn('');\n $this->logLn($shortClassName . ' thrown in ' . $e->getFile() . ':' . $e->getLine(), 'bold');\n $this->logLn('Message: \"' . $e->getMessage() . '\"', 'bold');\n //$this->logLn('Exception class: ' . $className);\n\n $this->logLn('Trace:');\n foreach ($e->getTrace() as $trace) {\n //$this->logLn(print_r($trace, true));\n $this->logLn(\n $trace['file'] . ':' . $trace['line']\n );\n }\n throw $e;\n } /*catch (\\Error $e) {\n $this->logLn('ERROR');\n }*/\n }",
"public static function init(){\n require __DIR__.'/BException'.EXT;\n require __DIR__.'/SQLException'.EXT;\n require __DIR__.'/LoaderException'.EXT;\n\n set_error_handler(function($errno, $errstr, $errfile = '', $errline = 0){\n if($errno === E_USER_ERROR || $errno === E_ERROR){\n if(DEBUG)\n exit(self::error($errstr, $errfile, $errline, 500, 'Internal server error'));\n else\n exit(self::error500 ($errfile, $errline));\n }elseif(DEBUG){\n switch($errno){\n case E_NOTICE:\n case E_USER_NOTICE:\n $name = 'Notice';\n break;\n case E_WARNING:\n case E_USER_WARNING:\n $name = 'Warning';\n break;\n case E_STRICT:\n $name = 'Strict standard';\n break;\n default:\n $name = 'Error';\n }\n Core::get_instance()->loader->get('Output')->add(self::error($errstr, $errfile, $errline, $errno, $name));\n }\n });\n\n set_exception_handler(function(Exception $e){\n if(DEBUG)\n exit($e);\n\n exit(self::error500($e->getFile(), $e->getLine()));\n });\n }",
"public function __construct()\n {\n $this->exceptions = new ObjectStorage();\n }",
"function __construct($class, $method, $message)\n\t{\n\t\tparent::__construct($message);\n\n\t\t// Assign custom exception data.\n\t\t$this->_class = $class;\n\t\t$this->_method = $method;\n\t\t$this->_string = \"[$class - $method()]: $message\";\n\t\t$this->_time = time();\n\t}",
"public function set_group_exceptions($cmarray) {\n $this->groupexceptions = $cmarray;\n }",
"public function __clone() {\r\n throw new Exception('Cannot clone the logger object.');\r\n }",
"private function handleException($e)\n {\n // TODO: test coverage\n if ($e instanceof ClientException) {\n // will catch all 4xx errors\n if ($e->getResponse()->getStatusCode() == 403) {\n throw new AuthenticationException(\n $this->apiKey,\n $this->apiSecret,\n null,\n $e\n );\n } else {\n throw new DomainException(\n 'The OpenTok API request failed: ' . json_decode($e->getResponse()->getBody(true))->message,\n null,\n $e\n );\n }\n } else if ($e instanceof ServerException) {\n // will catch all 5xx errors\n throw new UnexpectedValueException(\n 'The OpenTok API server responded with an error: ' . json_decode($e->getResponse()->getBody(true))->message,\n null,\n $e\n );\n } else {\n // TODO: check if this works because Exception is an interface not a class\n throw new Exception('An unexpected error occurred');\n }\n }",
"protected function error($msg) {\n \t parent::error($msg); //log in error msg\n throw new Exception ($msg); // <-- TESTS php4\n }",
"public function testFireEventWithInternalOnException()\n {\n $eventManager = new EventManager;\n $eventManager->listen(EventManager::ON_EXCEPTION, function ($ex) {\n $this->assertTrue($ex instanceof \\Exception);\n });\n $eventManager->listen('thrown', function () {\n throw new \\Exception('');\n });\n $eventManager->fire('thrown');\n }",
"public function logFatalErrors()\n {\n $this->ravenErrorHandler->registerShutdownFunction();\n return $this;\n }",
"protected function registerExceptionHandlers()\n {\n // We register the framework exception handler...\n $this->container->bind(\n \\Lib\\Contracts\\Exceptions\\Handler::class,\n \\App\\Exceptions\\Handler::class\n );\n\n // As well as the Whoops library for handling exceptions.\n $whoops = new Whoops\\Run;\n $whoops->pushHandler(new Whoops\\Handler\\PrettyPageHandler);\n $whoops->register();\n }",
"public function checkErrors()\r\n\t{\r\n\t\t$errors = error_get_last();\r\n\t\t \r\n\t\tif(!empty($errors))\r\n\t\t{\r\n\t\t\t$this->_status = false;\r\n\t\t\t \r\n\t\t\t$this->setException(\r\n\t\t\t\tnew \\ErrorException(\r\n\t\t\t\t\t$errors['message'], 0,\r\n\t\t\t\t\t$errors['type'], \r\n\t\t\t\t\t$errors['file'],\r\n\t\t\t\t\t$errors['line']\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t}\r\n\t\t \r\n\t\treturn $this;\r\n\t}",
"function _errorlog_catchUncaughtExceptions($exceptionObj) {\r\n //$logData = (array) $exceptionObj; // http://php.net/manual/en/class.exception.php\r\n $logData = array(\r\n 'logType' => 'exception',\r\n 'errno' => 'UNCAUGHT_EXCEPTION',\r\n 'errstr' => $exceptionObj->getMessage(), // method reference: http://php.net/manual/en/language.exceptions.extending.php\r\n 'errfile' => $exceptionObj->getFile(),\r\n 'errline' => $exceptionObj->getLine(),\r\n 'exceptionObj' => (array) $exceptionObj,\r\n 'backtrace' => _errorlog_getExceptionBacktraceText($exceptionObj),\r\n );\r\n $errorRecordNum = _errorlog_logErrorRecord($logData);\r\n \r\n // PHP will not continue or show any errors if we're catching exceptions, so show errors ourselves if it's enabled:\r\n if (ini_get('display_errors')) { // or check: $GLOBALS['SETTINGS']['advanced']['phpHideErrors']\r\n //$error = \"Fatal Error: Uncaught exception '\".get_class($exceptionObj).\"'\";\r\n //$error .= \" with message '\".$exceptionObj->getMessage().\"'\";\r\n //$error .= \" in \".$exceptionObj->getFile(). \" on line \" .$exceptionObj->getLine();\r\n $error = $exceptionObj->getMessage().\"\\n\";\r\n $error .= \"in \".$exceptionObj->getFile();\r\n $error .= \" on line \" .$exceptionObj->getLine(). \". \"; \r\n }\r\n else {\r\n $error = errorlog_messageWhenErrorsHidden($errorRecordNum);\r\n }\r\n print $error;\r\n \r\n // halt script execution after uncaught exceptions\r\n exit;\r\n}",
"public function registerExceptionHandler() {\n\t\tif (!$this->_request()->is('api')) {\n\t\t\treturn;\n\t\t}\n\n\t\tApp::uses('CrudExceptionRenderer', 'Crud.Error');\n\t\tConfigure::write('Exception.renderer', 'Crud.CrudExceptionRenderer');\n\t}",
"public function __construct()\n {\n set_error_handler([$this, 'handleError']);\n }",
"private function _initErrorHandler()\n {\n // Enable exception handling\n App_Exception::enable();\n $front = App::front();\n $front->throwExceptions(false);\n $front->registerPlugin(new Zend_Controller_Plugin_ErrorHandler(array('module' => 'main' , 'controller' => 'error' , 'action' => 'error')));\n $logger = new Zend_Log();\n if('development' === APPLICATION_ENV){\n $logger->addWriter(new Zend_Log_Writer_Firebug());\n }\n $logger->addWriter(new Zend_Log_Writer_Stream(VAR_PATH . \"logs\" . \"/system_log_\" . @date('Y-m-d') . '.log'));\n App::setLog($logger);\n }",
"public function disableExceptions()\n {\n $this->throwException = false;\n }",
"public static function setError($message) {\n self::$_class = \"Example\\\\Excel\\\\Controllers\\\\Error\";\n throw new \\Exception($message);\n }",
"protected function exceptions($exception){\n\t\tthrow $exception;\n\t}",
"private function _internalError($error)\n {\n $this->_error_stack[] = $error;\n }",
"protected function registerNewRelicFailsafeAdder()\n {\n $this->app->singleton(\n NewRelicAttributeAdder::class,\n function (Application $app) {\n $logger = $app->make('log');\n\n return new NewRelicAttributeAdder(\n function () use ($logger) {\n $logger->info(\n 'A request to send New Relic Attributes was received, '\n . 'but will not be processed as this is not a production instance '\n . 'or the New Relic extension is not loaded.'\n );\n }\n );\n }\n );\n }",
"#[@test]\n public function setExceptions_should_set_exception() {\n $expected= new \\lang\\XPException('foo');\n $this->sut->setException($expected);\n $actual= $this->sut->getException();\n\n $this->assertEquals($expected, $actual);\n }",
"public function setException($err) {\n $this->exception = $err;\n }",
"protected function setUp() {\n $this->object = new BadFunctionCallException;\n $this->setCommonInterface(ExceptionInterface::class)->setParentClass(PlatformBadFunctionCallException::class);\n }",
"public function bundleExceptions()\n {\n if ($this->exceptionsBundle === null) {\n $this->exceptionsBundle = [];\n }\n return $this;\n }",
"final public function __wakeup(){\n throw new Exception('Feature disabled.');\n }",
"abstract public function logException(string $log_level, \\Exception $exception);",
"public function report(\\Throwable $e): void\n {\n parent::report($e instanceof ApiException ? $e->toReport() : $e);\n }",
"protected function executeActionWithErrorHandling() {\n \n }",
"public function __wakeup() {\n\t\t$error = new WP_Error('forbidden', 'Unserializing instances of this class is forbidden.');\n\t\treturn $error->get_error_message();\n }",
"protected function assertErrorLogEntries() {}"
] | [
"0.63159585",
"0.6270674",
"0.5669977",
"0.56298125",
"0.5566446",
"0.55256426",
"0.5514989",
"0.5508942",
"0.5441384",
"0.5435312",
"0.543182",
"0.5424126",
"0.53731745",
"0.5349001",
"0.53020275",
"0.5191632",
"0.5163356",
"0.51573205",
"0.5118512",
"0.5111621",
"0.5101043",
"0.50816786",
"0.5076681",
"0.5043833",
"0.5041241",
"0.5039309",
"0.50336576",
"0.50330555",
"0.50218415",
"0.49864882",
"0.49831727",
"0.49755955",
"0.49542594",
"0.49296728",
"0.49064553",
"0.48983282",
"0.4894086",
"0.48863176",
"0.48553813",
"0.48463804",
"0.48453858",
"0.48212564",
"0.4809649",
"0.48054484",
"0.47912318",
"0.47866675",
"0.47746527",
"0.47738117",
"0.47706297",
"0.47640997",
"0.47610152",
"0.47546005",
"0.4752332",
"0.47433335",
"0.47386014",
"0.47316396",
"0.4731464",
"0.47183287",
"0.4707309",
"0.4704808",
"0.47039118",
"0.4702818",
"0.46976754",
"0.46883774",
"0.46808195",
"0.46744508",
"0.46660826",
"0.46654847",
"0.46626982",
"0.4642001",
"0.4640725",
"0.46381795",
"0.46286595",
"0.4622571",
"0.4621756",
"0.4619072",
"0.46119097",
"0.46106642",
"0.4609893",
"0.46006322",
"0.45940948",
"0.45939144",
"0.4593905",
"0.45858842",
"0.4585807",
"0.45791495",
"0.45749572",
"0.45706898",
"0.45676538",
"0.45649126",
"0.45641363",
"0.45620954",
"0.45613348",
"0.45554882",
"0.45539883",
"0.45520493",
"0.4549602",
"0.45482752",
"0.45478407",
"0.4547497"
] | 0.57478285 | 2 |
Get the current data in the model. | public function getData()
{
return $this->data;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_data() {\n return $this->data;\n }",
"public function data()\n {\n \tif (!isset($this->data)) {\n \t\t$this->setData();\n \t}\n \t\n \treturn $this->data->data();\n }",
"public function get_data() {\r\n return $this->data;\r\n }",
"public function get_data() {\n\t\treturn $this->data;\n\t}",
"public function get_data() {\r\n\t\treturn $this->data;\r\n\t}",
"function get_data() {\r\n return $this->data;\r\n }",
"private function get_data()\n\t{\n\t\treturn $this->member_model->get_data();\n\t}",
"public function get()\n {\n return $this->data;\n }",
"public function get_data()\n {\n return $this->_data;\n }",
"public function get_data() {\n $data = parent::get_data();\n if ($data !== null) {\n }\n return $data;\n }",
"public function data()\n {\n return $this->data;\n }",
"public function data()\n {\n return $this->data;\n }",
"public function data()\n {\n return $this->data;\n }",
"public function data()\n {\n return $this->data;\n }",
"public function data()\n {\n return $this->data;\n }",
"public function data()\n {\n return $this->data;\n }",
"public function data()\n {\n return $this->data;\n }",
"public function data()\n {\n return $this->data; \n }",
"function getData() {\n\t\treturn $this->data;\n\t}",
"public function getCurrentObjectData() {}",
"public function data(){\n\n\t\treturn $this->_data;\n\n\t}",
"protected function getData()\n {\n return $this->data;\n }",
"public function getData () {\n return $this->data;\n }",
"public function data()\n {\n return $this->_data;\n }",
"public function data(){\r\n\t\treturn $this->_data;\r\n\t}",
"public function data ()\n {\n return $this->_data;\n }",
"public function getData() {\n return $this::$data;\n }",
"public function getData() {\r\n return $this->data;\r\n }",
"function getData()\n {\n return $this->_data;\n }",
"public function getData(){\n\n return $this->data;\n }",
"public function getData() {\n return $this->data;\n }",
"private function getData()\n {\n if (isset($this->data)) {\n return $this->data;\n }\n\n return $this->data = Entry::find($this->context->get('id'));\n }",
"public function getData() {\n return $this->data;\n }",
"public function getData() {\n return $this->data;\n }",
"public function get()\n {\n\t\tif ($this->model->state())\n $this->model->get();\n }",
"public function getData() {\n return $this->data;\n }",
"public function getData() {\n return $this->data;\n }",
"public function getData() {\n return $this->data;\n }",
"public function getData() {\n return $this->data;\n }",
"public function getData() {\n\t\treturn $this->data;\n\t}",
"public function getData() {\n\t\treturn $this->data;\n\t}",
"public function getData() {\n\n return $this->data;\n }",
"public function getData(){\n\t\treturn $this->data;\n\t}",
"public function getData(){\n\t\treturn $this->data;\n\t}",
"public function getData(){\n\t\treturn $this->data;\n\t}",
"public function getData()\r\n {\r\n return $this->data;\r\n }",
"public function getData()\n {\n return $this->data;\n }",
"public function getData() {\n return $this->_data;\n }",
"public function getData() {\n return $this->_data;\n }",
"public function getData()\n {\n $data = parent::getData();\n\n return $data;\n }",
"public function getData() {\n\t\treturn $this->_data;\n\t}",
"public function getData() {\n\t\treturn $this->_data;\n\t}",
"public function getData() {\n\t\treturn $this->_data;\n\t}",
"public function getData() {\n\t\treturn $this->_data;\n\t}",
"public function getData() {\n\t\treturn $this->_data;\n\t}",
"public function getData()\n {\n return $this->_data;\n }",
"public function getData()\n {\n return $this->_data;\n }",
"public function getData()\n {\n return $this->_data;\n }",
"public function getData()\n {\n return $this->_data;\n }",
"public function getData()\n {\n return $this->_data;\n }"
] | [
"0.77340645",
"0.77263695",
"0.77167857",
"0.77045137",
"0.77040154",
"0.76638186",
"0.75246197",
"0.75216866",
"0.751615",
"0.75041807",
"0.7499142",
"0.7499142",
"0.7499142",
"0.7499142",
"0.7499142",
"0.7499142",
"0.74724066",
"0.7463888",
"0.7426318",
"0.7412057",
"0.73652846",
"0.73574036",
"0.73399276",
"0.73299354",
"0.73272824",
"0.7316549",
"0.7283305",
"0.72771114",
"0.7276455",
"0.72624075",
"0.7256497",
"0.72548735",
"0.7252183",
"0.7252183",
"0.7249726",
"0.72490114",
"0.72490114",
"0.72490114",
"0.72490114",
"0.7246302",
"0.7246302",
"0.72439885",
"0.7240186",
"0.7240186",
"0.7240186",
"0.7236315",
"0.7235189",
"0.72083616",
"0.72083616",
"0.72080755",
"0.71873665",
"0.71873665",
"0.71873665",
"0.71873665",
"0.71873665",
"0.7175922",
"0.7175922",
"0.7175922",
"0.7175922",
"0.7175922"
] | 0.7216698 | 83 |
Return the last lifted exception in the model. | public function getException()
{
return $this->exception;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getException() {\n\t\treturn $this->lastException;\n\t}",
"function get_last_error() {\n\t\treturn $this->errors[count($this->errors - 1)];\n\t}",
"public function getPriorException(){\n // dont call this method getPrevious as in php5.3+ because this\n // method is final and we want this to run in 5 and 5.3+\n return $this->priorException;\n }",
"public function getLastException(): ?\\Exception\n {\n return $this->lastException;\n }",
"public function getException()\r\n {\r\n return count($this->oException) == 0 ? null :\r\n (count($this->oException) == 1 ? $this->oException[0] :\r\n $this->oException);\r\n }",
"public function lastError()\n {\n return $this->error;\n }",
"public function getLastError() { return end($this->_traiat_errors); }",
"function getException() {\n\t\treturn $this->Exception;\n\t}",
"public function getException();",
"public function get_last_error() {\n\t\treturn $this->last_error;\n\t}",
"public function getException() {\n return $this->exception;\n }",
"public function get_last_error() {\n\t\treturn $this->_error;\n\t}",
"public function getException(){\n return $this->_exception;\n }",
"public function getCause()\n {\n return $this->getPrevious();\n }",
"public function getThrownException()\n {\n return $this->thrownException;\n }",
"public function get_last_error() {\n return $this->last_error;\n }",
"public function get_last_error()\n {\n return $this->_error;\n }",
"public function getLastSoapFault() {\n\t\treturn $this->lastSoapFault;\n\t}",
"public function getException() {\n\t\treturn $this->_exception;\n\t}",
"public function getException()\n {\n return $this->_exceptions;\n }",
"public static function getLastReportedException() {\n return self::$lastReported;\n }",
"public function getLastErrorMessage()\n {\n return $this->lastErrorMessage;\n }",
"public function getError()\n {\n $nb_errors = count($this->errors);\n\n if (0 === $nb_errors) {\n return null;\n }\n\n return $this->errors[$nb_errors - 1];\n }",
"public function getError()\n {\n return $this->currentError;\n }",
"public function getException()\r\n\t{\r\n\t\treturn $this->_exception;\r\n\t}",
"function tideways_last_detected_exception()\n{\n}",
"public function getError() {\n\t\treturn $this->current_error;\n\t}",
"public function getLast()\n {\n $k = count($this);\n if ($k > 0) {\n return $this[$k - 1];\n }\n }",
"public function getError()\n {\n return count($this->errors) ? current($this->errors) : NULL;\n }",
"public function lastError()\r\n\t{\r\n\t\treturn @mssql_get_last_message();\r\n\t}",
"public function lastError()\r\n\t{\r\n\t\tif( $this->conn->Errors->Count )\r\n\t\t\treturn $this->conn->Errors[ $this->conn->Errors->Count - 1 ]->Description;\r\n\t\t\r\n\t\treturn '';\r\n\t}",
"public function last()\n {\n $models = $this->models;\n\n return array_pop($models);\n }",
"public function getLastError()\n {\n return $this->lastErrorMsg;\n }",
"public static function getException()\n {\n if (self::$error[0] == \"00000\") {\n return false;\n } else {\n return self::$error[1];\n }\n }",
"public function getFirstError()\n {\n return $this->errors->first();\n }",
"public function getError() {\n return imap_last_error();\n }",
"public function getError()\n {\n return imap_last_error();\n }",
"public function getLastValidationError(): string;",
"function &thrownException() {\n return $this->_thrownException;\n }",
"protected function getLastError()\n {\n return error_get_last();\n }",
"function getTraceback()\n\t{\n\t\tif(!$this->body)\n\t\t{\n\t\t\tthrow new CeleryException('Called getTraceback before task was ready');\n\t\t}\n\t\treturn $this->body->traceback;\n\t}",
"final public function getLast() {\n\t\treturn null;\n\t}",
"public function getLastItem()\n {\n if ($this->valid() === false) {\n return null;\n }\n return $this->getRow($this->count() - 1);\n }",
"public function getThrowable()\n {\n return $this->throwable;\n }",
"public function getCurrentError()\n {\n return $this->getCurrent(self::NAMESPACE_ERROR);\n }",
"public function getInterventionException()\n {\n return $this->interventionException;\n }",
"public function getErrorMsg()\r\n {\r\n return $this->lastErrorMsg;\r\n }",
"public function getLastNullCause()\n {\n return $this->lastNullCause;\n }",
"public function getOriginalError()\n {\n return $this->originalError;\n }",
"public function failed()\n {\n return $this->model->failed()->get();\n }",
"public function getLast()\n {\n // inicia transao\n if ($conn = TTransaction::get()) {\n // instancia instruo de SELECT\n $sql = new TSqlSelect;\n $sql->addColumn('max(ID) as ID');\n $sql->setEntity($this->getEntity());\n\n\n // cria log e executa instruo SQL\n TTransaction::log($sql->getInstruction());\n $result = $conn->Query($sql->getInstruction());\n // retorna os dados do banco\n $row = $result->fetch();\n\n return $row[0];\n } else {\n // se no tiver transao, retorna uma exceo\n throw new Exception('No h transao ativa !!');\n }\n }",
"public function getError() {\n\t\treturn $this->lastError;\n\t}",
"public function getLastError() {\n\t\t\treturn $this->lastError;\n\t\t}",
"public function getLastEvent()\n {\n $events = $this->getEvents();\n if (count($events) > 0) {\n return $events[count($events) - 1];\n }\n\n return null;\n }",
"public function getLast()\n\t{\n\t\treturn $this->last;\n\t}",
"public function getError() {\n return $this->get(self::ERROR);\n }",
"public function getError() {\n return $this->get(self::ERROR);\n }",
"public function last()\n {\n return \\count($this->data) > 0 ? $this->data[\\count($this->data) - 1] : null;\n }",
"public function last() {\n\t\treturn $this->valueForKey($this->lastKey());\n\t}",
"public function getLastErrorMessage(): ?string;",
"function lastError();",
"public function getFault()\n {\n return $this->_fault;\n }",
"function getLastItem() { return $this->m_lastItem; }",
"private function getMostRecentLineIndex()\n {\n $c = count($this->_model['lines']);\n if ($c <= 0) {\n throw new \\Exception(\"No lines have been added. The $memberName method applies to the most recent line. To use this function, first add a line.\");\n }\n\n return $c-1;\n }",
"public function error()\n\t{\n\t\treturn reset($this->errors);\n\t}",
"public function getLastError()\r\n\t{\r\n\t\t// TODO: we should move this to returning an Error\r\n\t\t$numErrors = count($this->errors);\r\n\t\tif ($numErrors > 0)\r\n\t\t{\r\n\t\t\treturn $this->errors[$numErrors-1]['message'];\r\n\t\t}\r\n\r\n\t\treturn \"\";\r\n\t}",
"public function last()\n {\n return $this->all()->last();\n }",
"public function getException(): Throwable;",
"public function getException(): Throwable;",
"public function getLastErrorResponse() {\n if (!empty($this->rawResponses)) {\n foreach (array_reverse($this->rawResponses) as $x) {\n if (isset($x['error'])) {\n return $x;\n }\n }\n }\n }",
"public function lastItem() {\n\t\treturn $this->fastForward()->current();\n\t}",
"public function lastMessage()\n {\n return $this->messages()\n ->take(1);\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function getLastError()\n {\n return $this->lastError;\n }",
"public function getLastError()\n {\n return $this->lastError;\n }",
"public function getError () {\n\t\t\treturn $this->error; // seems useless for now\n\t\t}",
"public function lastId() {\n\t\tif (is_null($this->lastId)) {\n\t\t\tthrow new Exception('Unable to get last ID - wrong query type');\n\t\t}\n\n\t\treturn $this->lastId;\n\t}",
"public function last()\n {\n return (null === $this->getDraft()) ? $this->getData($this->count() - 1) : $this->getDraft()->last();\n }",
"public function getLastTrace() {\n return $this->last_trace;\n }",
"public function last()\n\t{\n\t\treturn parent::last();\n\t}"
] | [
"0.7064171",
"0.6807168",
"0.6489214",
"0.6432498",
"0.6355262",
"0.6339924",
"0.628294",
"0.62770575",
"0.6238403",
"0.6220892",
"0.62064177",
"0.6198524",
"0.6178521",
"0.6169842",
"0.61682916",
"0.6148923",
"0.60785806",
"0.60732746",
"0.6056155",
"0.60497195",
"0.6024291",
"0.5985756",
"0.59600407",
"0.5933159",
"0.59002626",
"0.5870471",
"0.5866657",
"0.58607996",
"0.5850897",
"0.58464754",
"0.58374655",
"0.5820295",
"0.58155805",
"0.5800859",
"0.5761468",
"0.5758237",
"0.57573354",
"0.5749736",
"0.574549",
"0.57301724",
"0.57272625",
"0.5724172",
"0.57217157",
"0.5715049",
"0.57087713",
"0.5702163",
"0.56993043",
"0.5692702",
"0.56807446",
"0.5675731",
"0.5668204",
"0.5666844",
"0.5662156",
"0.5650238",
"0.5638612",
"0.5613887",
"0.5613887",
"0.55918264",
"0.55892295",
"0.5577744",
"0.5572114",
"0.5570058",
"0.55592614",
"0.5558606",
"0.5552783",
"0.5552735",
"0.5547343",
"0.55468696",
"0.55468696",
"0.5545334",
"0.5544751",
"0.5541569",
"0.55362004",
"0.55362004",
"0.55362004",
"0.55362004",
"0.55362004",
"0.55362004",
"0.55362004",
"0.55362004",
"0.55362004",
"0.55362004",
"0.55362004",
"0.55362004",
"0.55362004",
"0.55362004",
"0.55362004",
"0.55362004",
"0.552936",
"0.552936",
"0.55280745",
"0.5519372",
"0.55030453",
"0.5486684",
"0.5480748"
] | 0.6174612 | 18 |
Create the event listener. | public function __construct(Store $session)
{
$this->session = $session;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addRequestCreateListener($listener);",
"public function onEvent();",
"private function init_event_listeners() {\n\t\t// add_action('wp_ajax_example_action', [$this, 'example_function']);\n\t}",
"public function listener(Listener $listener);",
"protected function setupListeners()\n {\n //\n }",
"function eventRegister($eventName, EventListener $listener);",
"public function listen($event, $listener);",
"private function createStreamCallback()\n {\n $read =& $this->readListeners;\n $write =& $this->writeListeners;\n $this->streamCallback = function ($stream, $flags) use(&$read, &$write) {\n $key = (int) $stream;\n if (\\EV_READ === (\\EV_READ & $flags) && isset($read[$key])) {\n \\call_user_func($read[$key], $stream);\n }\n if (\\EV_WRITE === (\\EV_WRITE & $flags) && isset($write[$key])) {\n \\call_user_func($write[$key], $stream);\n }\n };\n }",
"public function addEventListener(string $eventClass, callable $listener, int $priority = 0): EnvironmentBuilderInterface;",
"public function setupEventListeners()\r\n\t{\r\n\t\t$blueprints = craft()->courier_blueprints->getAllBlueprints();\r\n\t\t$availableEvents = $this->getAvailableEvents();\r\n\r\n\t\t// Setup event listeners for each blueprint\r\n\t\tforeach ($blueprints as $blueprint) {\r\n\t\t\tif (!$blueprint->eventTriggers) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tforeach ($blueprint->eventTriggers as $event) {\r\n\t\t\t\t// Is event currently enabled?\r\n\t\t\t\tif (!isset($availableEvents[$event])) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tcraft()->on($event, function(Event $event) use ($blueprint) {\r\n\t\t\t\t\tcraft()->courier_blueprints->checkEventConditions($event, $blueprint);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// On the event that an email is sent, create a successful delivery record\r\n\t\tcraft()->on('courier_emails.onAfterBlueprintEmailSent', [\r\n\t\t\tcraft()->courier_deliveries,\r\n\t\t\t'createDelivery'\r\n\t\t]);\r\n\r\n\t\t// On the event that an email fails to send, create a failed delivery record\r\n\t\tcraft()->on('courier_emails.onAfterBlueprintEmailFailed', [\r\n\t\t\tcraft()->courier_deliveries,\r\n\t\t\t'createDelivery',\r\n\t\t]);\r\n\t}",
"protected function registerListeners()\n {\n }",
"public function listen($listener);",
"public function listenForEvents()\n {\n Event::listen(DummyEvent::class, DummyListener::class);\n\n event(new DummyEvent);\n }",
"public function createEvent()\n {\n return new Event();\n }",
"public function attachEvents();",
"public function attachEvents();",
"public function add_event_handler($event, $callback);",
"function addListener(EventListener $listener): void;",
"public static function initListeners() {\n\t\t\n\t\tif(GO::modules()->isInstalled('files') && class_exists('\\GO\\Files\\Controller\\FolderController')){\n\t\t\t$folderController = new \\GO\\Files\\Controller\\FolderController();\n\t\t\t$folderController->addListener('checkmodelfolder', \"GO\\Projects2\\Projects2Module\", \"createParentFolders\");\n\t\t}\n\t\t\n\t\t\\GO\\Base\\Model\\User::model()->addListener('delete', \"GO\\Projects2\\Projects2Module\", \"deleteUser\");\n\n\t}",
"public function __create()\n {\n $this->eventPath = $this->data('event_path');\n $this->eventName = $this->data('event_name');\n $this->eventInstance = $this->data('event_instance');\n $this->eventFilter = $this->data('event_filter');\n }",
"private static function event()\n {\n $files = ['Event', 'EventListener'];\n $folder = static::$root.'Event'.'/';\n\n self::call($files, $folder);\n\n $files = ['ManyListenersArgumentsException'];\n $folder = static::$root.'Event/Exceptions'.'/';\n\n self::call($files, $folder);\n }",
"public function addEventListener($event, $callable){\r\n $this->events[$event] = $callable;\r\n }",
"public function testEventCallBackCreate()\n {\n }",
"public function listeners($event);",
"public function addListener($event, $listener, $priority = 0);",
"public function on($name, $listener, $data = null, $priority = null, $acceptedArgs = null);",
"public function createWatcher();",
"public function __construct()\n\t{\n\t\t$this->delegate = Delegate_1::fromMethod($this, 'onEvent');\n\t}",
"public function init_listeners( $callable ) {\n\t}",
"public static function events();",
"public static function __events () {\n \n }",
"public function onEventAdd()\n\t{\n\t\t$this->onTaskAdd();\n\t}",
"public function addApplicationBuilderListener( \n MyFusesApplicationBuilderListener $listener );",
"public function addListener($eventName, $listener, $priority = 0);",
"public function __construct(){\n\n\t\t\t$this->listen();\n\n\t\t}",
"protected function registerListeners()\n {\n // Login event listener\n #Event::listen('auth.login', function($user) {\n //\n #});\n\n // Logout event subscriber\n #Event::subscribe('Mrcore\\Parser\\Listeners\\MyEventSubscription');\n }",
"public function __construct()\n {\n// global $callback;\n // $this->eventsArr = $eventsArr;\n $this->callback = function () {\n\n // echo \"event: message\\n\"; // for onmessage listener\n echo \"event: ping\\n\";\n $curDate = date(DATE_ISO8601);\n echo 'data: {\"time\": \"' . $curDate . '\"}';\n echo \"\\n\\n\";\n\n while (($event = ServerSentEvents::popEvent()) != null) {\n $m = json_encode($event->contents);\n echo \"event: $event->event\\n\";\n echo \"data: $m\";\n echo \"\\n\\n\";\n }\n // echo \"event: message\\n\";\n // $curDate = date(DATE_ISO8601);\n // echo 'data: {\"message-time\": \"' . $curDate . '\"}';\n // echo \"\\n\\n\";\n // while(true){\n // if ($index != $this->eventsCounter){\n // ServerSentEvents::sendEvent($this->event, $this->eventBody);\n // $index = $this->eventsCounter;\n // }\n\n // sleep(1);\n // }\n };\n\n $this->setupResponse();\n }",
"private function createMyEvents()\n {\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatchSecure_Frontend_Checkout',\n 'onPostDispatchCheckoutSecure'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_Frontend_Checkout_PreRedirect',\n 'onPreRedirectToPayPal'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PreDispatch_Frontend_PaymentPaypal',\n 'onPreDispatchPaymentPaypal'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_Frontend_PaymentPaypal_Webhook',\n 'onPaymentPaypalWebhook'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_Frontend_PaymentPaypal_PlusRedirect',\n 'onPaymentPaypalPlusRedirect'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatch_Frontend_Account',\n 'onPostDispatchAccount'\n );\n $this->subscribeEvent(\n 'Theme_Compiler_Collect_Plugin_Javascript',\n 'onCollectJavascript'\n );\n $this->subscribeEvent(\n 'Shopware_Components_Document::assignValues::after',\n 'onBeforeRenderDocument'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatchSecure_Backend_Config',\n 'onPostDispatchConfig'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatch_Backend_Order',\n 'onPostDispatchOrder'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatch_Backend_PaymentPaypal',\n 'onPostDispatchPaymentPaypal'\n );\n $this->subscribeEvent(\n 'Theme_Compiler_Collect_Plugin_Less',\n 'addLessFiles'\n );\n $this->subscribeEvent(\n 'Enlight_Bootstrap_InitResource_paypal_plus.rest_client',\n 'onInitRestClient'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Dispatcher_ControllerPath_Api_PaypalPaymentInstruction',\n 'onGetPaymentInstructionsApiController'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Front_StartDispatch',\n 'onEnlightControllerFrontStartDispatch'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PreDispatch',\n 'onPreDispatchSecure'\n );\n }",
"public static function creating(callable $listener, $priority = 0)\n {\n static::listen(ModelEvent::CREATING, $listener, $priority);\n }",
"public function listen();",
"public function listen() {\n $this->source->listen($this->id);\n }",
"public function addEventListener($event, $callback, $weight = null);",
"public function testAddListener()\n {\n // Arrange\n $listenerCalled = false;\n $communicator = new Communicator();\n\n // Act\n $communicator->addListener(function () use (&$listenerCalled) {\n $listenerCalled = true;\n });\n\n $communicator->broadcast([], 'channel', [], []);\n\n // Assert\n static::assertTrue($listenerCalled);\n }",
"public function addListener($name, $listener, $priority = 0);",
"public static function created(callable $listener, $priority = 0)\n {\n static::listen(ModelEvent::CREATED, $listener, $priority);\n }",
"public function on($event, $callback){ }",
"public function appendListenerForEvent(string $eventType, callable $listener): callable;",
"public function initEventLogger()\n {\n $dispatcher = static::getEventDispatcher();\n\n $logger = $this->newEventLogger();\n\n foreach ($this->listen as $event) {\n $dispatcher->listen($event, function ($eventName, $events) use ($logger) {\n foreach ($events as $event) {\n $logger->log($event);\n }\n });\n }\n }",
"protected function getCron_EventListenerService()\n {\n return $this->services['cron.event_listener'] = new \\phpbb\\cron\\event\\cron_runner_listener(${($_ = isset($this->services['cron.lock_db']) ? $this->services['cron.lock_db'] : $this->getCron_LockDbService()) && false ?: '_'}, ${($_ = isset($this->services['cron.manager']) ? $this->services['cron.manager'] : $this->getCron_ManagerService()) && false ?: '_'}, ${($_ = isset($this->services['request']) ? $this->services['request'] : ($this->services['request'] = new \\phpbb\\request\\request(NULL, true))) && false ?: '_'});\n }",
"public function getListener(/* ... */)\n {\n return $this->_listener;\n }",
"protected function _listener($name) {\n\t\treturn $this->_crud()->listener($name);\n\t}",
"private function listeners()\n {\n foreach ($this['config']['listeners'] as $eventName => $classService) {\n $this['dispatcher']->addListener($classService::NAME, [new $classService($this), 'dispatch']);\n }\n }",
"public function initializeListeners()\n {\n $this->eventsEnabled = false;\n $this->setPreloads();\n $this->setEvents();\n $this->eventsEnabled = true;\n }",
"protected function listenForEvents()\n {\n $callback = function ($event) {\n foreach ($this->logWriters as $writer) {\n $writer->log($event);\n }\n };\n\n $this->events->listen(JobProcessing::class, $callback);\n $this->events->listen(JobProcessed::class, $callback);\n $this->events->listen(JobFailed::class, $callback);\n $this->events->listen(JobExceptionOccurred::class, $callback);\n }",
"protected function registerListeners()\n {\n $this->container['listener.server'] = $this->container->share(function ($c) {\n return new \\Symfttpd\\EventDispatcher\\Listener\\ServerListener($c['filesystem'], $c['generator.server']);\n });\n\n $this->container['listener.gateway'] = $this->container->share(function ($c) {\n return new \\Symfttpd\\EventDispatcher\\Listener\\GatewayListener($c['filesystem'], $c['generator.gateway']);\n });\n }",
"public function listeners($eventName);",
"public static function create()\n {\n list(\n $message,\n $callbackService,\n $callbackMethod,\n $callbackParams\n ) = array_pad( func_get_args(), 4, null);\n\n static::addToEventQueue( array(\n 'type' => \"alert\",\n 'properties' => array(\n 'message' => $message\n ),\n 'service' => $callbackService,\n 'method' => $callbackMethod,\n 'params' => $callbackParams ?? []\n ));\n }",
"public function requestCreateEvent()\n {\n $ch = self::curlIni('event_new', $this->eventParams);\n\n return $ch;\n }",
"function __construct()\n\t{\n\t\t$this->events[\"AfterAdd\"]=true;\n\n\n\t}",
"public function __construct()\n {\n Hook::listen(__CLASS__);\n }",
"function add_listener($hook, $function_name){\n\t\tglobal $listeners;\n\n\t\t$listeners[$hook][] = $function_name;\n\t}",
"public function __construct()\n {\n $this->events = new EventDispatcher();\n }",
"protected function initEventLogger(): void\n {\n $logger = $this->newEventLogger();\n\n foreach ($this->listen as $event) {\n $this->dispatcher->listen($event, function ($eventName, $events) use ($logger) {\n foreach ($events as $event) {\n $logger->log($event);\n }\n });\n }\n }",
"public function listen($events, $listener = null): void;",
"public function onCreate($callback)\n {\n $this->listeners[] = $callback;\n return $this;\n }",
"public static function listen() {\n $projectId = \"sunday-1601040613995\";\n\n # Instantiates a client\n $pubsub = new PubSubClient([\n 'projectId' => $projectId\n ]);\n\n # The name for the new topic\n $topicName = 'gmail';\n\n # Creates the new topic\n $topic = $pubsub->createTopic($topicName);\n\n echo 'Topic ' . $topic->name() . ' created.';\n }",
"protected function registerEventListeners()\n {\n Event::listen(Started::class, function (Started $event) {\n $this->progress = $this->output->createProgressBar($event->objects->count());\n });\n\n Event::listen(Imported::class, function () {\n if ($this->progress) {\n $this->progress->advance();\n }\n });\n\n Event::listen(ImportFailed::class, function () {\n if ($this->progress) {\n $this->progress->advance();\n }\n });\n\n Event::listen(DeletedMissing::class, function (DeletedMissing $event) {\n $event->deleted->isEmpty()\n ? $this->info(\"\\n No missing users found. None have been soft-deleted.\")\n : $this->info(\"\\n Successfully soft-deleted [{$event->deleted->count()}] users.\");\n });\n\n Event::listen(Completed::class, function (Completed $event) {\n if ($this->progress) {\n $this->progress->finish();\n }\n });\n }",
"public function addBeforeCreateListener(IBeforeCreateListener $listener)\n {\n $this->_lifecyclers[BeanLifecycle::BeforeCreate][] = $listener;\n }",
"protected function registerInputEvents() {\n\t\t$this->getEventLoop()->addEventListener('HANG', function($event) {\n\t\t\t// Update our state\n\t\t\t$this->offHook = (bool)$event['value'];\n\n\t\t\t// Trigger specific events for receiver up and down states\n\t\t\t$eventName = $this->isOffHook() ? 'RECEIVER_UP' : 'RECEIVER_DOWN';\n\t\t\t$this->fireEvents($eventName, $event);\n\t\t});\n\n\t\t$this->getEventLoop()->addEventListener('TRIG', function($event) {\n\t\t\t// Update our state\n\t\t\t$this->dialling = (bool)$event['value'];\n\t\t});\n\n\t\t// Proxy registration for all EventLoop events to pass them back up to our own listeners\n\t\t$this->getEventLoop()->addEventListener(true, function ($event, $type) {\n\t\t\t// Fire event to our own listeners\n\t\t\t$this->fireEvents($type, $event);\n\t\t});\n\t}",
"public static function creating($callback)\n {\n self::listenEvent('creating', $callback);\n }",
"public function attach(string $event, callable $listener, int $priority = 0): void;",
"public function __construct()\n {\n $this->listnerCode = config('settings.listener_code.DeletingVoucherEventListener');\n }",
"protected function registerEventListener()\n {\n $subscriber = $this->getConfig()->get('audit-trail.subscriber', AuditTrailEventSubscriber::class);\n $this->getDispatcher()->subscribe($subscriber);\n }",
"function listenTo(string $eventName, callable $callback)\n {\n EventManager::register($eventName, $callback);\n }",
"public function attach($identifier, $event, callable $listener, $priority = 1)\n {\n }",
"public function testRegisiterListenerMethodAddsAListener()\n\t{\n\t\t$instance = new Dispatcher();\n\n\t\t$instance->register_listener('some_event', 'my_function');\n\n\t\t$this->assertSame(array('some_event' => array('my_function')), $instance->listeners);\n\t\t$this->assertAttributeSame(array('some_event' => array('my_function')), 'listeners', $instance);\n\t}",
"protected function getPhpbb_Viglink_ListenerService()\n {\n return $this->services['phpbb.viglink.listener'] = new \\phpbb\\viglink\\event\\listener(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['template']) ? $this->services['template'] : $this->getTemplateService()) && false ?: '_'});\n }",
"public static function create($className, array &$extraTabs, $selectedTabId)\r\n {\r\n $createClass = XenForo_Application::resolveDynamicClass($className, 'listener_th');\r\n if (!$createClass) {\r\n throw new XenForo_Exception(\"Invalid listener '$className' specified\");\r\n }\r\n \r\n return new $createClass($extraTabs, $selectedTabId);\r\n }",
"function listen($listener)\n{\n return XPSPL::instance()->listen($listener);\n}",
"function getEventListeners()\n {\n $listeners = array();\n \n $listener = new Listener($this);\n \n $listeners[] = array(\n 'event' => RoutesCompile::EVENT_NAME,\n 'listener' => array($listener, 'onRoutesCompile')\n );\n\n $listeners[] = array(\n 'event' => GetAuthenticationPlugins::EVENT_NAME,\n 'listener' => array($listener, 'onGetAuthenticationPlugins')\n );\n\n return $listeners;\n }",
"protected static function loadListeners() {\n\t\t\n\t\t// default var\n\t\t$configDir = Config::getOption(\"configDir\");\n\t\t\n\t\t// make sure the listener data exists\n\t\tif (file_exists($configDir.\"/listeners.json\")) {\n\t\t\t\n\t\t\t// get listener list data\n\t\t\t$listenerList = json_decode(file_get_contents($configDir.\"/listeners.json\"), true);\n\t\t\t\n\t\t\t// get the listener info\n\t\t\tforeach ($listenerList[\"listeners\"] as $listenerName) {\n\t\t\t\t\n\t\t\t\tif ($listenerName[0] != \"_\") {\n\t\t\t\t\t$listener = new $listenerName();\n\t\t\t\t\t$listeners = $listener->getListeners();\n\t\t\t\t\tforeach ($listeners as $event => $eventProps) {\n\t\t\t\t\t\t$eventPriority = (isset($eventProps[\"priority\"])) ? $eventProps[\"priority\"] : 0;\n\t\t\t\t\t\tself::$instance->addListener($event, array($listener, $eventProps[\"callable\"]), $eventPriority);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}",
"function __construct()\n\t{\n\t\t$this->events[\"BeforeShowList\"]=true;\n\n\t\t$this->events[\"BeforeProcessList\"]=true;\n\n\t\t$this->events[\"BeforeProcessPrint\"]=true;\n\n\t\t$this->events[\"BeforeShowPrint\"]=true;\n\n\t\t$this->events[\"BeforeQueryList\"]=true;\n\n\t\t$this->events[\"BeforeAdd\"]=true;\n\n\t\t$this->events[\"BeforeProcessEdit\"]=true;\n\n\t\t$this->events[\"BeforeEdit\"]=true;\n\n\t\t$this->events[\"BeforeShowEdit\"]=true;\n\n\t\t$this->events[\"BeforeProcessView\"]=true;\n\n\t\t$this->events[\"BeforeShowView\"]=true;\n\n\n\n\n\t\t$this->events[\"ProcessValuesView\"]=true;\n\n\t\t$this->events[\"ProcessValuesEdit\"]=true;\n\n\t\t$this->events[\"CustomAdd\"]=true;\n\n\t\t$this->events[\"CustomEdit\"]=true;\n\n\t\t$this->events[\"ProcessValuesAdd\"]=true;\n\n\t\t$this->events[\"BeforeQueryEdit\"]=true;\n\n\t\t$this->events[\"BeforeQueryView\"]=true;\n\n\n\t\t$this->events[\"BeforeProcessAdd\"]=true;\n\n\n//\tonscreen events\n\t\t$this->events[\"calmonthly_snippet2\"] = true;\n\t\t$this->events[\"calmonthly_snippet1\"] = true;\n\t\t$this->events[\"Monthly_Next_Prev\"] = true;\n\n\t}",
"function defineHandlers() {\n EventsManager::listen('on_rawtext_to_richtext', 'on_rawtext_to_richtext');\n EventsManager::listen('on_daily', 'on_daily');\n EventsManager::listen('on_wireframe_updates', 'on_wireframe_updates');\n }",
"public function createEvents()\n {\n //\n\n return 'something';\n }",
"public static function createInstance()\n {\n return new GridPrintEventManager('ISerializable');\n }",
"public function setUp()\n {\n if ($this->getOption('listener') === true) \n $this->addListener(new BlameableListener($this->_options));\n }",
"public static function created($callback)\n {\n self::listenEvent('created', $callback);\n }",
"public function addListener()\n {\n $dispatcher = $this->wrapper->getDispatcher();\n $listener = new TestListener();\n\n $dispatcher->addListener(PsKillEvents::PSKILL_PREPARE, [$listener, 'onPrepare']);\n $dispatcher->addListener(PsKillEvents::PSKILL_SUCCESS, [$listener, 'onSuccess']);\n $dispatcher->addListener(PsKillEvents::PSKILL_ERROR, [$listener, 'onError']);\n $dispatcher->addListener(PsKillEvents::PSKILL_BYPASS, [$listener, 'onBypass']);\n\n return $listener;\n }",
"public static function addEventListener($event, $listenerClassName) {\n\t\tif (!is_a($listenerClassName, EventListenerInterface::class, TRUE)) {\n\t\t\tthrow new \\RuntimeException(\n\t\t\t\tsprintf(\n\t\t\t\t\t'Invalid CMIS Service EventListener: %s must implement %s',\n\t\t\t\t\t$listenerClassName,\n\t\t\t\t\tEventListenerInterface::class\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\tstatic::$eventListeners[get_called_class()][$event][] = $listenerClassName;\n\t}",
"public function makeListener($listener, $wildcard = false): Closure;",
"public function createSubscriber();",
"public function listener() {\n\t\treturn $this->_runtime['listener'];\n\t}",
"public function addEventListener($events, $eventListener)\n {\n $this->eventListeners[] = array('events' => $events, 'listener' => $eventListener);\n }",
"function __construct()\r\n\t{\r\n\t\t$this->events[\"BeforeAdd\"]=true;\r\n\r\n\r\n\t}",
"function __construct()\n\t{\n\n\t\t$this->events[\"BeforeEdit\"]=true;\n\n\n\t\t$this->events[\"BeforeShowAdd\"]=true;\n\n\t\t$this->events[\"BeforeShowEdit\"]=true;\n\n\t\t$this->events[\"IsRecordEditable\"]=true;\n\n\t\t$this->events[\"AfterAdd\"]=true;\n\n\t\t$this->events[\"BeforeAdd\"]=true;\n\n\t\t$this->events[\"AfterDelete\"]=true;\n\n\t\t$this->events[\"AfterEdit\"]=true;\n\n\t\t$this->events[\"BeforeMoveNextList\"]=true;\n\n\n//\tonscreen events\n\n\t}",
"public function startListening();",
"public function addEntryAddedListener(callable $listener): SubscriptionInterface;",
"function __construct()\n\t{\n\t\t$this->events[\"BeforeAdd\"]=true;\n\n\t\t$this->events[\"BeforeEdit\"]=true;\n\n\t\t$this->events[\"AfterAdd\"]=true;\n\n\n\t}",
"function GetEventListeners() {\n $my_file = '{%IEM_ADDONS_PATH%}/dynamiccontenttags/dynamiccontenttags.php';\n $listeners = array ();\n\n $listeners [] =\n array (\n 'eventname' => 'IEM_SENDSTUDIOFUNCTIONS_GENERATEMENULINKS',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'SetMenuItems'\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners[] =\n array (\n 'eventname' => 'IEM_USERAPI_GETPERMISSIONTYPES',\n 'trigger_details' => array (\n 'Interspire_Addons',\n 'GetAddonPermissions',\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners [] =\n array (\n 'eventname' => 'IEM_DCT_HTMLEDITOR_TINYMCEPLUGIN',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'DctTinyMCEPluginHook'\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners [] =\n array (\n 'eventname' => 'IEM_EDITOR_TAG_BUTTON',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'CreateInsertTagButton'\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners[] =\n array (\n 'eventname' => 'IEM_ADDON_DYNAMICCONTENTTAGS_GETALLTAGS',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'getAllTags'\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners[] =\n array (\n 'eventname' => 'IEM_ADDON_DYNAMICCONTENTTAGS_REPLACETAGCONTENT',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'replaceTagContent'\n ),\n 'trigger_file' => $my_file\n );\n\n return $listeners;\n }",
"function on_creation() {\n $this->init();\n }",
"public function addEventListener(ListenerInterface $eventListener)\n {\n $this->eventListeners[] = $eventListener;\n }"
] | [
"0.65685207",
"0.62875676",
"0.6221792",
"0.6197413",
"0.61627764",
"0.6129312",
"0.6096226",
"0.6056844",
"0.6051069",
"0.6041841",
"0.596228",
"0.596194",
"0.5957539",
"0.59439605",
"0.58821785",
"0.58821785",
"0.5874665",
"0.5864387",
"0.5856076",
"0.584338",
"0.5824244",
"0.5820997",
"0.5791637",
"0.57913053",
"0.57893854",
"0.57716024",
"0.5764599",
"0.5744472",
"0.57417566",
"0.57387024",
"0.5721539",
"0.57068586",
"0.5699624",
"0.56838834",
"0.5675836",
"0.56686187",
"0.5661412",
"0.56601405",
"0.56584114",
"0.5649107",
"0.5638085",
"0.56257224",
"0.56172097",
"0.56064796",
"0.55919635",
"0.5579062",
"0.55775297",
"0.5559927",
"0.5546297",
"0.5546121",
"0.5545537",
"0.5539715",
"0.55295366",
"0.55276597",
"0.5527287",
"0.551302",
"0.5497285",
"0.5495119",
"0.54845315",
"0.54834753",
"0.54812366",
"0.5478984",
"0.5474917",
"0.5471286",
"0.54693574",
"0.54684293",
"0.5466594",
"0.5465012",
"0.5450231",
"0.5450062",
"0.5450001",
"0.544321",
"0.54308116",
"0.54218924",
"0.5389615",
"0.53857446",
"0.5378957",
"0.5378836",
"0.53771406",
"0.5368413",
"0.5360908",
"0.5356685",
"0.5349897",
"0.53419805",
"0.5340825",
"0.53330225",
"0.53323317",
"0.5330117",
"0.53270465",
"0.5326564",
"0.5307367",
"0.52996707",
"0.52980274",
"0.52973336",
"0.52886003",
"0.528163",
"0.5276869",
"0.5269541",
"0.5268173",
"0.5265876",
"0.52629435"
] | 0.0 | -1 |
/ fetches the class's marksheet table | public function fetchMarksheetTable($classId = null)
{
if($classId) {
$classData = $this->model_classes->fetchClassData($classId);
$marksheetData = $this->model_marksheet->fetchMarksheetData($classId);
$table = '
<div class="well">
Ngành học : '.$classData['class_name'].'
</div>
<div id="messages"></div>
<div class="pull pull-right">
<button class="btn btn-default" data-toggle="modal" data-target="#addMarksheetModal" onclick="addMarksheet('.$classId.')">Thêm bảng điểm</button>
</div>
<br /> <br />
<!-- Table -->
<table class="table table-bordered" id="manageMarksheetTable">
<thead>
<tr>
<th> Tên bảng điểm </th>
<th> Ngày </th>
<th>Hoạt động </th>
</tr>
</thead>
<tbody>';
if($marksheetData) {
foreach ($marksheetData as $key => $value) {
$button = '<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Action <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a type="button" data-toggle="modal" data-target="#editMarksheetModal" onclick="editMarksheet('.$value['marksheet_id'].','.$value['class_id'].')"> <i class="glyphicon glyphicon-edit"></i> Chỉnh sửa</a></li>
<li><a type="button" data-toggle="modal" data-target="#removeMarksheetModal" onclick="removeMarksheet('.$value['marksheet_id'].','.$value['class_id'].')"> <i class="glyphicon glyphicon-trash"></i> Xóa</a></li>
</ul>
</div>';
$table .= '<tr>
<td>'.$value['marksheet_name'].'</td>
<td>'.$value['marksheet_date'].'</td>
<td>'.$button.'</td>
</tr>
';
} // /foreach
}
else {
$table .= '<tr>
<td colspan="3"><center>No Data Available</center></td>
</tr>';
} // /else
$table .= '</tbody>
</table>
';
echo $table;
} // /check class id
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function return_table()\n {\n $table = \"classes\";\n return $table;\n }",
"private function _fetch_table()\n {\n if (!isset($this->table))\n {\n $this->table = $this->_get_table_name(get_class($this));\n }\n }",
"public function allmarksheet($class, $term, $year)\n\t{\n\t\ttry {\n\n\t\t\t$stmt = $this->con->prepare(\"select * from sixtoeightmarksheet where class=:class and term=:term and year=:year and status=1 order by gpa desc \");\n\t\t\t$stmt->bindValue(':class', $class, PDO::PARAM_STR);\n\t\t\t$stmt->bindValue(':term', $term, PDO::PARAM_STR);\n\t \t\t$stmt->bindValue(':year', $year, PDO::PARAM_STR);\n\t \t\t$stmt->execute();\n\t \t\treturn $stmt->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t\n\t\t} catch (PDOException $e) {\n\t\t\techo \"Error: \".$e->getMessage().\"<br>\";\n\t\t\tdie();\n\t\t}\n\t}",
"public function getTable();",
"protected function get_table_classes()\n {\n }",
"public function getTableOfContents();",
"public function getTables();",
"public function getTables();",
"public function getTables();",
"public function getTable();",
"public function getTable();",
"public function getTable();",
"public function getTable();",
"public function getTable();",
"public function getTable();",
"public function getTable();",
"abstract public function getTables();",
"public function &getTables();",
"public function getTableData()\n\t{\n\t}",
"public static function getTables() {\n }",
"public function return_table()\n {\n $table = \"sub_classes\";\n return $table;\n }",
"public function getTable() {}",
"public function getTable() {}",
"public function getTable() {}",
"public static function getTable();",
"public static function getTable() {}",
"public static function getTable() {}",
"public static function getTable() {}",
"public static function getTable() {}",
"public static function getTable() {}",
"public static function getTable() {}",
"public static function getTable() {}",
"public function getTableMarks()\n {\n $str = $this->getProperty('table_marks');\n if (!$str) {\n return 0;\n }\n\n $ret = array();\n $arr = Tx_Rnbase_Utility_Strings::trimExplode('|', $str);\n foreach ($arr as $item) {\n // Jedes Item splitten\n $mark = Tx_Rnbase_Utility_Strings::trimExplode(';', $item);\n $positions = Tx_Rnbase_Utility_Strings::intExplode(',', $mark[0]);\n $comments = Tx_Rnbase_Utility_Strings::trimExplode(',', $mark[1]);\n // Jetzt das Ergebnisarray aufbauen\n foreach ($positions as $position) {\n $ret[$position] = array($comments[0], $comments[1]);\n }\n }\n\n return $ret;\n }",
"private function loadMarks()\r\n\t{\r\n\t\tglobal $database;\r\n\t\t$resultInformation = $database->query(\"SELECT subject, abbr FROM course__overview WHERE id = $this->id;\");\r\n\t\tif (mysql_num_rows($resultInformation) == 1) {\r\n\t\t\t$this->name = $resultInformation->fetch_row();\r\n\t\t}\r\n\t\t$resultTest = $database->query(\"SELECT id FROM test__test WHERE classId = $this->id AND studentId = $this->studentId;;\");\r\n\t\twhile ($row = $resultTest->fetch_row()) {\r\n\t\t\tarray_push($this->test, new Test($row[0]));\r\n\t\t}\r\n\t\t$resultOthers = $database->query(\"SELECT markValue FROM test__other WHERE classId = $this->id AND studentId = $this->studentId;\");\r\n\t\twhile ($row = $resultOthers->fetch_row()) {\r\n\t\t\tarray_push($this->otherMarks, $row[0]);\r\n\t\t}\r\n\t}",
"protected function _readTable() {}",
"protected function _readTable() {}",
"abstract public function getTable();",
"abstract public function getTable();",
"public function getTableInformation() {}",
"protected function tableclass(){\n\n\t\tforeach($this->mapChild($this) as $key => $table ){\n\n\t\t\t$myadrs = $this->address;\n\n\t\t\tif(!in_array($table,$myadrs)){\n\n\t\t\t\tarray_push($myadrs,$table);\n\n\t\t\t\teval('$this->'.$table.' = new $this::$tclass($myadrs);');\n\n\t\t\t}\n\n\t\t\t//print($key . ':' .$table. p);\n\n\t\t}\n\n\t}",
"abstract protected function getTable();",
"public function getTableDefinitions() {}",
"private function myTables(){\n }",
"public function getTable()\r\n {\r\n }",
"function &fetch_table()\n\t{\n\t\tif (sizeof($this->table) == 0)\n\t\t{\n\t\t\t$this->populate_table();\n\t\t}\n\t\treturn $this->table;\n\t}",
"protected function getTcaTables() {}",
"function _get_list_table($class_name, $args = array())\n {\n }",
"public function classesList(){\n\t\t$data['fl_classes']=array();\n\t\t// get the flight from db\n\t\t$tbl=$this->session->userdata('prefix').'flightclass';\n\t\t// get the db tables list\n\t\t$tableList=getTables(); // define in custom helper\n\t\t// check if the tbl exist in db \n\t\tif(in_array($tbl, $tableList)){\n\t\t\t$data['fl_classes']=$this->Common_model->select($tbl);\n\t\t} \n\t\t$this->show_front('flight/flight_class', $data);\n\t}",
"public function getTable()\n {\n\n }",
"public function getTcaTables() {}",
"function getTables()\n {\n // Init global variables\n global $types, $classes, $makes;\n // Set each variable to array\n $types = get_types();\n $classes = get_classes();\n $makes = getMakes();\n }",
"public function view_marksheet($display_id = null){\n if ($this->resultArchive_m->std_info($display_id)) {\n $data= [];\n $data['title'] = \"View Details\";\n $data['get_marksheet'] = 'resultArchive/details';\n $data['std_info'] = $this->resultArchive_m->std_info($display_id);\n // $data['get_info'] = $this->resultArchive_m->get_single_info($display_id);\n $data['get_waiver_sub'] = $this->resultArchive_m->get_waiver_sub($display_id);\n $data['get_waiver_display_id'] = $this->resultArchive_m->get_display_id($display_id);\n $data['dept_full_name'] =$this->resultArchive_m->get_dept($data['std_info']->std_dept);\n $data['point_table'] = $this->resultArchive_m->point_table($display_id);\n $data['get_earn_point'] = $this->resultArchive_m->get_earn_point($display_id, $null = 0);\n $data['per_sub_point'] = $this->resultArchive_m->per_sub_point_table($display_id);\n $this->load->view('dashboard_layout',$data);\n }else {\n redirect(base_url('resultArchive/resultArchive'));\n }\n }",
"protected function getTableHelper() {}",
"public function viewClass(){\n\t\t\t$query = $this->connection()->prepare(\"SELECT * FROM clazz ORDER BY id DESC\");\n\t\t\t$query->execute();\n\t\t\treturn $query->fetchAll();\n\t\t}",
"private function _fetch_table()\n {\n if ($this->_table == NULL)\n {\n $this->_table = plural(preg_replace('/(_m|_model)?$/', '', strtolower(get_class($this))));\n }\n }",
"function emarking_download_excel_markers_agreement($cm, $emarking) {\n global $DB;\n $csvsql = \"\n\t\tSELECT\n s.id,\n\t cr.description,\n CONCAT(cr.description,'-',b.id) as category,\n\t b.definition,\n COUNT(distinct c.id) as votes\n\t\tFROM {course_modules} cm\n\t\tINNER JOIN {context} mc ON (cm.id = :cmid AND mc.contextlevel = 70 AND cm.id = mc.instanceid)\n\t\tINNER JOIN {grading_areas} ar ON (mc.id = ar.contextid)\n\t\tINNER JOIN {grading_definitions} def ON (ar.id = def.areaid)\n\t\tINNER JOIN {gradingform_rubric_criteria} cr ON (def.id = cr.definitionid)\n\t\tINNER JOIN {gradingform_rubric_levels} b ON (cr.id = b.criterionid)\n INNER JOIN {emarking} e ON (e.id = cm.instance)\n\t\tINNER JOIN {emarking_submission} s ON (e.id = s.emarking)\n\t\tINNER JOIN {emarking_draft} d ON (d.submissionid = s.id AND d.qualitycontrol=0)\n INNER JOIN {course} cc ON (cc.id = e.course)\n\t\tLEFT JOIN mdl_emarking_comment c ON (d.id = c.draft AND c.levelid = b.id)\n GROUP BY s.id, cr.id, b.id\n ORDER BY s.id, cr.id, b.id\n \";\n // Get data and generate a list of questions.\n $rows = $DB->get_recordset_sql($csvsql, array(\n 'cmid' => $cm->id));\n $questions = array();\n foreach ($rows as $row) {\n if (array_search($row->category, $questions) === false && $row->category) {\n $questions [] = $row->category;\n }\n }\n $current = 0;\n $laststudent = 0;\n $headers = array(\n '00examid' => get_string('exam', 'mod_emarking'));\n $tabledata = array();\n $data = null;\n $rows = $DB->get_recordset_sql($csvsql, array(\n 'cmid' => $cm->id));\n $studentname = '';\n $lastrow = null;\n foreach ($rows as $row) {\n $index = 10 + array_search($row->category, $questions);\n $keyquestion = $index . \"\" . $row->category;\n if (! isset($headers [$keyquestion])) {\n $headers [$keyquestion] = $row->category;\n }\n if ($laststudent != $row->id) {\n if ($laststudent > 0) {\n $tabledata [$studentname] = $data;\n $current ++;\n }\n $data = array(\n '00examid' => $row->id,\n $keyquestion => $row->votes);\n $laststudent = intval($row->id);\n $studentname = $row->id;\n } else {\n $data [$keyquestion] = $row->votes;\n }\n $lastrow = $row;\n }\n $studentname = $lastrow->id;\n $tabledata [$studentname] = $data;\n ksort($tabledata);\n $current = 0;\n $newtabledata = array();\n foreach ($tabledata as $data) {\n foreach ($questions as $q) {\n $index = 10 + array_search($q, $questions);\n if (! isset($data [$index . \"\" . $q])) {\n $data [$index . \"\" . $q] = '0.000';\n }\n }\n ksort($data);\n $current ++;\n $newtabledata [] = $data;\n }\n $tabledata = $newtabledata;\n $excelfilename = clean_filename($emarking->name . \"-agreement.xls\");\n emarking_save_data_to_excel($headers, $tabledata, $excelfilename, 1);\n}",
"public function getDatatable(){\n if(!checkRole(getUserGrade(2))){\n prepareBlockUserMessage();\n return back();\n }\n\n $records = DB::table('lms_class_series')\n ->select('lms_class_series.id','classes.name','lmsseries.title')\n ->join('classes','classes.id','=','lms_class_series.class_id')\n ->join('lmsseries','lmsseries.id','=','lms_class_series.series_id')\n ->where([\n ['lms_class_series.delete_status',0]\n ])\n ->orderBy('lms_class_series.id','desc');\n\n return Datatables::of($records)\n ->addColumn('action',function(){\n return null;\n })\n ->editColumn('name', function($records){\n return '<a href=\"'.PREFIX.'lms/class-content/detail/'.$records->id.'\">'.$records->name.'</a>';\n })\n ->removeColumn('id')\n ->make();\n }",
"public function getTables() {\n\t\t$rows = $this->adapter->getCol( \"SELECT class_name FROM db_class WHERE is_system_class = 'NO';\" );\n\t\treturn $rows;\n\t}",
"public function allResultTable($search_class, $search_term, $search_student)\n {\n // {\n\n // }\n if ($search_class == null || $search_term == null || $search_student == null) {\n $results = new Result();\n $students = new Student();\n $output = \"\";\n global $bot_mark, $bot_mark1, $bot_mark2, $bot_mark3,\n $mot_mark, $mot_mark1, $mot_mark2, $mot_mark3,\n $eot_mark, $eot_mark1, $eot_mark2, $eot_mark3,\n $paper_1_total, $paper_total1, $paper_total2, $paper_total3;\n\n if ($results->get()->count() > 0) {\n $output .= '\n <div class=\"card-body table-responsive p-0 elevation-2 animated flipInX\" style=\"height: 400px;\">\n <table id=\"RoleTable\" class=\"table table-bordered table-head-fixed text-nowrap\">\n <thead>\n <th colspan=\"2\">Subject</th>\n\n <th>Bot <br> out of ' . Exmset::find(1)->set_percentage . '</th>\n <th>Mot<br> out of ' . Exmset::find(2)->set_percentage . '</th>\n <th>Eot <br>out of ' . Exmset::find(3)->set_percentage . '</th>\n <th>Total Marks<br> of' . '100' . '</th>\n <th>Final Mark</th>\n <th>Final Grade</th>\n <th>Teacher Comment</th>\n </thead>\n <tbody>\n ';\n if ($results->where('student_id', ($search_student == null ? '' : $search_student))->where('schclass_id', 'like', '%' . ($search_class == null ? '' : $search_class) . '%')->where('term_id', 'like', '%' . ($search_term == null ? '' : $search_term) . '%')->count() > 0) {\n foreach ($results->where('student_id', ($search_student == null ? '' : $search_student))->where('schclass_id', 'like', '%' . ($search_class == null ? '' : $search_class) . '%')->where('term_id', 'like', '%' . ($search_term == null ? '' : $search_term) . '%')->get()->groupBy('term_id') as $ter_id => $ter_res) {\n $output .= '<tr class=\"bg-dark\"><td colspan=\"2\">' . $ter_res->where('term_id', $ter_id)->first()->term->name . '</td><td colspan=\"3\">' . $ter_res->first()->schclass->name . '</td><td colspan=\"4\">' . $ter_res->first()->student->name . '</td>\n .\n </tr>';\n\n // if($ter_res->where('schclass_id','like','%'.($search_class==null?'':$search_class).'%')->count()>0)\n // {\n\n foreach ($ter_res->groupBy('schclass_id') as $class_id => $class_res) {\n // $output.='<tr><td colspan=\"9\">'.$ter_res->where('schclass_id',$class_id)->first()->schclass->name.'</td></tr>';\n\n foreach ($class_res->groupBy('student_id') as $stud => $resul) {\n\n\n\n // $output.='<tr><td colspan=\"9\">'.$students->find($stud)->name.'</td></tr>';\n foreach ($resul->groupBy('subject_id') as $sub_id => $res) {\n\n // subject with three papers\n if ($res->where('subject_id', $sub_id)->first()->subject->papersIn()->count() == 3 && $res->first()->paper_id != null) {\n $output .= '\n <tr>\n <tr>\n <td rowspan=\"3\">' . $res->where('subject_id', $sub_id)->first()->subject->name . '</td>\n <td>';\n if ($res->count() > 0) {\n $output .= $res->first()->paper->paper_abbrev;\n } elseif ($res->count() == 0) {\n $output .= \"\";\n }\n $output .= '</td>\n <td>';\n\n if ($res->where('exmset_id', 1)->count() > 0) {\n $bot_mark = round(($res->where('exmset_id', 1)->first()->mark * Exmset::find(1)->set_percentage / 100), 2);\n $output .= $bot_mark;\n } elseif ($res->where('exmset_id', 1)->count() == 0) {\n $bot_mark = 0;\n $output .= \"\";\n }\n\n $output .= '</td>\n <td>';\n\n if ($res->where('exmset_id', 2)->count() > 0) {\n $mot_mark = round($res->where('exmset_id', 2)->first()->mark * round((Exmset::find(2)->set_percentage / 100), 2), 2);\n $output .= $mot_mark;\n } elseif ($res->where('exmset_id', 2)->count() == 0) {\n $mot_mark = 0;\n $output .= \"\";\n }\n\n $output .= '</td>\n <td>';\n\n if ($res->where('exmset_id', 3)->count() > 0) {\n\n $eot_mark = round(($res->where('exmset_id', 3)->first()->mark * Exmset::find(3)->set_percentage / 100), 2);\n $output .= $eot_mark;\n } elseif ($res->where('exmset_id', 3)->count() == 0) {\n $eot_mark = 0;\n $output .= \"\";\n }\n\n $output .= '</td>\n <td>';\n\n if ($res->count() > 0) {\n $paper_1_total = round(array_sum(array($bot_mark, $mot_mark, $eot_mark)), 2);\n $output .= $paper_1_total;\n } elseif ($res->count() == 0) {\n $paper_1_total = 0;\n $output .= \"\";\n }\n\n $output .= '</td>\n <td rowspan=\"3\">';\n if ($res->count() > 0) {\n $bot_mark1 = ($res->where('exmset_id', 1)->where('paper_id', $res->first()->paper_id)->count() > 0 ?\n round(($res->where('exmset_id', 1)->where('paper_id', $res->first()->paper_id)->first()->mark * Exmset::find(1)->set_percentage) / 100, 2)\n : 0);\n $mot_mark1 = ($res->where('exmset_id', 2)->where('paper_id', $res->first()->paper_id)->count() > 0 ?\n round(($res->where('exmset_id', 2)->where('paper_id', $res->first()->paper_id)->first()->mark * Exmset::find(2)->set_percentage) / 100, 2)\n : 0);\n $eot_mark1 = ($res->where('exmset_id', 3)->where('paper_id', $res->first()->paper_id)->count() > 0 ?\n round(($res->where('exmset_id', 3)->where('paper_id', $res->first()->paper_id)->first()->mark * Exmset::find(3)->set_percentage) / 100, 2)\n : 0);\n $paper_total1 = round(array_sum(array($bot_mark1, $mot_mark1, $eot_mark1)), 2);\n }\n if ($res->count() == 0) {\n $paper_total1 = 0;\n $output .= \"\";\n }\n if ($res->count() > 1) {\n $bot_mark2 = ($res->where('exmset_id', 1)->where('paper_id', $res[1]->paper_id)->count() > 0 ?\n round(($res->where('exmset_id', 1)->where('paper_id', $res[1]->paper_id)->first()->mark * Exmset::find(1)->set_percentage) / 100, 2)\n : 0);\n $mot_mark2 = ($res->where('exmset_id', 2)->where('paper_id', $res[1]->paper_id)->count() > 0 ?\n round(($res->where('exmset_id', 2)->where('paper_id', $res[1]->paper_id)->first()->mark * Exmset::find(2)->set_percentage) / 100, 2)\n : 0);\n $eot_mark2 = ($res->where('exmset_id', 3)->where('paper_id', $res[1]->paper_id)->count() > 0 ?\n round(($res->where('exmset_id', 3)->where('paper_id', $res[1]->paper_id)->first()->mark * Exmset::find(3)->set_percentage) / 100, 2)\n : 0);\n $paper_total2 = round(array_sum(array($bot_mark2, $mot_mark2, $eot_mark2)), 2);\n }\n if ($res->count() < 1) {\n $paper_total2 = 0;\n }\n if ($res->count() > 2) {\n $bot_mark3 = ($res->where('exmset_id', 1)->where('paper_id', $res->last()->paper_id)->count() > 0 ?\n round(($res->where('exmset_id', 1)->where('paper_id', $res->last()->paper_id)->first()->mark * Exmset::find(1)->set_percentage) / 100, 2)\n : 0);\n $mot_mark3 = ($res->where('exmset_id', 2)->where('paper_id', $res->last()->paper_id)->count() > 0 ?\n round(($res->where('exmset_id', 2)->where('paper_id', $res->last()->paper_id)->first()->mark * Exmset::find(2)->set_percentage) / 100, 2)\n : 0);\n $eot_mark3 = ($res->where('exmset_id', 3)->where('paper_id', $res->last()->paper_id)->count() > 0 ?\n round(($res->where('exmset_id', 3)->where('paper_id', $res->last()->paper_id)->first()->mark * Exmset::find(3)->set_percentage) / 100, 2)\n : 0);\n $paper_total3 = round(array_sum(array($bot_mark3, $mot_mark3, $eot_mark3)), 2);\n }\n if ($res->count() < 2) {\n $paper_total3 = 0;\n }\n $Subject_final_mark = round(array_sum(array($paper_total1, $paper_total2, $paper_total3)) / 3, 2);\n $output .= $Subject_final_mark;\n\n\n $output .= '</td>\n <td rowspan=\"3\">';\n if ($Subject_final_mark > 90) {\n $Subject_final_grade = \"A+\";\n $output .= $Subject_final_grade;\n }\n if ($Subject_final_mark >= 80 && $Subject_final_mark < 90) {\n $Subject_final_grade = \"A\";\n $output .= $Subject_final_grade;\n }\n if ($Subject_final_mark >= 75 && $Subject_final_mark < 80) {\n $Subject_final_grade = \"B+\";\n $output .= $Subject_final_grade;\n }\n if ($Subject_final_mark >= 70 && $Subject_final_mark < 75) {\n $Subject_final_grade = \"B\";\n $output .= $Subject_final_grade;\n }\n if ($Subject_final_mark >= 65 && $Subject_final_mark < 70) {\n $Subject_final_grade = \"C+\";\n $output .= $Subject_final_grade;\n }\n if ($Subject_final_mark >= 60 && $Subject_final_mark < 65) {\n $Subject_final_grade = \"C\";\n $output .= $Subject_final_grade;\n }\n if ($Subject_final_mark >= 55 && $Subject_final_mark < 60) {\n $Subject_final_grade = \"C\";\n $output .= $Subject_final_grade;\n }\n if ($Subject_final_mark >= 50 && $Subject_final_mark < 55) {\n $Subject_final_grade = \"C\";\n $output .= $Subject_final_grade;\n }\n if ($Subject_final_mark < 50) {\n $Subject_final_grade = \"F\";\n $output .= $Subject_final_grade;\n }\n $output .= '</td>\n <td rowspan=\"3\">\n ' . ($Subject_final_grade !== null ? $this->teacherComment($Subject_final_grade) : null) . '\n </td>\n\n </tr>\n <tr>\n <td>';\n if ($res->count() > 1) {\n $output .= $res[1]->paper->paper_abbrev;\n } elseif ($res->count() < 1) {\n $output .= \"\";\n }\n $output .= '</td>\n <td>';\n if ($res->where('exmset_id', 1)->count() > 1) {\n $bot_mark = round(($res->where('exmset_id', 1)->nth(2, 1)->first()->mark * Exmset::find(1)->set_percentage / 100), 2);\n $output .= $bot_mark;\n } elseif ($res->where('exmset_id', 1)->count() < 1) {\n $bot_mark = 0;\n $output .= \"\";\n }\n $output .= '</td>\n <td>';\n if ($res->where('exmset_id', 2)->count() > 1) {\n $mot_mark = round(($res->where('exmset_id', 2)->nth(2, 1)->first()->mark * Exmset::find(2)->set_percentage / 100), 2);\n $output .= $mot_mark;\n } elseif ($res->where('exmset_id', 2)->count() < 1) {\n $mot_mark = 0;\n $output .= \"\";\n }\n $output .= '</td>\n <td>';\n if ($res->where('exmset_id', 3)->count() > 1) {\n $eot_mark = round(($res->where('exmset_id', 3)->nth(2, 1)->first()->mark * Exmset::find(3)->set_percentage / 100), 2);\n $output .= $eot_mark;\n } elseif ($res->where('exmset_id', 3)->count() < 1) {\n $eot_mark = 0;\n $output .= \"\";\n }\n $output .= '</td>\n <td>';\n if ($res->count() > 1) {\n $paper_2_total = round(array_sum(array($bot_mark, $mot_mark, $eot_mark)), 2);\n $output .= $paper_2_total;\n } elseif ($res->count() < 1) {\n $paper_2_total = 0;\n $output .= \"\";\n }\n $output .= '</td>\n </tr>\n <tr>\n <td>';\n if ($res->count() > 2) {\n $output .= $res->last()->paper->paper_abbrev;\n } elseif ($res->count() < 2) {\n $output .= \"\";\n }\n $output .= '</td>\n <td>';\n if ($res->where('exmset_id', 1)->count() > 2) {\n $bot_mark = round(($res->where('exmset_id', 1)->last()->mark * Exmset::find(1)->set_percentage / 100), 2);\n $output .= $bot_mark;\n } elseif ($res->where('exmset_id', 1)->count() < 2) {\n $bot_mark = 0;\n $output .= \"\";\n }\n $output .= '</td>\n <td>';\n if ($res->where('exmset_id', 2)->count() > 2) {\n $mot_mark = round(($res->where('exmset_id', 2)->last()->mark * Exmset::find(2)->set_percentage / 100), 2);\n $output .= $mot_mark;\n } elseif ($res->where('exmset_id', 2)->count() < 2) {\n $mot_mark = 0;\n $output .= \"\";\n }\n $output .= '</td>\n <td>';\n if ($res->where('exmset_id', 3)->count() > 2) {\n $eot_mark = round(($res->where('exmset_id', 3)->last()->mark * Exmset::find(3)->set_percentage / 100), 2);\n $output .= $eot_mark;\n } elseif ($res->where('exmset_id', 3)->count() < 2) {\n $eot_mark = 0;\n $output .= \"\";\n }\n $output .= '</td>\n <td>';\n if ($res->count() > 2) {\n $paper_3_total = round(array_sum(array($bot_mark, $mot_mark, $eot_mark)), 2);\n $output .= $paper_3_total;\n } elseif ($res->count() < 2) {\n $paper_3_total = 0;\n $output .= \"\";\n }\n $output .= '</td>\n </tr>\n </tr>';\n }\n\n\n\n // subject with two papers\n\n elseif ($res->where('subject_id', $sub_id)->first()->subject->papersIn()->count() == 2 && $res->where('subject_id', $sub_id)->first()->paper_id != null) {\n $output .= '\n <tr>\n <tr>\n <td rowspan=\"2\">' . $res->where('subject_id', $sub_id)->first()->subject->name . '</td>\n <td>';\n if ($res->count() > 0) {\n $output .= $res->first()->paper->paper_abbrev;\n } elseif ($res->count() == 0) {\n $output .= \"\";\n }\n $output .= '</td>\n <td>';\n\n if ($res->where('exmset_id', 1)->count() > 0) {\n $bot_mark = round(($res->where('exmset_id', 1)->first()->mark * Exmset::find(1)->set_percentage / 100), 2);\n $output .= $bot_mark;\n } elseif ($res->where('exmset_id', 1)->count() == 0) {\n $bot_mark = 0;\n $output .= \"\";\n }\n\n $output .= '</td>\n <td>';\n\n if ($res->where('exmset_id', 2)->count() > 0) {\n $mot_mark = round($res->where('exmset_id', 2)->first()->mark * round((Exmset::find(2)->set_percentage / 100), 2), 2);\n $output .= $mot_mark;\n } elseif ($res->where('exmset_id', 2)->count() == 0) {\n $mot_mark = 0;\n $output .= \"\";\n }\n\n $output .= '</td>\n <td>';\n\n if ($res->where('exmset_id', 3)->count() > 0) {\n\n $eot_mark = round(($res->where('exmset_id', 3)->first()->mark * Exmset::find(3)->set_percentage / 100), 2);\n $output .= $eot_mark;\n } elseif ($res->where('exmset_id', 3)->count() == 0) {\n $eot_mark = 0;\n $output .= \"\";\n }\n\n $output .= '</td>\n <td>';\n\n if ($res->count() > 0) {\n $paper_1_total = round(array_sum(array($bot_mark, $mot_mark, $eot_mark)), 2);\n $output .= $paper_1_total;\n } elseif ($res->count() == 0) {\n $paper_1_total = 0;\n $output .= \"\";\n }\n\n $output .= '</td>\n <td rowspan=\"2\">';\n if ($res->count() > 0) {\n $bot_mark1 = ($res->where('exmset_id', 1)->where('paper_id', $res->first()->paper_id)->count() > 0 ?\n round(($res->where('exmset_id', 1)->where('paper_id', $res->first()->paper_id)->first()->mark * Exmset::find(1)->set_percentage) / 100, 2)\n : 0);\n $mot_mark1 = ($res->where('exmset_id', 2)->where('paper_id', $res->first()->paper_id)->count() > 0 ?\n round(($res->where('exmset_id', 2)->where('paper_id', $res->first()->paper_id)->first()->mark * Exmset::find(2)->set_percentage) / 100, 2)\n : 0);\n $eot_mark1 = ($res->where('exmset_id', 3)->where('paper_id', $res->first()->paper_id)->count() > 0 ?\n round(($res->where('exmset_id', 3)->where('paper_id', $res->first()->paper_id)->first()->mark * Exmset::find(3)->set_percentage) / 100, 2)\n : 0);\n $paper_total1 = round(array_sum(array($bot_mark1, $mot_mark1, $eot_mark1)), 2);\n }\n if ($res->count() == 0) {\n $paper_total1 = 0;\n $output .= \"\";\n }\n\n if ($res->count() > 1) {\n $bot_mark3 = ($res->where('exmset_id', 1)->where('paper_id', $res->last()->paper_id)->count() > 0 ?\n round(($res->where('exmset_id', 1)->where('paper_id', $res->last()->paper_id)->first()->mark * Exmset::find(1)->set_percentage) / 100, 2)\n : 0);\n $mot_mark3 = ($res->where('exmset_id', 2)->where('paper_id', $res->last()->paper_id)->count() > 0 ?\n round(($res->where('exmset_id', 2)->where('paper_id', $res->last()->paper_id)->first()->mark * Exmset::find(2)->set_percentage) / 100, 2)\n : 0);\n $eot_mark3 = ($res->where('exmset_id', 3)->where('paper_id', $res->last()->paper_id)->count() > 0 ?\n round(($res->where('exmset_id', 3)->where('paper_id', $res->last()->paper_id)->first()->mark * Exmset::find(3)->set_percentage) / 100, 2)\n : 0);\n $paper_total2 = round(array_sum(array($bot_mark3, $mot_mark3, $eot_mark3)), 2);\n }\n if ($res->count() < 2) {\n $paper_total2 = 0;\n }\n $Subject_final_mark = round(array_sum(array($paper_total1, $paper_total2)) / 2, 2);\n $output .= $Subject_final_mark;\n\n\n $output .= '</td>\n <td rowspan=\"2\">';\n if ($Subject_final_mark > 90) {\n $Subject_final_grade = \"A+\";\n $output .= $Subject_final_grade;\n }\n if ($Subject_final_mark >= 80 && $Subject_final_mark < 90) {\n $Subject_final_grade = \"A\";\n $output .= $Subject_final_grade;\n }\n if ($Subject_final_mark >= 75 && $Subject_final_mark < 80) {\n $Subject_final_grade = \"B+\";\n $output .= $Subject_final_grade;\n }\n if ($Subject_final_mark >= 70 && $Subject_final_mark < 75) {\n $Subject_final_grade = \"B-\";\n $output .= $Subject_final_grade;\n }\n if ($Subject_final_mark >= 65 && $Subject_final_mark < 70) {\n $Subject_final_grade = \"C+\";\n $output .= $Subject_final_grade;\n }\n if ($Subject_final_mark >= 60 && $Subject_final_mark < 65) {\n $Subject_final_grade = \"C-\";\n $output .= $Subject_final_grade;\n }\n if ($Subject_final_mark >= 55 && $Subject_final_mark < 60) {\n $Subject_final_grade = \"D+\";\n $output .= $Subject_final_grade;\n }\n if ($Subject_final_mark >= 50 && $Subject_final_mark < 55) {\n $Subject_final_grade = \"D-\";\n $output .= $Subject_final_grade;\n }\n if ($Subject_final_mark < 50) {\n $Subject_final_grade = \"F\";\n $output .= $Subject_final_grade;\n }\n $output .= '</td>\n <td rowspan=\"2\">\n ' . ($Subject_final_grade !== null ? $this->teacherComment($Subject_final_grade) : null) . '\n\n </td>\n\n </tr>\n\n <tr>\n <td>';\n if ($res->count() > 1) {\n $output .= $res->last()->paper->paper_abbrev;\n } elseif ($res->count() < 1) {\n $output .= \"\";\n }\n $output .= '</td>\n <td>';\n if ($res->where('exmset_id', 1)->count() > 1) {\n $bot_mark = round(($res->where('exmset_id', 1)->last()->mark * Exmset::find(1)->set_percentage / 100), 2);\n $output .= $bot_mark;\n } elseif ($res->where('exmset_id', 1)->count() < 1) {\n $bot_mark = 0;\n $output .= \"\";\n }\n $output .= '</td>\n <td>';\n if ($res->where('exmset_id', 2)->count() > 1) {\n $mot_mark = round(($res->where('exmset_id', 2)->last()->mark * Exmset::find(2)->set_percentage / 100), 2);\n $output .= $mot_mark;\n } elseif ($res->where('exmset_id', 2)->count() < 1) {\n $mot_mark = 0;\n $output .= \"\";\n }\n $output .= '</td>\n <td>';\n if ($res->where('exmset_id', 3)->count() > 1) {\n $eot_mark = round(($res->where('exmset_id', 3)->last()->mark * Exmset::find(3)->set_percentage / 100), 2);\n $output .= $eot_mark;\n } elseif ($res->where('exmset_id', 3)->count() < 1) {\n $eot_mark = 0;\n $output .= \"\";\n }\n $output .= '</td>\n <td>';\n if ($res->count() > 1) {\n $paper_3_total = round(array_sum(array($bot_mark, $mot_mark, $eot_mark)), 2);\n $output .= $paper_3_total;\n } elseif ($res->count() < 1) {\n $paper_3_total = 0;\n $output .= \"\";\n }\n $output .= '</td>\n </tr>\n </tr>';\n } elseif ($res->where('subject_id', $sub_id)->first()->subject->papersIn()->count() == 0 && $res->where('subject_id', $sub_id)->first()->paper_id != null) {\n $output .= '<h3 class=\"display-1\">' . $res->where('subject_id', $sub_id)->first()->subject->name . '</h3>';\n } elseif ($res->where('subject_id', $sub_id)->first()->subject->papersIn()->count() > 0 && $res->where('subject_id', $sub_id)->first()->paper_id == null) {\n\n $output .= '<tr><tr>\n <td colspan=\"2\">';\n if ($res->count() > 0) {\n $output .= $res->first()->subject->name;\n } elseif ($res->count() < 0) {\n $output .= \"\";\n }\n\n $output .= '</td>\n <td>';\n if ($res->where('exmset_id', 1)->count() > 0) {\n $bot_mark = round(($res->where('exmset_id', 1)->first()->mark * Exmset::find(1)->set_percentage / 100), 2);\n $output .= $bot_mark;\n } elseif ($res->where('exmset_id', 1)->count() == 0) {\n $bot_mark = 0;\n $output .= \"\";\n }\n $output .= '</td>\n <td>';\n if ($res->where('exmset_id', 2)->count() > 0) {\n $mot_mark = round(($res->where('exmset_id', 2)->first()->mark * Exmset::find(2)->set_percentage / 100), 2);\n $output .= $mot_mark;\n } elseif ($res->where('exmset_id', 2)->count() == 0) {\n $mot_mark = 0;\n $output .= \"\";\n }\n $output .= '</td>\n <td>';\n if ($res->where('exmset_id', 3)->count() > 0) {\n $eot_mark = round(($res->where('exmset_id', 3)->first()->mark * Exmset::find(3)->set_percentage / 100), 2);\n $output .= $eot_mark;\n } elseif ($res->where('exmset_id', 3)->count() == 0) {\n $eot_mark = 0;\n $output .= \"\";\n }\n $output .= '</td>\n <td>';\n if ($res->count() > 0) {\n $total_mark = round((array_sum(array($bot_mark, $mot_mark, $eot_mark))), 2);\n $output .= $total_mark;\n }\n\n $output .= '</td>\n <td>';\n if ($res->count() > 0) {\n $total_mark = round((array_sum(array($bot_mark, $mot_mark, $eot_mark))), 2);\n $output .= $total_mark;\n }\n\n $output .= '</td>\n <td>';\n if ($res->count() > 0) {\n $total_mark = round((array_sum(array($bot_mark, $mot_mark, $eot_mark))), 2);\n if ($total_mark > 90) {\n $Subject_final_grade = \"A+\";\n $output .= $Subject_final_grade;\n }\n if ($total_mark >= 80 && $total_mark < 90) {\n $Subject_final_grade = \"A\";\n $output .= $Subject_final_grade;\n }\n if ($total_mark >= 75 && $total_mark < 80) {\n $Subject_final_grade = \"B+\";\n $output .= $Subject_final_grade;\n }\n if ($total_mark >= 70 && $total_mark < 75) {\n $Subject_final_grade = \"B-\";\n $output .= $Subject_final_grade;\n }\n if ($total_mark >= 65 && $total_mark < 70) {\n $Subject_final_grade = \"C+\";\n $output .= $Subject_final_grade;\n }\n if ($total_mark >= 60 && $total_mark < 65) {\n $Subject_final_grade = \"C-\";\n $output .= $Subject_final_grade;\n }\n if ($total_mark >= 55 && $total_mark < 60) {\n $Subject_final_grade = \"D+\";\n $output .= $Subject_final_grade;\n }\n if ($total_mark >= 50 && $total_mark < 55) {\n $Subject_final_grade = \"D-\";\n $output .= $Subject_final_grade;\n }\n if ($total_mark < 50) {\n $Subject_final_grade = \"F\";\n $output .= $Subject_final_grade;\n }\n }\n\n $output .= '</td>\n <td>' . ($Subject_final_grade !== null ? $this->teacherComment($Subject_final_grade) : null) . '</td>\n ';\n } else {\n $output .= '\n <tr><tr>\n <td colspan=\"2\">' . $res->first()->subject->name . '</td>';\n if ($res->where('exmset_id', 1)->count() > 0) {\n $bot_mark = $res->where('exmset_id', 1)->first()->mark * Exmset::find(1)->set_percentage / 100;\n $output .= '<td>' . $bot_mark . '</td>';\n } elseif ($res->where('exmset_id', 1)->count() == 0) {\n $bot_mark = 0;\n $output .= '<td>' . null . '</td>';\n }\n if ($res->where('exmset_id', 2)->count() > 0) {\n $mot_mark = $res->where('exmset_id', 2)->first()->mark * Exmset::find(2)->set_percentage / 100;\n $output .= '<td>' . $mot_mark . '</td>';\n } elseif ($res->where('exmset_id', 2)->count() == 0) {\n $mot_mark = 0;\n $output .= '<td>' . null . '</td>';\n }\n if ($res->where('exmset_id', 3)->count() > 0) {\n $eot_mark = $res->where('exmset_id', 3)->first()->mark * Exmset::find(3)->set_percentage / 100;\n $output .= '<td>' . $eot_mark . '</td>';\n } elseif ($res->where('exmset_id', 3)->count() == 0) {\n $eot_mark = 0;\n $output .= '<td>' . null . '</td>';\n }\n $final_total = round(array_sum(array($bot_mark, $mot_mark, $eot_mark)), 2);\n\n $output .= '<td>' . round(array_sum($res->pluck('calculate_mark')->toArray()), 2) . '</td>';\n $output .= '<td>' . $final_total . '</td>';\n $output .= '<td>';\n if ($final_total > 90) {\n $final_grade = \"A+\";\n $output .= '<span>' . $final_grade . '</span>';\n } elseif ($final_total > 90) {\n $final_grade = \"A+\";\n $output .= '<span>' . $final_grade . '</span>';\n } elseif ($final_total >= 80 && $final_total < 90) {\n $final_grade = \"A\";\n $output .= '<span>' . $final_grade . '</span>';\n } elseif ($final_total >= 75 && $final_total < 80) {\n $final_grade = \"B+\";\n $output .= '<span>' . $final_grade . '</span>';\n } elseif ($final_total >= 70 && $final_total < 75) {\n $final_grade = \"B-\";\n $output .= '<span>' . $final_grade . '</span>';\n } elseif ($final_total >= 65 && $final_total < 70) {\n $final_grade = \"C+\";\n $output .= '<span>' . $final_grade . '</span>';\n } elseif ($final_total >= 60 && $final_total < 65) {\n $final_grade = \"C-\";\n $output .= '<span>' . $final_grade . '</span>';\n } elseif ($final_total >= 55 && $final_total < 60) {\n $final_grade = \"D+\";\n $output .= '<span>' . $final_grade . '</span>';\n } elseif ($final_total >= 50 && $final_total < 55) {\n $final_grade = \"D-\";\n $output .= '<span>' . $final_grade . '</span>';\n } elseif ($final_total < 50) {\n $final_grade = \"F\";\n $output .= '<span>' . $final_grade . '</span>';\n }\n $output .= '</td><td>';\n $output .= ($final_grade !== null ? $this->teacherComment($final_grade) : null);\n $output .= '</td>';\n\n $output .= '</tr></tr>';\n }\n }\n }\n }\n // }\n // elseif($ter_res->where('schclass_id','like','%'.($search_class==null?'':$search_class).'%')->count()==0)\n // {\n // $output.='<tr>\n // <td colspan=\"9\">\n // No information for this class\n // </td>\n\n // </tr>';\n // }\n\n\n\n }\n } elseif ($results->where('term_id', 'like', '%' . ($search_term == null ? '' : $search_term) . '%')->count() == 0) {\n $output .= '<tr>\n <td colspan=\"9\">\n No information for results of student\n </td>\n\n </tr>';\n }\n\n\n $output .= '\n </tbody>\n <tfooter>\n <th colspan=\"2\">Subject</th>\n <th>Bot <br> out of ' . Exmset::find(1)->set_percentage . '</th>\n <th>Mot<br> out of ' . Exmset::find(2)->set_percentage . '</th>\n <th>Eot <br>out of ' . Exmset::find(3)->set_percentage . '</th>\n <th>Total Marks<br> of' . '100' . '</th>\n <th>Final Mark</th>\n <th>Final Grade</th>\n <th>Teacher Comment</th>\n </tfooter>\n </table>\n </div>\n ';\n } elseif ($results->get()->count() == 0) {\n $output .= '<div class=\"\"display-1>\n <p>Student not existing</p>\n </div>';\n }\n\n return $output;\n }\n }",
"private function _fetch_table()\n {\n if ($this->table_name == null) {\n $this->table_name = preg_replace('/(_m|_model)?$/', '', strtolower(get_class($this)));\n }\n }",
"private function _fetch_table()\n {\n if ($this->table_name == null) {\n $this->table_name = preg_replace('/(_m|_model)?$/', '', strtolower(get_class($this)));\n }\n }",
"public function getListOfTables() {}",
"public function getTable(): Table;",
"public function makeTableur()\n {\n return $this->setDocumentPropertiesWithMetas(new Spreadsheet());\n }",
"public function fetchClazz(){\n\t\t\t$query = $this->connection()->prepare(\"SELECT * FROM clazz\");\n\t\t\t$query->execute();\n\t\t\treturn $query->fetchAll();\n\t\t}",
"function getHighlightInfo(){\n\t\t$sql=\"SELECT sk.MaSK, sk.TieuDe, sk.HinhSK FROM sukien sk ORDER BY sk.SoLuotXem DESC limit 6\";\n\t\t$this->setQuery($sql);\n\t\treturn $this->loadAllRows();\n\t}",
"public function getTable($download=false){\n $this->getWorksheet($this->fileName, $download);\n // print_r ($this->worksheet);\n // $nr = count(array_filter($this->worksheet)); //number of rows\n // echo $nr.'Opps'. $this->totalRow;\n $html_tb ='';\n $html_tb .='<table class=\"table\" style=\"font-size:10px;\" border=\"1\"><tr><th>SN</th><th>'. implode('</th><th>', $this->unfilteredWorksheet[1]) .'</th></tr>';\n // $html_tb .='<table class=\"table\" style=\"font-size:10px;\" border=\"1\">';\n $startNum = ($this->currentPage == 1?$startNum = 2:$this->minPageNum);\n for($i=$startNum; $i<=$this->maxPageNum; $i++){\n if ($i > $this->totalRow){\n break;\n }\n $html_tb .='<tr><td>'.$i.'</td><td>'. implode('</td><td>', $this->worksheet[$i]) .'</td></tr>';\n }\n $html_tb .='</table>';\n\n return $html_tb;\n }",
"function emarking_download_excel_markers_training($emarking) {\n global $DB;\n $csvsql = \"\n\t\tSELECT cc.fullname AS course,\n\t\t\te.name AS exam,\n s.id AS id,\n s.student,\n d.id AS draft,\n\t\t\tCONCAT(u2.id,'-',cr.description) as description,\n l.score as maxscore,\n\t\t\tIFNULL(l.score, 0) AS score,\n\t\t\tIFNULL(c.bonus, 0) AS bonus,\n\t\t\tIFNULL(l.score,0) + IFNULL(c.bonus,0) AS totalscore,\n\t\t\td.grade,\n\t\t\tu2.id as markerid,\n\t\t\tu2.idnumber,\n\t\t\tu2.lastname,\n\t\t\tu2.firstname\n\t\tFROM {emarking} e\n\t\tINNER JOIN {emarking_submission} s ON (e.id = :emarking AND e.id = s.emarking)\n\t\tINNER JOIN {emarking_draft} d ON (d.submissionid = s.id AND d.qualitycontrol=0)\n INNER JOIN {course} cc ON (cc.id = e.course)\n\t\tINNER JOIN {emarking_page} p ON (p.submission = s.id)\n\t\tLEFT JOIN {emarking_comment} c ON (c.page = p.id AND d.id = c.draft)\n LEFT JOIN {user} u2 ON (c.markerid = u2.id)\n\t\tLEFT JOIN {gradingform_rubric_levels} l ON (c.levelid = l.id)\n\t\tLEFT JOIN {gradingform_rubric_criteria} cr ON (cr.id = l.criterionid)\n WHERE c.levelid > 0 AND c.criterionid > 0\n\t\tORDER BY cc.fullname ASC, e.name ASC, id, draft, cr.sortorder\n \";\n // Get data and generate a list of questions.\n $rows = $DB->get_recordset_sql($csvsql, array(\n 'emarking' => $emarking->id));\n $questions = array();\n foreach ($rows as $row) {\n if (array_search($row->description, $questions) === false && $row->description) {\n $questions [] = $row->description;\n }\n }\n $current = 0;\n $laststudent = 0;\n $headers = array(\n '00course' => get_string('course'),\n '01exam' => get_string('exam', 'mod_emarking'),\n '02examid' => get_string('exam', 'mod_emarking'));\n $tabledata = array();\n $data = null;\n $rows = $DB->get_recordset_sql($csvsql, array(\n 'emarking' => $emarking->id));\n $studentname = '';\n $lastrow = null;\n foreach ($rows as $row) {\n $index = 10 + array_search($row->description, $questions);\n $keyquestion = $index . \"\" . $row->description;\n if (! isset($headers [$keyquestion])) {\n $headers [$keyquestion] = $row->description;\n }\n if ($laststudent != $row->id) {\n if ($laststudent > 0) {\n $tabledata [$studentname] = $data;\n $current ++;\n }\n $data = array(\n '00course' => $row->course,\n '01exam' => $row->exam,\n '02examid' => $row->id,\n $keyquestion => $row->totalscore,\n '99grade' => $row->grade);\n $laststudent = intval($row->id);\n $studentname = $row->id;\n } else {\n $data [$keyquestion] = $row->totalscore;\n }\n $lastrow = $row;\n }\n $studentname = $lastrow->id;\n $tabledata [$studentname] = $data;\n $headers ['99grade'] = get_string('grade');\n ksort($tabledata);\n $current = 0;\n $newtabledata = array();\n foreach ($tabledata as $data) {\n foreach ($questions as $q) {\n $index = 10 + array_search($q, $questions);\n if (! isset($data [$index . \"\" . $q])) {\n $data [$index . \"\" . $q] = '0.000';\n }\n }\n ksort($data);\n $current ++;\n $newtabledata [] = $data;\n }\n $tabledata = $newtabledata;\n $excelfilename = clean_filename($emarking->name . \"-markers.xls\");\n emarking_save_data_to_excel($headers, $tabledata, $excelfilename, 2);\n}",
"function getMarksheet(){\n \n //get student datails to print in marksheet\n $unique_id1 = $this->session->userdata('unique_id1');\n $session1 = $this->session->userdata('session1');\n $q = $this->db->where('unique_id',$unique_id1)\n ->get('userinfo');\n \n\t if( $q->num_rows()>0 ){\n\t\t\t\t//login valid\n\t\t\t\t$name1 = $q->row('name');\n\t\t\t\t$contact_number1 = $q->row('contact_number');\n\t\t\t\t$city1 = $q->row('city');\n\t\t\t\t$state1 =\t$q->row('state');\n\t\t\t\t$address1 = $q->row('address');\n\t\t\t\t$school_name1 = $q->row('school_name');\n\t\t\t\t$father_name1 = $q->row('father_name');\n\t\t\t\t$enroll_no1 = $q->row('enroll_no');\n\t\t\t\t$class11 = $q->row('class1');\n\t\t\t\t$profile_img_path1 = $q->row('profile_img_path');\n\t\t\t\t$sign_img_path1 = $q->row('sign_img_path');\n\t\t\t\t$parent_sign_path1 = $q->row('parent_sign_path');\n\t\t\t\t$dob1 = $q->row('dob');\n\t\t\t\t$gender1 = $q->row('gender');\n\t\t\t\t$aadhar_no1 = $q->row('aadhar_no');\n\t\t\t\t$section1 = $q->row('section');\n\t\t\t\t\n\t\t\t\t$this->session->set_userdata('name1',$name1);\n\t\t\t\t$this->session->set_userdata('contact_number1',$contact_number1);\n\t\t\t\t$this->session->set_userdata('city1',$city1);\n\t\t\t\t$this->session->set_userdata('state1',$state1);\n\t\t\t\t$this->session->set_userdata('address1',$address1);\n\t\t\t\t$this->session->set_userdata('school_name1',$school_name1);\n\t\t\t\t$this->session->set_userdata('father_name1',$father_name1);\n\t\t\t\t$this->session->set_userdata('enroll_no1',$enroll_no1);\n\t\t\t\t$this->session->set_userdata('class11',$class11);\n\t\t\t\t$this->session->set_userdata('section1',$section1);\n $this->session->set_userdata('profile_img_path1',$profile_img_path1);\n $this->session->set_userdata('dob1',$dob1);\n\t\t\t\t$this->session->set_userdata('sign_img_path1',$sign_img_path1);\n\t\t\t\t$this->session->set_userdata('aadhar_no1',$aadhar_no1);\n\t\t\t\t$this->session->set_userdata('parent_sign_path1',$parent_sign_path1);\n\t\t\t\t$this->session->set_userdata('gender1',$gender1);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//get school details to display in marksheet\n\t\t\t\t$school_name = $this->session->userdata('school_name');\n\t $q = $this->db->like('school_name',$school_name)\n\t\t\t\t\t\t->get('userinfo');\n\n\t\t\tif( $q->num_rows()>0 ){\n\t\t\t\t//login valid\n\t\t\t\t$contact_number2 = $q->row('contact_number');\n\t\t\t\t$email2 = $q->row('email');\n\t\t\t\t$city2 = $q->row('city');\n\t\t\t\t$state2 =\t$q->row('state');\n\t\t\t\t$address2 = $q->row('address');\n\t\t\t\t$profile_img_path2 = $q->row('profile_img_path');\n\t\t\t\t\n\t\t\t\t$this->session->set_userdata('contact_number2',$contact_number2);\n\t\t\t\t$this->session->set_userdata('email2',$email2);\n\t\t\t\t$this->session->set_userdata('city2',$city2);\n\t\t\t\t$this->session->set_userdata('state2',$state2);\n\t\t\t\t$this->session->set_userdata('address2',$address2);\n\t\t\t\t$this->session->set_userdata('profile_img_path2',$profile_img_path2);\n\t\t\t\t\n\t\t\t}\n \n $q = $this->db->where('student_id',$unique_id1)\n\t\t ->where('session1',$session1)\n\t\t ->get('marks_table');\n\t\t \n\t\t $result = $q->result();\n\t\t $this->load->view('view_marksheet_operator',['dblist'=>$result]);\n \n\t }\n }",
"abstract protected function _listTables();",
"function getItemTableName() ;",
"function get_gmlas_to_gml_mapping_table($class) {\n\t\t$sql = \"SELECT o_table, o_column, t_table, t_column, t_data_type, regel FROM xplankonverter.mappingtable_gmlas_to_gml WHERE t_table = '\" . $class . \"';\";\n\t\t$ret = $this->pgdatabase->execSQL($sql, 4, 0);\n\t\t$result = pg_fetch_all($ret[1]);\n\t\treturn $result;\n\t}",
"function FetchIT()\n {\n $sql=\"SELECT * FROM INVT_T_INSP_HEAD\";\n return $this->db->query($sql, $return_object = TRUE)->result_array(); \n }",
"public function MondayClassDetail($school_id,$teacherid,$this_week_fst,$tablename)\n\t {\n\t\t//GROUP_CONCAT(schoolnew_section_group.section SEPARATOR \",\") as section\n\t\t$query =\"select concat(class_id,'-',section,'-',short_name)as classes,subjects,master_classid,class_id,section,PT,PS,status from \n $tablename a\n\t\tleft join teacher_subjects on a.PS=teacher_subjects.id\n\t\twhere school_id='\".$school_id.\"' and PT='\".$teacherid.\"' and days=1 and timetable_date='\".$this_week_fst.\"'\n \";\n $result = $this->db->query($query)->result();\n return $result;\n\t }",
"public function fetchClassArm(){\t\t\t\n\t\t\t$query = $this->connection()->prepare(\"SELECT * FROM class_arm\");\n\t\t\t$query->execute();\n\t\t\treturn $query->fetchAll();\n\t\t}",
"public function getTable() { return( $this->_table ); }",
"function getmarked_timetable($school_id,$classid,$sectionid,$this_week_fst)\n\t{\n\t\t$this->db->select('count(PT)as count');\n $this->db->from('schoolnew_timetable_weekly_classwise');\n $this->db->where('school_id',$school_id);\n\t\t$this->db->where('class_id',$classid);\n\t\t$this->db->where('section',$sectionid);\n\t\t$this->db->where('timetable_date',$this_week_fst);\n $query = $this->db->get();\n $result = $query->result();\n return $result;\n\t}",
"public function fetchAll(){\r\n$table=$this->getTable();\r\nreturn $this->fetch_array($this->query(\"SELECT * FROM {$table}\"));\r\n}",
"function emarking_download_excel($emarking, $context=null) {\n global $DB, $CFG;\n // Validate that we have a rubric associated\n list($gradingmanager, $gradingmethod, $definition, $rubriccontroller) = \n \temarking_validate_rubric($context, false, false);\n // Calculate levels indexes in forced formative feedback (no grades)\n $levelsindex = array();\n foreach($definition->rubric_criteria as $crit) {\n \t$total = count($crit['levels']);\n \t$current = 0;\n \tforeach($crit['levels'] as $lvl) {\n \t\t$current++;\n \t\t$levelsindex[$lvl['id']] = $current; \n \t\t\n \t}\n }\n // Retrieve marking\n $csvsql = \"\n\t\tSELECT cc.fullname AS course,\n\t\t\te.name AS exam,\n\t\t\tu.id,\n\t\t\tu.idnumber,\n\t\t\tu.lastname,\n\t\t\tu.firstname,\n\t\t\tcr.id criterionid,\n\t\t\tcr.description,\n\t\t\tl.id levelid,\n\t\t\tIFNULL(l.score, 0) AS score,\n\t\t\tIFNULL(c.bonus, 0) AS bonus,\n\t\t\tIFNULL(l.score,0) + IFNULL(c.bonus,0) AS totalscore,\n\t\t\td.grade\n\t\tFROM {emarking} e\n\t\tINNER JOIN {emarking_submission} s ON (e.id = :emarkingid AND e.id = s.emarking)\n\t\tINNER JOIN {emarking_draft} d ON (d.submissionid = s.id AND d.qualitycontrol=0)\n INNER JOIN {course} cc ON (cc.id = e.course)\n\t\tINNER JOIN {user} u ON (s.student = u.id)\n\t\tINNER JOIN {emarking_page} p ON (p.submission = s.id)\n\t\tLEFT JOIN {emarking_comment} c ON (c.page = p.id AND d.id = c.draft AND c.levelid > 0)\n\t\tLEFT JOIN {gradingform_rubric_levels} l ON (c.levelid = l.id)\n\t\tLEFT JOIN {gradingform_rubric_criteria} cr ON (cr.id = l.criterionid)\n\t\tORDER BY cc.fullname ASC, e.name ASC, u.lastname ASC, u.firstname ASC, cr.sortorder\";\n // Get data and generate a list of questions.\n $rows = $DB->get_recordset_sql($csvsql, array(\n 'emarkingid' => $emarking->id));\n // Make a list of all criteria\n $questions = array();\n foreach ($rows as $row) {\n if (array_search($row->description, $questions) === false && $row->description) {\n $questions [] = $row->description;\n }\n }\n // Starting the loop\n $current = 0;\n $laststudent = 0;\n // Basic headers that go everytime\n $headers = array(\n '00course' => get_string('course'),\n '01exam' => get_string('exam', 'mod_emarking'),\n '02idnumber' => get_string('idnumber'),\n '03lastname' => get_string('lastname'),\n '04firstname' => get_string('firstname'));\n $tabledata = array();\n $data = null;\n // Get dataset again\n $rows = $DB->get_recordset_sql($csvsql, array(\n 'emarkingid' => $emarking->id));\n // Now iterate through students\n $studentname = '';\n $lastrow = null;\n foreach ($rows as $row) {\n \t// The index allows to sort final grade at the end (99grade)\n $index = 10 + array_search($row->description, $questions);\n $keyquestion = $index . \"\" . $row->description;\n // If the index is not there yet we create it\n if (! isset($headers [$keyquestion]) && $row->description) {\n $headers [$keyquestion] = $row->description;\n }\n // If we changed student\n if ($laststudent != $row->id) {\n if ($laststudent > 0) {\n $tabledata [$studentname] = $data;\n $current ++;\n }\n $data = array(\n '00course' => $row->course,\n '01exam' => $row->exam,\n '02idnumber' => $row->idnumber,\n '03lastname' => $row->lastname,\n '04firstname' => $row->firstname);\n // If it's not formative feedback, add the grade as a final column\n if(!isset($CFG->emarking_formativefeedbackonly) || !$CFG->emarking_formativefeedbackonly) {\n \t$data['99grade'] = $row->grade;\n }\n $laststudent = intval($row->id);\n $studentname = $row->lastname . ',' . $row->firstname;\n }\n // Store the score (including bonus) or level index in criterion\n if ($row->description) {\n \tif(isset($CFG->emarking_formativefeedbackonly) && $CFG->emarking_formativefeedbackonly) {\n \t\t$data [$keyquestion] = $levelsindex[$row->levelid];\n \t} else {\n \t\t$data [$keyquestion] = $row->totalscore;\n \t}\n }\n $lastrow = $row;\n }\n // Add the last row\n $studentname = $lastrow->lastname . ',' . $lastrow->firstname;\n $tabledata [$studentname] = $data;\n // Add the grade if it's summative feedback\n if(!isset($CFG->emarking_formativefeedbackonly) || !$CFG->emarking_formativefeedbackonly) {\n \t$headers ['99grade'] = get_string('grade');\n }\n ksort($tabledata);\n // Now pivot the table to form the Excel report\n $current = 0;\n $newtabledata = array();\n foreach ($tabledata as $data) {\n foreach ($questions as $q) {\n $index = 10 + array_search($q, $questions);\n if (! isset($data [$index . \"\" . $q])) {\n $data [$index . \"\" . $q] = '0.000';\n }\n }\n ksort($data);\n $current ++;\n $newtabledata [] = $data;\n }\n $tabledata = $newtabledata;\n // The file name of the report\n $excelfilename = clean_filename($emarking->name . \"-grades.xls\");\n // Save the data to Excel\n emarking_save_data_to_excel($headers, $tabledata, $excelfilename, 5);\n}",
"public function getTable() { return $this->table->getTable(); }",
"function listTables();",
"function get_tables()\n {\n return $this->_tables;\n }",
"public function getCategorizedTables() {}",
"public function selectClass(){\n\t\t\t$query = new Query();\n\n\t\t\t$query->tables = array(\"classi\");\n\t\t\t$query->fields = array(\"id\", \"_Desc\");\n\t\t\t\n\t\t\tif ($query->Open()){\n\t\t\t\twhile ($row = $query->GetNextRecord(true)){\n\t\t\t\t\t$classes[] = $row;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn $classes;\n\t\t}",
"public function readTable()\n {\n $sql = \"SELECT Cubans.Id, FirstName, LastName, Gender, YearOfBirth, \n `Name`, IsInGroup FROM Cubans\n JOIN Genre ON Cubans.IdGenre=Genre.id\";\n $statement = $this->connect->prepare($sql);\n $statement->execute();\n return $statement->fetchAll();\n }",
"private function get_export_list_table() {\n\t\treturn wc_customer_order_csv_export()->load_class( '/includes/admin/class-wc-customer-order-csv-export-list-table.php', 'WC_Customer_Order_CSV_Export_List_Table' );\n\t}",
"public function getMarks()\n {\n return $this->hasMany(Mark::class, ['student_id' => 'id']);\n }",
"public function get_marks($c_number){\r\n\t\t$query = $this->conn->query(\"select * from final_score where cnum = '$c_number'\");\r\n\t\t$row = $query->fetch_array(MYSQLI_ASSOC);\r\n\t\tif($query->num_rows>0){\r\n \t\t\t$this->marks = $row;\r\n\t\t}\r\n\t\treturn $this->marks;\r\n\t}",
"abstract protected function fetchTableDefDb(string $table);",
"public function getCurrentTable() {}",
"public function get_data()\n {\n return $this->retrieve('SELECT * FROM isys_import LIMIT 1000;');\n }",
"public function getTableName() {}",
"public function getTableName() {}",
"public function getTableName() ;",
"public function admin_get_tables() {}",
"public function admin_get_tables() {}",
"static public function load_table_classes() {\n\t\treturn Module_Manifest_Model::get('orm_table_classes');\n\t}",
"public function fetch_classes($limit,$start)\n {\n $table = $this->return_table();\n $this->db->order_by(\"id\", \"DESC\");\n $this->db->limit($limit, $start);\n $query = $this->db->get($table);\n\n if ($query->num_rows() > 0) {\n foreach ($query->result() as $row) {\n $data[] = $row;\n }\n return $data;\n }\n return false;\n }",
"function getAllTablesBar(){\n\n return $this->db->table('mesas')\n ->select('numero_Mesa, forma, personas, alto, ancho')\n ->where('id_puntos = 1')\n ->get()\n ->getResult();\n }",
"public function table(){\r\n\r\n return $this;\r\n }"
] | [
"0.6439768",
"0.60545367",
"0.60295135",
"0.6014351",
"0.5985693",
"0.5959077",
"0.5936427",
"0.5936427",
"0.5936427",
"0.59247816",
"0.59247816",
"0.59247816",
"0.59247816",
"0.59247816",
"0.59247816",
"0.59247816",
"0.58949804",
"0.5873853",
"0.58563155",
"0.5830647",
"0.58136153",
"0.580485",
"0.5804033",
"0.5803925",
"0.5788698",
"0.57452583",
"0.57452583",
"0.57452583",
"0.57452583",
"0.57452583",
"0.57452583",
"0.57451445",
"0.57221735",
"0.5693679",
"0.5683556",
"0.5683085",
"0.56741524",
"0.56741524",
"0.56492203",
"0.5638006",
"0.562778",
"0.56136477",
"0.56122345",
"0.55889547",
"0.5585111",
"0.55830425",
"0.5563329",
"0.55595636",
"0.55360305",
"0.5533221",
"0.55252934",
"0.55163985",
"0.5515109",
"0.5488769",
"0.54853904",
"0.5475461",
"0.54576296",
"0.54457754",
"0.5442341",
"0.5419103",
"0.5419103",
"0.540959",
"0.5405895",
"0.5379258",
"0.5361268",
"0.5357271",
"0.5356272",
"0.5345652",
"0.5341695",
"0.53314537",
"0.53166384",
"0.53137195",
"0.5288089",
"0.52830875",
"0.52742106",
"0.52644646",
"0.5259586",
"0.5254617",
"0.52299356",
"0.52212125",
"0.5220831",
"0.5220094",
"0.5219849",
"0.5216128",
"0.52145374",
"0.52082294",
"0.52011365",
"0.5194505",
"0.5189966",
"0.51824784",
"0.5170369",
"0.51620036",
"0.51620036",
"0.5154968",
"0.51466644",
"0.51457584",
"0.51338017",
"0.5132864",
"0.5128441",
"0.5126489"
] | 0.6844916 | 0 |
======================= =============================== ==Attendance============= ============================ ===================== | public function fetchAttendaceType($id = null)
{
$classData = $this->model_section->fetchSectionDataByClass($id);
$form = '<div class="form-group">
<label for="sectionName" class="col-sm-2 control-label">Lớp học</label>
<div class="col-sm-10">
<select class="form-control" name="sectionName" id="sectionName">
';
foreach ($classData as $key => $value) {
$form .= '<option value="'.$value['section_id'].'">'.$value['section_name'].'</option>';
} // /froeac
$form .='</select>
</div>
</div>
<div class="form-group">
<label for="date" class="col-sm-2 control-label">Ngày</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="date" name="date" placeholder="Date" autocomplete="off">
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-primary">Submit</button>
</div>
</div>';
echo $form;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function Attendance(){\t\t\n\t\tif($this->IsLoggedIn('cashier')){\t\t\t\n\t\t\t$data = $this->GetDataForCashier(\"Attendance\");\t\t\t\n\t\t\t$data['experts'] = $this->GetExperts();\t\n\t\t\t$data['attendance_today']=$this->CashierModel->CalculateAttendance();\t\t\t\n\t\t\n\t\t\t$data['sidebar_collapsed'] = \"true\";\n\t\t\t// $this->PrettyPrintArray($data);\n\t\t\t// exit;\n\t\t\t$this->load->view('cashier/cashier_attendance_view', $data);\t\n\t\t}\n\t\telse{\n\t\t\t$data['title'] = \"Login\";\n\t\t\t$this->load->view('cashier/cashier_login_view',$data);\n\t\t}\n\t\t\n\n\t}",
"public function getAttendances_yes()\n {\n $orgid = isset($_REQUEST['refno']) ? $_REQUEST['refno'] : 0;\n $empid = isset($_REQUEST['empid']) ? $_REQUEST['empid'] : 0;\n $att = isset($_REQUEST['att']) ? $_REQUEST['att'] : 0;\n $datafor = isset($_REQUEST['datafor']) ? $_REQUEST['datafor'] : 0;\n //$zone = getTimeZone($orgid);\n if($empid!=0)\n \t$zone = getEmpTimeZone($empid,$orgid); // to set the timezone by employee country.\n else\n \t$zone = getTimeZone($orgid);\n date_default_timezone_set($zone);\n $date =date('Y-m-d', strtotime(' -1 day'));\n $time = date('H:i:s');\n $data = array();\n\t if($datafor=='present'){\n //today attendance\n\t\t$query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out FROM `AttendanceMaster` WHERE `AttendanceDate`=? and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8 ) AND EmployeeId in (SELECT Id from EmployeeMaster where OrganizationId = $orgid AND Is_Delete = 0) order by `name`\", array(\n\t\t\t\t$date,\t$orgid ));\n $data['present'] = $query->result();\n\t }else if($datafor=='absent'){\n\t\t\t$query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , '-' as `TimeOut` ,'-' as TimeIn FROM `AttendanceMaster` WHERE `AttendanceDate`=? and OrganizationId=? and (AttendanceStatus=2 or AttendanceStatus=6 or AttendanceStatus=7 ) AND EmployeeId in (SELECT Id from EmployeeMaster where OrganizationId = $orgid AND Is_Delete = 0) order by `name`\", array($date,$orgid));\n $this->db->close();\n $data['absent'] = $query->result(); \n\t}else if($datafor=='latecomings'){\t\t\n //////// today_late\n $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out FROM `AttendanceMaster` WHERE (time(TimeIn) > (select time(TimeIn) from ShiftMaster where ShiftMaster.Id=shiftId)) and `AttendanceDate`=? and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8) AND EmployeeId in (SELECT Id from EmployeeMaster where OrganizationId = $orgid AND Is_Delete = 0) order by `name`\", array(\n $date,\n $orgid\n ));\n $data['lateComings'] = $query->result();\n\t}else if($datafor=='earlyleavings'){\t\n ////////today_early\n /* $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out FROM `AttendanceMaster` WHERE (time(TimeOut) < (select time(TimeOut) from ShiftMaster where ShiftMaster.Id=shiftId) and TimeOut!='00:00:00' ) and `AttendanceDate`=? and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8) AND EmployeeId in (SELECT Id from EmployeeMaster where OrganizationId = $orgid AND Is_Delete = 0) order by `name`\", array( $date,$orgid ));\n $data['earlyLeavings'] = $query->result();*/\n\t\t$query = $this->db->query(\"select Shift,Id , FirstName , LastName from EmployeeMaster where OrganizationId = $orgid and Id IN (select EmployeeId from AttendanceMaster where OrganizationId = $orgid and AttendanceDate='$date' and TimeIn != '00:00:00' ) AND is_Delete=0 order by FirstName\");\n\t\t $res = array();\n\t\t $cond = '';\n foreach ($query->result() as $row) {\n $ShiftId = $row->Shift;\n $EId = $row->Id;\n $query = $this->db->query(\"select TimeIn,TimeOut,shifttype from ShiftMaster where Id = $ShiftId\");\n if ($data123 = $query->row()) {\n $shiftout = $data123->TimeOut;\n $shiftout1 = $date. ' '.$data123->TimeOut;\n\t\t\t\tif($data123->shifttype==2)\n\t\t\t\t{\n\t\t\t\t\t$nextdate = date('Y-m-d',strtotime($date . \"+1 days\"));\n\t\t\t\t\t $shiftout1 = $nextdate.' '.$data123->TimeOut;\n\t\t\t\t}\n $shift = substr($data123->TimeIn, 0, 5) . ' - ' . substr($data123->TimeOut, 0, 5);\n $ct = date('H:i:s');\n \n \n $query333 = $this->db->query(\"select SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out from AttendanceMaster where EmployeeId =$EId and if(timeoutdate = '0000-00-00' , TimeOut < '$shiftout' , CONCAT(timeoutdate,' ' ,TimeOut) < '$shiftout1' ) and AttendanceDate='$date' and TimeOut !='00:00:00' \");\n\t\t\t\t\t\n\t\t\t\t\t\n if ($row333 = $query333->row()) {\n $a = new DateTime($row333->TimeOut);\n $b = new DateTime($data123->TimeOut);\n $interval = $a->diff($b);\n $data1['earlyby'] = $interval->format(\"%H:%I\");\n $data1['timeout'] = substr($row333->TimeOut, 0, 5);\n $data1['name'] = $row->FirstName . ' ' . $row->LastName;\n $data1['shift'] = $shift;\n $data1['status'] = $row333->status;\n $data1['TimeIn'] = $row333->TimeIn;\n $data1['TimeOut'] = $row333->TimeOut;\n $data1['CheckOutLoc'] = $row333->CheckOutLoc;\n $data1['checkInLoc'] = $row333->checkInLoc;\n $data1['EntryImage'] = $row333->EntryImage;\n $data1['ExitImage'] = $row333->ExitImage;\n $data1['latit_in'] = $row333->latit_in;\n $data1['longi_in'] = $row333->longi_in;\n $data1['latit_out'] = $row333->latit_out;\n $data1['longi_out'] = $row333->longi_out;\n $data1['date'] = $date;\n $res[] = $data1;\n }\n \n }\n }\n $data['earlyLeavings'] =$res;\n\t}\n echo json_encode($data, JSON_NUMERIC_CHECK);\n \n }",
"public function attendance(){\n\t\t\t$data['title'] = 'Students Attendences Course name '; \n\n\t\t\t$course_code = $_GET['course_code'];\n\t\t\t\n\t\t\t$ids = $this->register_model->ids($course_code);\n\n\t\t\t$course_id;\n\t\t\tforeach ($ids as $id) {\n\t\t\t\t\t$course_id = $id['id'];\n\t\t\t\t\t$data['course_name'] = $id['course_name'];\n\t\t\t}\t\t\t\n\t\t\t$data['courses'] = $this->register_model->get_attendance($course_id);\n\n\t\t\t$this->load->view('admin/header1');\n\t\t\t$this->load->view('admin/attendance', $data);\n\t\t\t$this->load->view('admin/footer');\n\t\t}",
"public function get_attendance() {\n\t\t$view_type = ($this->uri->segment(3) === NULL)? 'daily': $this->uri->segment(3);\n\n\t\t$data['view_header'] = $this->get_sched_header($view_type);\n\t\t$data['view_type'] = $view_type;\n\t\t$data['type'] = ($this->type === NULL)? 'active': $this->type;\n\n\t\t$result = $this->Member_Model->get_attendance($view_type);\n\t\t$data['members'] = $result;\n\n\t\t$this->breadcrumbs->set(['Members Attendance' => 'members/attendance']);\n\n\t\t$this->render('attendance', $data);\n\t}",
"function eventclass_student_attendance()\n\t{\n\t\t$this->events[\"AfterAdd\"]=true;\n\n\t\t$this->events[\"AfterEdit\"]=true;\n\n\t\t$this->events[\"AfterDelete\"]=true;\n\n\n//\tonscreen events\n\n\n\t}",
"public function getAttendanceMobile()\n {\n $orgid = isset($_REQUEST['refno']) ? $_REQUEST['refno'] : 0;\n $att = isset($_REQUEST['att']) ? $_REQUEST['att'] : 0;\n $zone = getTimeZone($orgid);\n date_default_timezone_set($zone);\n $date = date('Y-m-d');\n $time = date('H:i:s');\n $data = array();\n if ($att == 'today') { //today attendance\n $query = $this->db->query(\"SELECT count(`Id`) as total FROM `EmployeeMaster` WHERE `OrganizationId`=\" . $orgid . \" and archive=1 and Is_Delete=0 \");\n //and CAST('$time' as time) > (select TimeIn from ShiftMaster where ShiftMaster.Id=shift)\n $data['total'] = $query->result();\n $query = $this->db->query(\"SELECT count(`EmployeeId`) as exited FROM AttendanceMaster WHERE `AttendanceDate` ='\" . $date . \"' and `TimeOut` !='00:00:00' and `OrganizationId`=\" . $orgid);\n $data['exited'] = $query->result();\n $query = $this->db->query(\"SELECT count(`EmployeeId`) as timedin FROM AttendanceMaster WHERE `AttendanceDate` ='\" . $date . \"' and `OrganizationId`=\" . $orgid); //and `TimeOut` ='00:00:00'\n $data['timedin'] = $query->result();\n $query = $this->db->query(\"SELECT count(TimeFrom) as onbreak FROM `Timeoff` where TimeofDate=? and (TimeTo ='00:00:00' or TimeTo IS NULL) and OrganizationId=?\", array(\n $date,\n $orgid\n ));\n $data['onbreak'] = $query->result();\n $query = $this->db->query(\"select count(Id) as latecomers from AttendanceMaster where `AttendanceDate` ='\" . $date . \"' and `OrganizationId`=\" . $orgid . \" and time(TimeIn) > (select time(TimeIn) from ShiftMaster where ShiftMaster.Id=shiftId)\");\n $data['latecomers'] = $query->result();\n $query = $this->db->query(\"select count(Id) as earlyleavers from AttendanceMaster where `AttendanceDate` ='\" . $date . \"' and `OrganizationId`=\" . $orgid . \" and TimeOut !='00:00:00' and time(TimeOut) < (select time(TimeOut) from ShiftMaster where ShiftMaster.Id=shiftId)\");\n $data['earlyleavers'] = $query->result();\n $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , `TimeIn`, `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc FROM `AttendanceMaster` WHERE `AttendanceDate`=? and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8) order by `name`\", array(\n $date,\n $orgid\n ));\n $data['elist'] = $query->result();\n //---managing off (weekly and holiday)\n $dt = $date;\n \n // day of month : 1 sun 2 mon --\n $dayOfWeek = 1 + date('w', strtotime($dt));\n $weekOfMonth = weekOfMonth($dt);\n $week = '';\n $query = $this->db->query(\"SELECT `WeekOff` FROM `WeekOffMaster` WHERE `OrganizationId` =? AND `Day` = ?\", array(\n $orgid,\n $dayOfWeek\n ));\n if ($row = $query->result()) {\n $week = explode(\",\", $row[0]->WeekOff);\n }\n if ($week[$weekOfMonth - 1] == 1) {\n $data['absentees'] = '';\n } else {\n $query = $this->db->query(\"SELECT `DateFrom`, `DateTo` FROM `HolidayMaster` WHERE OrganizationId=? and (? between `DateFrom` and `DateTo`) \", array(\n $orgid,\n $dt\n ));\n if ($query->num_rows() > 0) {\n //-----managing off (weekly and holiday) - close \n $query = $this->db->query(\"SELECT CONCAT(FirstName,' ',LastName) as name,'-' as TimeIn,'-' as TimeOut ,'Absent' as status from EmployeeMaster where `OrganizationId` =$orgid and EmployeeMaster.archive=1 and EmployeeMaster.Id not in(select AttendanceMaster.`EmployeeId` from AttendanceMaster where `AttendanceDate`='$date' and `OrganizationId` =$orgid) and CAST('$time' as time) > (select TimeIn from ShiftMaster where ShiftMaster.Id=shift) order by `name`\", array(\n $orgid,\n $date,\n $orgid\n ));\n $data['absentees'] = $query->result();\n } else {\n $data['absentees'] = '';\n }\n }\n } else if ($att == 'today_late') {\n $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , `TimeIn`, `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc FROM `AttendanceMaster` WHERE (time(TimeIn) > (select time(TimeIn) from ShiftMaster where ShiftMaster.Id=shiftId)) and `AttendanceDate`=? and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8) order by `name`\", array(\n $date,\n $orgid\n ));\n $data['elist'] = $query->result();\n } else if ($att == 'today_early') {\n $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , `TimeIn`, `TimeOut` ,'Present' as status,EntryImage,ExitImage, SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc FROM `AttendanceMaster` WHERE (time(TimeOut) < (select time(TimeOut) from ShiftMaster where ShiftMaster.Id=shiftId) and TimeOut!='00:00:00' ) and `AttendanceDate`=? and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8) order by `name`\", array(\n $date,\n $orgid\n ));\n $data['elist'] = $query->result();\n } else if ($att == 'today_abs') {\n \n \n $q2 = \"select (select count(EmployeeMaster.Id)-count(AttendanceMaster.Id) from EmployeeMaster where OrganizationId =\" . $orgid . \") as total, AttendanceDate from AttendanceMaster where AttendanceDate ='$date' and OrganizationId =\" . $orgid . \" group by AttendanceDate\";\n $query = $this->db->query($q2);\n $d = array();\n $res = array();\n foreach ($query->result() as $row) {\n '<br/>total: ' . $row->total . ' date: ' . $row->AttendanceDate . '<br/>';\n $query1 = $this->db->query(\"SELECT Id as EmployeeId ,FirstName,Shift,Department,Designation, Id ,'\" . $row->AttendanceDate . \"' as absentdate\n FROM `EmployeeMaster` \n WHERE EmployeeMaster.OrganizationId =\" . $orgid . \"\n AND archive=1 and IF(EmployeeMaster.CreatedDate!='0000-00-00 00:00:00', CreatedDate < '\" . $row->AttendanceDate . \"', 1) and Id \n NOT IN (\n SELECT `EmployeeId` \n FROM `AttendanceMaster` \n WHERE `AttendanceDate` \n IN (\n '\" . $row->AttendanceDate . \"'\n )\n AND AttendanceMaster.OrganizationId =\" . $orgid . \"\n AND `AttendanceStatus` not in(3,5,6)\n )\n ORDER BY EmployeeMaster.Id \");\n $count = $query1->num_rows();\n foreach ($query1->result() as $row) {\n $data = array();\n //$data['name']=ucwords(getEmpName($row->Id));\n $data['name'] = getEmpName($row->EmployeeId);\n $data['status'] = 'Absent';\n $data['TimeIn'] = '-';\n $data['TimeOut'] = '-';\n $res[] = $data;\n }\n }\n $this->db->close();\n $data['elist'] = $res;\n } else if ($att == 'yesterday') { //yesterday attendance\n $date = date('Y-m-d', strtotime(\"-1 days\"));\n $query = $this->db->query(\"SELECT count(`Id`) as total FROM `EmployeeMaster` WHERE archive=1 and `OrganizationId`=\" . $orgid);\n $data['total'] = $query->result();\n $query = $this->db->query(\"SELECT count(`Id`) as timedin FROM `AttendanceMaster` WHERE AttendanceDate='\" . $date . \"' and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8) and `OrganizationId`=\" . $orgid);\n $data['timedin'] = $query->result();\n $query = $this->db->query(\"select count(Id) as latecomers from AttendanceMaster where `AttendanceDate` ='\" . $date . \"' and `OrganizationId`=\" . $orgid . \" and time(TimeIn) > (select time(TimeIn) from ShiftMaster where ShiftMaster.Id=shiftId)\");\n $data['latecomers'] = $query->result();\n $query = $this->db->query(\"select count(Id) as earlyleavers from AttendanceMaster where `AttendanceDate` ='\" . $date . \"' and `OrganizationId`=\" . $orgid . \" and TimeOut !='00:00:00' and time(TimeOut) < (select time(TimeOut) from ShiftMaster where ShiftMaster.Id=shiftId)\");\n $data['earlyleavers'] = $query->result();\n //$query = $this->db->query(\"SELECT count(`EmployeeId`) as exited FROM AttendanceMaster WHERE `AttendanceDate` ='\".$date.\"' and `TimeOut` !='00:00:00' and `OrganizationId`=\".$orgid);\n //$data['exited']=$query->result();\n // $query = $this->db->query(\"SELECT count(`EmployeeId`) as timedin FROM AttendanceMaster WHERE `AttendanceDate` ='\".$date.\"' and `TimeOut` ='00:00:00' and `OrganizationId`=\".$orgid);\n // $data['timedin']=$query->result();\n // $query = $this->db->query(\"SELECT count(BreakOn) as onbreak FROM `BreakMaster` where Date=? and BreakOff ='00:00:00' and OrganizationId=?\",array($date,$orgid));\n // $data['onbreak']=$query->result();\n \n $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , `TimeIn`, `TimeOut` ,'Present' as status,EntryImage,ExitImage FROM `AttendanceMaster` WHERE (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8) and `AttendanceDate`=? and OrganizationId=? order by `name`\", array(\n $date,\n $orgid\n ));\n $data['elist'] = $query->result();\n //---managing off (weekly and holiday)\n $dt = $date;\n \n // day of month : 1 sun 2 mon --\n $dayOfWeek = 1 + date('w', strtotime($dt));\n $weekOfMonth = weekOfMonth($dt);\n $week = '';\n $query = $this->db->query(\"SELECT `WeekOff` FROM `WeekOffMaster` WHERE `OrganizationId` =? AND `Day` = ?\", array(\n $orgid,\n $dayOfWeek\n ));\n if ($row = $query->result()) {\n $week = explode(\",\", $row[0]->WeekOff);\n }\n if ($week[$weekOfMonth - 1] == 1) {\n $data['absentees'] = '';\n } else {\n $query = $this->db->query(\"SELECT `DateFrom`, `DateTo` FROM `HolidayMaster` WHERE OrganizationId=? and (? between `DateFrom` and `DateTo`) \", array(\n $orgid,\n $dt\n ));\n if ($query->num_rows() > 0) {\n \n //-----managing off (weekly and holiday) - close \n $query = $this->db->query(\"SELECT CONCAT(FirstName,' ',LastName) as name,'-' as TimeIn,'-' as TimeOut ,'Absent' as status from EmployeeMaster where `OrganizationId` =$orgid and EmployeeMaster.archive=1 and EmployeeMaster.Id in(select AttendanceMaster.`EmployeeId` from AttendanceMaster where `AttendanceDate`='$date' and AttendanceStatus<>1 and `OrganizationId` =$orgid) and CAST('$time' as time) > (select TimeIn from ShiftMaster where ShiftMaster.Id=shift) order by `name`\", array(\n $orgid,\n $date,\n $orgid\n ));\n $data['absentees'] = $query->result();\n } else {\n $data['absentees'] = '';\n }\n }\n } else if ($att == 'yes_late') {\n $date = date('Y-m-d', strtotime(\"-1 days\"));\n $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , `TimeIn`, `TimeOut` ,'Present' as status,EntryImage,ExitImage FROM `AttendanceMaster` WHERE (time(TimeIn) > (select time(TimeIn) from ShiftMaster where ShiftMaster.Id=shiftId)) and `AttendanceDate`=? and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8) order by `name`\", array(\n $date,\n $orgid\n ));\n $data['elist'] = $query->result();\n } else if ($att == 'yes_early') {\n $date = date('Y-m-d', strtotime(\"-1 days\"));\n $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , `TimeIn`, `TimeOut` ,'Present' as status,EntryImage,ExitImage FROM `AttendanceMaster` WHERE (time(TimeOut) < (select time(TimeOut) from ShiftMaster where ShiftMaster.Id=shiftId) and TimeOut!='00:00:00' ) and `AttendanceDate`=? and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8) order by `name`\", array(\n $date,\n $orgid\n ));\n $data['elist'] = $query->result();\n } else if ($att == 'yes_abs') {\n $date = date('Y-m-d', strtotime(\"-1 days\"));\n $q2 = \"select (select count(EmployeeMaster.Id)-count(AttendanceMaster.Id) from EmployeeMaster where OrganizationId =\" . $orgid . \") as total, AttendanceDate from AttendanceMaster where AttendanceDate ='$date' and OrganizationId =\" . $orgid . \" group by AttendanceDate\";\n $query = $this->db->query($q2);\n $d = array();\n $res = array();\n foreach ($query->result() as $row) {\n '<br/>total: ' . $row->total . ' date: ' . $row->AttendanceDate . '<br/>';\n $query1 = $this->db->query(\"SELECT Id as EmployeeId ,FirstName,Shift,Department,Designation, Id ,'\" . $row->AttendanceDate . \"' as absentdate\n FROM `EmployeeMaster` \n WHERE EmployeeMaster.OrganizationId =\" . $orgid . \"\n AND archive=1 and IF(EmployeeMaster.CreatedDate!='0000-00-00 00:00:00', CreatedDate < '\" . $row->AttendanceDate . \"', 1) and Id \n NOT IN (\n SELECT `EmployeeId` \n FROM `AttendanceMaster` \n WHERE `AttendanceDate` \n IN (\n '\" . $row->AttendanceDate . \"'\n )\n AND AttendanceMaster.OrganizationId =\" . $orgid . \"\n AND `AttendanceStatus` not in(3,5,6)\n )\n ORDER BY EmployeeMaster.Id \");\n $count = $query1->num_rows();\n foreach ($query1->result() as $row) {\n $data = array();\n //$data['name']=ucwords(getEmpName($row->Id));\n $data['name'] = getEmpName($row->EmployeeId);\n $data['status'] = 'Absent';\n $data['TimeIn'] = '-';\n $data['TimeOut'] = '-';\n $res[] = $data;\n }\n }\n $this->db->close();\n $data['elist'] = $res;\n } else if ($att == 'cdate') { //custom date attendance\n $cdate = isset($_REQUEST['cdate']) ? date('Y-m-d', strtotime($_REQUEST['cdate'])) : 0;\n $cond = '';\n if ($cdate == $date)\n $cond = \" and CAST('$time' as time) > (select TimeIn from ShiftMaster where ShiftMaster.Id=shift)\";\n $query = $this->db->query(\"SELECT count(`Id`) as total FROM `EmployeeMaster` WHERE `OrganizationId`=\" . $orgid . \" and archive=1 \" . $cond);\n $data['total'] = $query->result();\n $query = $this->db->query(\"SELECT count(`EmployeeId`) as marked FROM AttendanceMaster WHERE AttendanceDate ='\" . $cdate . \"' and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8) and `OrganizationId`=\" . $orgid);\n $data['marked'] = $query->result();\n $query = $this->db->query(\"select count(Id) as latecomers from AttendanceMaster where `AttendanceDate` ='\" . $cdate . \"' and `OrganizationId`=\" . $orgid . \" and time(TimeIn) > (select time(TimeIn) from ShiftMaster where ShiftMaster.Id=shiftId)\");\n $data['latecomers'] = $query->result();\n $query = $this->db->query(\"select count(Id) as earlyleavers from AttendanceMaster where `AttendanceDate` ='\" . $cdate . \"' and `OrganizationId`=\" . $orgid . \" and TimeOut !='00:00:00' and time(TimeOut) < (select time(TimeOut) from ShiftMaster where ShiftMaster.Id=shiftId)\");\n $data['earlyleavers'] = $query->result();\n $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , `TimeIn`, `TimeOut`,'Present' as status ,AttendanceDate FROM `AttendanceMaster` WHERE AttendanceDate =? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8) and OrganizationId=? order by `AttendanceDate` desc,name\", array(\n $cdate,\n $orgid\n ));\n $data['elist'] = $query->result();\n //---managing off (weekly and holiday)// \n $dt = $cdate;\n \n // day of month : 1 sun 2 mon --\n $dayOfWeek = 1 + date('w', strtotime($dt));\n $weekOfMonth = weekOfMonth($dt);\n $week = '';\n $query = $this->db->query(\"SELECT `WeekOff` FROM `WeekOffMaster` WHERE `OrganizationId` =? AND `Day` = ?\", array(\n $orgid,\n $dayOfWeek\n ));\n if ($row = $query->result()) {\n $week = explode(\",\", $row[0]->WeekOff);\n }\n if ($week[$weekOfMonth - 1] == 1) {\n $data['absentees'] = '';\n } else {\n $query = $this->db->query(\"SELECT `DateFrom`, `DateTo` FROM `HolidayMaster` WHERE OrganizationId=? and (? between `DateFrom` and `DateTo`) \", array(\n $orgid,\n $dt\n ));\n if ($query->num_rows() == 0) {\n //-----managing off (weekly and holiday) - close\n $query = $this->db->query(\"SELECT CONCAT(FirstName,' ',LastName) as name,'-' as TimeIn,'-' as TimeOut ,'Absent' as status,'\" . $cdate . \"' as AttendanceDate from EmployeeMaster where `OrganizationId` =? and EmployeeMaster.archive=1 and EmployeeMaster.Id in(select AttendanceMaster.`EmployeeId` from AttendanceMaster where `AttendanceDate`=? and AttendanceStatus<>1 and `OrganizationId` =?) \" . $cond . \" order by `name`\", array(\n $orgid,\n $cdate,\n $orgid\n ));\n //$query = $this->db->query(\"select * from AttendanceMaster where AttendanceStatus<>1 and AttendanceDate='2018-01-01'\",array());\n $data['absentees'] = $query->result();\n } else {\n $data['absentees'] = '';\n }\n }\n } else if ($att == 'cd_late') {\n $date = isset($_REQUEST['cdate']) ? date('Y-m-d', strtotime($_REQUEST['cdate'])) : 0;\n $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , `TimeIn`, `TimeOut` ,'Present' as status,EntryImage,ExitImage FROM `AttendanceMaster` WHERE (time(TimeIn) > (select time(TimeIn) from ShiftMaster where ShiftMaster.Id=shiftId)) and `AttendanceDate`=? and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8) order by `name`\", array(\n $date,\n $orgid\n ));\n $data['elist'] = $query->result();\n } else if ($att == 'cd_early') {\n $date = isset($_REQUEST['cdate']) ? date('Y-m-d', strtotime($_REQUEST['cdate'])) : 0;\n $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , `TimeIn`, `TimeOut` ,'Present' as status,EntryImage,ExitImage FROM `AttendanceMaster` WHERE (time(TimeOut) < (select time(TimeOut) from ShiftMaster where ShiftMaster.Id=shiftId) and TimeOut!='00:00:00' ) and `AttendanceDate`=? and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8)order by `name`\", array(\n $date,\n $orgid\n ));\n $data['elist'] = $query->result();\n } else if ($att == 'cd_abs') {\n $date = isset($_REQUEST['cdate']) ? date('Y-m-d', strtotime($_REQUEST['cdate'])) : 0;\n $q2 = \"select (select count(EmployeeMaster.Id)-count(AttendanceMaster.Id) from EmployeeMaster where OrganizationId =\" . $orgid . \") as total, AttendanceDate from AttendanceMaster where AttendanceDate ='$date' and OrganizationId =\" . $orgid . \" group by AttendanceDate\";\n $query = $this->db->query($q2);\n $d = array();\n $res = array();\n foreach ($query->result() as $row) {\n '<br/>total: ' . $row->total . ' date: ' . $row->AttendanceDate . '<br/>';\n $query1 = $this->db->query(\"SELECT Id as EmployeeId ,FirstName,Shift,Department,Designation, Id ,'\" . $row->AttendanceDate . \"' as absentdate\n FROM `EmployeeMaster` \n WHERE EmployeeMaster.OrganizationId =\" . $orgid . \"\n AND archive=1 and IF(EmployeeMaster.CreatedDate!='0000-00-00 00:00:00', CreatedDate < '\" . $row->AttendanceDate . \"', 1) and Id \n NOT IN (\n SELECT `EmployeeId` \n FROM `AttendanceMaster` \n WHERE `AttendanceDate` \n IN (\n '\" . $row->AttendanceDate . \"'\n )\n AND AttendanceMaster.OrganizationId =\" . $orgid . \"\n AND `AttendanceStatus` not in(3,5,6)\n )\n ORDER BY EmployeeMaster.Id \");\n $count = $query1->num_rows();\n foreach ($query1->result() as $row) {\n $data = array();\n //$data['name']=ucwords(getEmpName($row->Id));\n $data['name'] = getEmpName($row->EmployeeId);\n $data['status'] = 'Absent';\n $data['TimeIn'] = '-';\n $data['TimeOut'] = '-';\n $res[] = $data;\n }\n }\n $this->db->close();\n $data['elist'] = $res;\n } else if ($att == 'absentees') { //custom date absentees\n $cdate = isset($_REQUEST['cdate']) ? date('Y-m-d', strtotime($_REQUEST['cdate'])) : 0;\n ////////////////\n $query = $this->db->query(\"SELECT CONCAT(FirstName,' ',LastName) as name,'-' as TimeIn,'-' as TimeOut ,'Absent' as status,'\" . $cdate . \"' as AttendanceDate from EmployeeMaster where `OrganizationId` =\" . $orgid . \" and EmployeeMaster.Id not in(select AttendanceMaster.`EmployeeId` from AttendanceMaster WHERE `AttendanceDate` ='\" . $cdate . \"' and `OrganizationId`=\" . $orgid . \" and CAST('$time' as time) > (select TimeIn from ShiftMaster where ShiftMaster.Id=shift) order by DATE(AttendanceDate),name)\");\n $data['absentees'][] = $query->result();\n ////////////////\n $query = $this->db->query(\"SELECT count(`Id`) as total FROM `EmployeeMaster` WHERE `OrganizationId`=\" . $orgid);\n $data['total'] = $query->result();\n $query = $this->db->query(\"SELECT count(`EmployeeId`) as marked FROM AttendanceMaster WHERE AttendanceDate ='\" . $cdate . \"' and `OrganizationId`=\" . $orgid);\n $data['marked'] = $query->result();\n $query = $this->db->query(\"SELECT CONCAT(FirstName,' ',LastName) as name,'-' as TimeIn,'-' as TimeOut ,'Absent' as status,'\" . $cdate . \"' as AttendanceDate from EmployeeMaster where `OrganizationId` =\" . $orgid . \" and EmployeeMaster.Id not in(select AttendanceMaster.`EmployeeId` from AttendanceMaster WHERE `AttendanceDate` ='\" . $cdate . \"' and `OrganizationId`=\" . $orgid . \" and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8) order by DATE(AttendanceDate),name)\");\n $data['elist'] = $query->result();\n } else if ($att == 'l7') { //last 7 days attendance\n $end_week = date(\"Y-m-d\", strtotime(\"-1 days\"));\n $start_week = date(\"Y-m-d\", strtotime('-6 day', strtotime($end_week)));\n $start_week = \\DateTime::createFromFormat('Y-m-d', $start_week);\n $end_week = \\DateTime::createFromFormat('Y-m-d', $end_week);\n $datePeriod = new \\DatePeriod($start_week, new \\DateInterval('P1D'), $end_week->modify('+1day'));\n foreach ($datePeriod as $date) {\n $dt = $date->format('Y-m-d');\n $query = $this->db->query(\"SELECT count(`EmployeeId`) as total,AttendanceDate FROM AttendanceMaster WHERE `AttendanceDate` ='\" . $dt . \"' and AttendanceStatus<>1 and `OrganizationId`=\" . $orgid);\n $data['rec'][] = $query->result();\n $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , `TimeIn`, `TimeOut` ,AttendanceDate ,'Present' as status FROM `AttendanceMaster` WHERE `AttendanceDate` ='\" . $dt . \"' and `OrganizationId`=\" . $orgid . \" and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8) order by DATE(AttendanceDate) desc,name\");\n $data['elist'][] = $query->result();\n ///////////////abs\n \n //---managing off (weekly and holiday)\n $query = $this->db->query(\"SELECT `DateFrom`, `DateTo` FROM `HolidayMaster` WHERE OrganizationId=? and (? between `DateFrom` and `DateTo`) \", array(\n $orgid,\n $dt\n ));\n if ($query->num_rows() > 0)\n continue;\n // day of month : 1 sun 2 mon --\n $dayOfWeek = 1 + date('w', strtotime($dt));\n $weekOfMonth = weekOfMonth($dt);\n $week = '';\n $query = $this->db->query(\"SELECT `WeekOff` FROM `WeekOffMaster` WHERE `OrganizationId` =? AND `Day` = ?\", array(\n $orgid,\n $dayOfWeek\n ));\n if ($row = $query->result()) {\n $week = explode(\",\", $row[0]->WeekOff);\n }\n if ($week[$weekOfMonth - 1] == 1)\n continue;\n //-----managing off (weekly and holiday) - close\n $query = $this->db->query(\"SELECT CONCAT(FirstName,' ',LastName) as name,'-' as TimeIn,'-' as TimeOut ,'Absent' as status,'\" . $dt . \"' as AttendanceDate from EmployeeMaster where `OrganizationId` =\" . $orgid . \" and EmployeeMaster.archive=1 and EmployeeMaster.Id in(select AttendanceMaster.`EmployeeId` from AttendanceMaster WHERE `AttendanceDate` ='\" . $dt . \"' and AttendanceStatus<>1 and `OrganizationId`=\" . $orgid . \") and CAST('$time' as time) > (select TimeIn from ShiftMaster where ShiftMaster.Id=shift) order by DATE(AttendanceDate),name\");\n $data['absentees'][] = $query->result();\n \n //////////abs\n \n \n }\n } else if ($att == 'l7_late') {\n $end_week = date(\"Y-m-d\", strtotime(\"-1 days\"));\n $start_week = date(\"Y-m-d\", strtotime('-6 day', strtotime($end_week)));\n $start_week = \\DateTime::createFromFormat('Y-m-d', $start_week);\n $end_week = \\DateTime::createFromFormat('Y-m-d', $end_week);\n $datePeriod = new \\DatePeriod($start_week, new \\DateInterval('P1D'), $end_week->modify('+1day'));\n $res = array();\n foreach ($datePeriod as $date) {\n $data1 = array();\n $dt = $date->format('Y-m-d');\n $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , `TimeIn`, `TimeOut` ,AttendanceDate ,'Present' as status,EntryImage,ExitImage FROM `AttendanceMaster` WHERE (time(TimeIn) > (select time(TimeIn) from ShiftMaster where ShiftMaster.Id=shiftId)) and `AttendanceDate` ='\" . $dt . \"' and `OrganizationId`=\" . $orgid . \" and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8) order by DATE(AttendanceDate) desc,name\");\n $res[] = $query->result();\n }\n $data['elist'] = $res;\n \n } else if ($att == 'l7_early') {\n $end_week = date(\"Y-m-d\", strtotime(\"-1 days\"));\n $start_week = date(\"Y-m-d\", strtotime('-6 day', strtotime($end_week)));\n $start_week = \\DateTime::createFromFormat('Y-m-d', $start_week);\n $end_week = \\DateTime::createFromFormat('Y-m-d', $end_week);\n $datePeriod = new \\DatePeriod($start_week, new \\DateInterval('P1D'), $end_week->modify('+1day'));\n $res = array();\n foreach ($datePeriod as $date) {\n $data1 = array();\n $dt = $date->format('Y-m-d');\n $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , `TimeIn`, `TimeOut` ,AttendanceDate ,'Present' as status,EntryImage,ExitImage FROM `AttendanceMaster` WHERE (time(TimeOut) < (select time(TimeOut) from ShiftMaster where ShiftMaster.Id=shiftId) and TimeOut!='00:00:00' ) and `AttendanceDate` ='\" . $dt . \"' and `OrganizationId`=\" . $orgid . \" and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8) order by DATE(AttendanceDate) desc,name\");\n $res[] = $query->result();\n }\n $data['elist'] = $res;\n } else if ($att == 'l7_abs') {\n $end_week = date(\"Y-m-d\", strtotime(\"-1 days\"));\n $start_week = date(\"Y-m-d\", strtotime('-6 day', strtotime($end_week)));\n $start_week = \\DateTime::createFromFormat('Y-m-d', $start_week);\n $end_week = \\DateTime::createFromFormat('Y-m-d', $end_week);\n $datePeriod = new \\DatePeriod($start_week, new \\DateInterval('P1D'), $end_week->modify('+1day'));\n \n $res = array();\n foreach ($datePeriod as $date) {\n $data1 = array();\n $dt = $date->format('Y-m-d');\n $q2 = \"select (select count(EmployeeMaster.Id)-count(AttendanceMaster.Id) from EmployeeMaster where OrganizationId =\" . $orgid . \") as total, AttendanceDate from AttendanceMaster where AttendanceDate ='$dt' and OrganizationId =\" . $orgid . \" group by AttendanceDate\";\n $query = $this->db->query($q2);\n $d = array();\n //$res=array();\n foreach ($query->result() as $row) {\n $date = $row->AttendanceDate;\n // '<br/>total: '.$row->total.' date: '.$row->AttendanceDate .'<br/>';\n $query1 = $this->db->query(\"SELECT Id as EmployeeId ,FirstName,Shift,Department,Designation, Id ,'\" . $row->AttendanceDate . \"' as absentdate\n FROM `EmployeeMaster` \n WHERE EmployeeMaster.OrganizationId =\" . $orgid . \"\n AND archive=1 and IF(EmployeeMaster.CreatedDate!='0000-00-00 00:00:00', CreatedDate < '\" . $row->AttendanceDate . \"', 1) and Id \n NOT IN (\n SELECT `EmployeeId` \n FROM `AttendanceMaster` \n WHERE `AttendanceDate` \n IN (\n '\" . $row->AttendanceDate . \"'\n )\n AND AttendanceMaster.OrganizationId =\" . $orgid . \"\n AND `AttendanceStatus` not in(3,5,6)\n )\n ORDER BY EmployeeMaster.Id \");\n $count = $query1->num_rows();\n foreach ($query1->result() as $row) {\n $data = array();\n //$data['name']=ucwords(getEmpName($row->Id));\n $data['name'] = getEmpName($row->EmployeeId);\n $data['AttendanceDate'] = $date;\n $data['status'] = 'Absent';\n $data['TimeIn'] = '-';\n $data['TimeOut'] = '-';\n $res[] = $data;\n }\n }\n //$res1[]=$query->result();\n }\n $this->db->close();\n $data['elist'] = $res;\n } else if ($att == 'thismonth') { //current month attendance\n $month = date('m');\n $year = date('Y');\n $query = $this->db->query(\"SELECT count(`Id`) as total FROM `EmployeeMaster` WHERE `OrganizationId`=\" . $orgid);\n $data['total'] = $query->result();\n $query = $this->db->query(\"SELECT count(`EmployeeId`) as marked FROM AttendanceMaster WHERE EXTRACT(MONTH from AttendanceDate) ='\" . $month . \"' and EXTRACT(YEAR from AttendanceDate) ='\" . $year . \"' and `OrganizationId`=\" . $orgid);\n $data['marked'] = $query->result();\n $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , `TimeIn`, `TimeOut`,'Present' as status ,AttendanceDate FROM `AttendanceMaster` WHERE EXTRACT(MONTH from AttendanceDate) =? and EXTRACT(YEAR from AttendanceDate) =? and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8) order by DATE(AttendanceDate),name\", array(\n $month,\n $year,\n $orgid\n ));\n $data['elist'] = $query->result();\n $query = $this->db->query(\"select count(Id) as latecomers from AttendanceMaster where EXTRACT(MONTH from AttendanceDate) ='\" . $month . \"' and `OrganizationId`=\" . $orgid . \" and time(TimeIn) > (select time(TimeIn) from ShiftMaster where ShiftMaster.Id=shiftId)\");\n $data['latecomers'] = $query->result();\n $query = $this->db->query(\"select count(Id) as earlyleavers from AttendanceMaster where EXTRACT(MONTH from AttendanceDate) ='\" . $month . \"' and `OrganizationId`=\" . $orgid . \" and TimeOut !='00:00:00' and time(TimeOut) < (select time(TimeOut) from ShiftMaster where ShiftMaster.Id=shiftId)\");\n $data['earlyleavers'] = $query->result();\n $start_week = date('Y-m-01');\n $end_week = date('Y-m-d');\n $start_week = \\DateTime::createFromFormat('Y-m-d', $start_week);\n $end_week = \\DateTime::createFromFormat('Y-m-d', $end_week);\n $datePeriod = new \\DatePeriod($start_week, new \\DateInterval('P1D'), $end_week->modify('+1day'));\n foreach ($datePeriod as $date) {\n $dt = $date->format('Y-m-d');\n //---managing off (weekly and holiday)\n $query = $this->db->query(\"SELECT `DateFrom`, `DateTo` FROM `HolidayMaster` WHERE OrganizationId=? and (? between `DateFrom` and `DateTo`) \", array(\n $orgid,\n $dt\n ));\n if ($query->num_rows() > 0)\n continue;\n // day of month : 1 sun 2 mon --\n $dayOfWeek = 1 + date('w', strtotime($dt));\n $weekOfMonth = weekOfMonth($dt);\n $week = '';\n $query = $this->db->query(\"SELECT `WeekOff` FROM `WeekOffMaster` WHERE `OrganizationId` =? AND `Day` = ?\", array(\n $orgid,\n $dayOfWeek\n ));\n if ($row = $query->result()) {\n $week = explode(\",\", $row[0]->WeekOff);\n }\n if ($week[$weekOfMonth - 1] == 1)\n continue;\n //-----managing off (weekly and holiday) - close\n $query = $this->db->query(\"SELECT CONCAT(FirstName,' ',LastName) as name,'-' as TimeIn,'-' as TimeOut ,'Absent' as status,'\" . $dt . \"' as AttendanceDate from EmployeeMaster where `OrganizationId` =\" . $orgid . \" and EmployeeMaster.archive=1 and EmployeeMaster.Id in(select AttendanceMaster.`EmployeeId` from AttendanceMaster WHERE `AttendanceDate` ='\" . $dt . \"' and AttendanceStatus<>1 and `OrganizationId`=\" . $orgid . \") and CAST('$time' as time) > (select TimeIn from ShiftMaster where ShiftMaster.Id=shift) order by DATE(AttendanceDate),name asc\");\n $data['absentees'][] = $query->result();\n }\n } else if ($att == 'tm_late') {\n $start_week = date('Y-m-01');\n $end_week = date('Y-m-d');\n $start_week = \\DateTime::createFromFormat('Y-m-d', $start_week);\n $end_week = \\DateTime::createFromFormat('Y-m-d', $end_week);\n $datePeriod = new \\DatePeriod($start_week, new \\DateInterval('P1D'), $end_week->modify('+1day'));\n $res = array();\n foreach ($datePeriod as $date) {\n $data1 = array();\n $dt = $date->format('Y-m-d');\n $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , `TimeIn`, `TimeOut` ,AttendanceDate ,'Present' as status,EntryImage,ExitImage FROM `AttendanceMaster` WHERE (time(TimeIn) > (select time(TimeIn) from ShiftMaster where ShiftMaster.Id=shiftId)) and `AttendanceDate` ='\" . $dt . \"' and `OrganizationId`=\" . $orgid . \" and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8) order by DATE(AttendanceDate) desc,name\");\n $res[] = $query->result();\n }\n $data['elist'] = $res;\n \n } else if ($att == 'tm_early') {\n $start_week = date('Y-m-01');\n $end_week = date('Y-m-d');\n $start_week = \\DateTime::createFromFormat('Y-m-d', $start_week);\n $end_week = \\DateTime::createFromFormat('Y-m-d', $end_week);\n $datePeriod = new \\DatePeriod($start_week, new \\DateInterval('P1D'), $end_week->modify('+1day'));\n $res = array();\n foreach ($datePeriod as $date) {\n $data1 = array();\n $dt = $date->format('Y-m-d');\n $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , `TimeIn`, `TimeOut` ,AttendanceDate ,'Present' as status,EntryImage,ExitImage FROM `AttendanceMaster` WHERE (time(TimeOut) < (select time(TimeOut) from ShiftMaster where ShiftMaster.Id=shiftId) and TimeOut!='00:00:00' ) and `AttendanceDate` ='\" . $dt . \"' and `OrganizationId`=\" . $orgid . \" and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8) order by DATE(AttendanceDate) desc,name\");\n $res[] = $query->result();\n }\n $data['elist'] = $res;\n } else if ($att == 'tm_abs') {\n $start_week = date('Y-m-01');\n $end_week = date('Y-m-d');\n $start_week = \\DateTime::createFromFormat('Y-m-d', $start_week);\n $end_week = \\DateTime::createFromFormat('Y-m-d', $end_week);\n $datePeriod = new \\DatePeriod($start_week, new \\DateInterval('P1D'), $end_week->modify('+1day'));\n $res = array();\n foreach ($datePeriod as $date) {\n $data1 = array();\n $dt = $date->format('Y-m-d');\n $q2 = \"select (select count(EmployeeMaster.Id)-count(AttendanceMaster.Id) from EmployeeMaster where OrganizationId =\" . $orgid . \") as total, AttendanceDate from AttendanceMaster where AttendanceDate ='$dt' and OrganizationId =\" . $orgid . \" group by AttendanceDate\";\n $query = $this->db->query($q2);\n $d = array();\n //$res=array();\n foreach ($query->result() as $row) {\n $date = $row->AttendanceDate;\n // '<br/>total: '.$row->total.' date: '.$row->AttendanceDate .'<br/>';\n $query1 = $this->db->query(\"SELECT Id as EmployeeId ,FirstName,Shift,Department,Designation, Id ,'\" . $row->AttendanceDate . \"' as absentdate\n FROM `EmployeeMaster` \n WHERE EmployeeMaster.OrganizationId =\" . $orgid . \"\n AND archive=1 and IF(EmployeeMaster.CreatedDate!='0000-00-00 00:00:00', CreatedDate < '\" . $row->AttendanceDate . \"', 1) and Id \n NOT IN (\n SELECT `EmployeeId` \n FROM `AttendanceMaster` \n WHERE `AttendanceDate` \n IN (\n '\" . $row->AttendanceDate . \"'\n )\n AND AttendanceMaster.OrganizationId =\" . $orgid . \"\n AND `AttendanceStatus` not in(3,5,6)\n )\n ORDER BY EmployeeMaster.Id \");\n $count = $query1->num_rows();\n foreach ($query1->result() as $row) {\n $data = array();\n //$data['name']=ucwords(getEmpName($row->Id));\n $data['name'] = getEmpName($row->EmployeeId);\n $data['AttendanceDate'] = $date;\n $data['status'] = 'Absent';\n $data['TimeIn'] = '-';\n $data['TimeOut'] = '-';\n $res[] = $data;\n }\n }\n //$res1[]=$query->result();\n }\n $this->db->close();\n $data['elist'] = $res;\n } else if ($att == 'lastweek') { //lasweek attendance\n $previous_week = strtotime(\"-1 week +1 day\");\n $start_week = strtotime(\"last monday midnight\", $previous_week);\n $end_week = strtotime(\"next sunday\", $start_week);\n $start_week = date(\"Y-m-d\", $start_week);\n $end_week = date(\"Y-m-d\", $end_week);\n $start_week = \\DateTime::createFromFormat('Y-m-d', $start_week);\n $end_week = \\DateTime::createFromFormat('Y-m-d', $end_week);\n $datePeriod = new \\DatePeriod($start_week, new \\DateInterval('P1D'), $end_week->modify('+1day'));\n foreach ($datePeriod as $date) {\n $dt = $date->format('Y-m-d');\n $query = $this->db->query(\"SELECT count(`EmployeeId`) as total,AttendanceDate FROM AttendanceMaster WHERE `AttendanceDate` ='\" . $dt . \"' and `OrganizationId`=\" . $orgid);\n $data['rec'][] = $query->result();\n $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , `TimeIn`, `TimeOut` ,AttendanceDate,'Present' as status FROM `AttendanceMaster` WHERE `AttendanceDate` ='\" . $dt . \"' and `OrganizationId`=\" . $orgid . \" and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8) order by DATE(AttendanceDate),name \");\n $data['elist'][] = $query->result();\n //---managing off (weekly and holiday)\n $query = $this->db->query(\"SELECT `DateFrom`, `DateTo` FROM `HolidayMaster` WHERE OrganizationId=? and (? between `DateFrom` and `DateTo`) \", array(\n $orgid,\n $dt\n ));\n if ($query->num_rows() > 0)\n continue;\n // day of month : 1 sun 2 mon --\n $dayOfWeek = 1 + date('w', strtotime($dt));\n $weekOfMonth = weekOfMonth($dt);\n $week = '';\n $query = $this->db->query(\"SELECT `WeekOff` FROM `WeekOffMaster` WHERE `OrganizationId` =? AND `Day` = ?\", array(\n $orgid,\n $dayOfWeek\n ));\n if ($row = $query->result()) {\n $week = explode(\",\", $row[0]->WeekOff);\n }\n if ($week[$weekOfMonth - 1] == 1)\n continue;\n //-----managing off (weekly and holiday) - close\n $query = $this->db->query(\"SELECT CONCAT(FirstName,' ',LastName) as name,'-' as TimeIn,'-' as TimeOut ,'Absent' as status,'\" . $dt . \"' as AttendanceDate from EmployeeMaster where `OrganizationId` =\" . $orgid . \" and EmployeeMaster.Id not in(select AttendanceMaster.`EmployeeId` from AttendanceMaster WHERE `AttendanceDate` ='\" . $dt . \"' and `OrganizationId`=\" . $orgid . \") order by DATE(AttendanceDate),name\");\n $data['absentees'][] = $query->result(); \n }\n //$data['elist']=$query->result();\n }\n echo json_encode($data, JSON_NUMERIC_CHECK);\n \n }",
"public function actionManageSessionAttendance()\n { {\n $message = null;\n\n $session_id = $_GET['session_id'];\n $session = Session::model()->findByPk($session_id);\n $staff_id = $session->staff_id;\n $students_id = $session->students_id;\n if (isset($_POST['staff'])) {\n $attend = '';\n // attend for staff\n if ($_POST['staff'] == 'on') {\n $attend = $attend . '1';\n } else {\n $attend = $attend . '0';\n }\n // attend for student\n $s = explode(',', $students_id);\n for ($i = 0; $i < count($s); $i++) {\n $j = $i + 1;\n if ($_POST['student_' . $j] == 'on') {\n $attend = $attend . '1';\n } else {\n $attend = $attend . '0';\n }\n }\n $session->attendance = $attend;\n if (!($session->save())) {\n throw new CHttpException('Unable to save!');\n }\n $message = 'Save Successful<br/>';\n\n }\n\n $this->render('manageSessionAttendance', array(\n 'staff_id' => $staff_id,\n 'students_id' => $students_id,\n 'message' => $message,\n 'session' => $session));\n }\n }",
"function student_attendance()\n\t{\n\t\t\n\t\t$usercode = $_REQUEST['usercode'];\n\t\t$userdt\t\t\t\t=\t$this->ObjM->get_user_by_usercode($usercode);\n\t\t$yearly_acccount \t= $this->ObjM->student_yearly_acccount($userdt[0]['idcode']);\n\t\t\n\t\t$arr=array('student_yearly_code' =>$yearly_acccount[0]['student_yearly_code'],'attendance_month'=>$_REQUEST['month']);\n\t\t$stud_att\t\t\t\t=\t$this->ObjM->get_student_attendance($arr);\n\t\t\n\t\tif(count($stud_att)<1){\n\t\t\t$json_arr[]=array('validation'=>'false');\t\n\t\t\techo json_encode($json_arr);\n\t\t\texit;\t \n\t\t}\n\t\t\n\t\tfor($i=0;$i<count($stud_att);$i++){\n\t\t\t\t$attendance_date = date('d-m-Y',$stud_att[$i]['attendance_date']);\n\t\t\t\t$json_arr[]=array(\n\t\t\t\t\t'attendance_date'\t\t=>\t$attendance_date,\n\t\t\t\t\t'attendance'\t\t\t=>\t$stud_att[$i]['attendance'],\n\t\t\t\t\t'validation'\t \t\t=>\t'true' );\n\t\t }\n\t\t echo json_encode($json_arr);\n\t\t\texit;\n\t}",
"public function actionIndex()\n { \n $mac=get_client_mac(get_client_ip());\n $employeeModel=Employee::findIdentityByMacAddress($mac);\n \n if($employeeModel!=null){\n if ($employeeModel->Active==0){\n print_r (\"InActive Employee.. Contact Admin\");\n return;\n }\n $model = new AttendanceIn();\n date_default_timezone_set('Asia/Calcutta');\n $model=AttendanceIn::findIdentityByUniqueKeys($employeeModel->id,date(\"Y-m-d\"));\n $month_off=MonthOff::find()->select([\"Dates\"])->where(['BranchId'=>$employeeModel->Branch])->andWhere(['Month'=>date('m')])->andWhere(['Year'=>date(\"Y\")])->all();\n if($month_off)\n $month_off=array_map('intval',explode(',',$month_off[0]['Dates'],-1));\n if($model==null){\n $model= new AttendanceIn();\n $model->EmployeeId=$employeeModel->id;\n $model->Date=date(\"Y-m-d\");\n $model->Time=date(\"H:i:s\");\n $timeSlotModel=TimeSlots::findOne(['id'=>$employeeModel->TimeSlot]);\n if(strcmp($model->Time,$timeSlotModel->Grace)<0){\n if(in_array(date('d'), $month_off)){\n if(!$leaveHistory=LeaveHistory::findOne(['EmployeeId'=>$employeeModel->id, 'LeaveType'=>4])){\n $leaveHistory =new LeaveHistory();\n $leaveHistory->id=$employeeModel->id;\n $leaveHistory->Type=4;\n $leaveHistory->LeaveCount=0;\n $leaveHistory->MaxLeave=0.5;\n }\n else{\n $leaveHistory->MaxLeave+=0.5;\n }\n $leaveHistory->save();\n $model->FirstHalf=\"WP\";\n }\n else\n $model->FirstHalf=\"P\";\n \n }\n else if (strcmp($model->Time,$timeSlotModel->Grace)>0 && strcmp($model->Time,$timeSlotModel->DeadOut)<0){\n if($employeeModel->DeadOutCount>=$timeSlotModel->MaxDeadOutCount)\n $model->FirstHalf=\"A\";\n else{\n $employeeModel->DeadOutCount+=1;\n $employeeModel->save();\n $model->Remark=$employeeModel->DeadOutCount.\" Late Count\";\n if(in_array(date('d'), $month_off)){\n if(!$leaveHistory=LeaveHistory::findOne(['EmployeeId'=>$employeeModel->id, 'LeaveType'=>4])){\n $leaveHistory =new LeaveHistory();\n $leaveHistory->id=$employeeModel->id;\n $leaveHistory->Type=4;\n $leaveHistory->LeaveCount=0;\n $leaveHistory->MaxLeave=0.5;\n }\n else{\n $leaveHistory->MaxLeave+=0.5;\n }\n $leaveHistory->save();\n $model->FirstHalf=\"WP\";\n }\n else\n $model->FirstHalf=\"P\";\n }\n }\n else{\n $model->FirstHalf=\"A\";\n }\n if($model->validate() && $model->save()){\n return $this->renderPartial('attendance-in-success', [\n 'employeeModel'=>$employeeModel,\n 'model'=>$model,\n ]);\n }\n else{\n print_r(\"Error Occured\");\n return;\n }\n }\n return AttendanceInController::actionOut();\n\n }\n else{\n print_r(\"<h1><p style='color:red;background-color:pink;border-color:#c3e6cb;'>No Such Device/Employee Registered</p></h1>\");\n return;\n }\n \n }",
"public function get_attendance($id,$start,$end){\n \t $id = \"CB0\".$id;\n $attendance = AttendanceData::whereEmployee_id($id)\n ->whereDate('attendance_date','>=', $start) \n ->whereDate('attendance_date','<=', $end) \n ->orderBy('attendance_date','ASC')\n ->get(['attendance_date','status']); \n\t\t\t\n\t\t\t\n\t\t\t// print_r($attendance); \n\t\t\t// die; \n\t\t\t\n\t\t\tif(empty($attendance)){\n\t\t\t\t$data['present'] = 0;\n\t\t\t\t$data['leaves'] = 0;\n\t\t\t\t$data['half_day'] = 0;\n\t\t\t\t$data['ui'] = 0;\n\t\t\t\t$data['sandwich_leave'] = 0;\n\t\t\t\treturn $data;\n\t\t\t}\n\t\t\t\n $attendance = $attendance->toArray(); \n \n $startdate = strtotime($start); \n $enddate = strtotime('+' . (date('t',$startdate) - 1). ' days',$startdate);\n $currentdate = $startdate;\n $p = $ab = $ui = $hd = $sw = 0; \n $sw_status = false;\n $holydays = ['Sun','Sat'];\n while ($currentdate <= $enddate){\n $day = date('D', $currentdate);\n $date = date('Y-m-d', $currentdate);\n if(in_array($day, $holydays)){ \n ++$p;\n }else{ \n $found_key = array_search(date('Y-m-d', $currentdate), array_column($attendance, 'attendance_date'));\n if(!empty($found_key) || $found_key===0){ \n $status = $attendance[$found_key]['status'];\n\n if($day==\"Fri\" && ($status==\"AB\" || $status==\"UI\"))\n $sw_status =true; \n switch($status){\n case 'P': \n ++$p;\n break;\n case 'AB':\n ++$ab;\n break;\n case 'UI':\n ++$ui;\n break;\n case 'HD':\n ++$hd;\n $p = ($p + 0.5); \n break;\n }\n if($day==\"Mon\" && ($sw_status==true) && ($status==\"AB\" || $status==\"UI\")){\n ++$sw; \n $sw_status =false; \n $p = $p-2;\n $ab = $ab+2; \n }\n }else{\n $check_holyday = Holiday::whereDate('date',$date)->first(); \n if(!empty($check_holyday))\n ++$p; \n }\n }\n $currentdate = strtotime('+1 day', $currentdate);\n } \n //echo \"<br> $id P => $p HD => $hd AB => $ab UI => $ui \";\n $data['present'] = $p;\n $data['leaves'] = $ab;\n $data['half_day'] = $hd;\n $data['ui'] = $ui;\n $data['sandwich_leave'] = $sw;\n\t\t\treturn $data;\n }",
"public function getCDateAttendances_new()\n {\n $orgid = isset($_REQUEST['refno']) ? $_REQUEST['refno'] : 0;\n $att = isset($_REQUEST['att']) ? $_REQUEST['att'] : 0;\n $date = isset($_REQUEST['date']) ? $_REQUEST['date'] : '';\n $datafor = isset($_REQUEST['datafor']) ? $_REQUEST['datafor'] : '';\n $empid = isset($_REQUEST['empid']) ? $_REQUEST['empid'] : ''; \n $zone = getTimeZone($orgid);\n date_default_timezone_set($zone);\n $date =date('Y-m-d',strtotime($date));\n $time = date('H:i:s');\n $data = array();\n $cdate = date('Y-m-d');\n\t $adminstatus = getAdminStatus($empid);\n\t\t$cond = \"\";\n\t\t$cond1 = \"\";\n\t\tif($adminstatus == '2')\n\t\t{ \n\t \t$dptid = getDepartmentIdByEmpID($empid);\n\t\t\t$cond = \" AND Department = $dptid \";\n\t\t\t$cond1 = \" AND Dept_id = $dptid \";\n\t\t\t\n\t\t}\n\t \n\t \n //today attendance\n\t\t if($datafor=='present'){\n\t\t$query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out FROM `AttendanceMaster` WHERE `AttendanceDate`=? $cond1 and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8 ) AND EmployeeId in (SELECT Id from EmployeeMaster where OrganizationId = ? AND Is_Delete = 0 ) order by `name`\", array($date,$orgid,$orgid));\n $data['present'] = $query->result();\n\t\t\t\n\t\t\t }else if($datafor=='absent'){/*\n //---managing off (weekly and holiday)\n $dt = $date; \n // day of month : 1 sun 2 mon --\n $dayOfWeek = 1 + date('w', strtotime($dt));\n $weekOfMonth = weekOfMonth($dt);\n $week = '';\n $query = $this->db->query(\"SELECT `WeekOff` FROM `WeekOffMaster` WHERE `OrganizationId` =? AND `Day` = ?\", array(\n $orgid,\n $dayOfWeek\n ));\n if ($row = $query->result()) {\n $week = explode(\",\", $row[0]->WeekOff);\n }\n if ($week[$weekOfMonth - 1] == 1) {\n $data['absentees'] = '';\n } else {\n $query = $this->db->query(\"SELECT `DateFrom`, `DateTo` FROM `HolidayMaster` WHERE OrganizationId=? and (? between `DateFrom` and `DateTo`) \", array(\n $orgid,\n $dt\n ));\n if ($query->num_rows() > 0) {\n //-----managing off (weekly and holiday) - close \n $query = $this->db->query(\"SELECT CONCAT(FirstName,' ',LastName) as name,'-' as TimeIn,'-' as TimeOut ,'Absent' as status from EmployeeMaster where `OrganizationId` =$orgid and EmployeeMaster.archive=1 and EmployeeMaster.Id not in(select AttendanceMaster.`EmployeeId` from AttendanceMaster where `AttendanceDate`='$date' and `OrganizationId` =$orgid) and CAST('$time' as time) > (select TimeIn from ShiftMaster where ShiftMaster.Id=shift) order by `name`\", array(\n $orgid,\n $date,\n $orgid\n ));\n $data['absentees'] = $query->result();\n } \n }*/\n\t\t\t//////////today_abs\n\t\t\t\n\t\t\tif($date != date('Y-m-d')){// for other deay's absentees\n\t\t\t\t$query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , '-' as `TimeOut` ,'-' as TimeIn FROM `AttendanceMaster` WHERE `AttendanceDate`=? $cond1 and OrganizationId=? and (AttendanceStatus=2 or AttendanceStatus=6 or AttendanceStatus=7 ) AND EmployeeId in (SELECT Id from EmployeeMaster where OrganizationId = $orgid AND Is_Delete = 0) order by `name`\", array($date,$orgid));\n\t\t\t\t$this->db->close();\n\t\t\t\t$data['absent'] = $query->result();\n\t\t\t}else{ // for today's absentees\n\t\t\t\t$query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , '-' as `TimeOut` ,'-' as TimeIn FROM `AttendanceMaster` WHERE `AttendanceDate`=? $cond1 and OrganizationId=? \nand AttendanceStatus in (2,6,7) AND EmployeeId in (SELECT Id from EmployeeMaster where OrganizationId = $orgid AND Is_Delete = 0 ) order by `name` \",array($date,$orgid));\n\t\t\t$temp=array();\n $temp = $query->result();\n\t\t\t\n\t\t\t$query = $this->db->query(\"SELECT CONCAT(FirstName,' ',LastName) as name, '-' as `TimeOut` ,'-' as TimeIn FROM `EmployeeMaster` WHERE `OrganizationId` =? AND Is_Delete=0 $cond AND ARCHIVE =1 AND is_Delete = 0 AND (DOL='0000-00-00' OR DOL>CURDATE()) AND Id NOT IN ( SELECT EmployeeId FROM AttendanceMaster WHERE AttendanceDate = ? AND `OrganizationId` =? ) AND ( SELECT `TimeIn` FROM `ShiftMaster` WHERE `Id` = Shift AND TimeIn < ? )\",array($orgid,$date,$orgid,$time));\n\t\t\t\n\t\t\t\t$data['absent']= array_merge($temp,$query->result());\t\n\t\t\t}\n\t\t\t\n\t}else if($datafor=='latecomings'){\n //////// today_late\n $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out FROM `AttendanceMaster` WHERE (time(TimeIn) > (select time(TimeIn) from ShiftMaster where ShiftMaster.Id=shiftId)) and `AttendanceDate`=? $cond1 and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8 ) AND EmployeeId in (SELECT Id from EmployeeMaster where OrganizationId = $orgid AND Is_Delete = 0 ) order by `name`\", array(\n $date,\n $orgid\n ));\n $data['lateComings'] = $query->result();\n\t}else if($datafor=='earlyleavings'){\t\t\n ////////today_early\n /*$query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out FROM `AttendanceMaster` WHERE (time(TimeOut) < (select time(TimeOut) from ShiftMaster where ShiftMaster.Id=shiftId) and TimeOut!='00:00:00' ) and `AttendanceDate`=? $cond1 and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8 ) AND EmployeeId in (SELECT Id from EmployeeMaster where OrganizationId = $orgid AND Is_Delete = 0) order by `name`\", array( $date,$orgid ));\n $data['earlyLeavings'] = $query->result();*/\n\t\t\t\n\t\t $query = $this->db->query(\"select Shift,Id , FirstName , LastName from EmployeeMaster where OrganizationId = $orgid and Id IN (select EmployeeId from AttendanceMaster where OrganizationId = $orgid and AttendanceDate='$date' and TimeIn != '00:00:00' ) AND is_Delete=0 order by FirstName\");\n\t\t $res = array();\n\t\t $cond = '';\n foreach ($query->result() as $row) {\n $ShiftId = $row->Shift;\n $EId = $row->Id;\n $query = $this->db->query(\"select TimeIn,TimeOut,shifttype from ShiftMaster where Id = $ShiftId\");\n if ($data123 = $query->row()) {\n $shiftout = $data123->TimeOut;\n $shiftout1 = $date. ' '.$data123->TimeOut;\n\t\t\t\tif($data123->shifttype==2)\n\t\t\t\t{\n\t\t\t\t\t$nextdate = date('Y-m-d',strtotime($date . \"+1 days\"));\n\t\t\t\t\t $shiftout1 = $nextdate.' '.$data123->TimeOut;\n\t\t\t\t}\n $shift = substr($data123->TimeIn, 0, 5) . ' - ' . substr($data123->TimeOut, 0, 5);\n $ct = date('H:i:s');\n \n if ($cdate == $date)\n $cond = \" and TimeOut !='00:00:00'\";\n $query333 = $this->db->query(\"select SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out from AttendanceMaster where EmployeeId =$EId and if(timeoutdate = '0000-00-00' , TimeOut < '$shiftout' , CONCAT(timeoutdate,' ' ,TimeOut) < '$shiftout1' ) and AttendanceDate='$date' and TimeOut !='00:00:00' \");\n\t\t\t\t\t\n\t\t\t\t\t\n if ($row333 = $query333->row()) {\n $a = new DateTime($row333->TimeOut);\n $b = new DateTime($data123->TimeOut);\n $interval = $a->diff($b);\n $data1['earlyby'] = $interval->format(\"%H:%I\");\n $data1['timeout'] = substr($row333->TimeOut, 0, 5);\n $data1['name'] = $row->FirstName . ' ' . $row->LastName;\n $data1['shift'] = $shift;\n $data1['status'] = $row333->status;\n $data1['TimeIn'] = $row333->TimeIn;\n $data1['TimeOut'] = $row333->TimeOut;\n $data1['CheckOutLoc'] = $row333->CheckOutLoc;\n $data1['checkInLoc'] = $row333->checkInLoc;\n $data1['EntryImage'] = $row333->EntryImage;\n $data1['ExitImage'] = $row333->ExitImage;\n $data1['latit_in'] = $row333->latit_in;\n $data1['longi_in'] = $row333->longi_in;\n $data1['latit_out'] = $row333->latit_out;\n $data1['longi_out'] = $row333->longi_out;\n $data1['date'] = $date;\n $res[] = $data1;\n }\n \n }\n }\n\t\t $data['earlyLeavings'] =\t $res;\n\t\t\t\n\t}\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n \n \n \n echo json_encode($data, JSON_NUMERIC_CHECK);\n \n }",
"public function view_attendance() { \r\n date_default_timezone_set(\"Asia/Manila\");\r\n $date= date(\"Y-m-d\");\r\n $year = date('Y', strtotime($date));\r\n $month = date('m', strtotime($date));\r\n $datenow = $year .\"-\". $month;\r\n $set_data = $this->session->userdata('userlogin'); //session data\r\n $data = array('clientID' => $set_data['clientID']\r\n ); \r\n $firstDay = mktime(0,0,0,$month, 1, $year);\r\n $timestamp = $firstDay;\r\n $weekDays = array();\r\n for ($i = 0; $i < 31; $i++) {\r\n $weekDays[] = strftime('%a', $timestamp);\r\n $timestamp = strtotime('+1 day', $timestamp);\r\n } \r\n $records['clientprofile']=$this->Client_Model->clientprofile($data);\r\n $records['weekDays']=$weekDays;\r\n $records['useradmin']=$this->User_Model->usertype();\r\n $records['employeeatendance']=$this->Attendance_Model->viewattendanceemployee($set_data['clientID'], $datenow);\r\n $this->load->view('attendanceemployee', $records);\r\n }",
"public function dispAttendence ($class_id,$stud_id)\n\t{\n\t\t\t$year_id = $this->getYear();\n\n\t\t\t$total_days_query = \"SELECT * FROM `edu_attendence` WHERE ac_year='$year_id' AND class_id='$class_id'\";\n\t\t\t$total_days_res = $this->db->query($total_days_query);\n\t\t\t$total_days_result= $total_days_res->result();\n\t\t\t$total_days_count = $total_days_res->num_rows();\n\n\t\t\tif($total_days_res->num_rows()==0){\n\t\t\t\t $response = array(\"status\" => \"error\", \"msg\" => \"Attendance not yet taken!\");\n\t\t\t}else{\n\t\t\t // $total_days = $total_days_count/2;\n\t\t\t $total_days = $total_days_count;\n\n\t\t\t foreach($total_days_result as $rows){\n \t\t\t\t$at_id = $rows->at_id;\n\t\t\t }\n\n \t\t\t$absent_query = \"SELECT * FROM `edu_attendance_history` WHERE class_id='$class_id' AND student_id='$stud_id' AND a_status = 'A' \";\n \t\t\t$absent_res = $this->db->query($absent_query);\n \t\t\t$absent_result= $absent_res->result();\n \t\t\t$absent_count = $absent_res->num_rows();\n\n \t\t\tif($absent_res->num_rows()>0){\n \t\t\t\t//$absent_days = $absent_count/2;\n \t\t\t\t$absent_days = $absent_count;\n \t\t\t} else {\n \t\t\t $absent_days = 0;\n \t\t\t}\n\n \t\t\t$leave_query = \"SELECT * FROM `edu_attendance_history` WHERE class_id='$class_id' AND student_id='$stud_id' AND a_status = 'L' \";\n \t\t\t$leave_res = $this->db->query($leave_query);\n \t\t\t$leave_result= $leave_res->result();\n \t\t\t$leave_count = $leave_res->num_rows();\n\n \t\t\tif($leave_res->num_rows()>0){\n \t\t\t\t //$leave_days = $leave_count/2;\n \t\t\t\t $leave_days = $leave_count;\n \t\t\t} else {\n \t\t\t $leave_days = 0;\n \t\t\t}\n\n \t\t\t$od_query = \"SELECT * FROM `edu_attendance_history` WHERE class_id='$class_id' AND student_id='$stud_id' AND a_status = 'OD' \";\n \t\t\t$od_res = $this->db->query($od_query);\n \t\t\t$od_result= $od_res->result();\n \t\t\t$od_count = $od_res->num_rows();\n\n \t\t\tif($od_res->num_rows()>0){\n \t\t\t\t //$od_days = $od_count/2;\n \t\t\t\t $od_days = $od_count;\n \t\t\t} else {\n \t\t\t $od_days = 0;\n \t\t\t}\n\t\t\t $total_leave = $absent_days+$leave_days+$od_days;\n\t\t\t $present_days = $total_days-$total_leave;\n\n\t\t\t \t$attendence_history = array(\"total_working_days\"=>$total_days, \"absent_days\"=>$absent_days, \"leave_days\"=>$leave_days, \"od_days\"=>$od_days, \"present_days\"=>$present_days);\n\n \t\t\t$attend_query = \"SELECT\n COUNT(B.abs_date) AS abs_count,\n A.at_id,\n B.student_id,\n B.abs_date,\n B.a_status\n FROM\n edu_attendence A,\n edu_attendance_history B\n WHERE\n A.ac_year = '$year_id' AND B.class_id = '$class_id' AND B.student_id = '$stud_id' AND B.attend_id = A.at_id\n GROUP BY\n B.abs_date\";\n \t\t\t$attend_res = $this->db->query($attend_query);\n \t\t\t$attend_result= $attend_res->result();\n \t\t\t$attend_count = $attend_res->num_rows();\n\n \t\t\t if($attend_res->num_rows()==0){\n \t\t\t\t $response = array(\"status\" => \"success\", \"msg\" => \"View Attendence\",\"attendenceHistory\"=>$attendence_history, \"attendenceDetails\"=>$attend_result);\n \t\t\t}else{\n \t\t\t\t$response = array(\"status\" => \"success\", \"msg\" => \"View Attendence\",\"attendenceHistory\"=>$attendence_history, \"attendenceDetails\"=>$attend_result);\n \t\t\t}\n\t\t\t}\n\t\t\treturn $response;\n\t}",
"public function update_attendance(){ \n\t\t$this->loadModel('HrAttendance');\n\t\tforeach($this->request->data as $key => $data){\n\t\t\t$count = count($data['date']);\n\t\t\t// iterate all the values\n\t\t\tfor($i = 0; $i < $count; $i++){ \n\t\t\t\t// for waive off requests\n\t\t\t\tif($data['chk'][$i] == 'on'){\n\t\t\t\t\t$status = 'A';\n\t\t\t\t\t$waive = '1';\n\t\t\t\t}else{\n\t\t\t\t\t$status = 'R';\n\t\t\t\t\t$waive = NULL;\n\t\t\t\t}\n\t\t\t\t$month = $data['date'][$i];\n\t\t\t\t$user_att_data = $this->HrAttendance->find('all', array('fields' => array('HrAttendance.id'), \n\t\t\t\t'conditions' => array(\"in_time like\" => $data['date'][$i].'%', \n\t\t\t\t'app_users_id' => $this->request->data['HrAttWaive']['user_id']), 'limit' => '1'));\n\t\t\t\t// format array\n\t\t\t\t$ar_data = array('modified_date' => $this->Functions->get_current_date(), 'att_waive' => $waive, 'waive_msg' => $data['remark'][$i]);\n\t\t\t\t$fieldList = array('att_waive', 'modified_date', 'waive_msg');\n\t\t\t\t$this->HrAttendance->id = $user_att_data[0]['HrAttendance']['id'];\n\t\t\t\tif($this->HrAttendance->id != ''){\n\t\t\t\t\tif($this->HrAttendance->save($ar_data, true, $fieldList)){\n\t\t\t\t\t\t// save in the waive off request table\n\t\t\t\t\t\t$ar_data = array('id' => $data['id'][$i], 'status' => $status, 'approve_date' => $this->Functions->get_current_date(),\n\t\t\t\t\t\t'remark' => $data['remark'][$i], 'approve_by' => $this->Session->read('USER.Login.id'));\n\t\t\t\t\t\t$fieldList = array('approve_date', 'remark', 'approve_by', 'id','status');\n\t\t\t\t\t\t$this->HrAttWaive->save($ar_data, true, $fieldList);\n\t\t\t\t\t\t$this->Session->setFlash('<button type=\"button\" class=\"close\" data-dismiss=\"alert\">×</button>Waive-off request approved successfully', 'default', array('class' => 'alert alert-success'));\t\n\t\t\t\t\t\t$req_status = 'success';\n\t\t\t\t\t}else{ \n\t\t\t\t\t\t$this->Session->setFlash('<button type=\"button\" class=\"close\" data-dismiss=\"alert\">×</button>Problem in updating the attendance, pls contact admin..', 'default', array('class' => 'alert alert-error'));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// send mail to user\n\t\tif($req_status == 'success'){\n\t\t\t$this->notify_user($this->request->data['HrAttWaive']['user_id'], date('M, Y', strtotime($month)));\n\t\t}else{\n\t\t\t$this->Session->setFlash('<button type=\"button\" class=\"close\" data-dismiss=\"alert\">×</button>Problem in updating the attendance, pls contact admin..', 'default', array('class' => 'alert alert-error'));\n\t\t}\n\t\t$this->redirect('/hrattwaive/');\t\n\t\t\n\t}",
"function attendance_construct_sessions_data_for_add($formdata, mod_attendance_structure $att) {\n global $CFG;\n\n $sesstarttime = $formdata->sestime['starthour'] * HOURSECS + $formdata->sestime['startminute'] * MINSECS;\n $sesendtime = $formdata->sestime['endhour'] * HOURSECS + $formdata->sestime['endminute'] * MINSECS;\n $sessiondate = $formdata->sessiondate + $sesstarttime;\n $duration = $sesendtime - $sesstarttime;\n if (empty(get_config('attendance', 'enablewarnings'))) {\n $absenteereport = get_config('attendance', 'absenteereport_default');\n } else {\n $absenteereport = empty($formdata->absenteereport) ? 0 : 1;\n }\n\n $now = time();\n\n if (empty(get_config('attendance', 'studentscanmark'))) {\n $formdata->studentscanmark = 0;\n }\n\n if (empty(get_config('attendance', 'allowupdatestatus'))) {\n $formdata->allowupdatestatus = 0;\n }\n\n $calendarevent = 0;\n if (isset($formdata->calendarevent)) { // Calendar event should be created.\n $calendarevent = 1;\n }\n\n $sessions = array();\n if (isset($formdata->addmultiply)) {\n $startdate = $sessiondate;\n $enddate = $formdata->sessionenddate + DAYSECS; // Because enddate in 0:0am.\n\n if ($enddate < $startdate) {\n return null;\n }\n\n // Getting first day of week.\n $sdate = $startdate;\n $dinfo = usergetdate($sdate);\n if ($CFG->calendar_startwday === '0') { // Week start from sunday.\n $startweek = $startdate - $dinfo['wday'] * DAYSECS; // Call new variable.\n } else {\n $wday = $dinfo['wday'] === 0 ? 7 : $dinfo['wday'];\n $startweek = $startdate - ($wday - 1) * DAYSECS;\n }\n\n $wdaydesc = array(0 => 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat');\n\n while ($sdate < $enddate) {\n if ($sdate < strtotime('+1 week', $startweek)) {\n $dinfo = usergetdate($sdate);\n if (isset($formdata->sdays) && array_key_exists($wdaydesc[$dinfo['wday']], $formdata->sdays)) {\n $sess = new stdClass();\n $sess->sessdate = make_timestamp($dinfo['year'], $dinfo['mon'], $dinfo['mday'],\n $formdata->sestime['starthour'], $formdata->sestime['startminute']);\n $sess->duration = $duration;\n $sess->descriptionitemid = $formdata->sdescription['itemid'];\n $sess->description = $formdata->sdescription['text'];\n $sess->descriptionformat = $formdata->sdescription['format'];\n $sess->calendarevent = $calendarevent;\n $sess->timemodified = $now;\n $sess->absenteereport = $absenteereport;\n $sess->studentpassword = '';\n $sess->includeqrcode = 0;\n $sess->rotateqrcode = 0;\n $sess->rotateqrcodesecret = '';\n $sess->automark = !empty($formdata->automark) ? $formdata->automark : 0;\n $sess->automarkcmid = !empty($formdata->automarkcmid) ? $formdata->automarkcmid : 0;\n $sess->automarkcompleted = 0;\n\n if (!empty($formdata->usedefaultsubnet)) {\n $sess->subnet = $att->subnet;\n } else {\n $sess->subnet = $formdata->subnet;\n }\n if (!empty($formdata->preventsharedip)) {\n $sess->preventsharedip = $formdata->preventsharedip;\n }\n if (!empty($formdata->preventsharediptime)) {\n $sess->preventsharediptime = $formdata->preventsharediptime;\n }\n\n if (isset($formdata->studentscanmark)) { // Students will be able to mark their own attendance.\n $sess->studentscanmark = 1;\n if (isset($formdata->allowupdatestatus)) {\n $sess->allowupdatestatus = $formdata->allowupdatestatus;\n } else {\n $sess->allowupdatestatus = 0;\n }\n if (isset($formdata->autoassignstatus)) {\n $sess->autoassignstatus = 1;\n }\n if (isset($formdata->studentsearlyopentime)) {\n $sess->studentsearlyopentime = $formdata->studentsearlyopentime;\n }\n\n if (!empty($formdata->randompassword)) {\n $sess->studentpassword = attendance_random_string();\n } else if (!empty($formdata->studentpassword)) {\n $sess->studentpassword = $formdata->studentpassword;\n }\n if (!empty($formdata->includeqrcode)) {\n $sess->includeqrcode = $formdata->includeqrcode;\n }\n if (!empty($formdata->rotateqrcode)) {\n $sess->rotateqrcode = $formdata->rotateqrcode;\n $sess->studentpassword = attendance_random_string();\n $sess->rotateqrcodesecret = attendance_random_string();\n }\n if (!empty($formdata->preventsharedip)) {\n $sess->preventsharedip = $formdata->preventsharedip;\n }\n if (!empty($formdata->preventsharediptime)) {\n $sess->preventsharediptime = $formdata->preventsharediptime;\n }\n } else {\n $sess->subnet = '';\n $sess->automark = 0;\n $sess->automarkcompleted = 0;\n $sess->preventsharedip = 0;\n $sess->preventsharediptime = '';\n }\n $sess->statusset = $formdata->statusset;\n\n attendance_fill_groupid($formdata, $sessions, $sess);\n }\n\n $sdate = strtotime(\"+1 day\", $sdate); // Set start to tomorrow.\n } else {\n $startweek = strtotime(\"+\".$formdata->period.' weeks', $startweek);\n $sdate = $startweek;\n }\n }\n } else {\n $sess = new stdClass();\n $sess->sessdate = $sessiondate;\n $sess->duration = $duration;\n $sess->descriptionitemid = $formdata->sdescription['itemid'];\n $sess->description = $formdata->sdescription['text'];\n $sess->descriptionformat = $formdata->sdescription['format'];\n $sess->calendarevent = $calendarevent;\n $sess->timemodified = $now;\n $sess->studentscanmark = 0;\n $sess->allowupdatestatus = 0;\n $sess->autoassignstatus = 0;\n $sess->subnet = '';\n $sess->studentpassword = '';\n $sess->automark = 0;\n $sess->automarkcompleted = 0;\n\n if (!empty($formdata->automarkcmid)) {\n $sess->automarkcmid = $formdata->automarkcmid;\n } else {\n $sess->automarkcmid = 0;\n }\n\n $sess->absenteereport = $absenteereport;\n $sess->includeqrcode = 0;\n $sess->rotateqrcode = 0;\n $sess->rotateqrcodesecret = '';\n\n if (!empty($formdata->usedefaultsubnet)) {\n $sess->subnet = $att->subnet;\n } else {\n $sess->subnet = $formdata->subnet;\n }\n\n if (!empty($formdata->automark)) {\n $sess->automark = $formdata->automark;\n }\n if (!empty($formdata->automark)) {\n $sess->automark = $formdata->automark;\n }\n if (!empty($formdata->preventsharedip)) {\n $sess->preventsharedip = $formdata->preventsharedip;\n }\n if (!empty($formdata->preventsharediptime)) {\n $sess->preventsharediptime = $formdata->preventsharediptime;\n }\n\n if (isset($formdata->studentscanmark) && !empty($formdata->studentscanmark)) {\n // Students will be able to mark their own attendance.\n $sess->studentscanmark = 1;\n if (!empty($formdata->allowupdatestatus)) {\n $sess->allowupdatestatus = $formdata->allowupdatestatus;\n } else {\n $sess->allowupdatestatus = 0;\n }\n if (isset($formdata->autoassignstatus) && !empty($formdata->autoassignstatus)) {\n $sess->autoassignstatus = 1;\n }\n if (!empty($formdata->randompassword)) {\n $sess->studentpassword = attendance_random_string();\n } else if (!empty($formdata->studentpassword)) {\n $sess->studentpassword = $formdata->studentpassword;\n }\n if (!empty($formdata->includeqrcode)) {\n $sess->includeqrcode = $formdata->includeqrcode;\n }\n if (!empty($formdata->rotateqrcode)) {\n $sess->rotateqrcode = $formdata->rotateqrcode;\n $sess->studentpassword = attendance_random_string();\n $sess->rotateqrcodesecret = attendance_random_string();\n }\n if (!empty($formdata->usedefaultsubnet)) {\n $sess->subnet = $att->subnet;\n } else {\n $sess->subnet = $formdata->subnet;\n }\n\n if (!empty($formdata->automark)) {\n $sess->automark = $formdata->automark;\n }\n if (!empty($formdata->preventsharedip)) {\n $sess->preventsharedip = $formdata->preventsharedip;\n }\n if (!empty($formdata->studentsearlyopentime)) {\n $sess->studentsearlyopentime = $formdata->studentsearlyopentime;\n }\n }\n $sess->statusset = $formdata->statusset;\n\n attendance_fill_groupid($formdata, $sessions, $sess);\n }\n\n return $sessions;\n}",
"function generateAttendance($args, $request) {\r\n\t\t$meetingId = isset($args[0]) ? $args[0]: 0;\r\n\t\t$this->validate($meetingId, MINUTES_STATUS_ATTENDANCE);\r\n\t\t$this->setupTemplate(true, $meetingId);\r\n\t\t$meeting =& $this->meeting;\r\n\r\n\t\t$journal =& Request::getJournal();\r\n\t\timport('classes.meeting.form.AttendanceForm');\r\n\t\t$attendanceForm = new AttendanceForm($meetingId, $journal->getId());\r\n\t\t$submitted = Request::getUserVar(\"submitAttendance\") != null ? true : false;\r\n\r\n\t\tif($submitted) {\r\n\t\t\t$attendanceForm->readInputData();\r\n\t\t\tif($attendanceForm->validate()) {\r\n\t\t\t\t$attendanceForm->execute();\r\n\t\t\t\t$attendanceForm->savePdf();\r\n\t\t\t\tRequest::redirect(null, null, 'manageMinutes', $meetingId);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif ($attendanceForm->isLocaleResubmit()) {\r\n\t\t\t\t\t$attendanceForm->readInputData();\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t$attendanceForm->initData();\r\n\t\t\t\t}\r\n\t\t\t\t$attendanceForm->display();\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$attendanceForm->display();\r\n\t\t}\r\n\t}",
"public function mark_attendance($message = NULL) {\n $data['sideMenuData'] = fetch_non_main_page_content();\n $tenant_id = $this->tenant_id;\n $course_id = $this->input->post('course_id');\n $class_id = $this->input->post('class_id');\n $subsidy = $this->input->post('subsidy');\n $sort_by = $this->input->get('b');\n $sort_order = $this->input->get('o');\n $class_details = $this->class->get_class_by_id($tenant_id, $course_id, $class_id);\n \n $from_date = parse_date($class_details->class_start_datetime, SERVER_DATE_TIME_FORMAT);///added by shubhranshu\n $to_date = parse_date($class_details->class_end_datetime, SERVER_DATE_TIME_FORMAT);//added by shubhranshu\n $week_start_date = parse_date($this->input->post('week_start'), CLIENT_DATE_FORMAT);//added by shubhranshu\n //echo print_r($from_date);print_r($to_date);print_r($week_start_date);exit;\n \n $week = $this->input->post('week');\n $export = $this->input->post('export');\n $export1 = $this->input->post('export1');\n $this->load->helper('attendance_helper');\n if (!empty($export)) \n {\n $class_details = $this->class->get_class_details_for_report($tenant_id, $course_id, $class_id);\n $class_start = parse_date($class_details->class_start_datetime, SERVER_DATE_TIME_FORMAT);\n $class_end = parse_date($class_details->class_end_datetime, SERVER_DATE_TIME_FORMAT);\n if (empty($class_start))\n $class_start = new DateTime();\n if (empty($class_end))\n $class_end = new DateTime();\n $class_schedule = $this->class->get_all_class_schedule($tenant_id, $class_id);\n $class_schedule_data = array();\n foreach ($class_schedule as $row) {\n $session_arr = array('S1' => '1', 'BRK' => '3', 'S2' => '2');\n $class_schedule_data[date('d/m/y', strtotime($row['class_date']))][$session_arr[$row['session_type_id']]] = date('h:i A', strtotime($row['session_start_time']));\n }\n \n if ($export == 'xls') \n {\n $results = $this->classtraineemodel->get_class_trainee_list_for_attendance($tenant_id, $course_id, $class_id, $subsidy, $class_start, $class_end, $sort_by, $sort_order);\n $this->load->helper('export_helper');\n export_attendance($results, $class_details, $class_start, $class_end, $class_schedule_data);\n } \n else \n {\n $results = $this->classtraineemodel->get_class_trainee_list_for_attendance($tenant_id, $course_id, $class_id, $subsidy, $class_start, $class_end, $sort_by, $sort_order);\n $tenant_details = $this->classtraineemodel->get_tenant_masters($tenant_id);\n $tenant_details->tenant_state = rtrim($this->course->get_metadata_on_parameter_id($tenant_details->tenant_state), ', ');\n $tenant_details->tenant_country = rtrim($this->course->get_metadata_on_parameter_id($tenant_details->tenant_country), ', ');\n\t\t$mark_count = $this->classtraineemodel->get_rows_count($course_id,$class_id);\n \n if ($export == 'xls_week'){\n $this->load->helper('export_helper');\n return generate_class_attendance_sheet_xls($results, $class_details, $class_start, $class_end, $tenant_details, $class_schedule_data);\n }\n $this->load->helper('pdf_reports_helper');\n if ($export == 'pdf') {\n //return generate_class_attendance_pdf($results, $class_details, $tenant_details, $class_schedule_data, $mark_count);\n //print_r($results);exit;\n return generate_class_attendance_pdf($results, $class_details, $tenant_details, $class_schedule_data,$mark_count); // removed mark count by shubhranshu\n \n } else if ($export == 'pdf_week') {\n return generate_class_attendance_sheet_pdf($results, $class_details, $tenant_details, $class_schedule_data);\n }\n }\n \n } \n else \n {\n if($export1=='lock')\n { \n $lock_msg=$this->classtraineemodel->lock_class_attendance($tenant_id,$course_id,$class_id);\n if($lock_msg==TRUE){\n $this->session->set_flashdata(\"success\", \"Succesfully Locked.\");\n }else{\n $this->session ->set_flashdata(\"error\",\"Something went wrong while locking.\");\n }\n }else if($export1=='unlock'){\n $lock_msg=$this->classtraineemodel->unlock_class_attendance($tenant_id,$course_id,$class_id);\n if($lock_msg==TRUE){\n $this->session->set_flashdata(\"success\",\"Succesfully Unocked\");\n }else{\n $this->session->set_flashdata(\"error\",\"Somthing went wrong while Unlocking !\");\n \n }\n }\n \n \n $data = get_data_for_renderring_attendance($tenant_id, $course_id, $class_id, $subsidy, $from_date, $to_date, $week_start_date, $week, $sort_by, $sort_order,'');\n \n $data['class_schedule'] = $this->class->get_all_class_schedule($tenant_id, $class_id);\n $att = $this->classtraineemodel->get_attendance_lock_status($tenant_id,$course_id, $class_id);\n $data['lock_status']=$att->lock_status;\n $data['class_start_datetime']=$att->class_start_datetime;\n\t\t\t$data['user'] = $this->user;\n\t\t\t$data['controllerurl'] = 'class_trainee/mark_attendance';\n $data['page_title'] = 'Class Trainee Enrollment - Mark Attendance';\n $data['main_content'] = 'classtrainee/markattendance';\n //$data['week_start'] = $from_date;\n //$data['sideMenuData'] = $this->sideMenu;\n if (!empty($message))\n $data['message'] = $message;\n $this->load->view('layout', $data);\n }\n }",
"public function show(Attendance $attendance)\n {\n //\n }",
"public function show(Attendance $attendance)\n {\n //\n }",
"public function show(Attendance $attendance)\n {\n //\n }",
"function getAttendanceLecturer($classid,$crdate){\r\ninclude 'dbConnect.php';\r\n$sql= 'SELECT Student.SID, Classroom.ClassID, Course.CourseID, Student.SName, Course.CourseName, Classroom.Location, Classroom.StartTime, Classroom.EndTime, CRDate, Attendance_Status \r\nFROM Attendance\r\nINNER JOIN Student ON Attendance.SID = Student.SID\r\nINNER JOIN Classroom ON Attendance.ClassID = Classroom.ClassID\r\nINNER JOIN Course ON Attendance.CourseID = Course.CourseID\r\nWHERE Classroom.ClassID = '.$classid.'\r\nAND CRDate = \"'.$crdate.'\";';\r\n$result = mysqli_query($conn, $sql);\r\n$table = 'Attendance';\r\n$link = exportToCsv($sql,$table,$conn);\r\nif(isset($result)){\r\n\tif(mysqli_num_rows($result) > 0){\r\n\t\t$view = '<div class=\"alert alert-warning\">\r\n\t\t\t\t\t\t<strong>Warning!</strong> You have recorded this classroom before. You can only edit this attendance!\r\n\t\t\t\t</div>\r\n\t\t\t\t<form method=\"post\" action=\"attendance.php\">\r\n\t\t\t\t<table id=\"attendanceTable\" class=\"table table-striped custab\">\r\n\t\t\t\t<thead>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<th>Student Name</th>\r\n\t\t\t\t\t\t<th>Course Name</th>\r\n\t\t\t\t\t\t<th>Location</th>\r\n\t\t\t\t\t\t<th>Start Time</th>\r\n\t\t\t\t\t\t<th>End Time</th>\r\n\t\t\t\t\t\t<th>Class Date</th>\r\n\t\t\t\t\t\t<th>Attendance</th>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</thead><tbody>';\r\n\t\t$count = 0;\r\n\t\twhile($row = mysqli_fetch_assoc($result))\r\n\t\t{\r\n\t\t$dt = strtotime($row['CRDate']);\r\n\t\t$day = date(\"l\", $dt);\r\n\t\t\r\n\t\t$view.= '<tr>\r\n <td>'.$row['SName'].'</td>\r\n <td>'.$row['CourseName'].'</td>\r\n\t\t\t\t<td>'.$row['Location'].'</td>\r\n\t\t\t\t<td>'.$row['StartTime'].'</td>\r\n\t\t\t\t<td>'.$row['EndTime'].'</td>\r\n\t\t\t\t<td>'.$row['CRDate'].' / ('.$day.')</td>\r\n\t\t\t\t<td>\r\n\t\t\t\t<div class=\"switch-field\">';\r\n\t\tif($row['Attendance_Status'] == 'Present'){\r\n\t\t\t$view.= '<input type=\"radio\" id=\"switch_left'.$count.'\" name=\"tableRow['.$count.'][attendance]\" value=\"Present\" checked/>';\r\n\t\t}else{\r\n\t\t\t$view.= '<input type=\"radio\" id=\"switch_left'.$count.'\" name=\"tableRow['.$count.'][attendance]\" value=\"Present\" />';\r\n\t\t}\r\n\t\t$view.=\t'<label for=\"switch_left'.$count.'\">Present</label>';\r\n\t\tif($row['Attendance_Status'] == 'Absent'){\r\n\t\t\t$view.=\t'<input type=\"radio\" id=\"switch_right'.$count.'\" name=\"tableRow['.$count.'][attendance]\" value=\"Absent\" checked/>';\r\n\t\t}else{\r\n\t\t\t$view.=\t'<input type=\"radio\" id=\"switch_right'.$count.'\" name=\"tableRow['.$count.'][attendance]\" value=\"Absent\" />';\r\n\t\t}\r\n\t\t$view.=\t'<label for=\"switch_right'.$count.'\">Absent</label>\r\n\t\t\t\t</div>\r\n\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<div><input type=\"hidden\" name=\"tableRow['.$count.'][sid]\" value=\"'.$row[\"SID\"].'\"/></div>\r\n\t\t\t\t<div><input type=\"hidden\" name=\"tableRow['.$count.'][classid]\" value=\"'.$row[\"ClassID\"].'\"/></div>\r\n\t\t\t\t<div><input type=\"hidden\" name=\"tableRow['.$count.'][courseid]\" value=\"'.$row[\"CourseID\"].'\"/></div>\r\n\t\t\t\t<div><input type=\"hidden\" name=\"tableRow['.$count.'][crdate]\" value=\"'.$row[\"CRDate\"].'\"/></div>';\r\n\t\t$count++;\r\n\t\t}\r\n\t\t$view.= '</tbody></table>\r\n\t\t\t\t<input class=\"btn btn-warning\" type=\"submit\" name=\"edit\" value=\"Edit Attendance\"/>\r\n\t\t\t\t</form>\r\n\t\t\t\t</br>\r\n\t\t\t\t<a class=\"btn btn-success\" href='.$link.'>Export to Excel</a>\r\n\t\t\t\t';\r\n\t\t\t\t\r\n\t}else{\r\n\t\t$view = '<div class=\"alert alert-danger\">\r\n\t\t\t\t No student register this class yet!\r\n\t\t\t\t</div>';\r\n\t}\r\n}else{\r\n\t$view = 'Database Connection Error.';\r\n}\r\n\treturn $view;\r\n}",
"public function pcAttendance_report() {\n BackendMenu::setContext('Olabs.Oims', 'reports', 'pcattendance_report');\n $this->searchFormWidget = $this->createAttendanceSearchFormWidget();\n $this->pageTitle = 'Petty Contractor Attendance Report';\n $reports = array();\n\n $oimsSetting = \\Olabs\\Oims\\Models\\Settings::instance();\n\n $searchForm = $this->searchFormWidget;\n\n $this->vars['search'] = false;\n $this->vars['msg'] = false;\n $this->vars['searchFormWidget'] = $searchForm;\n $this->vars['reports'] = $reports;\n\n $this->vars['oimsSetting'] = $oimsSetting;\n }",
"public function attend() {\n\n $attr = array(\n 'events' => $this->db->query(\"SELECT id, title\n FROM events\n WHERE DATE_FORMAT(event_date, '%Y-%m') = DATE_FORMAT(NOW(), '%Y-%m')\n ORDER BY event_date DESC\")->result(),\n 'department' => $this->db->query(\"SELECT CONCAT(IF(is_pt = 1, CONCAT('PT. ', REPLACE(name, 'PT. ', '')), REPLACE(name, 'PT. ', '')), ' (', team, ')') AS 'name',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t CONCAT('t', ansena_team.id) AS 'id'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t FROM ansena_team \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t LEFT JOIN ansena_department ON ansena_department.id = ansena_team.dept_id \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t UNION ALL \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t SELECT IF(is_pt = 1, CONCAT('PT. ', REPLACE(name, 'PT. ', '')), REPLACE(name, 'PT. ', '')) AS 'name',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t CONCAT('d', ansena_department.id) AS 'id'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t FROM ansena_department \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t LEFT OUTER JOIN ansena_team ON ansena_team.dept_id = ansena_department.id \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t WHERE ansena_team.id IS NULL\")->result()\n \n );\n \n $this->layout_lib->template_with_custom_navbar('analisa/navbar-sub-attend', 'analisa/attend', $attr);\n \n }",
"function professor_class_routine_attendance($professor_id, $date) {\n return $this->db->select()\n ->from('class_routine')\n ->join('subject_manager', 'subject_manager.sm_id = class_routine.SubjectID')\n ->join('degree', 'degree.d_id = class_routine.DepartmentID')\n ->join('course', 'course.course_id = class_routine.BranchID')\n ->join('semester', 'semester.s_id = class_routine.SemesterID')\n ->join('class', 'class.class_id = class_routine.ClassID')\n ->where(array(\n //'class_routine.DepartmentID' => $where['department_id'],\n 'DATE_FORMAT(class_routine.Start, \"%Y-%m-%d\") <= ' => date('Y-m-d', strtotime($date)),\n //'class_routine.BranchID' => $where['branch_id'],\n // 'class_routine.BatchID' => $where['batch_id'],\n //'class_routine.SemesterID' => $where['semester_id'],\n //'class_routine.ClassID' => $where['class_id'],\n 'class_routine.ProfessorID' => $professor_id\n ))->order_by('class_routine.ClassRoutineId', 'ASC')->get()->result();\n }",
"public function attendances()\n {\n return $this->hasMany('App\\Models\\Attendance', 'personnel_no', 'personnel_no');\n }",
"public function actionAttendanceInView()\n {\n $no_days=new Query;\n $no_days->select('Days')->from('months')->where(['id'=>Yii::$app->request->queryParams['AttendanceInSearch'][\"Month\"]]);\n $_no_days = $no_days->all();\n $start=Yii::$app->request->queryParams['AttendanceInSearch'][\"Year\"].\"-\".add_zero(Yii::$app->request->queryParams['AttendanceInSearch'][\"Month\"]).\"-\".\"01\";\n $end=Yii::$app->request->queryParams['AttendanceInSearch'][\"Year\"].\"-\".add_zero(Yii::$app->request->queryParams['AttendanceInSearch'][\"Month\"]).\"-\".\"31\";\n \n $present_days=AttendanceIn::find()->where(['EmployeeId'=>Yii::$app->request->queryParams['AttendanceInSearch'][\"EmployeeId\"]])->andWhere(['and','Date>='.'\"'.$start.'\"','Date<='.'\"'.$end.'\"'])->all();\n $pst_days=[];\n foreach ($present_days as $pd) {\n $pst_days[$pd[\"Date\"]]=['InTime'=>$pd[\"Time\"],'OutTime'=>$pd[\"OutTime\"],\"Resolved\"=>(ChangeRequest::findOne(['RaisedEmpCode'=>Yii::$app->request->queryParams['AttendanceInSearch'][\"EmployeeId\"],'Date'=>$pd[\"Date\"]])[\"Resolved\"]),\"Attendance\"=>$pd['FirstHalf'].\"-\".$pd['SecondHalf'],\"Remark\"=>$pd['Remark']];\n \n }\n/* $attendance_criteria=[];\n foreach(TimeSlots::find()->all() as $ac){\n $attendance_criteria[$ac['id']]=['InTime'=>$ac['InTime'],'OutTime'=>$ac['OutTime'],'Grace'=>$ac['Grace'],'DeadOut'=>$ac['DeadOut'],'MaxDeadOutCount'=>$ac['MaxDeadOutCount']];\n }*/\n $leave_record=[];\n foreach(LeaveRequest::find()->where(['RaisedEmpId'=>Yii::$app->request->queryParams['AttendanceInSearch'][\"EmployeeId\"]])->andWhere(['and','Date>='.'\"'.$start.'\"','Date<='.'\"'.$end.'\"'])->all() as $lq){\n $leave_record[$lq['Date']]=$lq['Resolved'];\n }\n $month_off=MonthOff::find()->select([\"Dates\"])->where(['BranchId'=>Employee::findOne(['id'=>Yii::$app->request->queryParams['AttendanceInSearch'][\"EmployeeId\"]])->Branch])->andWhere(['Month'=>add_zero(Yii::$app->request->queryParams['AttendanceInSearch'][\"Month\"])])->andWhere(['Year'=>add_zero(Yii::$app->request->queryParams['AttendanceInSearch'][\"Year\"])])->all();\n if($month_off)\n $month_off=array_map('intval',explode(',',$month_off[0]['Dates'],-1));\n else\n $month_off=[];\n $searchModel = new AttendanceInSearch();\n return $this->render('attendance-in-view', [\n 'searchModel' => $searchModel,\n 'no_days'=>(int)$_no_days[0][\"Days\"],\n 'present_days'=>$pst_days,\n 'leave_record'=>$leave_record,\n 'month_off'=>$month_off,\n ]);\n }",
"function attendance_get_user_sessions_log_full($userid, $pageparams) {\n global $DB;\n // All taken sessions (including previous groups).\n\n $usercourses = enrol_get_users_courses($userid);\n list($usql, $uparams) = $DB->get_in_or_equal(array_keys($usercourses), SQL_PARAMS_NAMED, 'cid0');\n\n $coursesql = \"(1 = 1)\";\n $courseparams = array();\n $now = time();\n if ($pageparams->sesscourses === 'current') {\n $coursesql = \"(c.startdate = 0 OR c.startdate <= :now1) AND (c.enddate = 0 OR c.enddate >= :now2)\";\n $courseparams = array(\n 'now1' => $now,\n 'now2' => $now,\n );\n }\n\n $datesql = \"(1 = 1)\";\n $dateparams = array();\n if ($pageparams->startdate && $pageparams->enddate) {\n $datesql = \"ats.sessdate >= :sdate AND ats.sessdate < :edate\";\n $dateparams = array(\n 'sdate' => $pageparams->startdate,\n 'edate' => $pageparams->enddate,\n );\n }\n\n if ($pageparams->groupby === 'date') {\n $ordersql = \"ats.sessdate ASC, c.fullname ASC, att.name ASC, att.id ASC\";\n } else {\n $ordersql = \"c.fullname ASC, att.name ASC, att.id ASC, ats.sessdate ASC\";\n }\n\n // WHERE clause is important:\n // gm.userid not null => get unmarked attendances for user's current groups\n // ats.groupid 0 => get all sessions that are for all students enrolled in course\n // al.id not null => get all marked sessions whether or not user currently still in group.\n $sql = \"SELECT ats.id, ats.groupid, ats.sessdate, ats.duration, ats.description, ats.statusset,\n al.statusid, al.remarks, ats.studentscanmark, ats.allowupdatestatus, ats.autoassignstatus,\n ats.preventsharedip, ats.preventsharediptime, ats.studentsearlyopentime,\n ats.attendanceid, att.name AS attname, att.course AS courseid, c.fullname AS cname\n FROM {attendance_sessions} ats\n JOIN {attendance} att\n ON att.id = ats.attendanceid\n JOIN {course} c\n ON att.course = c.id\n LEFT JOIN {attendance_log} al\n ON ats.id = al.sessionid AND al.studentid = :uid\n LEFT JOIN {groups_members} gm\n ON (ats.groupid = gm.groupid AND gm.userid = :uid1)\n WHERE (gm.userid IS NOT NULL OR ats.groupid = 0 OR al.id IS NOT NULL)\n AND att.course $usql\n AND $datesql\n AND $coursesql\n ORDER BY $ordersql\";\n\n $params = array(\n 'uid' => $userid,\n 'uid1' => $userid,\n );\n $params = array_merge($params, $uparams);\n $params = array_merge($params, $dateparams);\n $params = array_merge($params, $courseparams);\n $sessions = $DB->get_records_sql($sql, $params);\n\n foreach ($sessions as $sess) {\n if (empty($sess->description)) {\n $sess->description = get_string('nodescription', 'attendance');\n } else {\n $modinfo = get_fast_modinfo($sess->courseid);\n $cmid = $modinfo->instances['attendance'][$sess->attendanceid]->get_course_module_record()->id;\n $ctx = context_module::instance($cmid);\n $sess->description = format_text(file_rewrite_pluginfile_urls($sess->description,\n 'pluginfile.php', $ctx->id, 'mod_attendance', 'session', $sess->id));\n }\n }\n\n return $sessions;\n}",
"public function attendance_calendar($action = 'calendar_list', $attendance_id = 0, $calendar_id = 0)\n {\n $attendance = new Attendance();\n $calendar_id = intval($calendar_id);\n $data = array();\n $data['attendance_id'] = $attendance_id;\n $attendance_id = intval($attendance_id);\n $groupList = isset($_POST['groups']) ? array($_POST['groups']) : array();\n\n if ($action == 'calendar_add') {\n if (strtoupper($_SERVER['REQUEST_METHOD']) == \"POST\") {\n if (!isset($_POST['cancel'])) {\n if (isset($_POST['repeat'])) {\n //@todo check this error_logs\n $start_datetime = api_strtotime(\n api_get_utc_datetime($_POST['date_time']), 'UTC'\n );\n\n $end_datetime = api_strtotime(api_get_utc_datetime($_POST['end_date_time'].' 23:59:59'), 'UTC');\n $checkdate = api_is_valid_date(api_get_utc_datetime($_POST['end_date_time'].' 23:59:59'));\n\n $repeat_type = $_POST['repeat_type'];\n if (($end_datetime > $start_datetime) && $checkdate) {\n $attendance->attendance_repeat_calendar_add(\n $attendance_id,\n $start_datetime,\n $end_datetime,\n $repeat_type,\n $groupList\n );\n $action = 'calendar_list';\n } else {\n if (!$checkdate) {\n $data['error_checkdate'] = true;\n } else {\n $data['error_repeat_date'] = true;\n }\n $data['repeat'] = true;\n $action = 'calendar_add';\n }\n } else {\n $datetime = $_POST['date_time'];\n $datetimezone = api_get_utc_datetime($datetime);\n if (!empty($datetime)) {\n $attendance->set_date_time($datetimezone);\n $attendance->attendance_calendar_add($attendance_id, $groupList);\n $action = 'calendar_list';\n } else {\n $data['error_date'] = true;\n $action = 'calendar_add';\n }\n }\n } else {\n $action = 'calendar_list';\n }\n }\n } else if ($action === 'calendar_edit') {\n $data['calendar_id'] = $calendar_id;\n if (strtoupper($_SERVER['REQUEST_METHOD']) == \"POST\") {\n if (!isset($_POST['cancel'])) {\n $datetime = $_POST['date_time'];\n $datetimezone = api_get_utc_datetime($datetime);\n $attendance->set_date_time($datetimezone);\n $attendance->attendance_calendar_edit($calendar_id, $attendance_id);\n $data['calendar_id'] = 0;\n $action = 'calendar_list';\n } else {\n $action = 'calendar_list';\n }\n }\n } else if ($action == 'calendar_delete') {\n $attendance->attendance_calendar_delete($calendar_id, $attendance_id);\n $action = 'calendar_list';\n } else if ($action == 'calendar_all_delete') {\n $attendance->attendance_calendar_delete(0, $attendance_id, true);\n $action = 'calendar_list';\n }\n\n $data['action'] = $action;\n $data['attendance_calendar'] = $attendance->get_attendance_calendar(\n $attendance_id,\n 'all',\n null,\n null,\n true\n );\n $data['is_locked_attendance'] = $attendance->is_locked_attendance($attendance_id);\n // render to the view\n $this->view->set_data($data);\n $this->view->set_layout('layout');\n $this->view->set_template('attendance_calendar');\n $this->view->render();\n }",
"public function getOfficialAttendance(Request $event)\n {\n //get attendance with did_attend == 'true'\n return Attendance::with('user')\n ->where('event_id', $event->id)\n ->where('did_attend', 'true')\n ->get();\n }",
"function getAttendanceList($act_id){\n $data = array(\n 'act_id' => $act_id,\n 'dept_id' => $this->activity_model->fetchDeptID($act_id)->act_department,\n 'att_list' => $this->activity_model->fetchAttendance($act_id)->result()\n );\n return $this->load->view('activitymonitoring/att_list', $data);\n }",
"public function individual_attendance(){\n return response()->json([\n 'ok' => 'ok'\n ], $this->successStatus);\n }",
"public function attendanceStatus()\n {\n return $this->hasOne('App\\AttendanceStatus');\n }",
"public function attendance_add()\n {\n $attendance = new Attendance();\n $data = array();\n\n if (strtoupper($_SERVER['REQUEST_METHOD']) == 'POST') {\n if (!empty($_POST['title'])) {\n $check = Security::check_token();\n if ($check) {\n $attendance->set_name($_POST['title']);\n $attendance->set_description($_POST['description']);\n $attendance->set_attendance_qualify_title($_POST['attendance_qualify_title']);\n $attendance->set_attendance_weight($_POST['attendance_weight']);\n $link_to_gradebook = false;\n if ( isset($_POST['attendance_qualify_gradebook']) && $_POST['attendance_qualify_gradebook'] == 1 ) {\n $link_to_gradebook = true;\n }\n $attendance->category_id = $_POST['category_id'];\n $last_id = $attendance->attendance_add($link_to_gradebook);\n Security::clear_token();\n }\n header('location:index.php?action=calendar_add&attendance_id='.$last_id.'&'.api_get_cidreq());\n exit;\n } else {\n $data['error'] = true;\n $this->view->set_data($data);\n $this->view->set_layout('layout');\n $this->view->set_template('attendance_add');\n $this->view->render();\n }\n } else {\n $this->view->set_data($data);\n $this->view->set_layout('layout');\n $this->view->set_template('attendance_add');\n $this->view->render();\n }\n }",
"function student_attendance($param1 = '', $param2 = '' , $param3 = '')\n\t\t{\n\t\t\tif ($this->session->userdata('parent_login') != 1){\n\t\t\t\t$this->session->set_userdata('last_page' , current_url());\n\t\t\t\tredirect(base_url(), 'refresh');\n\t\t\t}\n\t\t\tif ($param1 == 'create') {\n\t\t\t\t$test = explode('/',$this->input->post('date'));\n\t\t\t\t$date_final = $test[2].'-'.$test[0].'-'.$test[1];\n\t\t\t\t$data['date'] = $date_final;\n\t\t\t\t$data['attandence_class'] = $this->input->post('classes');\n\t\t\t\t$data['student_id'] = $this->input->post('student');\n\t\t\t\t$data['description'] \t\t = $this->input->post('description');\n\t\t\t\t$data['status'] \t\t\t\t = 2;\n\t\t\t\t$data['month'] \t\t\t\t = $test[0];\n\t\t\t\t\n\t\t\t\t$this->db->select('*')->from('attendance');\n\t\t\t\t$this->db->where('attandence_class',$this->input->post('classes')); \n\t\t\t\t$this->db->where('student_id',$this->input->post('student')); \n\t\t\t\t$this->db->where('date',$date_final); \n\t\t\t\t$query = $this->db->get(); \n\t\t\t\t$duplicate_student_entry=$query->num_rows();\n\t\t\t\t\n\t\t\t\t$student_holiday_check=$this->db->get_where('holiday',\n\t\t\t\tarray('holiday_date' =>$this->input->post('date')))->row();\n\t\t\t\tif(count($student_holiday_check)>0){\n\t\t\t\t\t$this->session->set_flashdata('flash_message' , get_phrase('this_day_is_already_holiday'));\n\t\t\t\t}\n\t\t\t\telse if($duplicate_student_entry > 0){\n\t\t\t\t\t$this->session->set_flashdata('flash_message' , get_phrase('do_not_add_this record_again')); \n\t\t\t\t\tredirect(base_url() . 'index.php?parents/student_attendance', 'refresh');\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$this->db->insert('attendance', $data);\n\t\t\t\t\t$this->session->set_flashdata('flash_message' , get_phrase('data_added_successfully')); \n\t\t\t\t\tredirect(base_url() . 'index.php?parents/student_attendance', 'refresh');\n\t\t\t\t}\n\t\t\t}\n\t\t\t$page_data['page_name'] = 'student_attendance';\n\t\t\t$page_data['page_title'] = 'Student Attendance';\n\t\t\t$this->load->view('backend/index', $page_data);\n\t\t}",
"public function attendances()\n {\n return $this->hasMany('App\\Invitee', 'first_timer_id');\n }",
"public function attendances(){\n return $this->hasMany('Attendance');\n }",
"public function actionManageStudentAttendance()\n {\n\n $message = '';\n $student_id = $_GET['student_id'];\n $student = Student::model()->findByPk($student_id);\n if (count($student->lessons) == 0) {\n throw new CHttpException('Student is currently enroll to no lesson!');\n }\n $this->render('manageStudentAttendance', array('student' => $student));\n\n }",
"function attendance_can_student_mark($sess, $log = true) {\n global $DB, $USER, $OUTPUT;\n $canmark = false;\n $reason = 'closed';\n $attconfig = get_config('attendance');\n\n if (!empty($attconfig->studentscanmark) && !empty($sess->studentscanmark)) {\n if (empty($attconfig->studentscanmarksessiontime) ||\n (attendance_is_status_availablebeforesession($sess->id)) && time() < $sess->sessdate) {\n $canmark = true;\n $reason = '';\n } else {\n $duration = $sess->duration;\n if (empty($duration)) {\n $duration = $attconfig->studentscanmarksessiontimeend * 60;\n }\n if (!isset($sess->studentsearlyopentime)) {\n // Sanity check just in case not set in this session.\n $sess->studentsearlyopentime = 0;\n }\n if (($sess->sessdate - $sess->studentsearlyopentime) < time() && time() < ($sess->sessdate + $duration)) {\n $canmark = true;\n $reason = '';\n }\n }\n }\n // Check if another student has marked attendance from this IP address recently.\n if ($canmark && !empty($sess->preventsharedip)) {\n if ($sess->preventsharedip == ATTENDANCE_SHAREDIP_MINUTES) {\n $time = time() - ($sess->preventsharediptime * 60);\n $sql = 'sessionid = ? AND studentid <> ? AND timetaken > ? AND ipaddress = ?';\n $params = array($sess->id, $USER->id, $time, getremoteaddr());\n $record = $DB->get_record_select('attendance_log', $sql, $params);\n } else {\n // Assume ATTENDANCE_SHAREDIP_FORCED.\n $sql = 'sessionid = ? AND studentid <> ? AND ipaddress = ?';\n $params = array($sess->id, $USER->id, getremoteaddr());\n $record = $DB->get_record_select('attendance_log', $sql, $params);\n }\n\n if (!empty($record)) {\n $canmark = false;\n $reason = 'preventsharederror';\n if ($log) {\n // Trigger an ip_shared event.\n $attendanceid = $DB->get_field('attendance_sessions', 'attendanceid', array('id' => $record->sessionid));\n $cm = get_coursemodule_from_instance('attendance', $attendanceid);\n $event = \\mod_attendance\\event\\session_ip_shared::create(array(\n 'objectid' => 0,\n 'context' => \\context_module::instance($cm->id),\n 'other' => array(\n 'sessionid' => $record->sessionid,\n 'otheruser' => $record->studentid\n )\n ));\n\n $event->trigger();\n }\n }\n }\n return array($canmark, $reason);\n}",
"public function getAllAttendances($id){\n\t\t$query = \"SELECT * FROM attendance where studentId=\".$id;\n\t\t$dbcontroller = new DBController();\n\t\t$this->attendance = $dbcontroller->executeSelectQuery($query);\n\t\treturn $this->attendance;\n }",
"public function store(StoreAttendance $request)\n {\n $date = Carbon::createFromFormat('m/d/Y', $request->date)->format('Y-m-d');\n $clockIn = Carbon::createFromFormat('h:i A', $request->clock_in_time, $this->global->timezone);\n $clockIn->setTimezone('UTC');\n $clockIn = $clockIn->format('H:i:s');\n if($request->clock_out_time != ''){\n $clockOut = Carbon::createFromFormat('h:i A', $request->clock_out_time, $this->global->timezone);\n $clockOut->setTimezone('UTC');\n $clockOut = $clockOut->format('H:i:s');\n $clockOut = $date.' '.$clockOut;\n }\n else{\n $clockOut = null;\n }\n\n $attendance = Attendance::where('user_id', $request->user_id)->where(DB::raw('DATE(`clock_in_time`)'), $date)->first();\n if(!is_null($attendance)){\n $attendance->update([\n 'user_id' => $request->user_id,\n 'clock_in_time' => $date.' '.$clockIn,\n 'clock_in_ip' => $request->clock_in_ip,\n 'clock_out_time' => $clockOut,\n 'clock_out_ip' => $request->clock_out_ip,\n 'working_from' => $request->working_from,\n 'late' => $request->late,\n 'half_day' => $request->half_day\n ]);\n }else{\n Attendance::create([\n 'user_id' => $request->user_id,\n 'clock_in_time' => $date.' '.$clockIn,\n 'clock_in_ip' => $request->clock_in_ip,\n 'clock_out_time' => $clockOut,\n 'clock_out_ip' => $request->clock_out_ip,\n 'working_from' => $request->working_from,\n 'late' => $request->late,\n 'half_day' => $request->half_day\n ]);\n }\n\n return Reply::success(__('messages.attendanceSaveSuccess'));\n }",
"public function index(Request $request)\n {\n $request->input('month')\n ? $month = Carbon::parse($request->input('month'))->toDateTimeString()\n : $month = Carbon::now()->startOfMonth()->toDateTimeString();\n \n $dates = array();\n $period = CarbonPeriod::create(Carbon::parse($month)->startOfMonth(), Carbon::parse($month)->endOfMonth());\n foreach($period as $date)\n {\n $dates[] = $date->format('d-m-Y');\n }\n \n if(Auth::user()->isAdmin() || Auth::user()->isSuperAdmin()){\n\n $user = $request->input('user') ? $request->input('user') : \"\";\n\n $users = User::searchStrict('id', $user)->get(); \n \n foreach($users as $index=>$user){\n $attendances = array();\n foreach($dates as $date){\n \n $check_in = Attendance::where('user_id',$user->id)\n ->where('date', '>=', Carbon::parse($date)->startOfDay())\n ->where('date', '<=', Carbon::parse($date)->endOfDay())\n ->where('type','check_in')\n ->first();\n \n $check_out = Attendance::where('user_id',$user->id)\n ->where('date', '>=', Carbon::parse($date)->startOfDay())\n ->where('date', '<=', Carbon::parse($date)->endOfDay())\n ->where('type','check_out')\n ->first();\n\n $absent = Attendance::where('user_id',$user->id)\n ->where('date', '>=', Carbon::parse($date)->startOfDay())\n ->where('date', '<=', Carbon::parse($date)->endOfDay())\n ->where('type','absent')\n ->first();\n \n $attendances[$date]['check_in'] = $check_in ? Carbon::parse($check_in->date)->toTimeString() : null;\n $attendances[$date]['check_out'] = $check_out ? Carbon::parse($check_out->date)->toTimeString() : null;\n $attendances[$date]['absent'] = $absent ? Carbon::parse($absent->date)->toTimeString() : null;\n }\n $users[$index]['attendances'] = $attendances;\n }\n\n \n\n return $this->processResponse('success',200,null,\n [\n 'users'=> $users,\n 'dates'=>$dates,\n 'attendances' => $attendances\n ]\n );\n \n }\n else{\n $users [] = Auth::user();\n \n foreach($users as $index=>$user){\n $attendances = array();\n foreach($dates as $date){\n \n $check_in = Attendance::where('user_id',$user->id)\n ->where('date', '>=', Carbon::parse($date)->startOfDay())\n ->where('date', '<=', Carbon::parse($date)->endOfDay())\n ->where('type','check_in')\n ->first();\n \n $check_out = Attendance::where('user_id',$user->id)\n ->where('date', '>=', Carbon::parse($date)->startOfDay())\n ->where('date', '<=', Carbon::parse($date)->endOfDay())\n ->where('type','check_out')\n ->first();\n\n $absent = Attendance::where('user_id',$user->id)\n ->where('date', '>=', Carbon::parse($date)->startOfDay())\n ->where('date', '<=', Carbon::parse($date)->endOfDay())\n ->where('type','absent')\n ->first();\n \n $attendances[$date]['check_in'] = $check_in ? Carbon::parse($check_in->date)->toTimeString() : null;\n $attendances[$date]['check_out'] = $check_out ? Carbon::parse($check_out->date)->toTimeString() : null;\n $attendances[$date]['absent'] = $absent ? Carbon::parse($absent->date)->toTimeString() : null;\n }\n $users[$index]['attendances'] = $attendances;\n }\n\n return $this->processResponse('success',200,null,\n [\n 'users'=> $users,\n 'dates'=>$dates,\n 'attendances' => $attendances\n ]\n );\n \n\n }\n }",
"public function show(StudentAttendance $studentAttendance)\n {\n //\n }",
"public function getAllAttendance($class_id) {\n return $this->get('get_all_attendance', ['class_id' => $class_id]);\n }",
"public function attendances(){\n return $this->morphMany('App\\Models\\Attendance', 'attendable');\n }",
"function get_student_class_attendance($class_id)\n\t\t{\n\t\t\t$array = array(\"attendance.status\"=>2,\"attendance.student_id !=\"=>0,\"attendance.attandence_class\"=>$class_id);\n\t\t\t$this->db->select('*');\n\t\t\t$this->db->from('attendance');\n\t\t\t$this->db->join('student', 'student.student_id = attendance.student_id');\n\t\t\t$this->db->where($array);\n\t\t\t$query = $this->db->get();\n\t\t\t$attendance =$query->result();\n\t\t\tforeach($attendance as $row){\n\t\t\t\techo '<tr class=\"gradeA\"><td>' .date(\"d-M-Y\", strtotime($row->date)) . '</td>\n\t\t\t\t<td>'. $row->class_id.'</td>\t\n\t\t\t\t<td>'. $row->name.'</td>\n\t\t\t\t<td>'. $row->description.'</td>\n\t\t\t\t</tr>';\n\t\t\t} \n\t\t}",
"public function attend($event_id,$user_id)\n {\n if ($this->check_events_attend($event_id,$user_id))\n {\n $unset = DB::delete($this->_tableEventsAttendance)\n ->where('user_id','=',(int)$user_id)\n ->execute();\n }\n else\n {\n $set = DB::insert($this->_tableEventsAttendance, array('user_id','event_id'))\n ->values(array(\n (int)$user_id,\n (int)$event_id))\n ->execute(); \n }\n }",
"public function phone_encounter()\n\t{\n\t\t$this->loadModel('ScheduleCalendar');\n\t\t$this->loadModel('ScheduleType');\n\t\t$this->loadModel('PracticeLocation');\n\t\t$patient_id = $this->params['named']['patient_id'];\n\t\t$location = $this->params['named']['location_id'];\n\t\t$type = $this->ScheduleType->find('first', array('fields' => 'appointment_type_id','conditions' => array('type' =>'Phone Call')));\n\t\t$practice_location = $this->PracticeLocation->find('first', array('conditions' => array('location_id' => $location), 'fields' => 'default_visit_duration'));\n\t\t$time = __date('H:i');\n\t\t$duration = $practice_location['PracticeLocation']['default_visit_duration'];\n\n\t\tif(empty($duration)) \n\t\t\t$duration = 15; // set duration 15 mins if it is empty\n\n\t\t$encounterCount = $this->EncounterMaster->find('count', array('conditions' => array('patient_id' => $patient_id), 'recursive' => -1));\n\t\tif($encounterCount > 0) {\n\t\t\t$reason_for_visit = 'Follow Up';\n\t\t} else {\n\t\t\t$reason_for_visit = 'New Visit';\n\t\t}\n $scheduleData = array(\n\t\t\t'patient_id' => $patient_id,\n\t\t\t'location' => $location,\n\t\t\t'reason_for_visit' => $reason_for_visit,\n\t\t\t'provider_id' => $this->Session->Read('UserAccount.user_id'),\n\t\t\t'date' => __date('Y-m-d'),\n\t\t\t'starttime' => $time,\n\t\t\t'duration' => $duration,\n\t\t\t'endtime' => __date('H:i', strtotime(\"+$duration minutes\")),\n\t\t\t'visit_type' => $type['ScheduleType']['appointment_type_id']\n\t\t);\n $this->ScheduleCalendar->save($scheduleData);\n\t\t$calendar_id = $this->ScheduleCalendar->id;\n\t\tif($calendar_id > 0)\n\t\t{\n\t\t\t$this->loadModel('PatientDemographic');\n\t\t\t$patient_status = $this->PatientDemographic->field('status', array('patient_id' => $patient_id));\n\t\t\tif ($patient_status == 'New' && $encounterCount > 0)\n\t\t\t{\n\t\t\t\t//$dataDemographic['PatientDemographic']['patient_id'] = $patient_id;\n\t\t\t\t//$dataDemographic['PatientDemographic']['status'] = 'Active';\n\t\t\t\t//$this->PatientDemographic->save($dataDemographic);\n\t\t\t}\n\t\t\t$this->EncounterMaster->execute($this, $calendar_id, '', 'Phone');\n\t\t}\n\t}",
"public function getAttendance($class_id, $date_and_time) {\n return $this->get('get_attendance', ['class_id' => $class_id, 'date_and_time' => $date_and_time]);\n }",
"function attendance_create_calendar_event(&$session) {\n global $DB;\n\n // We don't want to create multiple calendar events for 1 session.\n if ($session->caleventid) {\n return $session->caleventid;\n }\n if (empty(get_config('attendance', 'enablecalendar')) || $session->calendarevent === 0) {\n // Calendar events are not used, or event not required for this session.\n return true;\n }\n\n $attendance = $DB->get_record('attendance', array('id' => $session->attendanceid));\n\n $caleventdata = new stdClass();\n $caleventdata->name = $attendance->name;\n $caleventdata->courseid = $attendance->course;\n $caleventdata->groupid = $session->groupid;\n $caleventdata->instance = $session->attendanceid;\n $caleventdata->timestart = $session->sessdate;\n $caleventdata->timeduration = $session->duration;\n $caleventdata->description = $session->description;\n $caleventdata->format = $session->descriptionformat;\n $caleventdata->eventtype = 'attendance';\n $caleventdata->timemodified = time();\n $caleventdata->modulename = 'attendance';\n\n if (!empty($session->groupid)) {\n $caleventdata->name .= \" (\". get_string('group', 'group') .\" \". groups_get_group_name($session->groupid) .\")\";\n }\n\n $calevent = new stdClass();\n if ($calevent = calendar_event::create($caleventdata, false)) {\n $session->caleventid = $calevent->id;\n $DB->set_field('attendance_sessions', 'caleventid', $session->caleventid, array('id' => $session->id));\n return true;\n } else {\n return false;\n }\n}",
"function bbbWriteMeetings($meeting){\n global $DB;\n $future_id = $DB->get_field_sql(\"SELECT max(id) FROM {bbb_attendance}\")+1;\n $bbb_id = explode('-',$meeting->meetingID)[2];\n $bbb_course = explode('-',$meeting->meetingID)[1];\n \n if(empty($future_id)){\n $future_id = 0;\n }\n\n\n if(empty($bbb_id)){\n $bbb_id = 0;\n }\n \n if(empty($bbb_course)){\n $bbb_course = 0;\n }\n \n $sql = \"INSERT INTO {bbb_attendance} \n (id,courseid,bigbluebuttonid,timestamp)\n values (\".$future_id.\",\".$bbb_course.\",\".$bbb_id.\",\".time().\")\";\n \n $DB->execute($sql);\n echo sizeof($meeting->attendees->attendee);\n \n if(sizeof($meeting->attendees->attendee) > 1){\n $atendees = $meeting->attendees->attendee;\n //print_r($atendees);\n foreach ($atendees as $atendee){\n //print_r($atendee);\n if(empty($atendee->userID)){\n $atendee->userID = 0;\n \n }\n // echo \"<br>zapisuju\".$atendee->userID;\n $sql = \"INSERT INTO {bbb_attendance_users} \n (bbb_attendance_id,userid)\n values (\".$future_id.\",\".$atendee->userID.\")\";\n $DB->execute($sql); \n }\n }else{\n $atendees = $meeting->attendees;\n foreach ($atendees as $atendee){\n if(empty($atendee->userID)){\n $atendee->userID = 0;\n \n }\n //print_r($atendee);\n // echo \"<br>zapisuju\".$atendee->userID;\n $sql = \"INSERT INTO {bbb_attendance_users} \n (bbb_attendance_id,userid)\n values (\".$future_id.\",\".$atendee->userID.\")\";\n $DB->execute($sql); \n \n }\n }\n $state = 'wroten '.time().' - courseid:'.$bbb_course. '';\n return ($state);\n\n}",
"function getReservationLecturer($classid,$crdate){\r\ninclude 'dbConnect.php';\r\n$sql= 'SELECT Student.SID, Classroom.ClassID, Course.CourseID, Student.SName, Course.CourseName, Classroom.Location, Classroom.StartTime, Classroom.EndTime, CRDate \r\nFROM ClassReservation\r\nINNER JOIN Student ON ClassReservation.SID = Student.SID\r\nINNER JOIN Classroom ON ClassReservation.ClassID = Classroom.ClassID\r\nINNER JOIN Course ON ClassReservation.CourseID = Course.CourseID\r\nWHERE Classroom.ClassID = '.$classid.'\r\nAND CRDate = \"'.$crdate.'\";';\r\n$result = mysqli_query($conn, $sql);\r\nif(isset($result)){\r\n\tif(mysqli_num_rows($result) > 0){\r\n\t\t$view = '<form method=\"post\" action=\"attendance.php\">\r\n\t\t\t\t<table class=\"table table-striped custab\">\r\n\t\t\t\t<thead>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<th>Student Name</th>\r\n\t\t\t\t\t\t<th>Course Name</th>\r\n\t\t\t\t\t\t<th>Location</th>\r\n\t\t\t\t\t\t<th>Start Time</th>\r\n\t\t\t\t\t\t<th>End Time</th>\r\n\t\t\t\t\t\t<th>Class Date</th>\r\n\t\t\t\t\t\t<th>Attendance</th>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</thead><tbody>';\r\n\r\n\t\t$count = 0;\r\n\t\twhile($row = mysqli_fetch_assoc($result))\r\n\t\t{\r\n\t\t$dt = strtotime($row['CRDate']);\r\n\t\t$day = date(\"l\", $dt);\r\n\t\t\r\n\t\t$view.= '<tr>\r\n <td>'.$row['SName'].'</td>\r\n <td>'.$row['CourseName'].'</td>\r\n\t\t\t\t<td>'.$row['Location'].'</td>\r\n\t\t\t\t<td>'.$row['StartTime'].'</td>\r\n\t\t\t\t<td>'.$row['EndTime'].'</td>\r\n\t\t\t\t<td>'.$row['CRDate'].' / ('.$day.')</td>\r\n\t\t\t\t<td>\r\n\t\t\t\t<div class=\"switch-field\">\r\n\t\t\t\t <input type=\"radio\" id=\"switch_left'.$count.'\" name=\"tableRow['.$count.'][attendance]\" value=\"Present\" checked/>\r\n\t\t\t\t <label for=\"switch_left'.$count.'\">Present</label>\r\n\t\t\t\t <input type=\"radio\" id=\"switch_right'.$count.'\" name=\"tableRow['.$count.'][attendance]\" value=\"Absent\" />\r\n\t\t\t\t <label for=\"switch_right'.$count.'\">Absent</label>\r\n\t\t\t\t</div>\r\n\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<div><input type=\"hidden\" name=\"tableRow['.$count.'][sid]\" value=\"'.$row[\"SID\"].'\"/></div>\r\n\t\t\t\t<div><input type=\"hidden\" name=\"tableRow['.$count.'][classid]\" value=\"'.$row[\"ClassID\"].'\"/></div>\r\n\t\t\t\t<div><input type=\"hidden\" name=\"tableRow['.$count.'][courseid]\" value=\"'.$row[\"CourseID\"].'\"/></div>\r\n\t\t\t\t<div><input type=\"hidden\" name=\"tableRow['.$count.'][crdate]\" value=\"'.$row[\"CRDate\"].'\"/></div>';\r\n\t\t$count++;\r\n\t\t}\r\n\t\t$view.= '</tbody></table>\r\n\t\t\t\t<div><input type=\"hidden\" name=\"lid\" value=\"'.$_SESSION[\"Luserid\"].'\"/></div>\r\n\t\t\t\t<input class=\"btn btn-success\" type=\"submit\" name=\"record\" value=\"Record Attendance\"/>\r\n\t\t\t\t</form>';\r\n\t}else{\r\n\t\t$view = '<div class=\"alert alert-danger\">\r\n\t\t\t\t No student register this class yet!\r\n\t\t\t\t</div>';\r\n\t}\r\n}else{\r\n\t$view = 'Database Connection Error.';\r\n}\r\n\treturn $view;\r\n}",
"public function actionManageStaffAttendance()\n {\n $message = '';\n $staff_id = $_GET['staff_id'];\n $staff = Staff::model()->findByPk($staff_id);\n //echo $staff->id;\n //break;\n if (count($staff->lessons) == 0) {\n throw new CHttpException('Staff is currently enroll to no lesson!');\n }\n $this->render('manageStaffAttendance', array('staff' => $staff));\n\n\n }",
"public function ajax_get_member_attendance() {\n\t\t$member_id = $this->input->get('member_id');\n\t\t$attendance = $this->Member_Model->get_attendance_by_member_id($member_id);\n\n\t\techo json_encode($attendance);\n\t}",
"public function attendance_sheet($action, $attendance_id, $student_id = 0, $edit = true)\n {\n $attendance = new Attendance();\n $data = array();\n $data['attendance_id'] = $attendance_id;\n $groupId = isset($_REQUEST['group_id']) ? $_REQUEST['group_id'] : null;\n $data['users_in_course'] = $attendance->get_users_rel_course($attendance_id, $groupId);\n\n $filter_type = 'today';\n if (!empty($_REQUEST['filter'])) {\n $filter_type = $_REQUEST['filter'];\n }\n\n $isDrhOfCourse = CourseManager::isUserSubscribedInCourseAsDrh(\n api_get_user_id(),\n api_get_course_info()\n );\n\n if ($edit == true) {\n if (api_is_allowed_to_edit(null, true) || $isDrhOfCourse) {\n $data['users_presence'] = $attendance->get_users_attendance_sheet($attendance_id, 0, $groupId);\n }\n } else {\n if (!empty($student_id)) {\n $user_id = intval($student_id);\n } else {\n $user_id = api_get_user_id();\n }\n\n if (api_is_allowed_to_edit(null, true) ||\n api_is_coach(api_get_session_id(), api_get_course_int_id()) ||\n $isDrhOfCourse\n ) {\n $data['users_presence'] = $attendance->get_users_attendance_sheet($attendance_id, 0, $groupId);\n } else {\n $data['users_presence'] = $attendance->get_users_attendance_sheet($attendance_id, $user_id, $groupId);\n }\n\n $data['faults'] = $attendance->get_faults_of_user($user_id, $attendance_id, $groupId);\n $data['user_id'] = $user_id;\n }\n\n $data['next_attendance_calendar_id'] = $attendance->get_next_attendance_calendar_id($attendance_id);\n $data['next_attendance_calendar_datetime'] = $attendance->get_next_attendance_calendar_datetime($attendance_id);\n\n if (strtoupper($_SERVER['REQUEST_METHOD']) == 'POST') {\n if (isset($_POST['hidden_input'])) {\n foreach ($_POST['hidden_input'] as $cal_id) {\n $users_present = array();\n if (isset($_POST['check_presence'][$cal_id])) {\n $users_present = $_POST['check_presence'][$cal_id];\n }\n $attendance->attendance_sheet_add(\n $cal_id,\n $users_present,\n $attendance_id\n );\n }\n }\n\n $data['users_in_course'] = $attendance->get_users_rel_course($attendance_id, $groupId);\n $my_calendar_id = null;\n if (is_numeric($filter_type)) {\n $my_calendar_id = $filter_type;\n $filter_type = 'calendar_id';\n }\n $data['attendant_calendar'] = $attendance->get_attendance_calendar(\n $attendance_id,\n $filter_type,\n $my_calendar_id,\n $groupId\n );\n $data['attendant_calendar_all'] = $attendance->get_attendance_calendar($attendance_id, 'all', null, $groupId);\n $data['users_presence'] = $attendance->get_users_attendance_sheet($attendance_id, 0, $groupId);\n $data['next_attendance_calendar_id'] = $attendance->get_next_attendance_calendar_id($attendance_id);\n $data['next_attendance_calendar_datetime'] = $attendance->get_next_attendance_calendar_datetime($attendance_id);\n } else {\n $data['attendant_calendar_all'] = $attendance->get_attendance_calendar($attendance_id, 'all', null, $groupId);\n $data['attendant_calendar'] = $attendance->get_attendance_calendar($attendance_id, $filter_type, null, $groupId);\n }\n\n $data['edit_table'] = intval($edit);\n $data['is_locked_attendance'] = $attendance->is_locked_attendance($attendance_id);\n $this->view->set_data($data);\n $this->view->set_layout('layout');\n $this->view->set_template('attendance_sheet');\n $this->view->render();\n }",
"public function getAttendances(){\n try{\n $projectCode = Input::get('projectCode');\n $startDate = Input::get('beginDate');\n $endDate = Input::get('endDate');\n// Log::channel('in_sys')\n// ->info('API/IntegrationController - getAttendances data projectCode = '. $projectCode . \" | beginDate = \".$startDate.\" | endDate = \".$endDate);\n $project = Project::where('code', $projectCode)->first();\n\n if(!DB::table('projects')->where('code', $projectCode)->exists()){\n return Response::json([\n 'error' => 'Project code not found!'\n ], 400);\n }\n if(empty($startDate) || empty($endDate)){\n return Response::json([\n 'error' => 'Please provide Begin Date and End Date!'\n ], 400);\n }\n\n $attendanceAbsents = DB::table('attendance_absents')\n ->join('employees', 'attendance_absents.employee_id', '=', 'employees.id')\n ->join('projects', 'attendance_absents.project_id', '=', 'projects.id')\n ->select('attendance_absents.id as attendance_absent_id',\n 'attendance_absents.shift_type as shift_type',\n 'attendance_absents.is_done as is_done',\n 'attendance_absents.date as date',\n 'attendance_absents.date_checkout as date_checkout',\n 'attendance_absents.created_at as created_at',\n 'employees.id as employee_id',\n 'employees.code as employee_code',\n 'projects.name as project_name',\n 'projects.code as project_code')\n ->whereBetween('attendance_absents.created_at', array($startDate.' 00:00:00', $endDate.' 23:59:00'))\n ->where('attendance_absents.project_id', $project->id)\n ->where('attendance_absents.status_id',6)\n ->get();\n\n// $attendanceAbsents = AttendanceAbsent::where('project_id', $project->id)\n// ->where('status_id', 6)\n// ->whereBetween('created_at', array($startDate.' 00:00:00', $endDate.' 23:59:00'))\n// ->get();\n\n $dataModel = collect();\n// Log::channel('in_sys')\n// ->info('API/IntegrationController - getAttendances data 0 '. count($attendanceAbsents));\n if($attendanceAbsents->count() < 1){\n return Response::json([\n 'error' => 'No Attendances found within allocated time range!'\n ], 400);\n }\n\n// timestamp: ...,\n// projectCode: XXX, //assume project codes are synced\n// beginDate: ..., //date YYYY-MM-DD\n// endDate: ..., //date YYYY-MM-DD\n// data: [\n// {\n// employeeId: ...,\n// employeeCode: ...,\n// transDate: ..., //date YYYY-MM-DD\n// shiftCode: ..., // 1|2|3 or A|B|C or whatever\n// attendanceIn: ..., //timestamp YYYY-MM-DD HH:mm:ss\n// attendanceOut: ..., //timestamp YYYY-MM-DD HH:mm:ss\n// attendanceStatus: ..., // H=Hadir, A=Alpa, U=Unknown\n// ]\n// }\n\n foreach ($attendanceAbsents as $attendanceAbsent){\n $status = \"U\";\n $attendanceOut = \"\";\n if($attendanceAbsent->is_done == 0){\n $status = \"A\";\n }\n else{\n if(!empty($attendanceAbsent->date_checkout)){\n $status = \"H\";\n// $attendanceOut = $attendanceAbsent->date_checkout->format('Y-m-d H:i:s');\n $attendanceOut = $attendanceAbsent->date_checkout;\n }\n else{\n $status = \"A\";\n }\n }\n $createdAt = Carbon::parse($attendanceAbsent->created_at);\n $projectCSOModel = ([\n 'employeeId' => $attendanceAbsent->employee_id,\n 'employeeCode' => $attendanceAbsent->employee_code,\n 'transDate' => $createdAt->format('Y-m-d'),\n 'shiftCode' => $attendanceAbsent->shift_type ?? 0,\n 'attendanceIn' => $attendanceAbsent->date,\n 'attendanceOut' => $attendanceOut,\n 'attendanceStatus' => $status,\n ]);\n $dataModel->push($projectCSOModel);\n// Log::channel('in_sys')\n// ->info('API/IntegrationController - getAttendances data 2 '. json_encode($projectCSOModel));\n }\n $date = Carbon::now('Asia/Jakarta')->timestamp;\n $returnModel = collect([\n 'timestamp' => $date,\n 'projectCode' => $projectCode,\n 'beginDate' => $startDate,\n 'endDate' => $endDate,\n 'data' => $dataModel,\n ]);\n// Log::channel('in_sys')\n// ->info('API/IntegrationController - getAttendances data 3 '.json_encode($returnModel));\n return Response::json($returnModel, 200);\n }\n catch (\\Exception $ex){\n Log::channel('in_sys')->error('API/IntegrationController - getAttendances error EX: '. $ex);\n return Response::json([\n 'error' => $ex\n ], 500);\n }\n }",
"function attendance_get_user_courses_attendances($userid) {\n global $DB;\n\n $usercourses = enrol_get_users_courses($userid);\n\n list($usql, $uparams) = $DB->get_in_or_equal(array_keys($usercourses), SQL_PARAMS_NAMED, 'cid0');\n\n $sql = \"SELECT att.id as attid, att.course as courseid, course.fullname as coursefullname,\n course.startdate as coursestartdate, att.name as attname, att.grade as attgrade\n FROM {attendance} att\n JOIN {course} course\n ON att.course = course.id\n WHERE att.course $usql\n ORDER BY coursefullname ASC, attname ASC\";\n\n $params = array_merge($uparams, array('uid' => $userid));\n\n return $DB->get_records_sql($sql, $params);\n}",
"function attendance_update_status($status, $acronym, $description, $grade, $visible,\n $context = null, $cm = null, $studentavailability = null,\n $availablebeforesession = false, $setunmarked = false) {\n global $DB;\n\n if (empty($context)) {\n $context = context_system::instance();\n }\n\n if (isset($visible)) {\n $status->visible = $visible;\n $updated[] = $visible ? get_string('show') : get_string('hide');\n } else if (empty($acronym) || empty($description)) {\n return array('acronym' => $acronym, 'description' => $description);\n }\n\n $updated = array();\n\n if ($acronym) {\n $status->acronym = $acronym;\n $updated[] = $acronym;\n }\n if ($description) {\n $status->description = $description;\n $updated[] = $description;\n }\n if (isset($grade)) {\n $status->grade = $grade;\n $updated[] = $grade;\n }\n if (isset($studentavailability)) {\n if (empty($studentavailability)) {\n if ($studentavailability !== '0') {\n $studentavailability = null;\n }\n }\n\n $status->studentavailability = $studentavailability;\n $updated[] = $studentavailability;\n }\n if (strpos(strval($availablebeforesession), 'on') === false) {\n $status->availablebeforesession = 0;\n } else {\n $status->availablebeforesession = 1;\n }\n if ($setunmarked) {\n $status->setunmarked = 1;\n } else {\n $status->setunmarked = 0;\n }\n $DB->update_record('attendance_statuses', $status);\n\n $event = \\mod_attendance\\event\\status_updated::create(array(\n 'objectid' => $status->attendanceid,\n 'context' => $context,\n 'other' => array('acronym' => $acronym, 'description' => $description, 'grade' => $grade,\n 'updated' => implode(' ', $updated))));\n if (!empty($cm)) {\n $event->add_record_snapshot('course_modules', $cm);\n }\n $event->add_record_snapshot('attendance_statuses', $status);\n $event->trigger();\n}",
"function attendance_report() {\n if ($this->session->userdata('parent_login') != 1)\n redirect(base_url(), 'refresh');\n $student_id = $student_id = $this->session->userdata('parent_id');\n if ($this->input->post('month') != '' && $this->input->post('year') != '') {\n $page_data['month'] = $this->input->post('month');\n $page_data['year'] = $this->input->post('year');\n } else {\n $page_data['month'] = '';\n $page_data['year'] = '';\n }\n $page_data['student'] = $this->db->get_where('student', array('student_id' => $student_id))->row()->name;\n $page_data['student_id'] = $student_id;\n $page_data['page_name'] = 'attendance_report';\n $image = $this->db->get_where('student', array('student_id' => $student_id))->row()->image;\n $image_url = $this->crud_model->get_image_url('student', $image);\n $page_data['parent_page_title'] = \"<img src='$image_url'\" . 'class=\"img-circle\"' . 'width=\"40\"' . \"/>\" . $page_data['student'];\n $page_data['page_title'] = $page_data['student'];\n $this->load->view('backend/index', $page_data);\n }",
"public function checkin(Request $request) {\n $daynow = Carbon::now()->format('l');\n $workinghours = WorkingHour::where('name',$daynow)->first();\n $checkin = Carbon::parse($workinghours->check_in);\n $timenow = Carbon::now();\n \n if ($timenow->lt($checkin)) {\n $id = auth::user()->id;\n $attendance = Attendance::create([\n 'user_id' => $id,\n 'check_in' => Carbon::now(),\n 'check_out' => null,\n 'absent' => 1,\n 'working_hour_id' => $workinghours->id\n ]);\n\n return redirect()->route('usr.dashboard');\n\n } else {\n $id = auth::user()->id;\n $attendance = Attendance::create([\n 'user_id' => $id,\n 'check_in' => Carbon::now(),\n 'check_out' => null,\n 'absent' => 2,\n 'working_hour_id' => $workinghours->id\n ]);\n\n return redirect()->route('usr.dashboard');\n }\n }",
"public function audience()\n {\n return $this->belongsTo('App\\Attendance', 'teacher_id', 'teacher_id');\n }",
"public function attendenceDetails(){\n\n $attendences=Attendance::orderBy('id','ASC')->get();\n return view('backend.pages.attendance.updateAttendence')->with('attendences', $attendences);\n }",
"function ajan_core_record_activity() {\n\n\tif ( !is_user_logged_in() )\n\t\treturn false;\n\n\t$user_id = ajan_loggedin_user_id();\n\n\tif ( ajan_is_user_inactive( $user_id ) )\n\t\treturn false;\n\n\t$activity = ajan_get_user_last_activity( $user_id );\n\n\tif ( !is_numeric( $activity ) )\n\t\t$activity = strtotime( $activity );\n\n\t// Get current time\n\t$current_time = ajan_core_current_time();\n\n\t// Use this action to detect the very first activity for a given member\n\tif ( empty( $activity ) ) {\n\t\tdo_action( 'ajan_first_activity_for_member', $user_id );\n\t}\n\n\tif ( empty( $activity ) || strtotime( $current_time ) >= strtotime( '+5 minutes', $activity ) ) {\n\t\tajan_update_user_last_activity( $user_id, $current_time );\n\t}\n}",
"public function storeAttendence(){\n\t $date = date(\"Y-m-d\");\n\t $record = $this->input->post();\n\t foreach($record as $student_id => $attendence){\n\t \n\t $data = array('student_id'=>$student_id,\n\t\t\t 'attendence'=>$attendence\n\t\t\t);\n\t\t\t\n\t\t\t//insert value in database\n \t\t$this->db->insert('attendence_record',$data);\n\t }\n\t \n\t $this->session->set_flashdata('attendence_success','Attendence Successful Saved');\n\t\treturn redirect('Operator/attendencePage');\n\t}",
"public function actionScript($startdate = \"2016-12-01\",$enddate = \"2016-12-31\")\n {\n\t\tif(!strtotime($startdate)||!strtotime($enddate)){\n\t\t\t\n\t\t\techo \"日期错误\";\n\t\t\texit;\n\t\t}\n\t\tignore_user_abort(true);\n\t\t$data = \\app\\models\\AttendanceCheckinView::find()->where([\"and\",['>=', 'signdate', $startdate],['<=', 'signdate', $enddate]])->asArray()->all();//->andWhere(\"personnel_id != 0\")\n\t\t$Personnels = \\app\\models\\Personnel::find()->where([\"validflag\"=>\"1\",\"checkin\"=>\"1\"])->asArray()->all();\n\t\t// var_dump($data);exit;\n\t\t// echo \"<pre>\";\n\t\t$result = \\yii\\helpers\\ArrayHelper::index($data, \"personnel_id\", 'signdate');\n\t\t// echo \"<pre>\";\n\t\t// print_r($Personnels);\n\t\t// print_r($result);\n\t\t// exit;\n\t\t// echo date('w');exit;\n\t\t$startdateInt = strtotime($startdate);\n\t\t$enddateInt = strtotime($enddate);\n\t\t$weekArr=[\"0\"=>\"星期日\",\"1\"=>\"星期一\",\"2\"=>\"星期二\",\"3\"=>\"星期三\",\"4\"=>\"星期四\",\"5\"=>\"星期五\",\"6\"=>\"星期六\"];\n\t\tfor($time = $startdateInt;$time<=$enddateInt;$time+=86400){\n\t\t\t// var_dump(date(\"Y-m-d\",$time));\n\t\t\t// echo $time;\n\t\t\t// echo \"<hr/>\";\n\t\t\t// echo $time+86400;\n\t\t\t$Leaves = \\app\\models\\AttendanceLeave::find()->where([\"and\",['>=', 'leaveend', $time],['<', 'leavestart', $time+86400]])->asArray()->all();\n\t\t\t$LeavesDatas = \\yii\\helpers\\ArrayHelper::index($Leaves, \"id\",\"personnel_id\");\n\t\t\t\n\t\t\t$Overtimes = \\app\\models\\AttendanceOvertime::find()->where([\"and\",['>=', 'overtimestart', $time],['<', 'overtimestart', $time+86400]])->asArray()->all();\n\t\t\t$OvertimesDatas = \\yii\\helpers\\ArrayHelper::index($Overtimes, \"id\",\"personnel_id\");\n\t\t \n\t\t\t\n\t\t\t$goouts = \\app\\models\\AttendanceGoout::find()->where([\"gooutdate\"=>date(\"Y-m-d\",$time)])->asArray()->all();\n\t\t\t$gooutDatas = \\yii\\helpers\\ArrayHelper::index($goouts, \"id\",\"personnel_id\");\n\t\t\t\n\t\t\t\n\t\t\t// var_dump($goouts);\n\t\t\t// var_dump($gooutDatas);\n\t\t\t// continue;\n\t\t\t// exit;\n\t\t\t\n\t\t\t$curYear = date(\"Y\",$time);\n\t\t\t$curMonth = date(\"m\",$time);\n\t\t\t$curDate = date(\"Y-m-d\",$time);\n\t\t\t$curDayofWeekKey = date(\"w\",$time);\n\t\t\t$curDayofWeek = $weekArr[$curDayofWeekKey];\n\t\t\tforeach($Personnels as $personnel){\n\t\t\t\t$model =\\app\\models\\AttendanceCheckinReports::find()->where([\"personnel_id\"=>$personnel[\"id\"],\"signdate\"=>$curDate])->one()?:new \\app\\models\\AttendanceCheckinReports();\n\t\t\t\t// var_dump($model);exit;\n\t\t\t\t$model->personnel_id = $personnel['id'];\n\t\t\t\t$model->employeeid = $personnel['employeeid'];\n\t\t\t\t$model->username = $personnel['name'];\n\t\t\t\t$model->signdate = $curDate;\n\t\t\t\t$model->year = $curYear;\n\t\t\t\t$model->month = $curMonth;\n\t\t\t\t$model->dayofweekkey = $curDayofWeekKey;\n\t\t\t\t$model->dayofweek = $curDayofWeek;\n\t\t\t\t\n\t\t\t\t//考勤记录\n\t\t\t\tif(isset($result[$curDate])&&isset($result[$curDate][$personnel['id']])){\n\t\t\t\t\t$userSign= $result[$curDate][$personnel['id']];\n\t\t\t\t\t// var_dump($userSign);exit;\n\t\t\t\t\t$model->signstatus = $userSign[\"daytype\"];\n\t\t\t\t\tif($userSign[\"daytype\"]==\"迟到补齐\"&&$model->signstatus_valid==''){\n\t\t\t\t\t\t$model->signstatus_valid ='迟到';\n\t\t\t\t\t}\n\t\t\t\t\t$model->latetime = $userSign[\"uplate\"]>0?$userSign[\"uplate\"]:0;\n\t\t\t\t\t$model->overtime = $userSign[\"downlate\"]>0?floor($userSign[\"downlate\"]/30)*0.5:0;\n\t\t\t\t\t$model->timediff = $userSign[\"timediff\"]?:0;\n\t\t\t\t\t$model->signtime1 = $userSign[\"upsigntime\"]?date(\"Y-m-d H:i:s\",$userSign[\"upsigntime\"]):'0000-00-00 00:00:00';\n\t\t\t\t\t$model->signtime2 = $userSign[\"downsigntime\"]?date(\"Y-m-d H:i:s\",$userSign[\"downsigntime\"]):'0000-00-00 00:00:00';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//请假记录\n\t\t\t\tif(isset($LeavesDatas[$personnel['id']])){\n\t\t\t\t\t$userLeaves= $LeavesDatas[$personnel['id']];\n\t\t\t\t\t$leaveids=\"\";\n\t\t\t\t\t$leavehour=0;\n\t\t\t\t\t$leavememo=\"\";\n\t\t\t\t\tforeach($userLeaves as $leaveid => $leave){\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t$timeE = min(strtotime($curDate.\" 18:00:00\"),$leave[\"leaveend\"]);\n\t\t\t\t\t\t$timeS = max(strtotime($curDate.\" 09:00:00\"),$leave[\"leavestart\"]);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$difftime=$timeE-$timeS;\n\t\t\t\t\t\t// echo date(\"Y-m-d H:i:s\",$timeS);\n\t\t\t\t\t\t// echo date(\"Y-m-d H:i:s\",$timeE);\n\t\t\t\t\t\t// var_dump($difftime);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$timeAM = strtotime($curDate.\" 12:00:00\");\n\t\t\t\t\t\t$timePM = strtotime($curDate.\" 13:00:00\");\n\t\t\t\t\t\tif($timeS<=$timeAM&&$timeE>=$timePM){\n\t\t\t\t\t\t\t$difftime-=3600;\n\t\t\t\t\t\t}elseif($timeS<=$timeAM&&$timeE>=$timeAM){\n\t\t\t\t\t\t\t$difftime-=($timeE-$timeAM);\n\t\t\t\t\t\t}elseif($timeS<=$timePM&&$timeE>=$timePM){\n\t\t\t\t\t\t\t$difftime-=($timePM-$timeS);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$totalhour =$difftime>0?floor($difftime/60/30)*0.5:0;\n\t\t\t\t\t\t$leaveids.=$leaveids?(\",\". $leave[\"id\"]):$leave[\"id\"];\n\t\t\t\t\t\t$leavehour += $totalhour;\n\t\t\t\t\t\t$leavememo .= $leavememo?\"||,||\":\"\";\n\t\t\t\t\t\t\n\t\t\t\t\t\t$leavememo .= \"id:\".$leave[\"id\"].\"\\n时长:\".date(\"Y-m-d H:i\",$timeS).\"~\".date(\"Y-m-d H:i\",$timeE).\"(\".$totalhour.\"小时)\\n说明:\".$leave[\"description\"];\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t$model->leaveids = $leaveids;\n\t\t\t\t\t$model->leavehour = $leavehour;\n\t\t\t\t\t$model->leavememo = $leavememo;\n\t\t\t\t}else{\n\t\t\t\t\t$model->leaveids = \"\";\n\t\t\t\t\t$model->leavehour = 0;\n\t\t\t\t\t$model->leavememo = \"\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//加班记录\n\t\t\t\tif(isset($OvertimesDatas[$personnel['id']])){\n\t\t\t\t\t$userOvertimes= $OvertimesDatas[$personnel['id']];\n\t\t\t\t\t$overtimeids=\"\";\n\t\t\t\t\t$overtimehour=0;\n\t\t\t\t\t$overtimememo=\"\";\n\t\t\t\t\tforeach($userOvertimes as $overtimeid => $overtime){\n\t\t\t\t\t\t$overtimeids.=$overtimeids?(\",\". $overtime[\"id\"]):$overtime[\"id\"];\n\t\t\t\t\t\t$overtimehour += $overtime[\"totalhour\"];\n\t\t\t\t\t\t$overtimememo .= $overtimememo?\"||,||\":\"\";\n\t\t\t\t\t\t$overtimememo .= \"id:\".$overtime[\"id\"].\"\\n时长:\".date(\"Y-m-d H:i\",$overtime['overtimestart']).\"~\".date(\"Y-m-d H:i\",$overtime['overtimeend']).\"(\".$overtime[\"totalhour\"].\"小时)\\n说明:\".$overtime[\"description\"];\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t$model->overtimeids = $overtimeids;\n\t\t\t\t\t$model->overtimehour = $overtimehour;\n\t\t\t\t\t$model->overtimememo = $overtimememo;\n\t\t\t\t}else{\n\t\t\t\t\t$model->overtimeids = '';\n\t\t\t\t\t$model->overtimehour = 0;\n\t\t\t\t\t$model->overtimememo = '';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//外出记录\n\t\t\t\tif(isset($gooutDatas[$personnel['id']])){\n\t\t\t\t\t$userGoout= $gooutDatas[$personnel['id']];\n\t\t\t\t\t$gooutids=\"\";\n\t\t\t\t\t$goouthour=0;\n\t\t\t\t\t$gooutmemo=\"\";\n\t\t\t\t\tforeach($userGoout as $gooutid => $goout){\n\t\t\t\t\t\t$gooutids.=$gooutids?(\",\". $goout[\"id\"]):$goout[\"id\"];\n\t\t\t\t\t\t$goouthour += $goout[\"totalhour\"];\n\t\t\t\t\t\t$gooutmemo .= $gooutmemo?\"||,||\":\"\";\n\t\t\t\t\t\t$gooutmemo .= \"id:\".$goout[\"id\"].\"\\n时长:\".\"(\".$overtime[\"totalhour\"].\"小时)\\n说明:\".$overtime[\"description\"];\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t$model->gooutids = $gooutids;\n\t\t\t\t\t$model->goouthour = $goouthour;\n\t\t\t\t\t$model->gooutmemo = $gooutmemo;\n\t\t\t\t}else{\n\t\t\t\t\t$model->gooutids = '';\n\t\t\t\t\t$model->goouthour = 0;\n\t\t\t\t\t$model->gooutmemo = '';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($model->save()){\n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\tvar_dump($model->errors);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\techo \"从\",$startdate,\"到\",$enddate,\"考勤脚本执行完毕!\";\n }",
"public function PlannedAttendance()\n {\n return $this->hasMany('App\\Models\\PlannedAttendance');\n }",
"public function attendance($param1 = '', $param2 = '', $param3 = ''){\n\n\t\tif($param1 == 'take_attendance'){\n\t\t\t$response = $this->crud_model->take_attendance();\n\t\t\techo $response;\n\t\t}\n\n\t\tif($param1 == 'filter'){\n\t\t\t$date = '01 '.$this->input->post('month').' '.$this->input->post('year');\n\t\t\t$page_data['attendance_date'] = strtotime($date);\n\t\t\t$page_data['class_id'] = $this->input->post('class_id');\n\t\t\t$page_data['section_id'] = $this->input->post('section_id');\n\t\t\t$page_data['month'] = $this->input->post('month');\n\t\t\t$page_data['year'] = $this->input->post('year');\n\t\t\t$this->load->view('backend/admin/attendance/list', $page_data);\n\t\t}\n\n\t\tif($param1 == 'student'){\n\t\t\t$page_data['attendance_date'] = strtotime($this->input->post('date'));\n\t\t\t$page_data['class_id'] = htmlspecialchars($this->input->post('class_id'));\n\t\t\t$page_data['section_id'] = htmlspecialchars($this->input->post('section_id'));\n\t\t\t$this->load->view('backend/admin/attendance/student', $page_data);\n\t\t}\n\n\t\tif(empty($param1)){\n\t\t\t$page_data['folder_name'] = 'attendance';\n\t\t\t$page_data['page_title'] = 'attendance';\n\t\t\t$this->load->view('backend/index', $page_data);\n\t\t}\n\t}",
"public function postcreate(Request $request)\n {\n \t$attendance = Attendance::whereEmployeeId(Auth::user()->id)->whereCheckOut(null)->first();\n\n \t$now \t\t\t= Carbon::now();\n\n\t $now->toTimeString();\n\n \tif($attendance)\n \t{\n \t\t$attendance->update([\n \t\t\t'check_out' \t\t=> $now,\n \t\t]);\n\n \t\t$message = 'You have checked out successfully!';\n \t} else {\n \t\t$user \t\t\t= Auth::user()->id; \n\n\t \t$checkin_time = Carbon::today();\n $checkin_time->addHours(8);\n\n\t \tif(Carbon::parse($checkin_time)->lt($now))\n\t \t{\n\t \t\t$lateness_status = 1;\n\t \t} else {\n\t \t\t$lateness_status = 0;\n\t \t}\n\t \t\n\t \tAttendance::create([\n\t \t\t'employee_id' \t => $user,\n\t \t\t'check_in' \t\t\t=> $now, \n\t \t\t'lateness_status' \t=> $lateness_status,\n\t \t]);\n\n\t \t$message = 'You have checked in successfully!';\n \t} \n\n \treturn redirect('/attendances/view/')->with('success', $message);\n }",
"public function edit($int_proj_no)\n {\t\n \n if(session()->get('user')->int_status==1)\n {\n $date=date('Y-m-d');\n \n $attendance=tbl_intern_attend::where('att_intern',session()->get('user')->int_no)->where('att_date',$date)->first();\n \n $interns=tbl_intern_attend::where('att_intern',session()->get('user')->int_no)->first();\n }\n elseif(session()->get('user')->int_status==-1){\n $date=date('Y-m-d');\n \n $attendance=tbl_intern_attend::where('att_intern',session()->get('user')->int_no)->where('att_date',$date)->first();\n \n $interns=tbl_intern_attend::where('att_intern',session()->get('user')->int_no)->first();\n }else{\n \n $date=date('Y-m-d');\n $attendance=tbl_intern_attend::where('att_intern',session()->get('user')->int_no)->where('att_date',$date)->first();\n \n $begin = new DateTime(session()->get('user')->int_join_date);\n $end = new DateTime($date);\n $daterange = new DatePeriod($begin, new DateInterval('P1D'), $end);\n \n foreach($daterange as $d)\n { \n if($d>$date)\n {\n $att=tbl_intern_attend::where('att_intern',session()->get('user')->int_no)->where('att_date',$d->format('Y-m-d'))->first();\n if($att==null)\n {\n $add=tbl_intern_attend::create([\n // 'att_marked_on'=>$request->input('att_marked_on'),\n 'att_intern'=>session()->get('user')->int_no,\n 'att_date'=>$d->format('Y-m-d'),\n 'att_marked_on'=>$d->format('Y-m-d'),\n 'att_in'=>\"00:00:00\",\n 'att_out'=>\"00:00:00\",\n 'att_holiday'=>\"1\",\n ]);\n }\n }\n else\n {\n break;\n }\n }\n }\n \n\n \n \n \n \n \n \n \n \n \n \n \n return view('discussionboard',compact('project','int_proj_no','attendance'));\n\n }",
"function attendance_add_status($status) {\n global $DB;\n if (empty($status->context)) {\n $status->context = context_system::instance();\n }\n\n if (!empty($status->acronym) && !empty($status->description)) {\n $status->deleted = 0;\n $status->visible = 1;\n $status->setunmarked = 0;\n $status->availablebeforesession = 0;\n\n $id = $DB->insert_record('attendance_statuses', $status);\n $status->id = $id;\n\n $event = \\mod_attendance\\event\\status_added::create(array(\n 'objectid' => $status->attendanceid,\n 'context' => $status->context,\n 'other' => array('acronym' => $status->acronym,\n 'description' => $status->description,\n 'grade' => $status->grade)));\n if (!empty($status->cm)) {\n $event->add_record_snapshot('course_modules', $status->cm);\n }\n $event->add_record_snapshot('attendance_statuses', $status);\n $event->trigger();\n return true;\n } else {\n return false;\n }\n}",
"function AfterAdd(&$values,&$keys,$inline,&$pageObject)\n{\n\n\t\tglobal $conn;\n\n$attend_id=$values['attend_id'];\n\n//select shecdule ID from timetable\n$sql_at= \"SELECT scheduleID,courseID,date,(end_time-start_time) AS hour FROM schedule_timetable WHERE id='$attend_id'\";\n$query_at=db_query($sql_at,$conn);\n$row_at=db_fetch_array($query_at);\n\n$scheduleID=$row_at['scheduleID'];\n\n//select related schedule id from schedule\n$sql_at2= \"SELECT programID,batchID,groupID FROM schedule WHERE scheduleID='$scheduleID'\";\n$query_at2=db_query($sql_at2,$conn);\n$row_at2=db_fetch_array($query_at2);\n\n$program=$row_at2['programID'];\n$batch=$row_at2['batchID'];\n$class=$row_at2['groupID'];\n\n//update program , batch, class to student_attendance table\n$date=$row_at['date'];\n$hour=$row_at['hour'];\n$course=$row_at['courseID'];\n$id=$keys['id'];\n$sql_up= \"Update student_attendance set programID ='$program', batchID='$batch',class='$class',course='$course',date='$date',hour='$hour' where id='$id'\";\n$query_up=db_exec($sql_up,$conn);\n\n//query the total hour for this module\n$sql_th= \"SELECT total_hour FROM program_course WHERE programID='$program' && CourseID=$course\";\n$query_th=db_query($sql_th,$conn);\n$row_th=db_fetch_array($query_th);\n\n$totalhour=$row_th['total_hour'];\n//the percentage wight of absentee ( $hour/$totalhour)\n$weight_absent=($hour/$totalhour*100);\n\n//query current attendance status for this student, program , module\n$studentID=$values['StudentID'];\n$sql_at3=\"SELECT Attendance FROM student_course WHERE StudentID=$studentID AND programID=$program AND CourseID=$course AND Exam_Remark IS NULL\";\n$query_at3=db_query($sql_at3,$conn);\n$row_at3=db_fetch_array($query_at3);\n\n$current_attendance=$row_at3['Attendance'];\n//update student_course attendance\n\n$net_attendance=$current_attendance-$weight_absent;\n\n$sql_ups= \"Update student_course SET Attendance='$net_attendance' where StudentID='$studentID' && programID='$program' && CourseID=$course AND Exam_Remark IS NULL\";\n$query_ups=db_exec($sql_ups,$conn);\n;\t\t\n}",
"public function showEacAttendence()\n\t{\n\t\t$data = DB::select('select * from attendences a, user_masters u, sub_event_masters s where a.s_e_id = s.s_e_id and a.u_id=u.u_id');\n\t\treturn view('eac.viewAttendence')->with(['data' => $data]);\n\t}",
"function getAttendance(Staff &$staff, $date) {\n\t$rows = array();\n if (isset($staff)) {\n\t\t$link = Utility::getDefaultDBConnection();\n\t\tif(isset($date)){\n\t\t\t$query = \"select * from attendance where staff_id='\".$staff->getID().\"' and day<='$date'\";\n\t\t}else{\n\t\t\t$query = \"select * from attendance where staff_id='\".$staff->getID().\"'\";\n\t\t}\n\t\t$result = mysqli_query($link, $query) or die(mysqli_error($link));\n\t\tif($result){\n\t\t\twhile($row = mysqli_fetch_array($result)){\n\t\t\t\t$rows[] = $row;\n\t\t\t}\n\t\t}\n }\n return $rows;\n}",
"function index()\n {\n $data['attendance'] = $this->Attendance_model->get_all_attendance();\n \n $data['_view'] = 'attendance/index';\n $this->load->view('layouts/main',$data);\n }",
"public function attendencePage(){\n\t $school_name = $this->session->userdata('school_name');\n\t\t$q = $this->db\n\t\t\t\t\t\t->from('userinfo')\n\t\t\t\t\t\t->where('role', 8)\n\t\t\t\t\t\t->where('school_name',$school_name)\n\t\t\t\t\t\t->get();\n\n\t\t$result = $q->result();\n\n\t\t$this->load->view('take_attendence',['dblist'=>$result]);\n\n\t}",
"function add()\n { \n if( $this->input->post('rfid') !== null )\n {\n $this->load->model('cadet_model');\n $data['cadet'] = $this->cadet_model->find_cadet( $this->input->post('rfid') );\n if(isset($data['cadet']['rin']))\n {\n if(isset($_POST) && count($_POST) > 0) \n { \n $params = array(\n 'rin' => $data['cadet']['rin'],\n 'eventid' => $this->input->post('event'),\n );\n\n $attendance_id = $this->Attendance_model->add_attendance( $params );\n\n redirect('cadetevent/view');\n }\n else\n { \n show_error(\"There was no input given.\");\n }\n }\n else\n {\n echo 'This ID card does not match any cadet. Click <a href=\"connectrfid.php\">here</a> to connect this card to a cadet.';\n } \n }\n else if( $this->input->post('rin') !== null )\n {\n // TODO: Set attendance for given rin\n $this->load->model('cadet_model');\n $data['cadet'] = $this->cadet_model->get_cadet( $this->input->post('rin') );\n if(isset($data['cadet']['rin']))\n {\n if(isset($_POST) && count($_POST) > 0) \n { \n $params = array(\n 'rin' => $data['cadet']['rin'],\n 'eventid' => $this->input->post('event'),\n );\n\n $attendance_id = $this->Attendance_model->add_attendance( $params );\n\n redirect('cadetevent/view');\n }\n else\n { \n show_error(\"There was no input given.\");\n }\n }\n else\n {\n echo 'This ID card does not match any cadet. Click <a href=\"connectrfid.php\">here</a> to connect this card to a cadet.';\n } \n }\n }",
"public function reportTodayAttendent()\n {\n $shift = DB::table('shift')->get();\n $dept = DB::table('department')->where('status',1)->get();\n return view('report.reportTodayAttendent')->with('shift',$shift)->with('dept',$dept);\n }",
"function meetingAttendanceReport($args, &$request){\r\n\t\timport ('classes.meeting.form.MeetingAttendanceReportForm');\r\n\t\tparent::validate();\r\n\t\t$this->setupTemplate();\r\n\t\t$meetingAttendanceReportForm= new MeetingAttendanceReportForm($args, $request);\r\n\t\t$isSubmit = Request::getUserVar('generateMeetingAttendance') != null ? true : false;\r\n\t\t\r\n\t\tif ($isSubmit) {\r\n\t\t\t$meetingAttendanceReportForm->readInputData();\r\n\t\t\tif($meetingAttendanceReportForm->validate()){\t\r\n\t\t\t\t\t$this->generateMeetingAttendanceReport($args);\r\n\t\t\t}else{\r\n\t\t\t\tif ($meetingAttendanceReportForm->isLocaleResubmit()) {\r\n\t\t\t\t\t$meetingAttendanceReportForm->readInputData();\r\n\t\t\t\t}\r\n\t\t\t\t$meetingAttendanceReportForm->display($args);\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\t$meetingAttendanceReportForm->display($args);\r\n\t\t}\r\n\t}",
"public function get_appointment_activity($instructorId)\n\t{\n\n\t\t$query = $this->db->query(\"SELECT * FROM `appointments` LEFT JOIN `users_details` ON `appointments`.`user_id` = `users_details`.`id` WHERE `instructor_id` = '\".$instructorId.\"' AND DATE(book_datetime) >= DATE_SUB(CURRENT_DATE, INTERVAL 1 WEEK)\");\n\t\tif($query->num_rows()){\n\t\t\t$result = $query->result_array();\n\t\t\treturn $result;\n\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t}",
"function get_Applicant_user(){ \n global $access;\n session_start();\n $user=$_POST['user'];\n $password=$_POST['password'];\n //$password = substr(md5($password), 0, 20);\n include('conf.php');\n $conn=mysql_connect($host,$cuser,$cpass) or die ('Unable to connect');\n mysql_select_db($db) or die ('Unable to connect to database');\n\n // check and set PAID/UNPAID SYS\n $today=date(\"Y-m-d\", mktime()); \t\n $exp=$today;\t\t\t\t\t\t// FULLY PAID system ==> unCOMMENT or ACTIVATE this code \n \t\t\t\t\t\t\t// NOT FULLY PAID system ==> COMMENT this code and SET the date of expiration in the conf.php \n if ($today <= $exp){\n\t $ok_e = 1;\t// NOT expired\n }\n\n // check and set mac address\n $dateToday=date(\"d\", mktime()); \n if ($dateToday==15){\n \t // this will update mac address every 15th day of the month\n\t $acc=configs();\n \t $query3=\"UPDATE computer SET num='$acc',LastUpdate=now()\";\n\t $result3 = mysql_query($query3) or die (\"Error in query : $query3. \" . mysql_error());\n }\n $query4=\"select * from computer where num='$num'\";\n $result4 = mysql_query($query4) or die (\"Error in query : $query4. \" . mysql_error());\n $ok_m=mysql_num_rows($result4);\n\n // echo \"$ok_m * $ok_e\";\n \n if ($ok_m == 1 && $ok_e == 1){\n \n //SELECT applicant.smID, applicant.smPassword, applicant.smAppSem, applicant.smSchedExamID, sched.scStatus\n//FROM applicant INNER JOIN sched ON applicant.smSchedExamID = sched.scID;\n\n \t$query=\"select applicant.*,sched.* from applicant INNER JOIN sched \n\t\t\tON applicant.smSchedExamID = sched.scID\n\t\t\tWHERE smAppNo='$user' and smPassword='$password' and smExamTaken='No' and scStatus='Enabled'\";\n \t//echo $query;\n\t$result = mysql_query($query) or die (\"Error in query : $query. \" . mysql_error());\n \tif (mysql_num_rows($result) == 1 ){\n\t\t$row = mysql_fetch_array($result);\n\t\t$name = $row['smFName'] . \" \" . $row['smMName'] . \" \" . $row['smLName'];\n \t$_SESSION['name']=$name;\n\t\t$_SESSION['user']=$row['smAppNo'];\n\t\t$_SESSION['period']=$row['smAppSem'];\n\t\t$_SESSION['sex']=$row['smSex'];\n\t\t//$_SESSION['dept']=$row['suDeptCode'];\n\t\t//$_SESSION['desig']=$row['suDesig'];\n\t\t//$userID=$row['suID'];\n\t\t//LoginSaveSession($user);\n \t\t$query=\"INSERT INTO login (userID,active,login,logDate) VALUES ('$userID','Y',now(),now())\";\n \t\t$result = mysql_query($query) or die (\"Error in query login-detail : $query. \" . mysql_error());\n\t\theader(\"Location:takeExam.php\");\n \t}else{\n\t\t//heading_SITE();\n\t\t$access=\"Invalid User <br><span class=center>Unauthorized to access this system or <br> Exam already taken</span><br>\";\n \tinput_data_TAKEEXAM();\n \t}\n }else{\n\tif ($ok_m == 0 ){\n\t\t//heading_SITE();\n\t\t$access=index_main();\n \tinput_data_TAKEEXAM();\n\t\tgetSysFooter(); \n\t}else{\n\t\tif ($ok_e == 0 ){\n\t\t\t//heading_SITE();\n\t\t\t$access=index_exp();\n \t\tinput_data_TAKEEXAM();\n\t\t\tgetSysFooter(); \n\t\t}\n\t}\n } \n}",
"public function generate_subject_code_attendance_report(){\n $this->crud->credibilityAuth(array('Administrator','Registrar','Faculty'));\n // get inputs\n $con = array('subject_code'=>$this->input->post('subject_code'),'batch_year'=> $this->input->post('batch_year_id'));\n $range1 = $this->input->post('date_range1');\n $range2 = $this->input->post('date_range2');\n // get necessary report data\n $students = $this->admin_model->getStudentsBasicInfo($con,'a');\n $attendance = $this->admin_model->getStudentAttendanceBySubjectCode($range1,$range2,$con['subject_code'],$con['batch_year']);\n $att_record = $this->admin_model->getStudentSubjectCodeAttendanceRecord($students,$range1,$range2,$con['subject_code'],$con['batch_year']);\n $att_dates = $this->crud->getDistinctValueOnAssociativeArray($attendance,'attendance_date');\n // generate report data in pdf or csv format from admin_report_model\n if((!empty($con['subject_code']) && !empty($range1) && !empty($range2)) && ($range1 <= $range2)){\n if(!empty($attendance) && !empty($att_record)){\n if($this->input->post('export_csv')){\n $this->admin_report_model->generateStudentAttendanceBySubjectCodeCsv($attendance,$att_record,$att_dates,$con,$range1,$range2);\n exit;\n }else if($this->input->post('export_pdf')){\n $this->admin_report_model->generateSubjectCodeAttendanceReportPdf($attendance,$con,$range1,$range2);\n }\n }\n $this->session->set_flashdata('warning', 'No reports found!.');\n }else{\n $this->session->set_flashdata('danger', 'Invalid input.');\n }\n redirect('attendance_report');\n }",
"function extractAttendance($dataArray){\n\t$dateArray=(array_keys($dataArray));\n\n\t$attendanceArray = array_column($dataArray, 'total');\n\t//print_r($attendanceArray);\n\n\t$attendanceData = array_combine($dateArray, $attendanceArray);\n\t//print_r($attendanceData);\n\n\treturn $attendanceData;\n}",
"public function appointments()\n\t{\n\t\tif (!is_cli())\n\t\t{\n\t\t\techo \"This script can only be accessed via the command line\" . PHP_EOL;\n\t\t\treturn;\n\t\t}\n\n\t\t$participations = $this->participationModel->get_confirmed_participations();\n\t\tforeach ($participations as $participation)\n\t\t{\n\t\t\t$appointment = strtotime($participation->appointment); \n\t\t\tif ($appointment > strtotime('tomorrow') && $appointment <= strtotime('tomorrow + 1 day')) \n\t\t\t{\t\t\t\t\t\n\t\t\t\treset_language(L::DUTCH);\n\t\t\t\t\n\t\t\t\t$participant = $this->participationModel->get_participant_by_participation($participation->id);\n\t\t\t\t$experiment = $this->participationModel->get_experiment_by_participation($participation->id);\n\t\t\t\t$message = email_replace('mail/reminder', $participant, $participation, $experiment);\n\t\t\n\t\t\t\t$this->email->clear();\n\t\t\t\t$this->email->from(FROM_EMAIL, FROM_EMAIL_NAME);\n\t\t\t\t$this->email->to(in_development() ? TO_EMAIL_DEV_MODE : $participant->email);\n\t\t\t\t$this->email->subject('Babylab Utrecht: Herinnering deelname');\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();\n\t\t\t\t// DEBUG: $this->email->print_debugger();\n\t\t\t}\n\t\t}\n\t}",
"public function insertAttendance($total_time_school_opened, $no_of_times_present, $no_of_times_absent, $term_id, $session_id, $student_id, $clazz_no_of_student, $teacher_id, $clazz_id, $clazz_type_id, $class_arm){\n\t\t\t$sql = \"INSERT INTO attendance (id, total_time_school_opened, no_of_times_present, no_of_times_absent, term_id, session_id, student_id, clazz_no_of_student, teacher_id, clazz_id, clazz_type_id, class_arm_id, created_at) VALUES (NULL, '$total_time_school_opened', '$no_of_times_present', '$no_of_times_absent', '$term_id', '$session_id', '$student_id', '$clazz_no_of_student', '$teacher_id', '$clazz_id', '$clazz_type_id', '$class_arm', NULL)\";\n\t\t\t$this->connection()->exec($sql);\n\t\t\treturn true;\n\t\t}",
"public function getAll()\n {\n return\n DB::table('attendances')\n ->select(\n 'id',\n 'code',\n 'name',\n 'description',\n 'permit_code as permitCode'\n )\n ->where([\n ['tenant_id', $this->requester->getTenantId()],\n ['company_id', $this->requester->getCompanyId()]\n ])\n ->get();\n }",
"public function reportDatewiseAttendentForm()\n {\n $year = DB::table('student')->distinct()->get(array('year'));\n $shift = DB::table('shift')->get();\n $dept = DB::table('department')->where('status',1)->get();\n $semister = DB::table('semister')->where('status',1)->get();\n return view('report.reportDatewiseAttendentForm')\n ->with('year',$year)\n ->with('shift',$shift)\n ->with('dept',$dept)\n ->with('semister',$semister);\n }",
"public function index(Request $request)\n {\n $attendances = new Attendance();\n $attendances = $attendances->leftjoin('employee','employee.id','=','attendances.emp_id')\n ->leftjoin('branch','branch.id','=','employee.branch_id')\n ->leftjoin('department','department.id','=','employee.dep_id')\n ->leftjoin('position','position.id','=','employee.position_id')\n ->leftjoin('users','users.id','=','attendances.last_updated_by')\n ->select(\n 'attendances.*', \n 'employee.name',\n 'employee.photo',\n 'branch.name AS branch_name',\n 'department.name AS dept_name',\n 'position.name AS position_name',\n 'users.name AS user_name'\n );\n if ($request->name != '') {\n $attendances = $attendances->where('employee.name','like','%'.$request->name.'%');\n }\n if ($request->branch_id != '') {\n $attendances = $attendances->where('employee.branch_id',$request->branch_id);\n }\n if ($request->dept_id != '') {\n $attendances = $attendances->where('employee.dep_id',$request->dept_id);\n }\n if ($request->attendance_date != '') {\n $attendances = $attendances->whereDate('attendances.date',date('Y-m-d',strtotime($request->attendance_date)));\n // $attendances_date = date('Y-m-d',strtotime($request->attendance_date));\n }else{\n $attendances = $attendances->whereDate('attendances.date',date('Y-m-d'));\n }\n $count = $attendances->get()->count();\n\n $attendances = $attendances->orderBy('attendances.created_at','desc')->paginate(10);\n $branches = Branch::where('status',1)->get();\n $departments = Department::where('status',1)->get();\n return view('admin.attendance.index',compact('count','attendances','branches','departments'))->with('i', (request()->input('page', 1) - 1) * 10);\n }",
"public function getCDateAttnDesgWise_new()\n {\n $orgid = isset($_REQUEST['refno']) ? $_REQUEST['refno'] : 0;\n $att = isset($_REQUEST['att']) ? $_REQUEST['att'] : 0;\n $date = isset($_REQUEST['date']) ? $_REQUEST['date'] : '';\n $desg = isset($_REQUEST['desg']) ? $_REQUEST['desg'] : '';\n $datafor = isset($_REQUEST['datafor']) ? $_REQUEST['datafor'] : '';\n $zone = getTimeZone($orgid);\n date_default_timezone_set($zone);\n $date =date('Y-m-d',strtotime($date));\n $time = date('H:i:s');\n $data = array();\n $cdate = date('Y-m-d');\n\t \n\t $desg_cond='';\n\t $desg_cond1='';\n\t \n\t \n\t if($desg!=0)\n\t {\n\t\t $desg_cond=' and Desg_id='.$desg;\n\t\t $desg_cond1 =' and Designation='.$desg;\n\t }\n\t \n //today attendance\n\t\t if($datafor=='present'){\n\t\t$query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out FROM `AttendanceMaster` WHERE `AttendanceDate`=? \".$desg_cond.\" and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8 ) AND EmployeeId in (SELECT Id from EmployeeMaster where OrganizationId = $orgid AND Is_Delete = 0 ) order by `name`\",\n\t\tarray($date,$orgid));\n $data['present'] = $query->result();\n\t\t\t\n\t\t\t }else if($datafor=='absent'){/*\n //---managing off (weekly and holiday)\n $dt = $date; \n // day of month : 1 sun 2 mon --\n $dayOfWeek = 1 + date('w', strtotime($dt));\n $weekOfMonth = weekOfMonth($dt);\n $week = '';\n $query = $this->db->query(\"SELECT `WeekOff` FROM `WeekOffMaster` WHERE `OrganizationId` =? AND `Day` = ?\", array(\n $orgid,\n $dayOfWeek\n ));\n if ($row = $query->result()) {\n $week = explode(\",\", $row[0]->WeekOff);\n }\n if ($week[$weekOfMonth - 1] == 1) {\n $data['absentees'] = '';\n } else {\n $query = $this->db->query(\"SELECT `DateFrom`, `DateTo` FROM `HolidayMaster` WHERE OrganizationId=? and (? between `DateFrom` and `DateTo`) \", array(\n $orgid,\n $dt\n ));\n if ($query->num_rows() > 0) {\n //-----managing off (weekly and holiday) - close \n $query = $this->db->query(\"SELECT CONCAT(FirstName,' ',LastName) as name,'-' as TimeIn,'-' as TimeOut ,'Absent' as status from EmployeeMaster where `OrganizationId` =$orgid and EmployeeMaster.archive=1 and EmployeeMaster.Id not in(select AttendanceMaster.`EmployeeId` from AttendanceMaster where `AttendanceDate`='$date' and `OrganizationId` =$orgid) and CAST('$time' as time) > (select TimeIn from ShiftMaster where ShiftMaster.Id=shift) order by `name`\", array(\n $orgid,\n $date,\n $orgid\n ));\n $data['absentees'] = $query->result();\n } \n }*/\n\t\t\t//////////abs\n\t\n\t\t\t\n\t\t\t\n\t\t\tif($date!=date('Y-m-d')){// for other deay's absentees\n\t\t\t\t$query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , '-' as `TimeOut` ,'-' as TimeIn FROM `AttendanceMaster` WHERE `AttendanceDate`=? and OrganizationId=? and (AttendanceStatus=2 or AttendanceStatus=6 or AttendanceStatus=7 ) \".$desg_cond.\" order by `name`\", array($date,$orgid));\n\t\t\t\t$this->db->close();\n\t\t\t\t$data['absent'] = $query->result();\n\t\t\t}else{ // for today's absentees\n\t\t\t\t$query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , '-' as `TimeOut` ,'-' as TimeIn FROM `AttendanceMaster` WHERE `AttendanceDate`=? and OrganizationId=? \nand AttendanceStatus in (2,6,7) \".$desg_cond.\" order by `name`\",array($date,$orgid));\n\t\t\t$temp=array();\n $temp = $query->result();\n\t\t\t\n\t\t\t$query = $this->db->query(\"SELECT CONCAT(FirstName,' ',LastName) as name, '-' as `TimeOut` ,'-' as TimeIn\n\t\t\t\t\t\tFROM `EmployeeMaster` \n\t\t\t\t\t\tWHERE `OrganizationId` =?\n\t\t\t\t\t\tAND ARCHIVE =1 \".$desg_cond1.\"\n\t\t\t\t\t\tAND is_Delete = 0 AND Id NOT \n\t\t\t\t\t\tIN (\n\t\t\t\t\t\tSELECT EmployeeId\n\t\t\t\t\t\tFROM AttendanceMaster\n\t\t\t\t\t\tWHERE AttendanceDate = ?\n\t\t\t\t\t\tAND `OrganizationId` =?\n\t\t\t\t\t\t)\n\t\t\t\t\t\tAND (\n\t\t\t\t\t\tSELECT `TimeIn` \n\t\t\t\t\t\tFROM `ShiftMaster` \n\t\t\t\t\t\tWHERE `Id` = Shift\n\t\t\t\t\t\tAND TimeIn < ?\n\t\t\t\t\t\t)\",array($orgid,$date,$orgid,$time));\n\t\t\t\t\t\t$data['absent']= array_merge($temp,$query->result());\n\t\t\t}\n\t\t\t\n\t}else if($datafor=='latecomings'){\n\t//\techo \"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out FROM `AttendanceMaster` WHERE (time(TimeIn) > (select time(TimeIn) from ShiftMaster where ShiftMaster.Id=shiftId)) and `AttendanceDate`='$date' \".$desg_cond.\" and OrganizationId='$orgid' and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8 ) order by `name`\";\n //////// today_late\n $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out FROM `AttendanceMaster` WHERE (time(TimeIn) > (select time(TimeIn) from ShiftMaster where ShiftMaster.Id=shiftId)) and `AttendanceDate`=? \".$desg_cond.\" and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8 ) order by `name`\", array(\n $date,\n $orgid\n ));\n $data['lateComings'] = $query->result();\n\t}else if($datafor=='earlyleavings'){\t\t\n ////////today_early\n /*$query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out FROM `AttendanceMaster` WHERE (time(TimeOut) < (select time(TimeOut) from ShiftMaster where ShiftMaster.Id=shiftId) and TimeOut!='00:00:00' ) and `AttendanceDate`=? \".$desg_cond.\" and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8 ) order by `name`\", array( $date, $orgid ));\n $data['earlyLeavings'] = $query->result();*/\n\t\t\t\n\t\t $query = $this->db->query(\"select Shift,Id , FirstName , LastName from EmployeeMaster where OrganizationId = $orgid and Id IN (select EmployeeId from AttendanceMaster where OrganizationId = $orgid and AttendanceDate='$date' and TimeIn != '00:00:00' $desg_cond ) AND is_Delete=0 order by FirstName\");\n\t\t $res = array() ;\n\t\t $cond = '';\n foreach ($query->result() as $row) {\n $ShiftId = $row->Shift;\n $EId = $row->Id;\n $query = $this->db->query(\"select TimeIn,TimeOut,shifttype from ShiftMaster where Id = $ShiftId\");\n if ($data123 = $query->row()) {\n $shiftout = $data123->TimeOut;\n $shiftout1 = $date. ' '.$data123->TimeOut;\n\t\t\t\tif($data123->shifttype==2)\n\t\t\t\t{\n\t\t\t\t\t$nextdate = date('Y-m-d',strtotime($date . \"+1 days\"));\n\t\t\t\t\t $shiftout1 = $nextdate.' '.$data123->TimeOut;\n\t\t\t\t}\n $shift = substr($data123->TimeIn, 0, 5) . ' - ' . substr($data123->TimeOut, 0, 5);\n $ct = date('H:i:s');\n \n if ($cdate == $date)\n $cond = \" and TimeOut !='00:00:00'\";\n $query333 = $this->db->query(\"select SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out from AttendanceMaster where EmployeeId =$EId and if(timeoutdate = '0000-00-00' , TimeOut < '$shiftout' , CONCAT(timeoutdate,' ' ,TimeOut) < '$shiftout1' ) and AttendanceDate='$date'\" . $cond);\n\t\t\t\t\t\n\t\t\t\t\t\n if ($row333 = $query333->row()) {\n $a = new DateTime($row333->TimeOut);\n $b = new DateTime($data123->TimeOut);\n $interval = $a->diff($b);\n $data['earlyby'] = $interval->format(\"%H:%I\");\n $data['timeout'] = substr($row333->TimeOut, 0, 5);\n $data['name'] = $row->FirstName . ' ' . $row->LastName;\n $data['shift'] = $shift;\n $data['TimeIn'] = $row333->TimeIn;\n $data['TimeOut'] = $row333->TimeOut;\n $data['CheckOutLoc'] = $row333->CheckOutLoc;\n $data['checkInLoc'] = $row333->checkInLoc;\n $data['latit_in'] = $row333->latit_in;\n $data['longi_in'] = $row333->longi_in;\n $data['latit_out'] = $row333->latit_out;\n $data['longi_out'] = $row333->longi_out;\n $data['status'] = $row333->status;\n $data['date'] = $date;\n $res[] = $data;\n }\n \n }\n }\n\t\t $data['earlyLeavings'] =\t $res; \n\t\t\t\n\t}\t\t\n echo json_encode($data, JSON_NUMERIC_CHECK);\n \n }",
"public function index()\n {\n// $attendences=Attendence::with('student','teacher')->get();\n// dd($attendences);\n //$status=Student_Attendance::with('attendance')->get();\n //dd($status);\n $attendences=Attendence::\n join('student__attendances','student__attendances.attendence_id','attendences.id')\n ->join('teachers','attendences.teacher_id','teachers.id')\n\n ->join('students','student__attendances.student_id','students.id')\n\n ->join('class_news','attendences.class_id','class_news.id')\n\n ->select('class_news.class','teachers.name as teacherName','attendences.date','student__attendances.status','students.name as studentName')\n\n ->get();\n //dd($attendences);\n return view('Backend.attendences.index', compact('attendences'));\n\n }",
"public function getExpectedAttendance(Request $event)\n {\n /**\n * if within org, get all users in the orggroup with the same organization_id with the event's\n * if university / organization, get all users of the system\n */\n $ev = Event::find($event->id);\n\n if($ev->event_type_id == 1) {\n $data['result'] = User::all();\n } elseif ($ev->event_type_id == 2) {\n $data['result'] = OrganizationGroup::with('user')\n ->where('organization_id', '=', $ev->organization_id)\n ->get();\n }\n\n $data['event_type'] = $ev->event_type_id;\n\n echo json_encode($data);\n }",
"public function staffAttendances()\n {\n return $this->hasMany(User::class);\n }",
"public function getCDateAttnDeptWise_new()\n {\n $orgid = isset($_REQUEST['refno']) ? $_REQUEST['refno'] : 0;\n $att = isset($_REQUEST['att']) ? $_REQUEST['att'] : 0;\n $date = isset($_REQUEST['date']) ? $_REQUEST['date'] : '';\n $dept = isset($_REQUEST['dept']) ? $_REQUEST['dept'] : '';\n $datafor = isset($_REQUEST['datafor']) ? $_REQUEST['datafor'] : '';\n $zone = getTimeZone($orgid);\n date_default_timezone_set($zone);\n $date =date('Y-m-d',strtotime($date));\n $time = date('H:i:s');\n $data = array();\n $cdate = date('Y-m-d');\n\t \n\t $dept_cond='';\n\t $dept_cond1 ='';\n\t if($dept!=0)\n\t {\n\t\t $dept_cond = ' and Dept_id='.$dept;\n\t\t $dept_cond1 = ' and Department='.$dept;\n\t }\n\t \n //today attendance\n\t\t if($datafor=='present'){\n\t\t$query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out FROM `AttendanceMaster` WHERE `AttendanceDate`=? \".$dept_cond.\" and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8 ) order by `name`\",\n\t\tarray($date,$orgid));\n $data['present'] = $query->result();\n\t\t\t\n\t\t\t }else if($datafor=='absent'){\n\t\t\t\t /*\n //---managing off (weekly and holiday)\n $dt = $date; \n // day of month : 1 sun 2 mon --\n $dayOfWeek = 1 + date('w', strtotime($dt));\n $weekOfMonth = weekOfMonth($dt);\n $week = '';\n $query = $this->db->query(\"SELECT `WeekOff` FROM `WeekOffMaster` WHERE `OrganizationId` =? AND `Day` = ?\", array(\n $orgid,\n $dayOfWeek\n ));\n if ($row = $query->result()) {\n $week = explode(\",\", $row[0]->WeekOff);\n }\n if ($week[$weekOfMonth - 1] == 1) {\n $data['absentees'] = '';\n } else {\n $query = $this->db->query(\"SELECT `DateFrom`, `DateTo` FROM `HolidayMaster` WHERE OrganizationId=? and (? between `DateFrom` and `DateTo`) \", array(\n $orgid,\n $dt\n ));\n if ($query->num_rows() > 0) {\n //-----managing off (weekly and holiday) - close \n $query = $this->db->query(\"SELECT CONCAT(FirstName,' ',LastName) as name,'-' as TimeIn,'-' as TimeOut ,'Absent' as status from EmployeeMaster where `OrganizationId` =$orgid and EmployeeMaster.archive=1 and EmployeeMaster.Id not in(select AttendanceMaster.`EmployeeId` from AttendanceMaster where `AttendanceDate`='$date' and `OrganizationId` =$orgid) and CAST('$time' as time) > (select TimeIn from ShiftMaster where ShiftMaster.Id=shift) order by `name`\", array(\n $orgid,\n $date,\n $orgid\n ));\n $data['absentees'] = $query->result();\n } \n }*/\n\t\t\t//////////abs\n\t\n\t\t\t\n\t\t\t\n\t\t\tif($date!=date('Y-m-d')){// for other deay's absentees\n\t\t\t\t$query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , '-' as `TimeOut` ,'-' as TimeIn FROM `AttendanceMaster` WHERE `AttendanceDate`=? and OrganizationId=? and (AttendanceStatus=2 or AttendanceStatus=6 or AttendanceStatus=7 ) \". $dept_cond .\" order by `name`\", array($date,$orgid));\n\t\t\t\t$this->db->close();\n\t\t\t\t$data['absent'] = $query->result();\n\t\t\t}else{ // for today's absentees\n\t\t\t\t$query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , '-' as `TimeOut` ,'-' as TimeIn FROM `AttendanceMaster` WHERE `AttendanceDate`=? and OrganizationId=? \nand AttendanceStatus in (2,6,7) \". $dept_cond .\" order by `name`\",array($date,$orgid));\n\t\t\t$temp=array();\n $temp = $query->result();\n\t\t\t\n\t\t\t$query = $this->db->query(\"SELECT CONCAT(FirstName,' ',LastName) as name, '-' as `TimeOut` ,'-' as TimeIn\n\t\t\t\t\t\tFROM `EmployeeMaster` \n\t\t\t\t\t\tWHERE `OrganizationId` =?\n\t\t\t\t\t\tAND ARCHIVE =1 \". $dept_cond1.\" \n\t\t\t\t\t\tAND Id NOT \n\t\t\t\t\t\tIN (\n\t\t\t\t\t\tSELECT EmployeeId\n\t\t\t\t\t\tFROM AttendanceMaster\n\t\t\t\t\t\tWHERE AttendanceDate = ?\n\t\t\t\t\t\tAND `OrganizationId` =?\n\t\t\t\t\t\t)\n\t\t\t\t\t\tAND (\n\t\t\t\t\t\tSELECT `TimeIn` \n\t\t\t\t\t\tFROM `ShiftMaster` \n\t\t\t\t\t\tWHERE `Id` = Shift\n\t\t\t\t\t\tAND TimeIn < ?\n\t\t\t\t\t\t)\",array($orgid,$date,$orgid,$time));\n\t\t\t\t\t\t$data['absent']= array_merge($temp,$query->result());\n\t\t\t}\n\t}else if($datafor=='latecomings'){\n\t//\techo \"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out FROM `AttendanceMaster` WHERE (time(TimeIn) > (select time(TimeIn) from ShiftMaster where ShiftMaster.Id=shiftId)) and `AttendanceDate`='$date' \".$dept_cond.\" and OrganizationId='$orgid' and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8 ) order by `name`\";\n //////// today_late\n $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out FROM `AttendanceMaster` WHERE (time(TimeIn) > (select time(TimeIn) from ShiftMaster where ShiftMaster.Id=shiftId)) and `AttendanceDate`=? \".$dept_cond.\" and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8 ) order by `name`\", array(\n $date,\n $orgid\n ));\n $data['lateComings'] = $query->result();\n\t}else if($datafor=='earlyleavings'){\t\t\n ////////today_early\n\t\t\n /* $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out FROM `AttendanceMaster` WHERE (time(TimeOut) < (select time(TimeOut) from ShiftMaster where ShiftMaster.Id=shiftId) and TimeOut!='00:00:00' ) and `AttendanceDate`=? \".$dept_cond.\" and OrganizationId=? and AttendanceStatus in (1,3,4,5,8) order by `name`\", array( $date, $orgid ));\n $data['earlyLeavings'] = $query->result(); */\n\t\t\t\n\t\t $query = $this->db->query(\"select Shift,Id , FirstName , LastName from EmployeeMaster where OrganizationId = $orgid and Id IN (select EmployeeId from AttendanceMaster where OrganizationId = $orgid and AttendanceDate='$date' and TimeIn != '00:00:00' $dept_cond ) AND is_Delete=0 order by FirstName\");\n\t\t $res = array();\n\t\t $cond = '';\n foreach ($query->result() as $row) {\n $ShiftId = $row->Shift;\n $EId = $row->Id;\n $query = $this->db->query(\"select TimeIn,TimeOut,shifttype from ShiftMaster where Id = $ShiftId\");\n if ($data123 = $query->row()) {\n $shiftout = $data123->TimeOut;\n $shiftout1 = $date. ' '.$data123->TimeOut;\n\t\t\t\tif($data123->shifttype==2)\n\t\t\t\t{\n\t\t\t\t\t$nextdate = date('Y-m-d',strtotime($date . \"+1 days\"));\n\t\t\t\t\t $shiftout1 = $nextdate.' '.$data123->TimeOut;\n\t\t\t\t}\n $shift = substr($data123->TimeIn, 0, 5) . ' - ' . substr($data123->TimeOut, 0, 5);\n $ct = date('H:i:s');\n \n if ($cdate == $date)\n $cond = \" and TimeOut !='00:00:00'\";\n $query333 = $this->db->query(\"select SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out from AttendanceMaster where EmployeeId =$EId and if(timeoutdate = '0000-00-00' , TimeOut < '$shiftout' , CONCAT(timeoutdate,' ' ,TimeOut) < '$shiftout1' ) and AttendanceDate='$date'\" . $cond);\n\t\t\t\t\t\n\t\t\t\t\t\n if ($row333 = $query333->row()) {\n $a = new DateTime($row333->TimeOut);\n $b = new DateTime($data123->TimeOut);\n $interval = $a->diff($b);\n $data['earlyby'] = $interval->format(\"%H:%I\");\n $data['timeout'] = substr($row333->TimeOut, 0, 5);\n $data['name'] = $row->FirstName . ' ' . $row->LastName;\n $data['shift'] = $shift;\n $data['TimeIn'] = $row333->TimeIn;\n $data['TimeOut'] = $row333->TimeOut;\n $data['CheckOutLoc'] = $row333->CheckOutLoc;\n $data['checkInLoc'] = $row333->checkInLoc;\n $data['latit_in'] = $row333->latit_in;\n $data['longi_in'] = $row333->longi_in;\n $data['latit_out'] = $row333->latit_out;\n $data['longi_out'] = $row333->longi_out;\n $data['status'] = $row333->status;\n $data['date'] = $date;\n $res[] = $data;\n }\n \n }\n }\n\t\t $data['earlyLeavings'] =\t $res; \n \t}\n echo json_encode($data, JSON_NUMERIC_CHECK);\n }",
"private function createandActivenInactiveUser($accountType=0,$pin=0,$name=''){\n\n $checkAtt=\\DB::table('attendance_users')->where('pin',$pin)->count();\n if($checkAtt==0)\n {\n if($accountType==1){\n $array=array(\n 'pin'=>$pin,\n 'name'=>$name,\n 'password'=>\"\",\n 'group'=>1,\n 'privilege'=>0\n );\n }else{\n $array=array(\n 'pin'=>$pin,\n 'name'=>$name,\n 'password'=>\"\",\n 'group'=>1,\n 'privilege'=>0\n );\n }\n \n\n \\DB::table('attendance_users')->insert($array);\n }\n\n $dataTable=DeviceSetting::find(1);\n \n if($dataTable->device_status==\"Ready\"){\n $options = [\n 'ip' =>$dataTable->device_ip, \n 'internal_id' => 1, \n 'com_key' => 0, \n 'description' => 'TAD1', \n 'soap_port' => 80, \n 'udp_port' => 4370, \n 'encoding' => 'iso8859-1' \n ];\n \n $tad_factory = new TADFactory($options);\n $tad = $tad_factory->get_instance(); \n\n $dt = $tad->get_date()->to_array();\n if(count($dt)>0){\n\n if($accountType==1)\n {\n $r = $tad->set_user_info([\n 'pin' => $pin,\n 'name'=> $name,\n 'privilege'=> 0,\n 'password' => 0\n ]);\n\n \n $template1_data = [\n 'pin' => $pin,\n 'valid' => 1 //\n ];\n\n $tad->set_user_template($template1_data);\n }\n else\n {\n $tad->delete_user(['pin'=>$pin]);\n }\n \n }\n\n }\n\n if($dataTable->device_two_status==\"Ready\"){\n $options = [\n 'ip' =>$dataTable->device_ip_two, \n 'internal_id' => 1, \n 'com_key' => 0, \n 'description' => 'TAD1', \n 'soap_port' => 80, \n 'udp_port' => 4370, \n 'encoding' => 'iso8859-1' \n ];\n \n $tad_factory = new TADFactory($options);\n $tad = $tad_factory->get_instance(); \n\n $dt = $tad->get_date()->to_array();\n if(count($dt)>0){\n \n if($accountType==1)\n {\n $r = $tad->set_user_info([\n 'pin' => $pin,\n 'name'=> $name,\n 'privilege'=> 0,\n 'password' => 0\n ]);\n\n \n $template1_data = [\n 'pin' => $pin,\n 'valid' => 1 //\n ];\n\n $tad->set_user_template($template1_data);\n }\n else\n {\n $tad->delete_user(['pin'=>$pin]);\n }\n }\n }\n\n\n\n }",
"public function generate_date_attendance(Request $request)\n {\n \t$unit_id=$request->unit_id;\n \t$a_date=date('Y-m-d', strtotime(str_replace('-', '/', $request->attendance_date)));\n \t$attendance=DB::table('tbl_attendance')\n \t\t\t->join('tbl_employee','tbl_attendance.employee_id','=','tbl_employee.employee_id')\n \t\t\t->join('tbl_unit','tbl_attendance.unit_id','=','tbl_unit.unit_id')\n ->join('tbl_designation','tbl_employee.designation_id','=','tbl_designation.designation_id')\n \t\t\t->where('attendance_date',$a_date)\n \t\t\t->where('tbl_attendance.unit_id',$unit_id)\n \t\t\t->get();\n \t\t/*dd($a_date);*/\n \treturn view('manager.show_update_attendance_form', compact('attendance','a_date'));\n }",
"function add_attendence($id=0){\n $post=$this->input->post();\n if($post){\n\t\t\n\t\t\t$st_id=$_POST['st_id'];\n\t\t\t$sem_id=$_POST['sem_id'];\n\t\t\t$attd=$_POST['attd'];\n\t\t\t$attd_tot=$_POST['attd_tot'];\n\t\t\t $this->admin_model->add_student_attend($st_id,$sem_id,$attd,$attd_tot);\n\t\t\tredirect('admin/user_accounts');\n }else{\n\t\t$sql_sem=$this->db->query(\"select u.id from users u where u.id='\".$id.\"'\");\n\t\tif($sql_sem->num_rows()>0){\n\t\t$row=$sql_sem->row();\n\t\t\n\t\t\t$data['st_id']=$id;\t\t\t\t\t\n\t\t\t$data['content_page']='admin/add_attendence';\n $this->load->view('common/base_template',$data);\n\t\t\t}\n\t\t}\n }",
"public function showStudentAttendanceDate($student_id, $class_id, $date)\n {\n $student = Student::find($student_id);\n $num = 1;\n\n $attendances = $student->attendances()->where('room_id', '=', $class_id)->where('date', '=', $date)->get();\n }",
"public function show($id,Request $request)\n {\n $user_id = $request->session()->get('id');\n $user = \\DB::table('users')->whereId($user_id)->first();\n $data['user'] = $user;\n $userDetails = UserDetails::where('user_id', $user_id)->first();\n $data['profilePath'] = $userDetails->profilePhotoPath;\n $data['name'] = $userDetails->name;\n\n $appointmentDetails = $this->getAppointments($id);\n $eventId = $appointmentDetails['eventId'];\n $appointmentLogs = AuditAppointments::orderBy('id','asc')\n ->where('eventId',$eventId)\n ->get();\n $appointmentLogCount = count($appointmentLogs);\n $appointmentLog = array(\n 'initiatedBy'=>\"\",\n 'confirmedBy'=>\"\",\n 'cancelledBy'=>\"\",\n 'initiatedAt'=>\"\",\n 'confirmedAt'=>\"\",\n 'cancelledAt'=>\"\",\n 'expired'=>0,\n 'expiredOn'=>\"\"\n );\n for ($i=0;$i<$appointmentLogCount;$i++){\n $state = $appointmentLogs[$i]->appointmentState;\n if ($state == 1){\n $appointmentLog['initiatedBy'] = $appointmentLogs[$i]->triggeredBy;\n $initiatedAt = $appointmentLogs[$i]->created_at;\n $initiatedAt =Carbon::parse($initiatedAt)->addHours(5)->addMinutes(30);\n $appointmentLog['initiatedAt'] = $initiatedAt;\n $calendarEvent = CalendarEvent::where('id',$eventId)->first();\n $start = Carbon::parse($calendarEvent->start);\n $today = Carbon::today();\n $teacherSlots = TeacherAppointmentSlots::where('calendarEventsId',$eventId)->first();\n $slotId = $teacherSlots->id;\n $appointmentRequest = AppointmentRequest::where('teacherAppointmentsSlot_id',$slotId)->first();\n $confirmed = $appointmentRequest->isCancel;\n $cancelled = $appointmentRequest->isApproved;\n if($start<$today && ($confirmed==0 || $cancelled==0)){\n $appointmentLog['expired']=1;\n $appointmentLog['expiredOn']=$today;\n }\n \n }\n elseif ($state == 2){\n $appointmentLog['confirmedBy'] = $appointmentLogs[$i]->triggeredBy;\n $confirmedAt = $appointmentLogs[$i]->created_at;\n $confirmedAt =Carbon::parse($confirmedAt)->addHours(5)->addMinutes(30);\n $appointmentLog['confirmedAt'] = $confirmedAt;\n }\n else{\n $appointmentLog['cancelledBy'] = $appointmentLogs[$i]->triggeredBy;\n $cancelledAt = $appointmentLogs[$i]->created_at;\n $cancelledAt =Carbon::parse($cancelledAt)->addHours(5)->addMinutes(30);\n $appointmentLog['cancelledAt'] = $cancelledAt;\n }\n }\n return view('appointments.show', compact('appointmentDetails','appointmentLog'),$data);\n }",
"public function getDeclinedAttendance(Request $event)\n {\n //get attendance with status == 'unconfirmed'\n return Attendance::with('user')\n ->where('event_id', '=', $event->id)\n ->where('status', '=', 'unconfirmed')\n ->get();\n }",
"public function generate_voc_program_attendance_report(){\n $this->crud->credibilityAuth(array('Administrator','Registrar'));\n // get inputs\n $condition= array('vocational_program'=>$this->input->post('vocational_program'),'batch_year'=> $this->input->post('batch_year_id'));\n $range1 = $this->input->post('date_range1');\n $range2 = $this->input->post('date_range2');\n // get necessary report data\n $voc_program= $this->vocational_program_model->getVocationalPrograms('s',array('voc_program_id'=>$condition['vocational_program']));\n $students = $this->admin_model->getStudentsBasicInfo($condition,'a');\n $attendance = $this->admin_model->getStudentAttendanceByVocationalProgram($students,$range1,$range2,$condition['batch_year']);\n $att_record = $this->admin_model->getStudentDailyAttendanceRecord($students,$range1,$range2,$condition['batch_year']);\n $att_dates = $this->crud->getDistinctValueOnAssociativeArray($attendance,'attendance_date');\n // generate report data in pdf or csv format from admin_report_model\n if((!empty($condition['vocational_program']) && !empty($range1) && !empty($range2)) && ($range1 <= $range2)){\n if(!empty($attendance)){\n if($this->input->post('export_csv')){\n $this->admin_report_model->generateStudentAttendanceByVocationalProgramCsv($attendance,$att_record,$att_dates,$voc_program,$range1,$range2);\n exit;\n }else if($this->input->post('export_pdf')){\n $this->admin_report_model->generateVocProgramAttendanceReportPdf($attendance,$voc_program,$range1,$range2);\n }\n }\n $this->session->set_flashdata('warning', 'No reports found!.');\n redirect('attendance_report');\n }\n $this->session->set_flashdata('danger', 'Invalid input.');\n redirect('attendance_report');\n \n }",
"function get_student_month_attendance($month)\n\t\t{\n\t\t\t\n\t\t\t$array = array(\"attendance.status\"=>2,\"attendance.student_id !=\"=>0,\"attendance.month\"=>$month);\n\t\t\t$this->db->select('*');\n\t\t\t$this->db->from('attendance');\n\t\t\t$this->db->join('student', 'student.student_id = attendance.student_id');\n\t\t\t$this->db->where($array);\n\t\t\t$query = $this->db->get();\n\t\t\t$attendance =$query->result();\n\t\t\t//echo $this->db->last_query();\n\t\t\t\n\t\t\tforeach($attendance as $row)\n\t\t\t{\n\t\t\t\techo '\n\t\t\t\t<tr class=\"gradeA\"><td>' .date(\"d-M-Y\", strtotime($row->date)) . '</td>\n\t\t\t\t<td>'. $row->class_id.'</td>\t\n\t\t\t\t<td>'. $row->name.'</td>\n\t\t\t\t<td>'. $row->description.'</td>\n\t\t\t\t</tr>';\n\t\t\t} \n\t\t}",
"function report_availabilty($student_id)\n {\n global $CFG;\n\n $now=time();\n\n //if a maximum number of entries has been set lets see if the student has reached this number\n if (!empty($this->reportmaxentries)) {\n $studententries = $this->dbc->count_report_entries($this->report_id,$student_id);\n\n if ($studententries >= $this->reportmaxentries) {\n $extension = $this->extension_check('reportmaxentries');\n\n if (empty($extension) || $studententries >= $extension->value) {\n $temp = new stdClass();\n $temp->entries = $studententries;\n $temp->maxentries = (!empty($extension))? $extension->value : $this->reportmaxentries;\n return false;\n }\n }\n }\n\n //if this report has a lock date check if the date has passed\n if ($this->reporttype == ILP_RT_RECURRING_FINALDATE || $this->reporttype == ILP_RT_FINALDATE) {\n\n if ( $this->reportlockdate < $now ) {\n //find out if this student has been given a report extension\n $extension = $this->extension_check('reportlockdate');\n if (empty($extension) || $extension->value < $now) {\n $temp = new stdClass();\n $temp->expiredate = (!empty($extension))? date('d-m-Y',$extension->value) : date('d-m-Y',$this->reportlockdate);\n return false;\n }\n }\n }\n\n //if the report is a recurring report\n if ($this->reporttype == ILP_RT_RECURRING || $this->reporttype == ILP_RT_RECURRING_FINALDATE) {\n $recurringstart = 0;\n\n if ($this->recurstart == ILP_RECURRING_REPORTCREATION) {\n //rules started at report creation\n $recurringstart = $this->timecreated;\n } else if ($this->recurstart == ILP_RECURRING_SPECIFICDATE) {\n //rules started at specific date\n $recurringstart = $this->recurdate;\n } else {\n //rules started at first entry\n $studententries = $this->dbc->get_user_report_entries($this->id,$student_id);\n\n if (!empty($studententries)) {\n //get the creation time of the first user entry\n $recurringstart = reset($studententries);\n $recurringstart = $recurringstart->timecreated;\n }\n }\n\n if (!empty($recurringstart)) {\n $recurringperiod = $this->recurring_period($recurringstart,$this->recurfrequency);\n\n $entriescount = $this->dbc->count_report_entries($this->id,$student_id,$recurringperiod['start'],$recurringperiod['end']);\n\n if (!empty($entriescount) && $entriescount >= $this->recurmax) {\n $extension = $this->extension_check('recurmax');\n if (empty($extension) || $extension->value <= $entriescount) {\n $temp = new stdClass();\n $temp->entries = $entriescount;\n $temp->maxentries = (!empty($extension))? $extension->value : $this->recurmax;\n return false;\n }\n }\n }\n }\n return true;\n }",
"public function show(AttendanceRequest $attendanceRequest)\n {\n //\n }"
] | [
"0.71250165",
"0.7113097",
"0.69333696",
"0.69185835",
"0.68807983",
"0.6803668",
"0.6720476",
"0.6696979",
"0.6576377",
"0.6526271",
"0.64818496",
"0.64057726",
"0.6371541",
"0.63607395",
"0.6346609",
"0.6280011",
"0.6279408",
"0.6274503",
"0.6274503",
"0.6274503",
"0.6268225",
"0.62172604",
"0.61742336",
"0.61646616",
"0.61562836",
"0.6141028",
"0.61386365",
"0.61385787",
"0.60819757",
"0.6070258",
"0.60634416",
"0.6057817",
"0.6033643",
"0.6032469",
"0.6011274",
"0.59823817",
"0.59725046",
"0.59609854",
"0.5943655",
"0.59352356",
"0.59263927",
"0.5923599",
"0.5871719",
"0.5869135",
"0.5866015",
"0.58529764",
"0.584199",
"0.58377856",
"0.5820376",
"0.581993",
"0.58049756",
"0.58022296",
"0.577324",
"0.5741341",
"0.57330716",
"0.57259023",
"0.57168347",
"0.57067883",
"0.5687541",
"0.56775725",
"0.56550646",
"0.5647116",
"0.56201774",
"0.561955",
"0.5614202",
"0.56135345",
"0.5604183",
"0.5597252",
"0.5590466",
"0.5589715",
"0.55870104",
"0.55865645",
"0.55859554",
"0.5562818",
"0.555676",
"0.5555579",
"0.5554372",
"0.55473506",
"0.5529135",
"0.5526139",
"0.5525912",
"0.5524459",
"0.5520582",
"0.5513158",
"0.55058885",
"0.55026555",
"0.5497786",
"0.5495984",
"0.5493878",
"0.5491556",
"0.5473538",
"0.5466538",
"0.5459049",
"0.5453545",
"0.5450704",
"0.5446499",
"0.5439358",
"0.5436012",
"0.54336053",
"0.54326725",
"0.5430742"
] | 0.0 | -1 |
/ fetches the class's section info | public function fetchClassSection($classId = null)
{
if($classId) {
$sectionData = $this->model_section->fetchSectionDataByClass($classId);
if($sectionData) {
foreach ($sectionData as $key => $value) {
$option .= '<option value="'.$value['section_id'].'">'.$value['section_name'].'</option>';
} // /foreach
}
else {
$option = '<option value="">No Data</option>';
} // /else empty section
echo $option;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getEventClassSections();",
"public function get_section()\n\t\t{\n\t\t\t$retArr = null;\n\n\t\t\t// Scaffolding Code For Array:\n\t\t\t$objs = $this->obj->find_all();\n\t\t\tforeach($objs as $obj)\n\t\t\t{\n\t\t\t\t$retArr[] = $obj->getBasics();\n\t\t\t}\n\n\t\t\treturn $retArr;\n\t\t}",
"public function getSection() : string{\n return $this->section;\n }",
"public function section()\n {\n /*if ($this->section != '') {\n return $this->section;\n }\n else {*/\n // Kill trailing period\n $pattern = \"/\\.$/\"; // remove last \".\"\n $cleaned = $this->section_comment();\n $cleaned = trim($cleaned);\n $cleaned = preg_replace($pattern, '', $cleaned);\n\n $pattern = \"/Styleguide (.+)/\";\n preg_match_all($pattern, $cleaned, $sections);\n //$this->section = $sections[1][0];\n //return $this->section;\n return $sections[1][0];\n //}\n }",
"public function getSection() {\n try {\n $client = new SoapClient($this->SECTION_WSDL);\n $res = $client->findAllActiveSection();\n return $res;\n //print_r($res);\n } catch (Zend_Exception $e) {\n var_dump($e);\n }\n }",
"public function getSection(): string\n {\n return $this->section;\n }",
"public function read($section);",
"static function get_section_info($modinfo, $sectionnum) {\n global $DB;\n\n if (method_exists($modinfo, 'get_section_info')) {\n // Moodle >= 2.3\n return $modinfo->get_section_info($sectionnum);\n }\n\n // Moodle <= 2.2\n $params = array('course' => $modinfo->get_course_id(),\n 'section' => $sectionnum);\n return $DB->get_record('course_sections', $params);\n }",
"public function print_elements_section_info()\n {\n }",
"public function getSection() {\n return $this->section;\n }",
"public function section_details(){\n\t\treturn array(\n\t\t\t'section_name'\t=> $this->section_name,\n\t\t\t'section_url'\t=> $this->section_url,\n\t\t\t'list_columns'\t=> $this->list_columns,\n\t\t\t'column_prefix'\t=> $this->model->db_column_prefix,\n\t\t\t'tabs'\t\t\t=> $this->tabs,\n\t\t\t'hide_tabs'\t\t=> $this->hide_tabs,\n\t\t\t'actions'\t\t=> misc::getActionsDropdowns(),\n\t\t\t'filters'\t\t=> misc::getFiltersDropdowns(),\n\t\t\t'per_page'\t\t=> misc::getPerPageDropdowns(),\n\t\t\t'id'\t\t\t=> $this->id,\n\t\t\t'item_name'\t\t=> $this->item_name,\n\t\t\t'active_tab'\t=> isset($_GET['active_tab']) ? $_GET['active_tab'] : ($this->session->get('active_tab') ? $this->session->get_once('active_tab') : $this->active_tab)\n\t\t);\n\t}",
"public function print_settings_section_info()\n {\n }",
"static function get_section_info_all($modinfo) {\n global $DB;\n\n if (method_exists($modinfo, 'get_section_info_all')) {\n // Moodle >= 2.3\n return $modinfo->get_section_info_all();\n }\n\n // Moodle <= 2.2\n $info = array();\n $params = array('course' => $modinfo->get_course_id());\n if ($sections = $DB->get_records('course_sections', $params, 'section')) {\n foreach ($sections as $section) {\n $sectionnum = $section->section;\n $info[$sectionnum] = $section;\n }\n }\n return $info;\n }",
"function wantedSection() {\n $urlParts = $this->_getPathUrl();\n return $urlParts[$this->sectionOffset];\n }",
"public function getSectionsByClass() {\n\t\t$sections_by_class = Section::GetInstance()->getSectionsByClass( $_POST['class_id'] );\n\n\t\treturn jsonResult( $sections_by_class );\n\n\t}",
"public function get_section_list_for_classs()\n\t{\n\t\t$cls_id = $this->input->post('classid');\n\t\t$result = $this->tmtl->get_sect_by_school_id($cls_id);\n\t\techo json_encode($result); \n\t}",
"public function sections()\n {\n }",
"public function print_section_info() {\n // print 'Enter your settings below:';\n }",
"public function print_section_info()\n {\n print '<p> Configurações para a consulta de dados a partir do sistema <strong>TSD</strong>. </p>';\n print '<p> Atenção: Sempre que a chave for modificada, é necessário, modificar o arquivo .env com a nova chave. </p>';\n }",
"private function getDetailedDescription($classInfo) {\n\t\t$class = file_get_html($classInfo->getCourseLink());\n\t\t\n\t\t// page is broken up into 2 sections: top and bottom. Below are the HTML Nodes for Top section and bottom section\n\t\t$top = $class->find('section[id=main] div[class=gray-noise-box pad-box no-sides]', 0);\n\t\t$bottom = $class->find('section[id=main] div[class=light-bg pad-box no-sides top-rule-box]', 0);\n\t\t\n\t\t// get image url\n\t\t$imageURL = $this->getClassImageURL($top);\n\t\t\n\t\t// get course title\n\t\t$title = $top->find('div.course-detail-info h2', 0)->text();\n\t\t\n\t\t// start and end dates\n\t\t$startDate = $this->getStartDate($top);\n\t\t$endDate = $this->getEndDate($top);\n\n\t\t// get price of this class\n\t\t$price = $this->getClassPrice($top);\n\n\t\t// get full class description\n\t\t$description = $this->getFullDescription($bottom);\n\t\t\n\t\t// get prof name\n\t\t$profName = $this->getProfName($bottom);\n\t\t\n\t\t// get prof image\n\t\t$profImage = $this->getProfImage($bottom);\n\t\t\n\t\t// get class category\n\t\t$category = $this->getClassCategory($class);\n\t\t\n\t\t// get class status\n\t\t$isFull = $this->getClassStatus($top);\n\t\t\n\t\t// get class duration in weeks\n\t\t$duration = $this->getClassDuration($startDate, $endDate);\n\t\t\n\t\t$classInfo->setTitle(trim($title));\n\t\t$classInfo->setLongDescription(trim($description));\n\t\t$classInfo->setVideoLink(\"\");\n\t\t$classInfo->setStartDate($startDate);\n\t\t$classInfo->setCourseLength($duration);\n\t\t$classInfo->setCategory(\"Science\");\n\t\t$classInfo->setCourseImage($imageURL);\n\t\t$classInfo->setProfName($profName);\n\t\t$classInfo->setProfImage($profImage);\n\t\t\n\t\t#return $retVal;\n\t}",
"public function getInfo() {}",
"public function getInfo() {}",
"public function getInfo();",
"public function getSections(){\n\t\treturn $this->sections;\n\t}",
"private function get_section_data() {\n\t\t$sections = apply_filters( 'toolset_get_troubleshooting_sections', array() );\n\t\t\n\t\tif( !is_array( $sections ) ) {\n\t\t\t$sections = array();\n\t\t}\n\t\t\n\t\treturn $sections;\n\t}",
"public function init_sections() {\n\t\t// Override this function in your class and assign the array of sections to $this->sections.\n\t\t_e( 'Override init_sections() in your class.', '{plugin_jump_starter_textdomain}' );\n\t}",
"function spr_get_sections() {\n\tglobal $spr_sql_fields;\n\n\t$sql_tables = safe_pfx('txp_section');\n\t$rs = safe_query(\"SELECT \".$spr_sql_fields.\" FROM \".$sql_tables.\" WHERE name != 'default' ORDER BY name\");\n\twhile ($a = nextRow($rs)) {\n\t\textract($a); // set 'name','title','parent' etc in $a\n\t\t$out[$name] = $a;\n\t}\n\treturn $out;\n}",
"protected function section()\n {\n /* @var SectionTool $section */\n $section = $this->tool('section');\n return $section;\n }",
"public function get($section){\n\t\t$body = $this->toArray();\n\t\treturn $body[$section];\n\t}",
"public function get_section($id)\n {\n }",
"public function print_section_info()\n {\n print \"Don't use long sentences below!\";\n }",
"public function getSections(){\n return $this->getSite()->getSections();\n }",
"public function getInformation();",
"function sectionID()\r\n {\r\n return $this->SectionID;\r\n }",
"function section ( $arguments = \"\" ) {\n $arguments = func_get_args();\n $rc = new ReflectionClass('tsection');\n return $rc->newInstanceArgs( $arguments ); \n}",
"public function print_section_info()\n {\n print '<strong>Requirements for Setup:</strong><br>\n 1. Log into Google Analytics.<br> \n 2. Go your site\\'s profile (go to the admin dashboard).<br> \n 3. Your URL should look like: https://www.google.com/analytics/web/#report/visitors-overview/a1234b23478970<b>p</b><strong><font color=\"#2EA2CC\">987654</font></strong>/<br>\n 4. The last part after the <b>\"p\"</b> is your Google Analytics Profile ID, in this case it is <strong>\"<font color=\"#2EA2CC\">987654</font>\"</strong><br><br>\n <em><strong>NOTE:</strong> Your GA Profile ID is <strong>NOT</strong> your \"UA-xxxxxx-xx\" number. It is a 9 digit number unique to your site profile.</em>';\n }",
"function getSection($section='') {\r\n if(!empty($section)) {\r\n return $this->parsed_ini_file[$section];\r\n } else {\r\n return '';\r\n }\r\n }",
"public function print_section_info()\n {\n print 'Enter your settings below:';\n }",
"public function print_section_info()\n {\n print 'Enter your settings below:';\n }",
"public function print_section_info()\n {\n print 'Enter your settings below:';\n }",
"public function init ()\n {\n $section_general = array (\n array (\n 'section_id_list',\n __ ('List of section ids', DOMAIN),\n sprintf (\n __ ('List of section ids (space-separated). Eg.: %s', DOMAIN),\n 'mss mss_internal capit_ldf capit_ldf_internal'\n ),\n ns ('cap_sanitize_key_list'),\n ),\n array (\n 'xml_root_uri',\n __ ('XML Root URI', DOMAIN),\n sprintf (\n __ ('Root URI from where to download XML files, eg.: %s', DOMAIN),\n 'https://capitularia.uni-koeln.de/downloads'\n ),\n ns ('cap_sanitize_path'),\n ),\n );\n $section_transform = array (\n array (\n 'section_caption',\n __ ('Section name', DOMAIN),\n __ ('The name of this section', DOMAIN),\n ns ('cap_sanitize_caption'),\n ),\n array (\n 'shortcode',\n __ ('Shortcode', DOMAIN),\n __ ('The text to insert on all new pages. Use {slug} to insert the page slug.', DOMAIN),\n ns ('cap_sanitize_nothing'),\n ),\n array (\n 'xml_dir',\n __ ('XML files directory', DOMAIN),\n sprintf (\n __ (\n 'The path to the XML files, relative to the FS Root. eg.: %s. ' .\n 'The FS root is currently configured as<br>%s',\n DOMAIN\n ),\n 'publ/mss',\n lib\\get_opt ('afs')\n ),\n ns ('cap_sanitize_path'),\n ),\n array (\n 'slug_path',\n __ ('Slug path', DOMAIN),\n sprintf (\n __ ('The URL path to the page, eg.: %s', DOMAIN),\n 'capit/ldf'\n ),\n ns ('cap_sanitize_path'),\n ),\n array (\n 'slug_prefix',\n __ ('Slug prefix', DOMAIN),\n sprintf (\n __ ('The slug prefix for the pages, eg.: %s', DOMAIN),\n 'capit-ldf-'\n ),\n ns ('cap_sanitize_key'),\n ),\n array (\n 'page_status_list',\n __ ('Page statuses list', DOMAIN),\n sprintf (\n __ ('The allowed page statuses (space-separated list). Eg.: %s', DOMAIN),\n 'publish private'\n ),\n ns ('cap_sanitize_caption'),\n ),\n array (\n 'sidebars',\n __ ('Sidebars', DOMAIN),\n sprintf (\n __ ('The sidebars (space-separated list). Eg.: %s', DOMAIN),\n 'transcription'\n ),\n ns ('cap_sanitize_caption'),\n ),\n );\n\n $this->sections = array ();\n $this->sections[] = array ('general', $section_general);\n\n $sections = explode (' ', $this->get_opt ('general', 'section_id_list'));\n foreach ($sections as $section_id) {\n $this->sections[] = array ($section_id, $section_transform);\n }\n }",
"public static function print_section_info()\n {\n print 'Enter your settings below:';\n }",
"protected function create_section_data() {\n\t\t$this->enable();\n\t\t$this->post_types();\n\t\t$this->headings();\n\t\t$this->min_headings_num();\n\t\t$this->exclude_keywords();\n\t\t$this->title_to_id();\n\t\t$this->id_prefix();\n\t\t$this->in_widget();\n\t\t$this->customize_css();\n\t\t$this->shotcut();\n\t\t$this->fixed_menu_selector();\n\t\t$this->scroll_offset();\n\t}",
"public function getSectionDetails($section) {\r\n\t\tif ($section == 'Blood_glucose') {\r\n\t\t\t$title = \"Blood Glucose\";\r\n\t\t\t$text = \"Glucose circulates in our blood stream and signals the pancreas to secrete insulin. Insulin is the body's \\\"key\\\" to release glucose. Glucose that enters into our cells is used by your body to create energy. Sometimes, certain conditions, such as excess body fat inhibit insulin ability to absorb glucose, thus leaving excess amounts of glucose in the bloodstream. This test measures the concentration of glucose in your blood.\";\r\n\t\t\t$range = \"Non-Fasting Less than 130 mg/dl<br />Fasting Less than 100 mg/dl\";\r\n\t\t\t$type = $this->data['biometric_data']['glucose_test'];\r\n\t\t\t$score = $this->data['biometric_data']['blood_glucose'];\r\n\t\t\t$image = \"green_chips.png\";\r\n\t\t\tif ($type == \"fasting\") {\r\n\t\t\t\tif ($score > 100) {\r\n\t\t\t\t\t$image = \"yellow_chips.png\";\r\n\t\t\t\t}\r\n\t\t\t\tif ($score > 125) {\r\n\t\t\t\t\t$image = \"red_chips.png\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if ($type == \"non-fasting\") {\r\n\t\t\t\tif ($score > 130) {\r\n\t\t\t\t\t$image = \"yellow_chips.png\";\r\n\t\t\t\t}\r\n\t\t\t\tif ($score > 200) {\r\n\t\t\t\t\t$image = \"red_chips.png\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$score = $score . \" mg/dl (\" . $type . \")\";\r\n\t\t}\r\n\r\n\t\telse if ($section == 'Waist_circumference') {\r\n\t\t\t$title = \"Waist Circumference\";\r\n\t\t\t$text = \"Waist Circumference and Body Mass Index (BMI) are interrelated; however waist circumference can provide an independent prediction of risk in addition to BMI. Body fat that accumulates around the stomach area poses a greater health risk than fat stored in the lower half of the body.\";\r\n\t\t\t$range = \"< 35 inches (female) | < 40 inches (male)\";\r\n\t\t\t$score = $this->data['biometric_data']['waist'];\r\n\t\t\t$image = \"green_chips.png\";\r\n\t\t\tif ($this->demographics['gender'] == 'F') {\r\n\t\t\t\tif ($score >= 35.0) {\r\n\t\t\t\t\t$image = \"red_chips.png\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if ($this->demographics['gender'] == 'M') {\r\n\t\t\t\tif ($score >= 40.0) {\r\n\t\t\t\t\t$image = \"red_chips.png\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$score = $score . \" inches\";\t\t\t\r\n\t\t}\r\n\r\n\t\telse if ($section == \"Body_mass_index\") {\r\n\t\t\t$title = \"Body Mass Index\";\r\n\t\t\t$text = \"Body Mass Index uses a mathematical formula that takes into account both a personīs height and weight. BMI is a personīs weight in kilograms divided by height in meters squared (BMI=kg/m2). BMI correlates with, but does not equal body fat. The relation between body shape and BMI changes with age and gender. BMI is one of many factors related to developing a chronic disease (such as heart disease, cancer or diabetes). Other factors that may be important to consider when assessing your risk for chronic disease include diet, physical activity, waist circumference, blood pressure, blood sugar level, cholesterol level, and family history of disease.\";\r\n\t\t\t$range = \"18.5 - 24.9\";\r\n\t\t\t$score = $this->data['biometric_data']['bmi'];\r\n\t\t\t$image = \"yellow_chips.png\";\r\n\t\t\tif ($score > 30) {\r\n\t\t\t\t$image = \"red_chips.png\";\r\n\t\t\t}\r\n\t\t\telse if ($score > 24.9) {\r\n\t\t\t\t$image = \"yellow_chips.png\";\r\n\t\t\t}\r\n\t\t\telse if ($score >= 18.5) {\r\n\t\t\t\t$image = \"green_chips.png\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\telse if ($section == \"Blood_pressure\") {\r\n\t\t\t$title = \"Blood Pressure\";\r\n\t\t\t$text = \"Blood Pressure is the pressure of the blood against the walls of the arteries. The top number, systolic pressure, the pressure in the arteries as the heart contracts to pump blood to the body. The bottom number, diastolic pressure, measures the pressure in the arterial walls between heart beats. High blood pressure makes your heart work harder than normal. Both the heart and arteries are then more prone to injury. High blood pressure increases the risk of heart attacks, strokes, and/or kidney failure.\";\r\n\t\t\t$range = \"Systolic: < 120 mm Hg | Diastolic: < 80 mm Hg\";\r\n\t\t\t$sys = $this->data['biometric_data']['bp_systolic'];\r\n\t\t\t$dia = $this->data['biometric_data']['bp_diastolic'];\r\n\t\t\tif ($sys > 140) {\r\n\t\t\t\t$sysScore = 1;\r\n\t\t\t}\r\n\t\t\telse if ($sys > 120) {\r\n\t\t\t\t$sysScore = 3;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$sysScore = 5;\r\n\t\t\t}\r\n\t\t\tif ($dia > 90) {\r\n\t\t\t\t$diaScore = 1;\r\n\t\t\t}\r\n\t\t\telse if($dia > 80) {\r\n\t\t\t\t$diaScore = 3;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$diaScore = 5;\r\n\t\t\t}\r\n\t\t\t$tot = (($sysScore + $diaScore) / 2.0) * 20.0;\r\n\t\t\tif ($tot >= 80) {\r\n\t\t\t\t$image = \"green_chips.png\";\r\n\t\t\t}\r\n\t\t\telse if ($tot >= 50) {\r\n\t\t\t\t$image = \"yellow_chips.png\";\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$image = \"red_chips.png\";\r\n\t\t\t}\r\n\t\t\t$score = $sys . \" / \" . $dia . \" mm Hg\";\r\n\t\t}\r\n\r\n\t\telse if ($section == \"Cholesterol\") {\r\n\t\t\t$title = \"Total Cholesterol\";\r\n\t\t\t$text = \"Cholesterol is an essential fatty substance produced by the body used to create bile, hormones and fat soluble vitamins. Cholesterol is found in foods that come from animals such as meats, fish, poultry, eggs and dairy. High levels of circulating cholesterol may form deposits in artery walls leading to narrowing and hardening of the arteries and heart disease. Cholesterol does not dissolve in water and is combined with lipoproteins to assist in its transportation in the blood. Low-density lipoproteins (LDL), high-density lipoproteins (HDL), triglycerides, and other cholesterol levels such as VLDLS are all included in the total cholesterol value.\";\r\n\t\t\t$range = \"< 200 mg/dl\";\r\n\t\t\t$score = $this->data['biometric_data']['cholesterol'];\r\n\t\t\t$image = \"green_chips.png\";\r\n\t\t\tif ($score > 239) {\r\n\t\t\t\t$image = \"red_chips.png\";\r\n\t\t\t}\r\n\t\t\telse if ($score > 199) {\r\n\t\t\t\t$image = \"yellow_chips.png\";\r\n\t\t\t}\r\n\t\t\t$score = $score . \" mg/dl\";\r\n\t\t}\r\n\r\n\t\telse if ($section == \"Hdl\") {\r\n\t\t\t$title = \"High-Density Lipoprotein (HDL) Cholesterol\";\r\n\t\t\t$text = \"HDL cholesterol is nicknamed \\\"good\\\" cholesterol because it removes excess cholesterol from the body and transports it to the liver where it is eliminated from the body. This, in turn, prevents LDL cholesterol accumulation in the arterial walls and can reduce the risk for heart disease. Higher levels of HDL cholesterol are optimal.\";\r\n\t\t\t$range = \"> 50 mg/dl (female) | 40 mg/dl (male)\";\r\n\t\t\t$score = $this->data['biometric_data']['hdl'];\r\n\t\t\t$image = \"green_chips.png\";\r\n\t\t\tif ($score < 30) {\r\n\t\t\t\t$image = \"red_chips.png\";\r\n\t\t\t}\r\n\t\t\telse if ($scoe < 40) {\r\n\t\t\t\t$image = \"yellow_chips.png\";\r\n\t\t\t}\r\n\t\t\t$score = $score . \" mg/dl\";\r\n\t\t}\r\n\r\n\t\telse if ($section == \"Ldl\") {\r\n\t\t\t$title = \"Low Density Lipoprotein (LDL) Cholesterol\";\r\n\t\t\t$text = \"LDL cholesterol is nicknamed the \\\"bad\\\" cholesterol because in excess levels it can build plaque deposits on your arterial wall; a condition known as arteriolosclerosis. Low levels of LDL cholesterol are optimal.\";\r\n\t\t\t$range = \"< 100 mg/dl\";\r\n\t\t\t$score = $this->data['biometric_data']['ldl'];\r\n\t\t\t$image = \"green_chips.png\";\r\n\t\t\tif ($score > 149) {\r\n\t\t\t\t$image = \"red_chips.png\";\r\n\t\t\t}\r\n\t\t\telse if ($score > 139) {\r\n\t\t\t\t$image = \"yellow_chips.png\";\r\n\t\t\t}\r\n\t\t\t$score = $score . \" mg/dl\";\r\n\t\t}\r\n\r\n\t\telse if ($section == \"Triglycerides\") {\r\n\t\t\t$title = \"Triglycerides\";\r\n\t\t\t$text = \"Triglycerides are composed of fatty acids and glycerol. Like cholesterol, it circulates in your blood, but is stored in body fat and is used when the body requires extra energy. Triglyceride levels are very sensitive and can be affected by food consumption before a screening. Optimally, triglyceride levels should be performed on a fasting individual.\";\r\n\t\t\t$range = \"< 150 mg/dl\";\r\n\t\t\t$score = $this->data['biometric_data']['triglycerides'];\r\n\t\t\t$image = \"green_chips.png\";\r\n\t\t\tif ($score > 199) {\r\n\t\t\t\t$image = \"red_chips.png\";\r\n\t\t\t}\r\n\t\t\telse if ($score > 149) {\r\n\t\t\t\t$image = \"yellow_chips.png\";\r\n\t\t\t}\r\n\t\t\t$score = $score . \" mg/dl\";\r\n\t\t}\r\n\r\n\t\telse if ($section == \"TC_HDL_Ratio\") {\r\n\t\t\t$title = \"TC/HDL Cardiac Ratio\";\r\n\t\t\t$text = \"A ratio of total cholesterol divided by HDL cholesterol greater than 4.0 can indicate an increased risk of developing heart disease. A high ratio suggests there is a large amount of LDL cholesterol circulating in the blood that can stick to arterial walls and not enough HDL cholesterol to eliminate the excess.\";\r\n\t\t\t$range = \"< 4.0\";\r\n\t\t\t$score = $this->data['biometric_data']['cholesterol'] / $this->data['biometric_data']['hdl'];\r\n\t\t\t$image = \"green_chips.png\";\r\n\t\t\tif ($score >= 4.0) {\r\n\t\t\t\t$image = \"red_chips.png\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$info = array('title' => $title,\r\n\t\t\t 'text' => $text,\r\n\t\t\t 'image' => $image,\r\n\t\t\t 'score' => $score,\r\n\t\t 'range' => $range\r\n\t );\r\n\r\n\t\treturn $info;\r\n\t}",
"function load_Info()\n {\n\n $this->Facility_Info($this->facilities[0]);\n }",
"private function getBasicClassInfo($class, $classInfo) {\n\t\t// get the URL to the class details page\n\t\t$link = $class->find('div.learn-more-container a', 0)->getAttribute('href');\n\t\t// get short description\n\t\t$shortDesc = $class->find('p[class=last fineprint pad-box-mini top-rule-box featured-course-desc]', 0)->text();\n\t\t\n\t\t$classInfo->setCourseLink(trim($link));\n\t\t$classInfo->setShortDescription(trim($shortDesc));\n\t\t$classInfo->setSite($this->siteName);\n\t}",
"public function print_section_info()\r\n {\r\n print 'Additional options of your sites are available in Tapatalk Admin CP.';\r\n }",
"public function getInfo()\n\t{\n\t\treturn $this->resource->get($this->name)->getContent();\n\t}",
"function gw214_get_section_definitions() {\n\treturn GW214_Section_Definitions::instance();\n}",
"public function getInfo()\n {\n return $this->get(self::_INFO);\n }",
"public function getInfo()\n {\n return $this->get(self::_INFO);\n }",
"public function getInfo()\n {\n return $this->get(self::_INFO);\n }",
"public function getInfo()\n {\n return $this->get(self::_INFO);\n }",
"public function getInfo()\n {\n return $this->get(self::_INFO);\n }",
"private function _getSection()\n\t{\n\t\tif (!isset($this->_section))\n\t\t{\n\t\t\t$this->_section = false;\n\n\t\t\t$sectionId = $this->getSettings()->section;\n\n\t\t\tif ($sectionId)\n\t\t\t{\n\t\t\t\t$this->_section = craft()->sections->getSectionById($sectionId);\n\t\t\t}\n\t\t}\n\n\t\treturn $this->_section;\n\t}",
"function theSection()\n\t{\n\t\treturn array_shift( $this->getSections() );\n\t}",
"public function getSectionName(): string\n {\n return $this->sectionName;\n }",
"public function display_section() {\n\t\t// do nothing - @todo Possibly add description here later if we have more options to add.\n\t}",
"public function sections_get() {\n $response = array();\n $auth_token = $_GET['auth_token'];\n $course_id = $_GET['course_id'];\n $logged_in_user_details = json_decode($this->token_data_get($auth_token), true);\n\n if ($logged_in_user_details['user_id'] > 0) {\n $response = $this->api_model->sections_get($course_id, $logged_in_user_details['user_id']);\n }else{\n }\n return $this->set_response($response, REST_Controller::HTTP_OK);\n }",
"function getDocumentation()\n{\t\n if(count($this->_documentation) > 0){\n return $this->_documentation;\n } else {\n $debug_prefix = debug_indent(\"Module-getDocumentation() {$this->ModuleID}:\");\n\n $this->_documentation = array(\n 'Introduction' => '' \n );\n\n $documentation_element = $this->_map->selectFirstElement('Documentation', NULL, NULL);\n if(!empty($documentation_element) && count($documentation_element->c) > 0){\n foreach($documentation_element->c as $docsection_element){\n $title = $docsection_element->getAttr('title');\n print \"$debug_prefix generating section: $title\\n\";\n\n $content = '';\n\n //loop through contents\n foreach($docsection_element->c as $contentItem){\n switch(strtolower(get_class($contentItem))){\n case 'element':\n $content .= $contentItem->getContent();\n break;\n case 'characterdata':\n $content .= $contentItem->content;\n break;\n default:\n die(\"$debug_prefix unknown content type in documentation section\");\n }\n }\n\n $this->_documentation[$docsection_element->getAttr('sectionID')] = array($docsection_element->getAttr('title'), $content);\n }\n }\n debug_unindent();\n return $this->_documentation;\n }\n}",
"function getInfo() {\n return array(\n 'author' => 'Sam Wilson',\n 'email' => '[email protected]',\n 'date' => '2012-03-10',\n 'name' => 'Proofread Page',\n 'desc' => 'View images side-by-side with pages, for viewing and editing.',\n 'url' => 'http://www.dokuwiki.org/plugin:proofreadpage',\n );\n }",
"public function getSections(): array {\n\t\t\n\t\tif (isset($this->sections)) {\n\t\t\treturn $this->sections;\n\t\t}\n\t\t\n\t\t$this->sections = [];\n\t\t\n\t\t$sections = elgg_extract('sections', $this->config, []);\n\t\tforeach ($sections as $section) {\n\t\t\t$this->sections[] = new Section($section);\n\t\t}\n\t\t\n\t\treturn $this->sections;\n\t}",
"public function getInfo ()\n {\n return $this->info;\n }",
"public function getSections()\n {\n return $this->sections;\n }",
"protected function getInfoModule() {}",
"protected function getSection() {\n\t\treturn 'poker';\n }",
"private function getClassInfos($className)\n {\n $json = $this->getLastJsonResponse();\n $classInfos = null;\n\n if (isset($json->{'hydra:supportedClass'})) {\n foreach ($json->{'hydra:supportedClass'} as $classData) {\n if ($classData->{'hydra:title'} === $className) {\n $classInfos = $classData;\n }\n }\n }\n\n if (empty($classInfos)) {\n throw new \\Exception(sprintf('Class %s cannot be found in the vocabulary', $className));\n }\n\n return $classInfos;\n }",
"public function get()\n\t{\n\t\tif(isset( $this->_id ))\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$sql = 'select * from class where id = :id';\n\t\t\t\t$stmt = $this->db->prepare($sql);\n\t\t\t\t$stmt->execute();\n\t\t\t\t$result = $stmt->fetchAll(\\PDO::FETCH_ASSOC);\n\t\t\t\treturn $result;\t\t\t\n\t\n\t\t\t}\n\t\t\tcatch (Exception $e)\n\t\t\t{\n\t\t\t\theader(\"HTTP/1.0 500 Internal server error\");\n\t\t\t\techo $e;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$sql = 'select * from class order by section';\n\t\t\t\t$data = [\n\t\t\t\t\t'id' => $this->_id,\n\n\t\t\t\t];\n\t\t\t\t$stmt = $this->db->prepare($sql);\n\t\t\t\t$stmt->execute($data);\n\t\t\t\t$result = $stmt->fetchAll(\\PDO::FETCH_ASSOC);\n\t\t\t\treturn $result;\t\t\t\n\t\n\t\t\t}\n\t\t\tcatch (Exception $e)\n\t\t\t{\n\t\t\t\theader(\"HTTP/1.0 400 Bad request\");\n\t\t\t\techo $e;\n\t\t\t}\n\t\t}\n\t}",
"public function getInfo()\n\t{\n\t\treturn $this->info;\n\t}",
"public function getInfo()\n\t{\n\t\treturn $this->info;\n\t}",
"function info() {\n\t \treturn $this->description;\n\t }",
"private function retrieveSections() {\n\t\t$this->sections = array();\n\n\t\t$dbResult = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t'*',\n\t\t\tself::TABLE_SECTIONS,\n\t\t\t'content_uid = ' . $this->getContentUid() .\n\t\t\t\ttx_oelib_db::enableFields(self::TABLE_SECTIONS),\n\t\t\t'',\n\t\t\t'sorting'\n\t\t);\n\t\tif (!$dbResult) {\n\t\t\tthrow new Exception(DATABASE_QUERY_ERROR);\n\t\t}\n\n\t\twhile ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($dbResult)) {\n\t\t\t$GLOBALS['TSFE']->sys_page->versionOL(self::TABLE_SECTIONS, $row);\n\t\t\t$GLOBALS['TSFE']->sys_page->fixVersioningPid(\n\t\t\t\tself::TABLE_SECTIONS, $row\n\t\t\t);\n\t\t\tif ($GLOBALS['TSFE']->sys_language_content > 0) {\n\t\t\t\t$row = $GLOBALS['TSFE']->sys_page->getRecordOverlay(\n\t\t\t\t\tself::TABLE_SECTIONS,\n\t\t\t\t\t$row,\n\t\t\t\t\t$GLOBALS['TSFE']->sys_language_content,\n\t\t\t\t\t$GLOBALS['TSFE']->sys_language_contentOL\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$this->sections[] = $row;\n\t\t}\n\t}",
"public function gen_section(){\n $data = array(\n \"txtinicio\"=>\"Inicio\",\n \"rutainicio\" => \"/admin/inicio\",\n \"txtmodulo\" => \"CONTABILIDAD\",\n \"section\" => \"Contabilidad\",\n \"rutamodulo\" => \"/admin/tipocuenta\",\n \"ventana\" => \"Niveles\"\n );\n\n return $data;\n }",
"public function print_section_info()\n\t{\n\t\tprint '<p>内部アクセスを許可するIP一覧を入力してください。<br />\n\t\t\t\t<span style=\"color:red;\">IPリストが空の場合は全てのIPに対し、外部公開の投稿/固定ページしか表示されません。</span></p>';\n\t}",
"public function getSections(): array\n {\n return $this->sections;\n }",
"private function info()\n\t{\n\t\t$data = file_get_contents(DATAPATH.'sidebar.md');\n\t\t$result = $this->parsedown->text($data);\n\t\t$result = $this->parser->parse_string($result, $this->data, true);\n\t\treturn $result;\n\t}",
"public function get_definition() {\n require_once(__DIR__ . '/elements/hidden_form_element.php');\n require_once(__DIR__ . '/elements/text_form_element.php');\n require_once(__DIR__ . '/elements/selection_popup_form_element.php');\n require_once(__DIR__ . '/elements/checkbox_form_element.php');\n\n $elements = [];\n\n // Disabled some fiels for section 0.\n $disabled = $this->object->section == 0;\n\n // Section id.\n $id = $this->object->id;\n $elements[] = new hidden_form_element('id', 'section-id', $id, 0);\n\n // Section name.\n $elements[] = new text_form_element(\n 'name',\n 'section-title',\n $this->object->name,\n $this->object->get_title(),\n get_string('label-section-title', 'format_ludic'),\n [\n 'required' => true,\n 'disabled' => $disabled\n ]\n );\n\n // Section visibility.\n $elements[] = new checkbox_form_element(\n 'visible',\n 'section-visible',\n $this->object->visible,\n 1,\n get_string('label-section-visible', 'format_ludic'),\n [\n 'required' => true,\n 'disabled' => $disabled\n ]\n );\n\n // There is no skin for section 0.\n if (!$disabled) {\n $editinfo = $this->object->skin->get_edit_info();\n $elements[] = new selection_popup_form_element(\n 'skinid',\n 'section-skinid',\n $this->object->skinid,\n 0,\n get_string('label-skin-selection', 'format_ludic'),\n [\n 'required' => true,\n 'multiple' => false\n ],\n [\n 'icon' => (object)[ 'imgsrc' => $editinfo->imgsrc, 'imgalt' => '' ],\n 'itemid' => $id,\n 'itemcontroller' => 'skin',\n 'itemaction' => 'get_section_skin_selector',\n 'popuptitle' => get_string('section-skin-selection', 'format_ludic'),\n 'skintitle' => $editinfo->title,\n 'skindescription' => $editinfo->description,\n ]\n );\n\n // Course module target value (if there is one).\n $targetid = $this->object->skin->get_target_string_id();\n if ($targetid) {\n $elements[] = new text_form_element(\n 'target',\n 'section-target',\n $this->object->get_target(),\n '',\n get_string($targetid . '-title', 'format_ludic'),\n []\n );\n } else {\n $elements[] = new hidden_form_element('target', 'section-target', $this->object->get_target(), 0);\n }\n } else {\n $elements[] = new hidden_form_element('skinid', 'section-skinid', $this->object->skinid, 0);\n $elements[] = new hidden_form_element('target', 'section-target', $this->object->get_target(), 0);\n }\n\n return $elements;\n }",
"public function get_page_info()\n {\n }",
"function print_additional_settings_section_info() {\n }",
"public function getInfo()\n {\n return $this->info;\n }",
"public function getInfo()\n {\n return $this->info;\n }",
"public function getInfo()\n {\n return $this->info;\n }",
"public function getInfo()\n {\n return $this->info;\n }",
"public function getInfo()\n {\n return $this->info;\n }",
"public function getInfo()\n {\n return $this->info;\n }",
"public function getInfo()\n {\n return $this->info;\n }",
"public function getSections()\n {\n /** @var WebApplication|ConsoleApplication $this */\n return $this->get('sections');\n }",
"protected function getClassInfoCache() {}",
"public function section()\n {\n return $this->belongsTo(Section::class, 'section_id')->select('id', 'name');\n }",
"public function getInfo ()\n {\n return array (\n 'courseNumber' => (string) $this->xml->coursCnum,\n 'courseInitials' => (string) $this->xml->coursSigle,\n 'courseSubdivision' => (string) $this->xml->coursSubdivision,\n 'courseValidity' => (string) $this->xml->coursValidite,\n 'numberOfStudents' => (string) $this->xml->nombreEtudiantsInscrits\n );\n }",
"function getInfo();",
"public function getInfo()\r\n {\r\n return $this->info;\r\n }",
"public function section()\n\t{\n\t\treturn $this->belongsTo('App\\Model\\Section');\n\t}",
"public function getInfoHelp()\n {\n // what would its help file be named?\n $class = get_class($this);\n $file = str_replace('_', DIRECTORY_SEPARATOR, $class)\n . DIRECTORY_SEPARATOR . 'Info'\n . DIRECTORY_SEPARATOR . 'help.txt';\n \n // does that file exist?\n $file = Solar_File::exists($file);\n if ($file) {\n return file_get_contents($file);\n }\n }",
"public function getSections(): iterable;",
"public function loadInfo()\n\t{\n\t\t$this->_info = $this->_adapter->describeTable($this->_identifier);\n\t}",
"protected function getClassInfo($class, $classInfoObj) {\n\t\t// get basic class information (from the main page)\n\t\t$this->getBasicClassInfo($class, &$classInfoObj);\n\t\t\n\t\t// get detailed class information (by navigating to class' page and scraping it)\n\t\t$this->getDetailedDescription(&$classInfoObj);\n\t}",
"public function getAllSections();",
"public function coverageSection(string $section);",
"protected function info()\n\t\t{\n\t\t}"
] | [
"0.71541375",
"0.6443103",
"0.6414751",
"0.6387197",
"0.630261",
"0.6256556",
"0.62296927",
"0.620704",
"0.6172234",
"0.61535645",
"0.6032271",
"0.5914129",
"0.58927006",
"0.588019",
"0.587934",
"0.5797182",
"0.5791736",
"0.5779039",
"0.57725704",
"0.5757284",
"0.575521",
"0.575521",
"0.57495415",
"0.5697003",
"0.5695889",
"0.56927866",
"0.56808764",
"0.56736904",
"0.56723756",
"0.5667169",
"0.5661624",
"0.56576085",
"0.5637082",
"0.56359774",
"0.56240755",
"0.5623018",
"0.56170917",
"0.55985194",
"0.55985194",
"0.55985194",
"0.5597632",
"0.55804956",
"0.55795616",
"0.55786866",
"0.55700105",
"0.5567429",
"0.5483102",
"0.54722637",
"0.5461706",
"0.54531914",
"0.54531914",
"0.54531914",
"0.54531914",
"0.54531914",
"0.5450156",
"0.54418653",
"0.5435177",
"0.54321456",
"0.54309887",
"0.542978",
"0.54219556",
"0.54160583",
"0.54045826",
"0.5397773",
"0.538351",
"0.5372853",
"0.5360335",
"0.53458214",
"0.5344468",
"0.5344468",
"0.5340719",
"0.5330113",
"0.5320947",
"0.5320036",
"0.5297344",
"0.5290697",
"0.52736783",
"0.52722496",
"0.52686423",
"0.52551264",
"0.52551264",
"0.52551264",
"0.52551264",
"0.52551264",
"0.52551264",
"0.52551264",
"0.52527416",
"0.5250655",
"0.525057",
"0.5247335",
"0.52464813",
"0.524235",
"0.523336",
"0.52333087",
"0.5223303",
"0.52221656",
"0.5213535",
"0.5212261",
"0.52118164",
"0.5202753"
] | 0.5288703 | 76 |
/ create the attendance | public function createSchedule()
{
$validator = array('success' => false, 'messages' => array());
$attendance = $this->model_schedule->createSchedule();
if($attendance == true) {
$validator['success'] = true;
$validator['messages'] = 'Successfully Added';
}
else {
$validator['success'] = false;
$validator['messages'] = 'Error';
}
echo json_encode($validator);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function attendance_add()\n {\n $attendance = new Attendance();\n $data = array();\n\n if (strtoupper($_SERVER['REQUEST_METHOD']) == 'POST') {\n if (!empty($_POST['title'])) {\n $check = Security::check_token();\n if ($check) {\n $attendance->set_name($_POST['title']);\n $attendance->set_description($_POST['description']);\n $attendance->set_attendance_qualify_title($_POST['attendance_qualify_title']);\n $attendance->set_attendance_weight($_POST['attendance_weight']);\n $link_to_gradebook = false;\n if ( isset($_POST['attendance_qualify_gradebook']) && $_POST['attendance_qualify_gradebook'] == 1 ) {\n $link_to_gradebook = true;\n }\n $attendance->category_id = $_POST['category_id'];\n $last_id = $attendance->attendance_add($link_to_gradebook);\n Security::clear_token();\n }\n header('location:index.php?action=calendar_add&attendance_id='.$last_id.'&'.api_get_cidreq());\n exit;\n } else {\n $data['error'] = true;\n $this->view->set_data($data);\n $this->view->set_layout('layout');\n $this->view->set_template('attendance_add');\n $this->view->render();\n }\n } else {\n $this->view->set_data($data);\n $this->view->set_layout('layout');\n $this->view->set_template('attendance_add');\n $this->view->render();\n }\n }",
"function generateAttendance($args, $request) {\r\n\t\t$meetingId = isset($args[0]) ? $args[0]: 0;\r\n\t\t$this->validate($meetingId, MINUTES_STATUS_ATTENDANCE);\r\n\t\t$this->setupTemplate(true, $meetingId);\r\n\t\t$meeting =& $this->meeting;\r\n\r\n\t\t$journal =& Request::getJournal();\r\n\t\timport('classes.meeting.form.AttendanceForm');\r\n\t\t$attendanceForm = new AttendanceForm($meetingId, $journal->getId());\r\n\t\t$submitted = Request::getUserVar(\"submitAttendance\") != null ? true : false;\r\n\r\n\t\tif($submitted) {\r\n\t\t\t$attendanceForm->readInputData();\r\n\t\t\tif($attendanceForm->validate()) {\r\n\t\t\t\t$attendanceForm->execute();\r\n\t\t\t\t$attendanceForm->savePdf();\r\n\t\t\t\tRequest::redirect(null, null, 'manageMinutes', $meetingId);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif ($attendanceForm->isLocaleResubmit()) {\r\n\t\t\t\t\t$attendanceForm->readInputData();\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t$attendanceForm->initData();\r\n\t\t\t\t}\r\n\t\t\t\t$attendanceForm->display();\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$attendanceForm->display();\r\n\t\t}\r\n\t}",
"public function create()\n {\n return view('admin.attendance.create');\n }",
"public function store(Request $request)\n {\n $this->validate($request,[\n 'emp_id'=>'required'\n ]);\n $attendance = Attendance::create([\n 'emp_id'=>$request->emp_id,\n 'clock_in'=>$request->clock_in,\n 'clock_out'=>$request->clock_out,\n 'date'=>date('Y-m-d',strtotime($request->date)),\n 'out_date'=>date('Y-m-d',strtotime($request->out_date)),\n 'attendance_status'=>$request->attendance_status,\n 'clockin_ip_address'=>$request->clockin_ip_address,\n 'colckout_ip_address'=>$request->colckout_ip_address,\n 'working_from'=>$request->working_from,\n 'note'=>$request->note,\n 'is_late'=>$request->is_late,\n 'reason'=>$request->reason,\n 'last_updated_by'=>auth()->user()->id,\n ]);\n return redirect()->route('attendance.index')->with('success','Success');\n }",
"function student_attendance($param1 = '', $param2 = '' , $param3 = '')\n\t\t{\n\t\t\tif ($this->session->userdata('parent_login') != 1){\n\t\t\t\t$this->session->set_userdata('last_page' , current_url());\n\t\t\t\tredirect(base_url(), 'refresh');\n\t\t\t}\n\t\t\tif ($param1 == 'create') {\n\t\t\t\t$test = explode('/',$this->input->post('date'));\n\t\t\t\t$date_final = $test[2].'-'.$test[0].'-'.$test[1];\n\t\t\t\t$data['date'] = $date_final;\n\t\t\t\t$data['attandence_class'] = $this->input->post('classes');\n\t\t\t\t$data['student_id'] = $this->input->post('student');\n\t\t\t\t$data['description'] \t\t = $this->input->post('description');\n\t\t\t\t$data['status'] \t\t\t\t = 2;\n\t\t\t\t$data['month'] \t\t\t\t = $test[0];\n\t\t\t\t\n\t\t\t\t$this->db->select('*')->from('attendance');\n\t\t\t\t$this->db->where('attandence_class',$this->input->post('classes')); \n\t\t\t\t$this->db->where('student_id',$this->input->post('student')); \n\t\t\t\t$this->db->where('date',$date_final); \n\t\t\t\t$query = $this->db->get(); \n\t\t\t\t$duplicate_student_entry=$query->num_rows();\n\t\t\t\t\n\t\t\t\t$student_holiday_check=$this->db->get_where('holiday',\n\t\t\t\tarray('holiday_date' =>$this->input->post('date')))->row();\n\t\t\t\tif(count($student_holiday_check)>0){\n\t\t\t\t\t$this->session->set_flashdata('flash_message' , get_phrase('this_day_is_already_holiday'));\n\t\t\t\t}\n\t\t\t\telse if($duplicate_student_entry > 0){\n\t\t\t\t\t$this->session->set_flashdata('flash_message' , get_phrase('do_not_add_this record_again')); \n\t\t\t\t\tredirect(base_url() . 'index.php?parents/student_attendance', 'refresh');\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$this->db->insert('attendance', $data);\n\t\t\t\t\t$this->session->set_flashdata('flash_message' , get_phrase('data_added_successfully')); \n\t\t\t\t\tredirect(base_url() . 'index.php?parents/student_attendance', 'refresh');\n\t\t\t\t}\n\t\t\t}\n\t\t\t$page_data['page_name'] = 'student_attendance';\n\t\t\t$page_data['page_title'] = 'Student Attendance';\n\t\t\t$this->load->view('backend/index', $page_data);\n\t\t}",
"public function create()\n {\n return view('admin.attendance.create', $this->data);\n }",
"public function getCDateAttendances_new()\n {\n $orgid = isset($_REQUEST['refno']) ? $_REQUEST['refno'] : 0;\n $att = isset($_REQUEST['att']) ? $_REQUEST['att'] : 0;\n $date = isset($_REQUEST['date']) ? $_REQUEST['date'] : '';\n $datafor = isset($_REQUEST['datafor']) ? $_REQUEST['datafor'] : '';\n $empid = isset($_REQUEST['empid']) ? $_REQUEST['empid'] : ''; \n $zone = getTimeZone($orgid);\n date_default_timezone_set($zone);\n $date =date('Y-m-d',strtotime($date));\n $time = date('H:i:s');\n $data = array();\n $cdate = date('Y-m-d');\n\t $adminstatus = getAdminStatus($empid);\n\t\t$cond = \"\";\n\t\t$cond1 = \"\";\n\t\tif($adminstatus == '2')\n\t\t{ \n\t \t$dptid = getDepartmentIdByEmpID($empid);\n\t\t\t$cond = \" AND Department = $dptid \";\n\t\t\t$cond1 = \" AND Dept_id = $dptid \";\n\t\t\t\n\t\t}\n\t \n\t \n //today attendance\n\t\t if($datafor=='present'){\n\t\t$query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out FROM `AttendanceMaster` WHERE `AttendanceDate`=? $cond1 and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8 ) AND EmployeeId in (SELECT Id from EmployeeMaster where OrganizationId = ? AND Is_Delete = 0 ) order by `name`\", array($date,$orgid,$orgid));\n $data['present'] = $query->result();\n\t\t\t\n\t\t\t }else if($datafor=='absent'){/*\n //---managing off (weekly and holiday)\n $dt = $date; \n // day of month : 1 sun 2 mon --\n $dayOfWeek = 1 + date('w', strtotime($dt));\n $weekOfMonth = weekOfMonth($dt);\n $week = '';\n $query = $this->db->query(\"SELECT `WeekOff` FROM `WeekOffMaster` WHERE `OrganizationId` =? AND `Day` = ?\", array(\n $orgid,\n $dayOfWeek\n ));\n if ($row = $query->result()) {\n $week = explode(\",\", $row[0]->WeekOff);\n }\n if ($week[$weekOfMonth - 1] == 1) {\n $data['absentees'] = '';\n } else {\n $query = $this->db->query(\"SELECT `DateFrom`, `DateTo` FROM `HolidayMaster` WHERE OrganizationId=? and (? between `DateFrom` and `DateTo`) \", array(\n $orgid,\n $dt\n ));\n if ($query->num_rows() > 0) {\n //-----managing off (weekly and holiday) - close \n $query = $this->db->query(\"SELECT CONCAT(FirstName,' ',LastName) as name,'-' as TimeIn,'-' as TimeOut ,'Absent' as status from EmployeeMaster where `OrganizationId` =$orgid and EmployeeMaster.archive=1 and EmployeeMaster.Id not in(select AttendanceMaster.`EmployeeId` from AttendanceMaster where `AttendanceDate`='$date' and `OrganizationId` =$orgid) and CAST('$time' as time) > (select TimeIn from ShiftMaster where ShiftMaster.Id=shift) order by `name`\", array(\n $orgid,\n $date,\n $orgid\n ));\n $data['absentees'] = $query->result();\n } \n }*/\n\t\t\t//////////today_abs\n\t\t\t\n\t\t\tif($date != date('Y-m-d')){// for other deay's absentees\n\t\t\t\t$query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , '-' as `TimeOut` ,'-' as TimeIn FROM `AttendanceMaster` WHERE `AttendanceDate`=? $cond1 and OrganizationId=? and (AttendanceStatus=2 or AttendanceStatus=6 or AttendanceStatus=7 ) AND EmployeeId in (SELECT Id from EmployeeMaster where OrganizationId = $orgid AND Is_Delete = 0) order by `name`\", array($date,$orgid));\n\t\t\t\t$this->db->close();\n\t\t\t\t$data['absent'] = $query->result();\n\t\t\t}else{ // for today's absentees\n\t\t\t\t$query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , '-' as `TimeOut` ,'-' as TimeIn FROM `AttendanceMaster` WHERE `AttendanceDate`=? $cond1 and OrganizationId=? \nand AttendanceStatus in (2,6,7) AND EmployeeId in (SELECT Id from EmployeeMaster where OrganizationId = $orgid AND Is_Delete = 0 ) order by `name` \",array($date,$orgid));\n\t\t\t$temp=array();\n $temp = $query->result();\n\t\t\t\n\t\t\t$query = $this->db->query(\"SELECT CONCAT(FirstName,' ',LastName) as name, '-' as `TimeOut` ,'-' as TimeIn FROM `EmployeeMaster` WHERE `OrganizationId` =? AND Is_Delete=0 $cond AND ARCHIVE =1 AND is_Delete = 0 AND (DOL='0000-00-00' OR DOL>CURDATE()) AND Id NOT IN ( SELECT EmployeeId FROM AttendanceMaster WHERE AttendanceDate = ? AND `OrganizationId` =? ) AND ( SELECT `TimeIn` FROM `ShiftMaster` WHERE `Id` = Shift AND TimeIn < ? )\",array($orgid,$date,$orgid,$time));\n\t\t\t\n\t\t\t\t$data['absent']= array_merge($temp,$query->result());\t\n\t\t\t}\n\t\t\t\n\t}else if($datafor=='latecomings'){\n //////// today_late\n $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out FROM `AttendanceMaster` WHERE (time(TimeIn) > (select time(TimeIn) from ShiftMaster where ShiftMaster.Id=shiftId)) and `AttendanceDate`=? $cond1 and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8 ) AND EmployeeId in (SELECT Id from EmployeeMaster where OrganizationId = $orgid AND Is_Delete = 0 ) order by `name`\", array(\n $date,\n $orgid\n ));\n $data['lateComings'] = $query->result();\n\t}else if($datafor=='earlyleavings'){\t\t\n ////////today_early\n /*$query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out FROM `AttendanceMaster` WHERE (time(TimeOut) < (select time(TimeOut) from ShiftMaster where ShiftMaster.Id=shiftId) and TimeOut!='00:00:00' ) and `AttendanceDate`=? $cond1 and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8 ) AND EmployeeId in (SELECT Id from EmployeeMaster where OrganizationId = $orgid AND Is_Delete = 0) order by `name`\", array( $date,$orgid ));\n $data['earlyLeavings'] = $query->result();*/\n\t\t\t\n\t\t $query = $this->db->query(\"select Shift,Id , FirstName , LastName from EmployeeMaster where OrganizationId = $orgid and Id IN (select EmployeeId from AttendanceMaster where OrganizationId = $orgid and AttendanceDate='$date' and TimeIn != '00:00:00' ) AND is_Delete=0 order by FirstName\");\n\t\t $res = array();\n\t\t $cond = '';\n foreach ($query->result() as $row) {\n $ShiftId = $row->Shift;\n $EId = $row->Id;\n $query = $this->db->query(\"select TimeIn,TimeOut,shifttype from ShiftMaster where Id = $ShiftId\");\n if ($data123 = $query->row()) {\n $shiftout = $data123->TimeOut;\n $shiftout1 = $date. ' '.$data123->TimeOut;\n\t\t\t\tif($data123->shifttype==2)\n\t\t\t\t{\n\t\t\t\t\t$nextdate = date('Y-m-d',strtotime($date . \"+1 days\"));\n\t\t\t\t\t $shiftout1 = $nextdate.' '.$data123->TimeOut;\n\t\t\t\t}\n $shift = substr($data123->TimeIn, 0, 5) . ' - ' . substr($data123->TimeOut, 0, 5);\n $ct = date('H:i:s');\n \n if ($cdate == $date)\n $cond = \" and TimeOut !='00:00:00'\";\n $query333 = $this->db->query(\"select SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out from AttendanceMaster where EmployeeId =$EId and if(timeoutdate = '0000-00-00' , TimeOut < '$shiftout' , CONCAT(timeoutdate,' ' ,TimeOut) < '$shiftout1' ) and AttendanceDate='$date' and TimeOut !='00:00:00' \");\n\t\t\t\t\t\n\t\t\t\t\t\n if ($row333 = $query333->row()) {\n $a = new DateTime($row333->TimeOut);\n $b = new DateTime($data123->TimeOut);\n $interval = $a->diff($b);\n $data1['earlyby'] = $interval->format(\"%H:%I\");\n $data1['timeout'] = substr($row333->TimeOut, 0, 5);\n $data1['name'] = $row->FirstName . ' ' . $row->LastName;\n $data1['shift'] = $shift;\n $data1['status'] = $row333->status;\n $data1['TimeIn'] = $row333->TimeIn;\n $data1['TimeOut'] = $row333->TimeOut;\n $data1['CheckOutLoc'] = $row333->CheckOutLoc;\n $data1['checkInLoc'] = $row333->checkInLoc;\n $data1['EntryImage'] = $row333->EntryImage;\n $data1['ExitImage'] = $row333->ExitImage;\n $data1['latit_in'] = $row333->latit_in;\n $data1['longi_in'] = $row333->longi_in;\n $data1['latit_out'] = $row333->latit_out;\n $data1['longi_out'] = $row333->longi_out;\n $data1['date'] = $date;\n $res[] = $data1;\n }\n \n }\n }\n\t\t $data['earlyLeavings'] =\t $res;\n\t\t\t\n\t}\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n \n \n \n echo json_encode($data, JSON_NUMERIC_CHECK);\n \n }",
"public function postcreate(Request $request)\n {\n \t$attendance = Attendance::whereEmployeeId(Auth::user()->id)->whereCheckOut(null)->first();\n\n \t$now \t\t\t= Carbon::now();\n\n\t $now->toTimeString();\n\n \tif($attendance)\n \t{\n \t\t$attendance->update([\n \t\t\t'check_out' \t\t=> $now,\n \t\t]);\n\n \t\t$message = 'You have checked out successfully!';\n \t} else {\n \t\t$user \t\t\t= Auth::user()->id; \n\n\t \t$checkin_time = Carbon::today();\n $checkin_time->addHours(8);\n\n\t \tif(Carbon::parse($checkin_time)->lt($now))\n\t \t{\n\t \t\t$lateness_status = 1;\n\t \t} else {\n\t \t\t$lateness_status = 0;\n\t \t}\n\t \t\n\t \tAttendance::create([\n\t \t\t'employee_id' \t => $user,\n\t \t\t'check_in' \t\t\t=> $now, \n\t \t\t'lateness_status' \t=> $lateness_status,\n\t \t]);\n\n\t \t$message = 'You have checked in successfully!';\n \t} \n\n \treturn redirect('/attendances/view/')->with('success', $message);\n }",
"public function create()\n {\n return view('attendances.create');\n }",
"public function create()\n {\n\t\t$trainees = Trainee::all();\n\t\t$lectures = Lecture::all();\n\n\t\treturn view('attendance.create', compact('trainees', 'lectures'));\n }",
"function attendance_construct_sessions_data_for_add($formdata, mod_attendance_structure $att) {\n global $CFG;\n\n $sesstarttime = $formdata->sestime['starthour'] * HOURSECS + $formdata->sestime['startminute'] * MINSECS;\n $sesendtime = $formdata->sestime['endhour'] * HOURSECS + $formdata->sestime['endminute'] * MINSECS;\n $sessiondate = $formdata->sessiondate + $sesstarttime;\n $duration = $sesendtime - $sesstarttime;\n if (empty(get_config('attendance', 'enablewarnings'))) {\n $absenteereport = get_config('attendance', 'absenteereport_default');\n } else {\n $absenteereport = empty($formdata->absenteereport) ? 0 : 1;\n }\n\n $now = time();\n\n if (empty(get_config('attendance', 'studentscanmark'))) {\n $formdata->studentscanmark = 0;\n }\n\n if (empty(get_config('attendance', 'allowupdatestatus'))) {\n $formdata->allowupdatestatus = 0;\n }\n\n $calendarevent = 0;\n if (isset($formdata->calendarevent)) { // Calendar event should be created.\n $calendarevent = 1;\n }\n\n $sessions = array();\n if (isset($formdata->addmultiply)) {\n $startdate = $sessiondate;\n $enddate = $formdata->sessionenddate + DAYSECS; // Because enddate in 0:0am.\n\n if ($enddate < $startdate) {\n return null;\n }\n\n // Getting first day of week.\n $sdate = $startdate;\n $dinfo = usergetdate($sdate);\n if ($CFG->calendar_startwday === '0') { // Week start from sunday.\n $startweek = $startdate - $dinfo['wday'] * DAYSECS; // Call new variable.\n } else {\n $wday = $dinfo['wday'] === 0 ? 7 : $dinfo['wday'];\n $startweek = $startdate - ($wday - 1) * DAYSECS;\n }\n\n $wdaydesc = array(0 => 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat');\n\n while ($sdate < $enddate) {\n if ($sdate < strtotime('+1 week', $startweek)) {\n $dinfo = usergetdate($sdate);\n if (isset($formdata->sdays) && array_key_exists($wdaydesc[$dinfo['wday']], $formdata->sdays)) {\n $sess = new stdClass();\n $sess->sessdate = make_timestamp($dinfo['year'], $dinfo['mon'], $dinfo['mday'],\n $formdata->sestime['starthour'], $formdata->sestime['startminute']);\n $sess->duration = $duration;\n $sess->descriptionitemid = $formdata->sdescription['itemid'];\n $sess->description = $formdata->sdescription['text'];\n $sess->descriptionformat = $formdata->sdescription['format'];\n $sess->calendarevent = $calendarevent;\n $sess->timemodified = $now;\n $sess->absenteereport = $absenteereport;\n $sess->studentpassword = '';\n $sess->includeqrcode = 0;\n $sess->rotateqrcode = 0;\n $sess->rotateqrcodesecret = '';\n $sess->automark = !empty($formdata->automark) ? $formdata->automark : 0;\n $sess->automarkcmid = !empty($formdata->automarkcmid) ? $formdata->automarkcmid : 0;\n $sess->automarkcompleted = 0;\n\n if (!empty($formdata->usedefaultsubnet)) {\n $sess->subnet = $att->subnet;\n } else {\n $sess->subnet = $formdata->subnet;\n }\n if (!empty($formdata->preventsharedip)) {\n $sess->preventsharedip = $formdata->preventsharedip;\n }\n if (!empty($formdata->preventsharediptime)) {\n $sess->preventsharediptime = $formdata->preventsharediptime;\n }\n\n if (isset($formdata->studentscanmark)) { // Students will be able to mark their own attendance.\n $sess->studentscanmark = 1;\n if (isset($formdata->allowupdatestatus)) {\n $sess->allowupdatestatus = $formdata->allowupdatestatus;\n } else {\n $sess->allowupdatestatus = 0;\n }\n if (isset($formdata->autoassignstatus)) {\n $sess->autoassignstatus = 1;\n }\n if (isset($formdata->studentsearlyopentime)) {\n $sess->studentsearlyopentime = $formdata->studentsearlyopentime;\n }\n\n if (!empty($formdata->randompassword)) {\n $sess->studentpassword = attendance_random_string();\n } else if (!empty($formdata->studentpassword)) {\n $sess->studentpassword = $formdata->studentpassword;\n }\n if (!empty($formdata->includeqrcode)) {\n $sess->includeqrcode = $formdata->includeqrcode;\n }\n if (!empty($formdata->rotateqrcode)) {\n $sess->rotateqrcode = $formdata->rotateqrcode;\n $sess->studentpassword = attendance_random_string();\n $sess->rotateqrcodesecret = attendance_random_string();\n }\n if (!empty($formdata->preventsharedip)) {\n $sess->preventsharedip = $formdata->preventsharedip;\n }\n if (!empty($formdata->preventsharediptime)) {\n $sess->preventsharediptime = $formdata->preventsharediptime;\n }\n } else {\n $sess->subnet = '';\n $sess->automark = 0;\n $sess->automarkcompleted = 0;\n $sess->preventsharedip = 0;\n $sess->preventsharediptime = '';\n }\n $sess->statusset = $formdata->statusset;\n\n attendance_fill_groupid($formdata, $sessions, $sess);\n }\n\n $sdate = strtotime(\"+1 day\", $sdate); // Set start to tomorrow.\n } else {\n $startweek = strtotime(\"+\".$formdata->period.' weeks', $startweek);\n $sdate = $startweek;\n }\n }\n } else {\n $sess = new stdClass();\n $sess->sessdate = $sessiondate;\n $sess->duration = $duration;\n $sess->descriptionitemid = $formdata->sdescription['itemid'];\n $sess->description = $formdata->sdescription['text'];\n $sess->descriptionformat = $formdata->sdescription['format'];\n $sess->calendarevent = $calendarevent;\n $sess->timemodified = $now;\n $sess->studentscanmark = 0;\n $sess->allowupdatestatus = 0;\n $sess->autoassignstatus = 0;\n $sess->subnet = '';\n $sess->studentpassword = '';\n $sess->automark = 0;\n $sess->automarkcompleted = 0;\n\n if (!empty($formdata->automarkcmid)) {\n $sess->automarkcmid = $formdata->automarkcmid;\n } else {\n $sess->automarkcmid = 0;\n }\n\n $sess->absenteereport = $absenteereport;\n $sess->includeqrcode = 0;\n $sess->rotateqrcode = 0;\n $sess->rotateqrcodesecret = '';\n\n if (!empty($formdata->usedefaultsubnet)) {\n $sess->subnet = $att->subnet;\n } else {\n $sess->subnet = $formdata->subnet;\n }\n\n if (!empty($formdata->automark)) {\n $sess->automark = $formdata->automark;\n }\n if (!empty($formdata->automark)) {\n $sess->automark = $formdata->automark;\n }\n if (!empty($formdata->preventsharedip)) {\n $sess->preventsharedip = $formdata->preventsharedip;\n }\n if (!empty($formdata->preventsharediptime)) {\n $sess->preventsharediptime = $formdata->preventsharediptime;\n }\n\n if (isset($formdata->studentscanmark) && !empty($formdata->studentscanmark)) {\n // Students will be able to mark their own attendance.\n $sess->studentscanmark = 1;\n if (!empty($formdata->allowupdatestatus)) {\n $sess->allowupdatestatus = $formdata->allowupdatestatus;\n } else {\n $sess->allowupdatestatus = 0;\n }\n if (isset($formdata->autoassignstatus) && !empty($formdata->autoassignstatus)) {\n $sess->autoassignstatus = 1;\n }\n if (!empty($formdata->randompassword)) {\n $sess->studentpassword = attendance_random_string();\n } else if (!empty($formdata->studentpassword)) {\n $sess->studentpassword = $formdata->studentpassword;\n }\n if (!empty($formdata->includeqrcode)) {\n $sess->includeqrcode = $formdata->includeqrcode;\n }\n if (!empty($formdata->rotateqrcode)) {\n $sess->rotateqrcode = $formdata->rotateqrcode;\n $sess->studentpassword = attendance_random_string();\n $sess->rotateqrcodesecret = attendance_random_string();\n }\n if (!empty($formdata->usedefaultsubnet)) {\n $sess->subnet = $att->subnet;\n } else {\n $sess->subnet = $formdata->subnet;\n }\n\n if (!empty($formdata->automark)) {\n $sess->automark = $formdata->automark;\n }\n if (!empty($formdata->preventsharedip)) {\n $sess->preventsharedip = $formdata->preventsharedip;\n }\n if (!empty($formdata->studentsearlyopentime)) {\n $sess->studentsearlyopentime = $formdata->studentsearlyopentime;\n }\n }\n $sess->statusset = $formdata->statusset;\n\n attendance_fill_groupid($formdata, $sessions, $sess);\n }\n\n return $sessions;\n}",
"public function attendance_calendar($action = 'calendar_list', $attendance_id = 0, $calendar_id = 0)\n {\n $attendance = new Attendance();\n $calendar_id = intval($calendar_id);\n $data = array();\n $data['attendance_id'] = $attendance_id;\n $attendance_id = intval($attendance_id);\n $groupList = isset($_POST['groups']) ? array($_POST['groups']) : array();\n\n if ($action == 'calendar_add') {\n if (strtoupper($_SERVER['REQUEST_METHOD']) == \"POST\") {\n if (!isset($_POST['cancel'])) {\n if (isset($_POST['repeat'])) {\n //@todo check this error_logs\n $start_datetime = api_strtotime(\n api_get_utc_datetime($_POST['date_time']), 'UTC'\n );\n\n $end_datetime = api_strtotime(api_get_utc_datetime($_POST['end_date_time'].' 23:59:59'), 'UTC');\n $checkdate = api_is_valid_date(api_get_utc_datetime($_POST['end_date_time'].' 23:59:59'));\n\n $repeat_type = $_POST['repeat_type'];\n if (($end_datetime > $start_datetime) && $checkdate) {\n $attendance->attendance_repeat_calendar_add(\n $attendance_id,\n $start_datetime,\n $end_datetime,\n $repeat_type,\n $groupList\n );\n $action = 'calendar_list';\n } else {\n if (!$checkdate) {\n $data['error_checkdate'] = true;\n } else {\n $data['error_repeat_date'] = true;\n }\n $data['repeat'] = true;\n $action = 'calendar_add';\n }\n } else {\n $datetime = $_POST['date_time'];\n $datetimezone = api_get_utc_datetime($datetime);\n if (!empty($datetime)) {\n $attendance->set_date_time($datetimezone);\n $attendance->attendance_calendar_add($attendance_id, $groupList);\n $action = 'calendar_list';\n } else {\n $data['error_date'] = true;\n $action = 'calendar_add';\n }\n }\n } else {\n $action = 'calendar_list';\n }\n }\n } else if ($action === 'calendar_edit') {\n $data['calendar_id'] = $calendar_id;\n if (strtoupper($_SERVER['REQUEST_METHOD']) == \"POST\") {\n if (!isset($_POST['cancel'])) {\n $datetime = $_POST['date_time'];\n $datetimezone = api_get_utc_datetime($datetime);\n $attendance->set_date_time($datetimezone);\n $attendance->attendance_calendar_edit($calendar_id, $attendance_id);\n $data['calendar_id'] = 0;\n $action = 'calendar_list';\n } else {\n $action = 'calendar_list';\n }\n }\n } else if ($action == 'calendar_delete') {\n $attendance->attendance_calendar_delete($calendar_id, $attendance_id);\n $action = 'calendar_list';\n } else if ($action == 'calendar_all_delete') {\n $attendance->attendance_calendar_delete(0, $attendance_id, true);\n $action = 'calendar_list';\n }\n\n $data['action'] = $action;\n $data['attendance_calendar'] = $attendance->get_attendance_calendar(\n $attendance_id,\n 'all',\n null,\n null,\n true\n );\n $data['is_locked_attendance'] = $attendance->is_locked_attendance($attendance_id);\n // render to the view\n $this->view->set_data($data);\n $this->view->set_layout('layout');\n $this->view->set_template('attendance_calendar');\n $this->view->render();\n }",
"public function store(Request $request,$attendancet_id)\n {\n $user_id=Auth::user()->id;\n Rattrapage::create([\n 'attendance_id'=>$attendancet_id,\n 'heure_rd'=>$request->heure_rd,\n 'heure_rf'=>$request->heure_rf,\n 'date_r'=>$request->date_r,\n 'etat'=>$request->etat,\n 'user_id'=>$user_id,\n 'cours'=>$request->cours,\n\n\n ]);\n return redirect()->route('rattrapage.index');\n\n }",
"public function actionManageSessionAttendance()\n { {\n $message = null;\n\n $session_id = $_GET['session_id'];\n $session = Session::model()->findByPk($session_id);\n $staff_id = $session->staff_id;\n $students_id = $session->students_id;\n if (isset($_POST['staff'])) {\n $attend = '';\n // attend for staff\n if ($_POST['staff'] == 'on') {\n $attend = $attend . '1';\n } else {\n $attend = $attend . '0';\n }\n // attend for student\n $s = explode(',', $students_id);\n for ($i = 0; $i < count($s); $i++) {\n $j = $i + 1;\n if ($_POST['student_' . $j] == 'on') {\n $attend = $attend . '1';\n } else {\n $attend = $attend . '0';\n }\n }\n $session->attendance = $attend;\n if (!($session->save())) {\n throw new CHttpException('Unable to save!');\n }\n $message = 'Save Successful<br/>';\n\n }\n\n $this->render('manageSessionAttendance', array(\n 'staff_id' => $staff_id,\n 'students_id' => $students_id,\n 'message' => $message,\n 'session' => $session));\n }\n }",
"function attendance_create_calendar_event(&$session) {\n global $DB;\n\n // We don't want to create multiple calendar events for 1 session.\n if ($session->caleventid) {\n return $session->caleventid;\n }\n if (empty(get_config('attendance', 'enablecalendar')) || $session->calendarevent === 0) {\n // Calendar events are not used, or event not required for this session.\n return true;\n }\n\n $attendance = $DB->get_record('attendance', array('id' => $session->attendanceid));\n\n $caleventdata = new stdClass();\n $caleventdata->name = $attendance->name;\n $caleventdata->courseid = $attendance->course;\n $caleventdata->groupid = $session->groupid;\n $caleventdata->instance = $session->attendanceid;\n $caleventdata->timestart = $session->sessdate;\n $caleventdata->timeduration = $session->duration;\n $caleventdata->description = $session->description;\n $caleventdata->format = $session->descriptionformat;\n $caleventdata->eventtype = 'attendance';\n $caleventdata->timemodified = time();\n $caleventdata->modulename = 'attendance';\n\n if (!empty($session->groupid)) {\n $caleventdata->name .= \" (\". get_string('group', 'group') .\" \". groups_get_group_name($session->groupid) .\")\";\n }\n\n $calevent = new stdClass();\n if ($calevent = calendar_event::create($caleventdata, false)) {\n $session->caleventid = $calevent->id;\n $DB->set_field('attendance_sessions', 'caleventid', $session->caleventid, array('id' => $session->id));\n return true;\n } else {\n return false;\n }\n}",
"public function store(\\Modules\\Organization\\Http\\Requests\\AttendanceDeductionCreateRequest $request)\n { \n $user = AttendanceDeductionMaster::create($request->all());\n $request->session()->flash('status', 'Task was successful!');\n return back();\n }",
"public function run()\n {\n AttendanceTransaction::create([\n \t'attendance_id' => '83f6b554-a17c-4ff2-9c33-eb0f289f6154',\n \t'clock_in' => '2020-02-11 07:42:46',\n \t'clock_out' => '2020-02-11 18:42:46',\n \t'notes' => 'Attendance Seeder Test',\n \t'created_at' => '2020-02-11 07:42:46',\n \t'updated_at' => '2020-02-11 18:42:46',\n ]);\n }",
"public function attendance(){\n\t\t\t$data['title'] = 'Students Attendences Course name '; \n\n\t\t\t$course_code = $_GET['course_code'];\n\t\t\t\n\t\t\t$ids = $this->register_model->ids($course_code);\n\n\t\t\t$course_id;\n\t\t\tforeach ($ids as $id) {\n\t\t\t\t\t$course_id = $id['id'];\n\t\t\t\t\t$data['course_name'] = $id['course_name'];\n\t\t\t}\t\t\t\n\t\t\t$data['courses'] = $this->register_model->get_attendance($course_id);\n\n\t\t\t$this->load->view('admin/header1');\n\t\t\t$this->load->view('admin/attendance', $data);\n\t\t\t$this->load->view('admin/footer');\n\t\t}",
"public function store(Request $request)\n {\n $this->validate($request, [\n\t\t\t'scheduled_event_id' => 'required',\n\t\t\t'student_id' => 'required',\n\t\t\t'event_id' => 'required',\n\t\t\t'event_date' => 'required',\n\t\t\t'time_in' => 'required',\n\t\t\t'time_out' => 'nullable'\n\t\t]);\n $requestData = $request->all();\n \n Attendance::create($requestData);\n\n return redirect('attendances')->with('flash_message', 'Attendance added!');\n }",
"public function create() {\n $data[''] \t\t= $this->input->post('date_from'); \n $data[''] \t\t= $this->input->post('date_to');\n\t\t\n\t\t$SendData = array(\n\t\t'' => '',\n\t\t'' => ''\n\t\t);\n \n\t\t\n Template::set('toolbar_title', lang(\"atndnce_proces_title\"));\n Template::set_view('attendance_processing/attendance_processing_form');\n Template::render();\n\t\t\n }",
"public function createAction(Request $request)\n {\n \n $em = $this->getDoctrine()->getManager();\n $entity = new AttendanceChildren();\n \n if(!$this->getRequest()->isXmlHttpRequest())\n {\n $form = $this->createForm(new AttendanceChildrenType(), $entity);\n $form->bind($request);\n\n if ($form->isValid()) {\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('attendancechildren_show', array('id' => $entity->getId())));\n }\n\n return $this->render('AcmeKindergartenBundle:AttendanceChildren:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }else\n {\n $accion = $request->get('accion');\n $id_child = $request->get('child_id');\n\n $repository = $em->getRepository('AcmeKindergartenBundle:AttendanceChildren');\n $isAttendanceToday = $repository->isAttendanceToday($id_child);\n\n if ($accion == \"on\") \n { \n //get on \n if(!$isAttendanceToday)\n {\n $child = $em->getRepository('AcmeChildrenBundle:Children')->find($id_child);\n $entity->setChild($child);\n //$entity->setDate(date( 'Y-m-d H:i:s' ));\n \n $date = new \\DateTime('now');\n $date->format('Y-m-d H:i:s');\n $entity->setAttendanceDate($date);\n //$entity->setAttendance(true);\n //$entity->setUser(true);\n\n $em->persist($entity);\n $em->flush();\n $data = \"on\";\n \n \n }else\n {\n $data = \"Kinder is online alredy\";\n } \n }else{\n //off\n\n if($isAttendanceToday)\n {\n //var_dump($id_child);die();\n\n $child = $em->getRepository('AcmeChildrenBundle:Children')->find($id_child);\n //var_dump($child);die();\n\n $entity = $em->getRepository('AcmeKindergartenBundle:AttendanceChildren')->findOneBy(array('child' => $child->getId()));\n //var_dump($entity);die();\n\n\n $em->remove($entity);\n $em->flush();\n $data = \"off\"; \n\n }else\n {\n $data = \"Kinder isn't online yet\";\n }\n \n //if is online already return new query and update the view\n \n }\n $response = new Response(json_encode(array('data' => $data)));\n $response->headers->set('Content-Type', 'application/json');\n\n return $response; \n }\n\n }",
"public function mark_attendance($message = NULL) {\n $data['sideMenuData'] = fetch_non_main_page_content();\n $tenant_id = $this->tenant_id;\n $course_id = $this->input->post('course_id');\n $class_id = $this->input->post('class_id');\n $subsidy = $this->input->post('subsidy');\n $sort_by = $this->input->get('b');\n $sort_order = $this->input->get('o');\n $class_details = $this->class->get_class_by_id($tenant_id, $course_id, $class_id);\n \n $from_date = parse_date($class_details->class_start_datetime, SERVER_DATE_TIME_FORMAT);///added by shubhranshu\n $to_date = parse_date($class_details->class_end_datetime, SERVER_DATE_TIME_FORMAT);//added by shubhranshu\n $week_start_date = parse_date($this->input->post('week_start'), CLIENT_DATE_FORMAT);//added by shubhranshu\n //echo print_r($from_date);print_r($to_date);print_r($week_start_date);exit;\n \n $week = $this->input->post('week');\n $export = $this->input->post('export');\n $export1 = $this->input->post('export1');\n $this->load->helper('attendance_helper');\n if (!empty($export)) \n {\n $class_details = $this->class->get_class_details_for_report($tenant_id, $course_id, $class_id);\n $class_start = parse_date($class_details->class_start_datetime, SERVER_DATE_TIME_FORMAT);\n $class_end = parse_date($class_details->class_end_datetime, SERVER_DATE_TIME_FORMAT);\n if (empty($class_start))\n $class_start = new DateTime();\n if (empty($class_end))\n $class_end = new DateTime();\n $class_schedule = $this->class->get_all_class_schedule($tenant_id, $class_id);\n $class_schedule_data = array();\n foreach ($class_schedule as $row) {\n $session_arr = array('S1' => '1', 'BRK' => '3', 'S2' => '2');\n $class_schedule_data[date('d/m/y', strtotime($row['class_date']))][$session_arr[$row['session_type_id']]] = date('h:i A', strtotime($row['session_start_time']));\n }\n \n if ($export == 'xls') \n {\n $results = $this->classtraineemodel->get_class_trainee_list_for_attendance($tenant_id, $course_id, $class_id, $subsidy, $class_start, $class_end, $sort_by, $sort_order);\n $this->load->helper('export_helper');\n export_attendance($results, $class_details, $class_start, $class_end, $class_schedule_data);\n } \n else \n {\n $results = $this->classtraineemodel->get_class_trainee_list_for_attendance($tenant_id, $course_id, $class_id, $subsidy, $class_start, $class_end, $sort_by, $sort_order);\n $tenant_details = $this->classtraineemodel->get_tenant_masters($tenant_id);\n $tenant_details->tenant_state = rtrim($this->course->get_metadata_on_parameter_id($tenant_details->tenant_state), ', ');\n $tenant_details->tenant_country = rtrim($this->course->get_metadata_on_parameter_id($tenant_details->tenant_country), ', ');\n\t\t$mark_count = $this->classtraineemodel->get_rows_count($course_id,$class_id);\n \n if ($export == 'xls_week'){\n $this->load->helper('export_helper');\n return generate_class_attendance_sheet_xls($results, $class_details, $class_start, $class_end, $tenant_details, $class_schedule_data);\n }\n $this->load->helper('pdf_reports_helper');\n if ($export == 'pdf') {\n //return generate_class_attendance_pdf($results, $class_details, $tenant_details, $class_schedule_data, $mark_count);\n //print_r($results);exit;\n return generate_class_attendance_pdf($results, $class_details, $tenant_details, $class_schedule_data,$mark_count); // removed mark count by shubhranshu\n \n } else if ($export == 'pdf_week') {\n return generate_class_attendance_sheet_pdf($results, $class_details, $tenant_details, $class_schedule_data);\n }\n }\n \n } \n else \n {\n if($export1=='lock')\n { \n $lock_msg=$this->classtraineemodel->lock_class_attendance($tenant_id,$course_id,$class_id);\n if($lock_msg==TRUE){\n $this->session->set_flashdata(\"success\", \"Succesfully Locked.\");\n }else{\n $this->session ->set_flashdata(\"error\",\"Something went wrong while locking.\");\n }\n }else if($export1=='unlock'){\n $lock_msg=$this->classtraineemodel->unlock_class_attendance($tenant_id,$course_id,$class_id);\n if($lock_msg==TRUE){\n $this->session->set_flashdata(\"success\",\"Succesfully Unocked\");\n }else{\n $this->session->set_flashdata(\"error\",\"Somthing went wrong while Unlocking !\");\n \n }\n }\n \n \n $data = get_data_for_renderring_attendance($tenant_id, $course_id, $class_id, $subsidy, $from_date, $to_date, $week_start_date, $week, $sort_by, $sort_order,'');\n \n $data['class_schedule'] = $this->class->get_all_class_schedule($tenant_id, $class_id);\n $att = $this->classtraineemodel->get_attendance_lock_status($tenant_id,$course_id, $class_id);\n $data['lock_status']=$att->lock_status;\n $data['class_start_datetime']=$att->class_start_datetime;\n\t\t\t$data['user'] = $this->user;\n\t\t\t$data['controllerurl'] = 'class_trainee/mark_attendance';\n $data['page_title'] = 'Class Trainee Enrollment - Mark Attendance';\n $data['main_content'] = 'classtrainee/markattendance';\n //$data['week_start'] = $from_date;\n //$data['sideMenuData'] = $this->sideMenu;\n if (!empty($message))\n $data['message'] = $message;\n $this->load->view('layout', $data);\n }\n }",
"public function create()\n {\n $companies = Company::all();\n $agents = Agent::all();\n $requesters = Attendance::groupBy('requester')\n ->selectRaw('requester as name')\n ->get();\n return view('attendance.create', ['companies' => $companies, 'agents' => $agents, 'requesters' => $requesters]);\n }",
"public function create(){\n $this->isAuthorize();\n\n // Load the Create View\n $userID = $this->request->session()->get('userID');\n //echo $userID;die();\n $allEvents = Apt_event::where('userID','=',$userID)->pluck('evtName', 'id');\n //DB::enableQueryLog();\n $allEmployee = DB::table('users AS u')\n ->join('role_user AS ur', 'u.id', '=', 'ur.id')\n ->select('u.id','u.name')\n ->where('ur.userType', '=', 4)\n ->where('ur.parentID', '=', $userID)\n ->orderBy('ur.user_id', 'ASC')\n ->pluck('name', 'id');\n //dd(DB::getQueryLog());\n return view('appointments.timeslot.create', compact('allEvents', 'allEmployee'));\n }",
"public function storeAttendence(){\n\t $date = date(\"Y-m-d\");\n\t $record = $this->input->post();\n\t foreach($record as $student_id => $attendence){\n\t \n\t $data = array('student_id'=>$student_id,\n\t\t\t 'attendence'=>$attendence\n\t\t\t);\n\t\t\t\n\t\t\t//insert value in database\n \t\t$this->db->insert('attendence_record',$data);\n\t }\n\t \n\t $this->session->set_flashdata('attendence_success','Attendence Successful Saved');\n\t\treturn redirect('Operator/attendencePage');\n\t}",
"public function create(){\n\t\t$p=$this->input->post();\n\t\t$id=$this->m_user->saveUserFromTim($p);\n\t\t$p['id']=$id;\n\t\t$idt = $this->m_timHps->saveTimHps($p);\n\t\t$exp = explode(',', $p['anggota']);\n\t\t$jml = count($exp);\n\t\tfor($i=0; $i < $jml; $i++) { \n\t\t\t$this->m_timHps->saveAnggotaTimHps($exp[$i],$idt);\n\t\t}\n\t\t\n\t}",
"public function store(Request $request)\n {\n $attendance = Attendance::where('class_id', $request->class_id)->whereDate('date', $request->date)->get();\n if(count($attendance)>0){\n return back()->withErrors(['error-message'=> 'Attendance Data Added Previously']);\n }\n foreach($request->student_id as $key=>$value){\n foreach($value as $k => $s_val){\n Attendance::create([\n 'date' => $request->date,\n 'class_id' => $request->class_id,\n 'student_id' => $s_val,\n 'present' => $request->present[$key][$k],\n ]);\n }\n }\n return back()->with('success-message', 'Attnedance record Entered Successfully!');\n }",
"public function store(CreateStudentAttendRequest $request)\n {\n $input = $request->all();\n\n $studentAttend = $this->studentAttendRepository->create($input);\n\n Flash::success('تم تسجيل حضور الطالب بنجاح');\n\n return redirect(route('attendance', $studentAttend->student_id));\n }",
"public function create()\n\t{\n\t\t//\n\t\tdd('Day la trang create');\n\t}",
"public function store(Request $request)\n {\n\n $parentData = $request->only('class_id', 'teacher_id', 'date');\n $attendance_id = Attendence::create($parentData);\n\n foreach ($request->status as $key => $status){\n Student_Attendance::create([\n 'attendence_id' => $attendance_id->id,\n 'student_id' => $key,\n 'status' => $status,\n\n ]);\n\n }\n\n // $child_data=Attendence::where('student_id','=',id)->get();\n return redirect()->route('attendences.index')->with('message','Data has been inserted successfully');\n }",
"public function view_attendance() { \r\n date_default_timezone_set(\"Asia/Manila\");\r\n $date= date(\"Y-m-d\");\r\n $year = date('Y', strtotime($date));\r\n $month = date('m', strtotime($date));\r\n $datenow = $year .\"-\". $month;\r\n $set_data = $this->session->userdata('userlogin'); //session data\r\n $data = array('clientID' => $set_data['clientID']\r\n ); \r\n $firstDay = mktime(0,0,0,$month, 1, $year);\r\n $timestamp = $firstDay;\r\n $weekDays = array();\r\n for ($i = 0; $i < 31; $i++) {\r\n $weekDays[] = strftime('%a', $timestamp);\r\n $timestamp = strtotime('+1 day', $timestamp);\r\n } \r\n $records['clientprofile']=$this->Client_Model->clientprofile($data);\r\n $records['weekDays']=$weekDays;\r\n $records['useradmin']=$this->User_Model->usertype();\r\n $records['employeeatendance']=$this->Attendance_Model->viewattendanceemployee($set_data['clientID'], $datenow);\r\n $this->load->view('attendanceemployee', $records);\r\n }",
"public function store(StoreAttendance $request)\n {\n $date = Carbon::createFromFormat('m/d/Y', $request->date)->format('Y-m-d');\n $clockIn = Carbon::createFromFormat('h:i A', $request->clock_in_time, $this->global->timezone);\n $clockIn->setTimezone('UTC');\n $clockIn = $clockIn->format('H:i:s');\n if($request->clock_out_time != ''){\n $clockOut = Carbon::createFromFormat('h:i A', $request->clock_out_time, $this->global->timezone);\n $clockOut->setTimezone('UTC');\n $clockOut = $clockOut->format('H:i:s');\n $clockOut = $date.' '.$clockOut;\n }\n else{\n $clockOut = null;\n }\n\n $attendance = Attendance::where('user_id', $request->user_id)->where(DB::raw('DATE(`clock_in_time`)'), $date)->first();\n if(!is_null($attendance)){\n $attendance->update([\n 'user_id' => $request->user_id,\n 'clock_in_time' => $date.' '.$clockIn,\n 'clock_in_ip' => $request->clock_in_ip,\n 'clock_out_time' => $clockOut,\n 'clock_out_ip' => $request->clock_out_ip,\n 'working_from' => $request->working_from,\n 'late' => $request->late,\n 'half_day' => $request->half_day\n ]);\n }else{\n Attendance::create([\n 'user_id' => $request->user_id,\n 'clock_in_time' => $date.' '.$clockIn,\n 'clock_in_ip' => $request->clock_in_ip,\n 'clock_out_time' => $clockOut,\n 'clock_out_ip' => $request->clock_out_ip,\n 'working_from' => $request->working_from,\n 'late' => $request->late,\n 'half_day' => $request->half_day\n ]);\n }\n\n return Reply::success(__('messages.attendanceSaveSuccess'));\n }",
"function createAppointment(){\n\t\t\t$query = \"INSERT INTO appointment set appTime=?, custId=?\";\n\t\t\t$stmt = $this->conn->prepare($query);\n\t\t\t// $stmt->bindparam(1, $this->serviceType);\n\t\t\t// $stmt->bindparam(2, $this->serviceName);\n\t\t\t// $stmt->bindparam(3, $this->appDate);\n\t\t\t$stmt->bindparam(1, $this->appTime);\n\t\t\t$stmt->bindparam(2, $_SESSION['username']);\n\n\t\t\tif($stmt->execute()){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"public function actionCreate()\n {\n $model = new TabelAppointment();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id_appointment]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Accident();\n\n $user_id = $_SESSION['user']['id'];\n $user_group = $_SESSION['user']['user_group'];\n\n if ($user_group <= 20) {\n\n if ($model->load(Yii::$app->request->post())) {\n\n $model = Accident::setDates($model);\n\n $model->responsible = $user_id;\n\n if (empty($model->acc_status)) {\n $model->acc_status = 'ОТКРЫТА';\n }\n\n $arChanges = Logs::getChanges($model);\n\n if ($model->save()) {\n\n $file_changes = Files::saveFiles('accident', $model->id, $_FILES);\n if (!empty($file_changes)) $arChanges += $file_changes;\n\n Logs::createLog('ACCIDENT CREATE', $user_id, $arChanges, $model->id);\n\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'getParams' => Yii::$app->request->get(),\n 'user' => $_SESSION['user'],\n ]);\n }\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'getParams' => Yii::$app->request->get(),\n 'user' => $_SESSION['user'],\n ]);\n }\n }\n }",
"public function actionCreate() {\n $model = new Bookings();\n\n $model->load(Yii::$app->request->post());\n $query = Bookings::find()\n ->andWhere(['patients_id' => $model->patients_id])\n ->andWhere(['date' => $model->date])->one();\n\n\n if (!empty($query->doctors_id)) {\n Yii::$app->session->setFlash('error', 'You already have an appointment on this date');\n return $this->redirect(['view', 'id' => $query->id]);\n }\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n// $model->time = Yii::$app->formatter->\n// asDate($_POST['hours'].$_POST['minutes'], 'HH:mm');\n\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function store(StoreAttendanceRequest $request)\n {\n try {\n $request['note'] = str_replace([\"'\", '\"'], '', $request['note']);\n Attendance::create($request->all() + ['user_id' => auth()->id()]);\n } catch (\\Exception $exception) {\n return back()->withInput()->withError('Atendimento não cadastrado! Verifique com o suporte.');\n }\n\n return redirect()->route('attendance.index')->withSuccess('Atendimento finalizado!');\n }",
"public function insertAttendance($total_time_school_opened, $no_of_times_present, $no_of_times_absent, $term_id, $session_id, $student_id, $clazz_no_of_student, $teacher_id, $clazz_id, $clazz_type_id, $class_arm){\n\t\t\t$sql = \"INSERT INTO attendance (id, total_time_school_opened, no_of_times_present, no_of_times_absent, term_id, session_id, student_id, clazz_no_of_student, teacher_id, clazz_id, clazz_type_id, class_arm_id, created_at) VALUES (NULL, '$total_time_school_opened', '$no_of_times_present', '$no_of_times_absent', '$term_id', '$session_id', '$student_id', '$clazz_no_of_student', '$teacher_id', '$clazz_id', '$clazz_type_id', '$class_arm', NULL)\";\n\t\t\t$this->connection()->exec($sql);\n\t\t\treturn true;\n\t\t}",
"public function Attendance(){\t\t\n\t\tif($this->IsLoggedIn('cashier')){\t\t\t\n\t\t\t$data = $this->GetDataForCashier(\"Attendance\");\t\t\t\n\t\t\t$data['experts'] = $this->GetExperts();\t\n\t\t\t$data['attendance_today']=$this->CashierModel->CalculateAttendance();\t\t\t\n\t\t\n\t\t\t$data['sidebar_collapsed'] = \"true\";\n\t\t\t// $this->PrettyPrintArray($data);\n\t\t\t// exit;\n\t\t\t$this->load->view('cashier/cashier_attendance_view', $data);\t\n\t\t}\n\t\telse{\n\t\t\t$data['title'] = \"Login\";\n\t\t\t$this->load->view('cashier/cashier_login_view',$data);\n\t\t}\n\t\t\n\n\t}",
"function eventclass_student_attendance()\n\t{\n\t\t$this->events[\"AfterAdd\"]=true;\n\n\t\t$this->events[\"AfterEdit\"]=true;\n\n\t\t$this->events[\"AfterDelete\"]=true;\n\n\n//\tonscreen events\n\n\n\t}",
"public function run()\n {\n /*\n $faker=Faker::create('id_ID');\n $status=array(\"hadir\",\"ijin\",\"sakit\",\"alpha\");\n for($i=0;$i<100;$i++){\n $sc_id=\\App\\Models\\Schedule::factory()->create();\n $st_id=\\App\\Models\\student::factory()->create();\n $ac_id=\\App\\Models\\Academic::factory()->create();\n $ka = array_rand($status);\n $start=$faker->time($format = 'H:i', $max = 'now');\n $end=Carbon::parse($start)->addHour(2)->format('H:i');\n DB::table('attendance')->insert([\n 'schedule_id'=>$sc_id,\n 'user_id'=>$st_id,\n 'lesson_id'=>$ac_id,\n 'date'=>$faker->date('Y-m-d'),\n 'in'=>$start,\n 'out'=>$end,\n 'status'=>$status[$ka]\n ]);\n };\n */\n \\App\\Models\\Attendance::factory(400)->create();\n }",
"function student_attendance()\n\t{\n\t\t\n\t\t$usercode = $_REQUEST['usercode'];\n\t\t$userdt\t\t\t\t=\t$this->ObjM->get_user_by_usercode($usercode);\n\t\t$yearly_acccount \t= $this->ObjM->student_yearly_acccount($userdt[0]['idcode']);\n\t\t\n\t\t$arr=array('student_yearly_code' =>$yearly_acccount[0]['student_yearly_code'],'attendance_month'=>$_REQUEST['month']);\n\t\t$stud_att\t\t\t\t=\t$this->ObjM->get_student_attendance($arr);\n\t\t\n\t\tif(count($stud_att)<1){\n\t\t\t$json_arr[]=array('validation'=>'false');\t\n\t\t\techo json_encode($json_arr);\n\t\t\texit;\t \n\t\t}\n\t\t\n\t\tfor($i=0;$i<count($stud_att);$i++){\n\t\t\t\t$attendance_date = date('d-m-Y',$stud_att[$i]['attendance_date']);\n\t\t\t\t$json_arr[]=array(\n\t\t\t\t\t'attendance_date'\t\t=>\t$attendance_date,\n\t\t\t\t\t'attendance'\t\t\t=>\t$stud_att[$i]['attendance'],\n\t\t\t\t\t'validation'\t \t\t=>\t'true' );\n\t\t }\n\t\t echo json_encode($json_arr);\n\t\t\texit;\n\t}",
"function add_attendence($id=0){\n $post=$this->input->post();\n if($post){\n\t\t\n\t\t\t$st_id=$_POST['st_id'];\n\t\t\t$sem_id=$_POST['sem_id'];\n\t\t\t$attd=$_POST['attd'];\n\t\t\t$attd_tot=$_POST['attd_tot'];\n\t\t\t $this->admin_model->add_student_attend($st_id,$sem_id,$attd,$attd_tot);\n\t\t\tredirect('admin/user_accounts');\n }else{\n\t\t$sql_sem=$this->db->query(\"select u.id from users u where u.id='\".$id.\"'\");\n\t\tif($sql_sem->num_rows()>0){\n\t\t$row=$sql_sem->row();\n\t\t\n\t\t\t$data['st_id']=$id;\t\t\t\t\t\n\t\t\t$data['content_page']='admin/add_attendence';\n $this->load->view('common/base_template',$data);\n\t\t\t}\n\t\t}\n }",
"function createactivity() {\n $this->auth(WL_ADM_LEVEL);\n $wl_id = $this->session->userdata('wl_id');\n $name = $this->input->post('name');\n $multiplicity = $this->input->post('multiplicity');\n $severity = $this->input->post('severity');\n $unit = $this->input->post('unit');\n $desc = $this->input->post('desc');\n $this->m_activities->create($wl_id, $name, $multiplicity, $severity, $unit, $desc);\n $this->activities();\n }",
"public function create()\n {\n // $crud = new Events();\n // $crud->photo ='anniv.png';\n // $crud->title = 'Sogod Founding Anniversary Concert';\n // $crud->descriptions = 'secret';\n // $crud->venue = 'Sogod Covered Court';\n // $crud->date = date('04/02/2018');\n // $crud->time = time('h:i:s');\n\n // $crud->save(); \n }",
"private function create() {\n\t\t$id = $this->objAccessCrud->getId();\n\t\tif (!empty ( $id )) return;\n\t\t// Check if there are permission to execute delete command.\n\t\t$result = $this->clsAccessPermission->toCreat();\n\t\tif(!$result){\n\t\t\t$this->msg->setWarn(\"You don't have permission to create!\");\n\t\t\treturn;\n\t\t}\n\t\t// Execute insert.\n\t\t$this->objAccessCrud->setDateInsert(date(\"Y-m-d H:i:s\"));\n\t\t$id = $this->objAccessCrud->create ();\n\t\t// Check result.\n\t\tif ($id == 0) {\n \t\t\t$this->msg->setError ('There were issues on creating ther record!');\n\t\t\t\treturn;\n\t\t}\n\t\t// Save the id in the session to be used in the update.\n\t\t$_SESSION ['PK']['ACCESSCRUD'] = $id;\n\t\t\t\n\t\t$this->msg->setSuccess ( 'Created the record with success!' );\n\t\treturn;\n\t}",
"public function create()\n {\n $leaders = Leader::where('AreaID',auth()->user()->AreaID)->lists('name','id');\n return view('Attendance.create',compact('rows','leaders'));\n }",
"function invite_workshop_attendees_create(){\n\t\t$this->content_data['uri'] = base_url('workshops/invite/register');\n $this->content_data['get_dropdown_all_titles'] = _get_dropdown_all_titles();\t\t\n\t\t$this->content_data['submit_button'] = lang('invite_').lang('attendee');\t\t\t\t\n\t\t$this->panel_title = 'ADD WORKSHOP ATTENDEES';\n\t\t$this->add_external_css(array(\"/themes/core/css/bootstrap-datetimepicker.css\"));\n\t\t$this->add_external_js(array(\"/themes/core/js/date-time-picker/moment.js\", \"/themes/core/js/date-time-picker/transition.js\", \"/themes/core/js/date-time-picker/collapse.js\", \"/themes/core/js/date-time-picker/bootstrap-datetimepicker.js\", \"/themes/core/js/views/training/workshops/workshops.js\"));\n\t\t$this->data = $this->includes;\t\t\n\t\t$this->content_data['workshopId'] = $this->id;\n\t\t$this->data['content'] = $this->load->view('training/workshops/workshop_attendees_add', $this->content_data, true);\n \t $this->load->view($this->template, $this->data);\n }",
"public function create()\n {\n $students = Student::select('id', 'name')->get();\n return view('attendances.create', compact('students'));\n }",
"public function store(StoreAttendanceRequest $request)\n {\n $request->createAttendance();\n\n return response()->json([\n 'message' => __('Checked in successfully!')\n ]);\n }",
"public function getAttendances_yes()\n {\n $orgid = isset($_REQUEST['refno']) ? $_REQUEST['refno'] : 0;\n $empid = isset($_REQUEST['empid']) ? $_REQUEST['empid'] : 0;\n $att = isset($_REQUEST['att']) ? $_REQUEST['att'] : 0;\n $datafor = isset($_REQUEST['datafor']) ? $_REQUEST['datafor'] : 0;\n //$zone = getTimeZone($orgid);\n if($empid!=0)\n \t$zone = getEmpTimeZone($empid,$orgid); // to set the timezone by employee country.\n else\n \t$zone = getTimeZone($orgid);\n date_default_timezone_set($zone);\n $date =date('Y-m-d', strtotime(' -1 day'));\n $time = date('H:i:s');\n $data = array();\n\t if($datafor=='present'){\n //today attendance\n\t\t$query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out FROM `AttendanceMaster` WHERE `AttendanceDate`=? and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8 ) AND EmployeeId in (SELECT Id from EmployeeMaster where OrganizationId = $orgid AND Is_Delete = 0) order by `name`\", array(\n\t\t\t\t$date,\t$orgid ));\n $data['present'] = $query->result();\n\t }else if($datafor=='absent'){\n\t\t\t$query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , '-' as `TimeOut` ,'-' as TimeIn FROM `AttendanceMaster` WHERE `AttendanceDate`=? and OrganizationId=? and (AttendanceStatus=2 or AttendanceStatus=6 or AttendanceStatus=7 ) AND EmployeeId in (SELECT Id from EmployeeMaster where OrganizationId = $orgid AND Is_Delete = 0) order by `name`\", array($date,$orgid));\n $this->db->close();\n $data['absent'] = $query->result(); \n\t}else if($datafor=='latecomings'){\t\t\n //////// today_late\n $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out FROM `AttendanceMaster` WHERE (time(TimeIn) > (select time(TimeIn) from ShiftMaster where ShiftMaster.Id=shiftId)) and `AttendanceDate`=? and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8) AND EmployeeId in (SELECT Id from EmployeeMaster where OrganizationId = $orgid AND Is_Delete = 0) order by `name`\", array(\n $date,\n $orgid\n ));\n $data['lateComings'] = $query->result();\n\t}else if($datafor=='earlyleavings'){\t\n ////////today_early\n /* $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out FROM `AttendanceMaster` WHERE (time(TimeOut) < (select time(TimeOut) from ShiftMaster where ShiftMaster.Id=shiftId) and TimeOut!='00:00:00' ) and `AttendanceDate`=? and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8) AND EmployeeId in (SELECT Id from EmployeeMaster where OrganizationId = $orgid AND Is_Delete = 0) order by `name`\", array( $date,$orgid ));\n $data['earlyLeavings'] = $query->result();*/\n\t\t$query = $this->db->query(\"select Shift,Id , FirstName , LastName from EmployeeMaster where OrganizationId = $orgid and Id IN (select EmployeeId from AttendanceMaster where OrganizationId = $orgid and AttendanceDate='$date' and TimeIn != '00:00:00' ) AND is_Delete=0 order by FirstName\");\n\t\t $res = array();\n\t\t $cond = '';\n foreach ($query->result() as $row) {\n $ShiftId = $row->Shift;\n $EId = $row->Id;\n $query = $this->db->query(\"select TimeIn,TimeOut,shifttype from ShiftMaster where Id = $ShiftId\");\n if ($data123 = $query->row()) {\n $shiftout = $data123->TimeOut;\n $shiftout1 = $date. ' '.$data123->TimeOut;\n\t\t\t\tif($data123->shifttype==2)\n\t\t\t\t{\n\t\t\t\t\t$nextdate = date('Y-m-d',strtotime($date . \"+1 days\"));\n\t\t\t\t\t $shiftout1 = $nextdate.' '.$data123->TimeOut;\n\t\t\t\t}\n $shift = substr($data123->TimeIn, 0, 5) . ' - ' . substr($data123->TimeOut, 0, 5);\n $ct = date('H:i:s');\n \n \n $query333 = $this->db->query(\"select SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out from AttendanceMaster where EmployeeId =$EId and if(timeoutdate = '0000-00-00' , TimeOut < '$shiftout' , CONCAT(timeoutdate,' ' ,TimeOut) < '$shiftout1' ) and AttendanceDate='$date' and TimeOut !='00:00:00' \");\n\t\t\t\t\t\n\t\t\t\t\t\n if ($row333 = $query333->row()) {\n $a = new DateTime($row333->TimeOut);\n $b = new DateTime($data123->TimeOut);\n $interval = $a->diff($b);\n $data1['earlyby'] = $interval->format(\"%H:%I\");\n $data1['timeout'] = substr($row333->TimeOut, 0, 5);\n $data1['name'] = $row->FirstName . ' ' . $row->LastName;\n $data1['shift'] = $shift;\n $data1['status'] = $row333->status;\n $data1['TimeIn'] = $row333->TimeIn;\n $data1['TimeOut'] = $row333->TimeOut;\n $data1['CheckOutLoc'] = $row333->CheckOutLoc;\n $data1['checkInLoc'] = $row333->checkInLoc;\n $data1['EntryImage'] = $row333->EntryImage;\n $data1['ExitImage'] = $row333->ExitImage;\n $data1['latit_in'] = $row333->latit_in;\n $data1['longi_in'] = $row333->longi_in;\n $data1['latit_out'] = $row333->latit_out;\n $data1['longi_out'] = $row333->longi_out;\n $data1['date'] = $date;\n $res[] = $data1;\n }\n \n }\n }\n $data['earlyLeavings'] =$res;\n\t}\n echo json_encode($data, JSON_NUMERIC_CHECK);\n \n }",
"public function actionCreate()\n {\n $model = new Appointment();\n $model->creator_id = Yii::$app->user->identity->id;\n\n if ($model->load(Yii::$app->request->post()) && $model->validate() && $model->save()) {\n DoctorPatientPivot::createNewRecordIfNotExist($model->doctor_id, $model->patient_id);\n NursePatientPivot::createNewRecordIfNotExist($model->nurse_id, $model->patient_id);\n Yii::$app->session->addFlash( 'success', Yii::t('auth', 'You have successfully create Appointment №:'\n . $model->id .' for patient: ' . Patient::findOne($model->patient_id)->name )\n );\n $this->redirect('index');\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'patientsList' => Patient::getPatientsListDropDown(),\n 'doctorsList' => Doctor::getDoctorsListDropDown(),\n 'nursesList' => Nurse::getNursesListDropDown(),\n 'statusesList' => Appointment::STATUSES_ARRAY,\n 'createFromPatient' => false,\n 'createFromDoctor' => false,\n 'createFromNurse' => false\n ]);\n }\n }",
"public function createRelatedToStudent(Request $request, int $studentId) : EducationalActivityAttendance\n {\n $student = Student::findOrFail($studentId);\n\n $educationalActivityAttendance = new EducationalActivityAttendance($request->request->all());\n\n $student->educationalActivityAttendances()->save($educationalActivityAttendance);\n\n return $educationalActivityAttendance;\n }",
"private function createandActivenInactiveUser($accountType=0,$pin=0,$name=''){\n\n $checkAtt=\\DB::table('attendance_users')->where('pin',$pin)->count();\n if($checkAtt==0)\n {\n if($accountType==1){\n $array=array(\n 'pin'=>$pin,\n 'name'=>$name,\n 'password'=>\"\",\n 'group'=>1,\n 'privilege'=>0\n );\n }else{\n $array=array(\n 'pin'=>$pin,\n 'name'=>$name,\n 'password'=>\"\",\n 'group'=>1,\n 'privilege'=>0\n );\n }\n \n\n \\DB::table('attendance_users')->insert($array);\n }\n\n $dataTable=DeviceSetting::find(1);\n \n if($dataTable->device_status==\"Ready\"){\n $options = [\n 'ip' =>$dataTable->device_ip, \n 'internal_id' => 1, \n 'com_key' => 0, \n 'description' => 'TAD1', \n 'soap_port' => 80, \n 'udp_port' => 4370, \n 'encoding' => 'iso8859-1' \n ];\n \n $tad_factory = new TADFactory($options);\n $tad = $tad_factory->get_instance(); \n\n $dt = $tad->get_date()->to_array();\n if(count($dt)>0){\n\n if($accountType==1)\n {\n $r = $tad->set_user_info([\n 'pin' => $pin,\n 'name'=> $name,\n 'privilege'=> 0,\n 'password' => 0\n ]);\n\n \n $template1_data = [\n 'pin' => $pin,\n 'valid' => 1 //\n ];\n\n $tad->set_user_template($template1_data);\n }\n else\n {\n $tad->delete_user(['pin'=>$pin]);\n }\n \n }\n\n }\n\n if($dataTable->device_two_status==\"Ready\"){\n $options = [\n 'ip' =>$dataTable->device_ip_two, \n 'internal_id' => 1, \n 'com_key' => 0, \n 'description' => 'TAD1', \n 'soap_port' => 80, \n 'udp_port' => 4370, \n 'encoding' => 'iso8859-1' \n ];\n \n $tad_factory = new TADFactory($options);\n $tad = $tad_factory->get_instance(); \n\n $dt = $tad->get_date()->to_array();\n if(count($dt)>0){\n \n if($accountType==1)\n {\n $r = $tad->set_user_info([\n 'pin' => $pin,\n 'name'=> $name,\n 'privilege'=> 0,\n 'password' => 0\n ]);\n\n \n $template1_data = [\n 'pin' => $pin,\n 'valid' => 1 //\n ];\n\n $tad->set_user_template($template1_data);\n }\n else\n {\n $tad->delete_user(['pin'=>$pin]);\n }\n }\n }\n\n\n\n }",
"public function store(Request $request)\n {\n $date = explode(\" - \", request()->date_leave, 2);\n \n $dateStart = Carbon::parse($date[0]);\n $dateEnd = Carbon::parse($date[1]);\n $date1 = date('Y-m-d', strtotime($dateStart->toDateTimeString()));\n $date2 = date('Y-m-d', strtotime($dateEnd->toDateTimeString()));\n\n $period = CarbonPeriod::create($date1, $date2);\n\n // Iterate over the period\n $dates = [];\n foreach ($period as $date) {\n array_push($dates, $date->format('Y-m-d'));\n }\n\n $leave = new Leave;\n $leave->users_id = request()->users_id;\n $leave->date_leave = json_encode($dates);\n $leave->amount = count($dates);\n $leave->status = request()->status;\n $leave->periode_id = request()->periode_id;\n\n if(request()->status == 'approved'){\n foreach($dates as $date){\n $dateLeave = Carbon::parse($date);\n $getDays = Days::where('name_day', $dateLeave->format('l'))->first();\n $getSchedule = Schedule::where('users_id', $leave->users_id)->where('days_id', $getDays->id)->first();\n \n if($getSchedule){ // jika ada jadwalnya, maka create\n Attendance::create([\n \"user_id\" => $leave->users_id,\n // \"user_id\" => 1,\n \"start\" => Carbon::parse($date.' '.$getSchedule->clock_in)->addHour(7),\n \"end\" => Carbon::parse($date.' '.$getSchedule->clock_out)->addHour(7),\n \"is_on_area\" => \"0\",\n \"hours\" => $getSchedule->hours,\n \"note_start\" => '',\n \"note_end\" => '',\n \"status\" => 'cuti'\n ]);\n }\n }\n }\n\n $leave->note = request()->note;\n $leave->request_to = 1;\n $leave->note_from_manager = 'note_from_manager';\n $leave->save();\n\n // update balance\n $leaveStaf = LeaveStaf::where('users_id', $leave->users_id)->where('periode_id', request()->periode_id)->first();\n \n if(request()->status == \"approved\"){\n $leaveStaf->balance = $leaveStaf->balance - $leave->amount;\n $leaveStaf->save();\n } else if(request()->status == \"rejected\") {\n $leaveStaf->balance = $leaveStaf->balance + $leave->amount;\n $leaveStaf->save();\n }\n\n if($leave){\n return redirect()->route('leave.index')->with('success','Data berhasil disimpan!');\n }\n\n return redirect()->route('leave.create')->with('danger','Terjadi masalah!');\n }",
"public function newappointment(){\n $appointments_table = TableRegistry::get('Appointments');\n $users_table = TableRegistry::get('Users');\n $appointment = $appointments_table->newEntity();\n if ($this->request->is('post')) {\n $appointment_time = $this->request->getData('appointment_time');\n $appointment_date = $this->request->getData('appointment_date');\n $time = $appointment_date.' '.$appointment_time;\n $appointment = $appointments_table->patchEntity($appointment, $this->request->getData());\n $appointment->appointment_date = date('Y-m-d H:i A', strtotime($time));\n $appointment->user_id = $this->Auth->user('id');\n if ( $appointments_table->save($appointment)) {\n //log what just happened\n $userscontroller = new UsersController();\n $ip = $userscontroller->get_client_ip();\n $userscontroller->makeLog('Scheduled Appointment', $this->Auth->user('id'), 'Doctor scheduled an appointment', $ip, 'Add');\n $this->Flash->success(__('The appointment has been saved.'));\n\n return $this->redirect(['action' => 'viewappointments']);\n }\n $this->Flash->error(__('The appointment could not be saved. Please, try again.'));\n }\n $doctors = $users_table->find('list', ['limit' => 200])->where(['role_id'=>2]);\n $patients = $appointments_table->Patients->find('list', ['limit' => 200]);\n $this->set(compact('appointment', 'doctors', 'patients'));\n \n \n $this->viewBuilder()->setLayout('backend');\n }",
"function create_attendance_table($db_name, $con, $table_name, $class_name)\n{\n\n\tmysql_select_db($db_name, $con);\n\t\n\t$sql_query=\t\"DROP table \" . $table_name;\n\texecute_query_NR($_DB['name'],$con,$sql_query);\t\n\n\n\tglobal $_SCHEMA;\n\n\t$sql_query = \"SELECT * from $class_name\";\n\n\t$result = mysql_query($sql_query);\n\n\t$sql_query = \"CREATE TABLE \". $table_name .\"(\". $_SCHEMA['attendance'] ;\n\n\twhile($row = mysql_fetch_array($result))\n\t{\n//\t\t$sql_query.= \", \". $row['name'] . \" varchar(5) DEFAULT 'A'\";\n\t\t$sql_query.= \", \". \"roll_\". $row['roll_number']. \" varchar(5) \";\n\t}\n\n\t$sql_query.= \", \". $_SCHEMA['attendance_key'] . \")\";\n\n\tif (mysql_query($sql_query))\n\t{\n\t\techo \"attendance table for class $table_name created \\n\";\n\t}\n\n\telse\n\t{\n\t\techo \"Error creating table: \" . mysql_error();\n\t}\n\n}",
"public function create()\n {\n $validated = request()->validate([\n 'title' => 'required',\n 'day' => 'required|date',\n 'start_date' => 'required|date_format:H:i',\n 'end_date' => 'required|date_format:H:i',\n 'id_paciente' => 'required|integer',\n 'id_personal' => 'required|integer',\n ]);\n\n Agenda::create($validated);\n\n $paciente = Paciente::find($validated['id_paciente']);\n $colaborador = Personal::find($validated['id_personal']);\n\n \\Mail::to($paciente->correo)->send(new AgendaCreate($validated, $paciente, $colaborador));\n\n return redirect()->route('agenda.index')->with('success', 'Hora agendada correctamente');\n }",
"public function attend($event_id,$user_id)\n {\n if ($this->check_events_attend($event_id,$user_id))\n {\n $unset = DB::delete($this->_tableEventsAttendance)\n ->where('user_id','=',(int)$user_id)\n ->execute();\n }\n else\n {\n $set = DB::insert($this->_tableEventsAttendance, array('user_id','event_id'))\n ->values(array(\n (int)$user_id,\n (int)$event_id))\n ->execute(); \n }\n }",
"public function generate_date_attendance(Request $request)\n {\n \t$unit_id=$request->unit_id;\n \t$a_date=date('Y-m-d', strtotime(str_replace('-', '/', $request->attendance_date)));\n \t$attendance=DB::table('tbl_attendance')\n \t\t\t->join('tbl_employee','tbl_attendance.employee_id','=','tbl_employee.employee_id')\n \t\t\t->join('tbl_unit','tbl_attendance.unit_id','=','tbl_unit.unit_id')\n ->join('tbl_designation','tbl_employee.designation_id','=','tbl_designation.designation_id')\n \t\t\t->where('attendance_date',$a_date)\n \t\t\t->where('tbl_attendance.unit_id',$unit_id)\n \t\t\t->get();\n \t\t/*dd($a_date);*/\n \treturn view('manager.show_update_attendance_form', compact('attendance','a_date'));\n }",
"function add()\n { \n if( $this->input->post('rfid') !== null )\n {\n $this->load->model('cadet_model');\n $data['cadet'] = $this->cadet_model->find_cadet( $this->input->post('rfid') );\n if(isset($data['cadet']['rin']))\n {\n if(isset($_POST) && count($_POST) > 0) \n { \n $params = array(\n 'rin' => $data['cadet']['rin'],\n 'eventid' => $this->input->post('event'),\n );\n\n $attendance_id = $this->Attendance_model->add_attendance( $params );\n\n redirect('cadetevent/view');\n }\n else\n { \n show_error(\"There was no input given.\");\n }\n }\n else\n {\n echo 'This ID card does not match any cadet. Click <a href=\"connectrfid.php\">here</a> to connect this card to a cadet.';\n } \n }\n else if( $this->input->post('rin') !== null )\n {\n // TODO: Set attendance for given rin\n $this->load->model('cadet_model');\n $data['cadet'] = $this->cadet_model->get_cadet( $this->input->post('rin') );\n if(isset($data['cadet']['rin']))\n {\n if(isset($_POST) && count($_POST) > 0) \n { \n $params = array(\n 'rin' => $data['cadet']['rin'],\n 'eventid' => $this->input->post('event'),\n );\n\n $attendance_id = $this->Attendance_model->add_attendance( $params );\n\n redirect('cadetevent/view');\n }\n else\n { \n show_error(\"There was no input given.\");\n }\n }\n else\n {\n echo 'This ID card does not match any cadet. Click <a href=\"connectrfid.php\">here</a> to connect this card to a cadet.';\n } \n }\n }",
"public function createAction(Request $request)\n {\n $entity = new AttendanceEmployed();\n $form = $this->createForm(new AttendanceEmployedType(), $entity);\n $form->bind($request);\n $post = $request->request->all();\n //var_dump($post);die();\n \n if (!empty($post)) {\n \n $em = $this->getDoctrine()->getManager();\n $user = $em->getRepository('AcmeUsersBundle:Users')->findOneByUsername($post['_username']);\n //hay que verificar se el esta logado hoy \n //var_dump(\"<pre>\");\n //var_dump($user->getEmployed());die();\n //var_dump($now = new \\DateTime('now'));\n //var_dump($date = $now->format('Y-m-d'));\n //var_dump($hour = $now->format('h:i:s'));die();\n //var_dump($now = new \\DateTime('now'));die();\n if(!empty($user))\n {\n $em = $this->getDoctrine()->getManager();\n $now = new \\DateTime('now');\n $date = $now->format('Y-m-d');\n $hour = $now->format('h:i:s');\n $entity->setDate($now);\n $entity->setClockIn($now);\n $entity->setEmployed($user->getEmployed());\n\n $em->persist($entity);\n if($em->flush())\n {\n return $this->render('AcmeKindergartenBundle:AttendanceEmployed:getattendance.html.twig', array(\n 'entity' => $entity,\n ));\n }\n }else{\n \n $session = $this->get('session');\n $session->getFlashBag()->add(\n 'attendance',\n array(\n 'tittle' => 'Warning',\n 'message' => 'Error in to ClockIn Maybe you aren\\'t registed oder your password is wrong',\n 'type' =>'warning' \n )\n\n );\n } \n\n //return $this->redirect($this->generateUrl('attendanceemployed_show', array('id' => $entity->getId())));\n }\n /*if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('attendanceemployed_show', array('id' => $entity->getId())));\n }*/\n\n return $this->render('AcmeKindergartenBundle:AttendanceEmployed:attendance.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function run()\n {\n DB::table('attendance')->truncate();\n DB::table('attendance')->insert([\n [\n 'user_id' => 2,\n 'start_time' => Carbon::create(2019, 1, 15, 9, 50, 22),\n 'end_time' => Carbon::create(2019, 1, 15, 19, 30, 28),\n 'absent_flg' => 0,\n 'date' => Carbon::create(2019, 1, 15, 0, 0, 0),\n ]\n ]);\n }",
"public function save()\n {\n // UPDATE (since records were produced from [attendances] table itself\n //\n //TODO: date validation - should comply with attendances table\n\n $connection = new database();\n $columns = '';\n\n for ($i = 1; $i <= $_GET['total_days']; $i++) {\n $columns .= \"day\" . $i . \"=?,\";\n }\n $columns = substr($columns, 0, -1);\n\n $sql = \"UPDATE attendances SET {$columns} WHERE attendance_id=?\";\n //var_dump($sql);\n //var_dump($_POST);\n\n foreach ($_POST as $attendances) {\n foreach ($attendances as $attendance_id => $month) {\n // $attendance_id;\n $data = array();\n foreach ($month as $day) {\n $data[] .= $day;\n }\n $data[] .= $attendance_id;\n $connection->update($sql, $data);\n }\n }\n //var_dump($data);\n //die();\n // TODO: to redirect, need set $_POST['curriculum'] and $_POST['month']\n header(\"Location: http://\".WEBSITE_URL.\"/index.php?controller=attendances&action=index\");\n }",
"public function actionIndex()\n { \n $mac=get_client_mac(get_client_ip());\n $employeeModel=Employee::findIdentityByMacAddress($mac);\n \n if($employeeModel!=null){\n if ($employeeModel->Active==0){\n print_r (\"InActive Employee.. Contact Admin\");\n return;\n }\n $model = new AttendanceIn();\n date_default_timezone_set('Asia/Calcutta');\n $model=AttendanceIn::findIdentityByUniqueKeys($employeeModel->id,date(\"Y-m-d\"));\n $month_off=MonthOff::find()->select([\"Dates\"])->where(['BranchId'=>$employeeModel->Branch])->andWhere(['Month'=>date('m')])->andWhere(['Year'=>date(\"Y\")])->all();\n if($month_off)\n $month_off=array_map('intval',explode(',',$month_off[0]['Dates'],-1));\n if($model==null){\n $model= new AttendanceIn();\n $model->EmployeeId=$employeeModel->id;\n $model->Date=date(\"Y-m-d\");\n $model->Time=date(\"H:i:s\");\n $timeSlotModel=TimeSlots::findOne(['id'=>$employeeModel->TimeSlot]);\n if(strcmp($model->Time,$timeSlotModel->Grace)<0){\n if(in_array(date('d'), $month_off)){\n if(!$leaveHistory=LeaveHistory::findOne(['EmployeeId'=>$employeeModel->id, 'LeaveType'=>4])){\n $leaveHistory =new LeaveHistory();\n $leaveHistory->id=$employeeModel->id;\n $leaveHistory->Type=4;\n $leaveHistory->LeaveCount=0;\n $leaveHistory->MaxLeave=0.5;\n }\n else{\n $leaveHistory->MaxLeave+=0.5;\n }\n $leaveHistory->save();\n $model->FirstHalf=\"WP\";\n }\n else\n $model->FirstHalf=\"P\";\n \n }\n else if (strcmp($model->Time,$timeSlotModel->Grace)>0 && strcmp($model->Time,$timeSlotModel->DeadOut)<0){\n if($employeeModel->DeadOutCount>=$timeSlotModel->MaxDeadOutCount)\n $model->FirstHalf=\"A\";\n else{\n $employeeModel->DeadOutCount+=1;\n $employeeModel->save();\n $model->Remark=$employeeModel->DeadOutCount.\" Late Count\";\n if(in_array(date('d'), $month_off)){\n if(!$leaveHistory=LeaveHistory::findOne(['EmployeeId'=>$employeeModel->id, 'LeaveType'=>4])){\n $leaveHistory =new LeaveHistory();\n $leaveHistory->id=$employeeModel->id;\n $leaveHistory->Type=4;\n $leaveHistory->LeaveCount=0;\n $leaveHistory->MaxLeave=0.5;\n }\n else{\n $leaveHistory->MaxLeave+=0.5;\n }\n $leaveHistory->save();\n $model->FirstHalf=\"WP\";\n }\n else\n $model->FirstHalf=\"P\";\n }\n }\n else{\n $model->FirstHalf=\"A\";\n }\n if($model->validate() && $model->save()){\n return $this->renderPartial('attendance-in-success', [\n 'employeeModel'=>$employeeModel,\n 'model'=>$model,\n ]);\n }\n else{\n print_r(\"Error Occured\");\n return;\n }\n }\n return AttendanceInController::actionOut();\n\n }\n else{\n print_r(\"<h1><p style='color:red;background-color:pink;border-color:#c3e6cb;'>No Such Device/Employee Registered</p></h1>\");\n return;\n }\n \n }",
"public function createHospital(){\n\n\t}",
"public function getCDateAttnDeptWise_new()\n {\n $orgid = isset($_REQUEST['refno']) ? $_REQUEST['refno'] : 0;\n $att = isset($_REQUEST['att']) ? $_REQUEST['att'] : 0;\n $date = isset($_REQUEST['date']) ? $_REQUEST['date'] : '';\n $dept = isset($_REQUEST['dept']) ? $_REQUEST['dept'] : '';\n $datafor = isset($_REQUEST['datafor']) ? $_REQUEST['datafor'] : '';\n $zone = getTimeZone($orgid);\n date_default_timezone_set($zone);\n $date =date('Y-m-d',strtotime($date));\n $time = date('H:i:s');\n $data = array();\n $cdate = date('Y-m-d');\n\t \n\t $dept_cond='';\n\t $dept_cond1 ='';\n\t if($dept!=0)\n\t {\n\t\t $dept_cond = ' and Dept_id='.$dept;\n\t\t $dept_cond1 = ' and Department='.$dept;\n\t }\n\t \n //today attendance\n\t\t if($datafor=='present'){\n\t\t$query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out FROM `AttendanceMaster` WHERE `AttendanceDate`=? \".$dept_cond.\" and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8 ) order by `name`\",\n\t\tarray($date,$orgid));\n $data['present'] = $query->result();\n\t\t\t\n\t\t\t }else if($datafor=='absent'){\n\t\t\t\t /*\n //---managing off (weekly and holiday)\n $dt = $date; \n // day of month : 1 sun 2 mon --\n $dayOfWeek = 1 + date('w', strtotime($dt));\n $weekOfMonth = weekOfMonth($dt);\n $week = '';\n $query = $this->db->query(\"SELECT `WeekOff` FROM `WeekOffMaster` WHERE `OrganizationId` =? AND `Day` = ?\", array(\n $orgid,\n $dayOfWeek\n ));\n if ($row = $query->result()) {\n $week = explode(\",\", $row[0]->WeekOff);\n }\n if ($week[$weekOfMonth - 1] == 1) {\n $data['absentees'] = '';\n } else {\n $query = $this->db->query(\"SELECT `DateFrom`, `DateTo` FROM `HolidayMaster` WHERE OrganizationId=? and (? between `DateFrom` and `DateTo`) \", array(\n $orgid,\n $dt\n ));\n if ($query->num_rows() > 0) {\n //-----managing off (weekly and holiday) - close \n $query = $this->db->query(\"SELECT CONCAT(FirstName,' ',LastName) as name,'-' as TimeIn,'-' as TimeOut ,'Absent' as status from EmployeeMaster where `OrganizationId` =$orgid and EmployeeMaster.archive=1 and EmployeeMaster.Id not in(select AttendanceMaster.`EmployeeId` from AttendanceMaster where `AttendanceDate`='$date' and `OrganizationId` =$orgid) and CAST('$time' as time) > (select TimeIn from ShiftMaster where ShiftMaster.Id=shift) order by `name`\", array(\n $orgid,\n $date,\n $orgid\n ));\n $data['absentees'] = $query->result();\n } \n }*/\n\t\t\t//////////abs\n\t\n\t\t\t\n\t\t\t\n\t\t\tif($date!=date('Y-m-d')){// for other deay's absentees\n\t\t\t\t$query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , '-' as `TimeOut` ,'-' as TimeIn FROM `AttendanceMaster` WHERE `AttendanceDate`=? and OrganizationId=? and (AttendanceStatus=2 or AttendanceStatus=6 or AttendanceStatus=7 ) \". $dept_cond .\" order by `name`\", array($date,$orgid));\n\t\t\t\t$this->db->close();\n\t\t\t\t$data['absent'] = $query->result();\n\t\t\t}else{ // for today's absentees\n\t\t\t\t$query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , '-' as `TimeOut` ,'-' as TimeIn FROM `AttendanceMaster` WHERE `AttendanceDate`=? and OrganizationId=? \nand AttendanceStatus in (2,6,7) \". $dept_cond .\" order by `name`\",array($date,$orgid));\n\t\t\t$temp=array();\n $temp = $query->result();\n\t\t\t\n\t\t\t$query = $this->db->query(\"SELECT CONCAT(FirstName,' ',LastName) as name, '-' as `TimeOut` ,'-' as TimeIn\n\t\t\t\t\t\tFROM `EmployeeMaster` \n\t\t\t\t\t\tWHERE `OrganizationId` =?\n\t\t\t\t\t\tAND ARCHIVE =1 \". $dept_cond1.\" \n\t\t\t\t\t\tAND Id NOT \n\t\t\t\t\t\tIN (\n\t\t\t\t\t\tSELECT EmployeeId\n\t\t\t\t\t\tFROM AttendanceMaster\n\t\t\t\t\t\tWHERE AttendanceDate = ?\n\t\t\t\t\t\tAND `OrganizationId` =?\n\t\t\t\t\t\t)\n\t\t\t\t\t\tAND (\n\t\t\t\t\t\tSELECT `TimeIn` \n\t\t\t\t\t\tFROM `ShiftMaster` \n\t\t\t\t\t\tWHERE `Id` = Shift\n\t\t\t\t\t\tAND TimeIn < ?\n\t\t\t\t\t\t)\",array($orgid,$date,$orgid,$time));\n\t\t\t\t\t\t$data['absent']= array_merge($temp,$query->result());\n\t\t\t}\n\t}else if($datafor=='latecomings'){\n\t//\techo \"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out FROM `AttendanceMaster` WHERE (time(TimeIn) > (select time(TimeIn) from ShiftMaster where ShiftMaster.Id=shiftId)) and `AttendanceDate`='$date' \".$dept_cond.\" and OrganizationId='$orgid' and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8 ) order by `name`\";\n //////// today_late\n $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out FROM `AttendanceMaster` WHERE (time(TimeIn) > (select time(TimeIn) from ShiftMaster where ShiftMaster.Id=shiftId)) and `AttendanceDate`=? \".$dept_cond.\" and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8 ) order by `name`\", array(\n $date,\n $orgid\n ));\n $data['lateComings'] = $query->result();\n\t}else if($datafor=='earlyleavings'){\t\t\n ////////today_early\n\t\t\n /* $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out FROM `AttendanceMaster` WHERE (time(TimeOut) < (select time(TimeOut) from ShiftMaster where ShiftMaster.Id=shiftId) and TimeOut!='00:00:00' ) and `AttendanceDate`=? \".$dept_cond.\" and OrganizationId=? and AttendanceStatus in (1,3,4,5,8) order by `name`\", array( $date, $orgid ));\n $data['earlyLeavings'] = $query->result(); */\n\t\t\t\n\t\t $query = $this->db->query(\"select Shift,Id , FirstName , LastName from EmployeeMaster where OrganizationId = $orgid and Id IN (select EmployeeId from AttendanceMaster where OrganizationId = $orgid and AttendanceDate='$date' and TimeIn != '00:00:00' $dept_cond ) AND is_Delete=0 order by FirstName\");\n\t\t $res = array();\n\t\t $cond = '';\n foreach ($query->result() as $row) {\n $ShiftId = $row->Shift;\n $EId = $row->Id;\n $query = $this->db->query(\"select TimeIn,TimeOut,shifttype from ShiftMaster where Id = $ShiftId\");\n if ($data123 = $query->row()) {\n $shiftout = $data123->TimeOut;\n $shiftout1 = $date. ' '.$data123->TimeOut;\n\t\t\t\tif($data123->shifttype==2)\n\t\t\t\t{\n\t\t\t\t\t$nextdate = date('Y-m-d',strtotime($date . \"+1 days\"));\n\t\t\t\t\t $shiftout1 = $nextdate.' '.$data123->TimeOut;\n\t\t\t\t}\n $shift = substr($data123->TimeIn, 0, 5) . ' - ' . substr($data123->TimeOut, 0, 5);\n $ct = date('H:i:s');\n \n if ($cdate == $date)\n $cond = \" and TimeOut !='00:00:00'\";\n $query333 = $this->db->query(\"select SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out from AttendanceMaster where EmployeeId =$EId and if(timeoutdate = '0000-00-00' , TimeOut < '$shiftout' , CONCAT(timeoutdate,' ' ,TimeOut) < '$shiftout1' ) and AttendanceDate='$date'\" . $cond);\n\t\t\t\t\t\n\t\t\t\t\t\n if ($row333 = $query333->row()) {\n $a = new DateTime($row333->TimeOut);\n $b = new DateTime($data123->TimeOut);\n $interval = $a->diff($b);\n $data['earlyby'] = $interval->format(\"%H:%I\");\n $data['timeout'] = substr($row333->TimeOut, 0, 5);\n $data['name'] = $row->FirstName . ' ' . $row->LastName;\n $data['shift'] = $shift;\n $data['TimeIn'] = $row333->TimeIn;\n $data['TimeOut'] = $row333->TimeOut;\n $data['CheckOutLoc'] = $row333->CheckOutLoc;\n $data['checkInLoc'] = $row333->checkInLoc;\n $data['latit_in'] = $row333->latit_in;\n $data['longi_in'] = $row333->longi_in;\n $data['latit_out'] = $row333->latit_out;\n $data['longi_out'] = $row333->longi_out;\n $data['status'] = $row333->status;\n $data['date'] = $date;\n $res[] = $data;\n }\n \n }\n }\n\t\t $data['earlyLeavings'] =\t $res; \n \t}\n echo json_encode($data, JSON_NUMERIC_CHECK);\n }",
"public function run()\n {\n statusdate::create([\n 'status'=>'Pentiente'\n ]);\n\n\n statusdate::create([\n 'status'=>'Confirmada'\n ]);\n\n \n\n \n }",
"public function generate_subject_code_attendance_report(){\n $this->crud->credibilityAuth(array('Administrator','Registrar','Faculty'));\n // get inputs\n $con = array('subject_code'=>$this->input->post('subject_code'),'batch_year'=> $this->input->post('batch_year_id'));\n $range1 = $this->input->post('date_range1');\n $range2 = $this->input->post('date_range2');\n // get necessary report data\n $students = $this->admin_model->getStudentsBasicInfo($con,'a');\n $attendance = $this->admin_model->getStudentAttendanceBySubjectCode($range1,$range2,$con['subject_code'],$con['batch_year']);\n $att_record = $this->admin_model->getStudentSubjectCodeAttendanceRecord($students,$range1,$range2,$con['subject_code'],$con['batch_year']);\n $att_dates = $this->crud->getDistinctValueOnAssociativeArray($attendance,'attendance_date');\n // generate report data in pdf or csv format from admin_report_model\n if((!empty($con['subject_code']) && !empty($range1) && !empty($range2)) && ($range1 <= $range2)){\n if(!empty($attendance) && !empty($att_record)){\n if($this->input->post('export_csv')){\n $this->admin_report_model->generateStudentAttendanceBySubjectCodeCsv($attendance,$att_record,$att_dates,$con,$range1,$range2);\n exit;\n }else if($this->input->post('export_pdf')){\n $this->admin_report_model->generateSubjectCodeAttendanceReportPdf($attendance,$con,$range1,$range2);\n }\n }\n $this->session->set_flashdata('warning', 'No reports found!.');\n }else{\n $this->session->set_flashdata('danger', 'Invalid input.');\n }\n redirect('attendance_report');\n }",
"function bbbWriteMeetings($meeting){\n global $DB;\n $future_id = $DB->get_field_sql(\"SELECT max(id) FROM {bbb_attendance}\")+1;\n $bbb_id = explode('-',$meeting->meetingID)[2];\n $bbb_course = explode('-',$meeting->meetingID)[1];\n \n if(empty($future_id)){\n $future_id = 0;\n }\n\n\n if(empty($bbb_id)){\n $bbb_id = 0;\n }\n \n if(empty($bbb_course)){\n $bbb_course = 0;\n }\n \n $sql = \"INSERT INTO {bbb_attendance} \n (id,courseid,bigbluebuttonid,timestamp)\n values (\".$future_id.\",\".$bbb_course.\",\".$bbb_id.\",\".time().\")\";\n \n $DB->execute($sql);\n echo sizeof($meeting->attendees->attendee);\n \n if(sizeof($meeting->attendees->attendee) > 1){\n $atendees = $meeting->attendees->attendee;\n //print_r($atendees);\n foreach ($atendees as $atendee){\n //print_r($atendee);\n if(empty($atendee->userID)){\n $atendee->userID = 0;\n \n }\n // echo \"<br>zapisuju\".$atendee->userID;\n $sql = \"INSERT INTO {bbb_attendance_users} \n (bbb_attendance_id,userid)\n values (\".$future_id.\",\".$atendee->userID.\")\";\n $DB->execute($sql); \n }\n }else{\n $atendees = $meeting->attendees;\n foreach ($atendees as $atendee){\n if(empty($atendee->userID)){\n $atendee->userID = 0;\n \n }\n //print_r($atendee);\n // echo \"<br>zapisuju\".$atendee->userID;\n $sql = \"INSERT INTO {bbb_attendance_users} \n (bbb_attendance_id,userid)\n values (\".$future_id.\",\".$atendee->userID.\")\";\n $DB->execute($sql); \n \n }\n }\n $state = 'wroten '.time().' - courseid:'.$bbb_course. '';\n return ($state);\n\n}",
"public function attend() {\n\n $attr = array(\n 'events' => $this->db->query(\"SELECT id, title\n FROM events\n WHERE DATE_FORMAT(event_date, '%Y-%m') = DATE_FORMAT(NOW(), '%Y-%m')\n ORDER BY event_date DESC\")->result(),\n 'department' => $this->db->query(\"SELECT CONCAT(IF(is_pt = 1, CONCAT('PT. ', REPLACE(name, 'PT. ', '')), REPLACE(name, 'PT. ', '')), ' (', team, ')') AS 'name',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t CONCAT('t', ansena_team.id) AS 'id'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t FROM ansena_team \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t LEFT JOIN ansena_department ON ansena_department.id = ansena_team.dept_id \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t UNION ALL \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t SELECT IF(is_pt = 1, CONCAT('PT. ', REPLACE(name, 'PT. ', '')), REPLACE(name, 'PT. ', '')) AS 'name',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t CONCAT('d', ansena_department.id) AS 'id'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t FROM ansena_department \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t LEFT OUTER JOIN ansena_team ON ansena_team.dept_id = ansena_department.id \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t WHERE ansena_team.id IS NULL\")->result()\n \n );\n \n $this->layout_lib->template_with_custom_navbar('analisa/navbar-sub-attend', 'analisa/attend', $attr);\n \n }",
"public function store(Request $request)\n {\n\n // Create an array of the student attendance history\n $marks = $request->roster;\n\n // Get the course and student names\n $section = Session::get('section');\n $course = Session::get('id');\n\n $students = DB::table('students')->where('course_code', $section)->orderBy('student_last_name')->get();\n\n // store in the database\n $record = new Record;\n\n $i = 0;\n\n foreach($marks as $mark) {\n\n $record = new Record;\n\n $record->course_code = $section;\n $record->student_last_name = $students[$i]->student_last_name;\n $record->student_first_name = $students[$i]->student_first_name;\n\n if($mark == 'absent')\n {\n $record->points = 1.0;\n }\n else if($mark == 'tardy')\n {\n $record->points = 0.5;\n }\n\n $record->save();\n\n $i++;\n\n };\n\n\n\n\n Session::flash('success', 'The attendance was stored!');\n\n //redirect to another page\n return redirect()->route('courses.index', $course);\n\n }",
"function attendance_add_status($status) {\n global $DB;\n if (empty($status->context)) {\n $status->context = context_system::instance();\n }\n\n if (!empty($status->acronym) && !empty($status->description)) {\n $status->deleted = 0;\n $status->visible = 1;\n $status->setunmarked = 0;\n $status->availablebeforesession = 0;\n\n $id = $DB->insert_record('attendance_statuses', $status);\n $status->id = $id;\n\n $event = \\mod_attendance\\event\\status_added::create(array(\n 'objectid' => $status->attendanceid,\n 'context' => $status->context,\n 'other' => array('acronym' => $status->acronym,\n 'description' => $status->description,\n 'grade' => $status->grade)));\n if (!empty($status->cm)) {\n $event->add_record_snapshot('course_modules', $status->cm);\n }\n $event->add_record_snapshot('attendance_statuses', $status);\n $event->trigger();\n return true;\n } else {\n return false;\n }\n}",
"public function getCDateAttnDesgWise_new()\n {\n $orgid = isset($_REQUEST['refno']) ? $_REQUEST['refno'] : 0;\n $att = isset($_REQUEST['att']) ? $_REQUEST['att'] : 0;\n $date = isset($_REQUEST['date']) ? $_REQUEST['date'] : '';\n $desg = isset($_REQUEST['desg']) ? $_REQUEST['desg'] : '';\n $datafor = isset($_REQUEST['datafor']) ? $_REQUEST['datafor'] : '';\n $zone = getTimeZone($orgid);\n date_default_timezone_set($zone);\n $date =date('Y-m-d',strtotime($date));\n $time = date('H:i:s');\n $data = array();\n $cdate = date('Y-m-d');\n\t \n\t $desg_cond='';\n\t $desg_cond1='';\n\t \n\t \n\t if($desg!=0)\n\t {\n\t\t $desg_cond=' and Desg_id='.$desg;\n\t\t $desg_cond1 =' and Designation='.$desg;\n\t }\n\t \n //today attendance\n\t\t if($datafor=='present'){\n\t\t$query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out FROM `AttendanceMaster` WHERE `AttendanceDate`=? \".$desg_cond.\" and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8 ) AND EmployeeId in (SELECT Id from EmployeeMaster where OrganizationId = $orgid AND Is_Delete = 0 ) order by `name`\",\n\t\tarray($date,$orgid));\n $data['present'] = $query->result();\n\t\t\t\n\t\t\t }else if($datafor=='absent'){/*\n //---managing off (weekly and holiday)\n $dt = $date; \n // day of month : 1 sun 2 mon --\n $dayOfWeek = 1 + date('w', strtotime($dt));\n $weekOfMonth = weekOfMonth($dt);\n $week = '';\n $query = $this->db->query(\"SELECT `WeekOff` FROM `WeekOffMaster` WHERE `OrganizationId` =? AND `Day` = ?\", array(\n $orgid,\n $dayOfWeek\n ));\n if ($row = $query->result()) {\n $week = explode(\",\", $row[0]->WeekOff);\n }\n if ($week[$weekOfMonth - 1] == 1) {\n $data['absentees'] = '';\n } else {\n $query = $this->db->query(\"SELECT `DateFrom`, `DateTo` FROM `HolidayMaster` WHERE OrganizationId=? and (? between `DateFrom` and `DateTo`) \", array(\n $orgid,\n $dt\n ));\n if ($query->num_rows() > 0) {\n //-----managing off (weekly and holiday) - close \n $query = $this->db->query(\"SELECT CONCAT(FirstName,' ',LastName) as name,'-' as TimeIn,'-' as TimeOut ,'Absent' as status from EmployeeMaster where `OrganizationId` =$orgid and EmployeeMaster.archive=1 and EmployeeMaster.Id not in(select AttendanceMaster.`EmployeeId` from AttendanceMaster where `AttendanceDate`='$date' and `OrganizationId` =$orgid) and CAST('$time' as time) > (select TimeIn from ShiftMaster where ShiftMaster.Id=shift) order by `name`\", array(\n $orgid,\n $date,\n $orgid\n ));\n $data['absentees'] = $query->result();\n } \n }*/\n\t\t\t//////////abs\n\t\n\t\t\t\n\t\t\t\n\t\t\tif($date!=date('Y-m-d')){// for other deay's absentees\n\t\t\t\t$query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , '-' as `TimeOut` ,'-' as TimeIn FROM `AttendanceMaster` WHERE `AttendanceDate`=? and OrganizationId=? and (AttendanceStatus=2 or AttendanceStatus=6 or AttendanceStatus=7 ) \".$desg_cond.\" order by `name`\", array($date,$orgid));\n\t\t\t\t$this->db->close();\n\t\t\t\t$data['absent'] = $query->result();\n\t\t\t}else{ // for today's absentees\n\t\t\t\t$query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , '-' as `TimeOut` ,'-' as TimeIn FROM `AttendanceMaster` WHERE `AttendanceDate`=? and OrganizationId=? \nand AttendanceStatus in (2,6,7) \".$desg_cond.\" order by `name`\",array($date,$orgid));\n\t\t\t$temp=array();\n $temp = $query->result();\n\t\t\t\n\t\t\t$query = $this->db->query(\"SELECT CONCAT(FirstName,' ',LastName) as name, '-' as `TimeOut` ,'-' as TimeIn\n\t\t\t\t\t\tFROM `EmployeeMaster` \n\t\t\t\t\t\tWHERE `OrganizationId` =?\n\t\t\t\t\t\tAND ARCHIVE =1 \".$desg_cond1.\"\n\t\t\t\t\t\tAND is_Delete = 0 AND Id NOT \n\t\t\t\t\t\tIN (\n\t\t\t\t\t\tSELECT EmployeeId\n\t\t\t\t\t\tFROM AttendanceMaster\n\t\t\t\t\t\tWHERE AttendanceDate = ?\n\t\t\t\t\t\tAND `OrganizationId` =?\n\t\t\t\t\t\t)\n\t\t\t\t\t\tAND (\n\t\t\t\t\t\tSELECT `TimeIn` \n\t\t\t\t\t\tFROM `ShiftMaster` \n\t\t\t\t\t\tWHERE `Id` = Shift\n\t\t\t\t\t\tAND TimeIn < ?\n\t\t\t\t\t\t)\",array($orgid,$date,$orgid,$time));\n\t\t\t\t\t\t$data['absent']= array_merge($temp,$query->result());\n\t\t\t}\n\t\t\t\n\t}else if($datafor=='latecomings'){\n\t//\techo \"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out FROM `AttendanceMaster` WHERE (time(TimeIn) > (select time(TimeIn) from ShiftMaster where ShiftMaster.Id=shiftId)) and `AttendanceDate`='$date' \".$desg_cond.\" and OrganizationId='$orgid' and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8 ) order by `name`\";\n //////// today_late\n $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out FROM `AttendanceMaster` WHERE (time(TimeIn) > (select time(TimeIn) from ShiftMaster where ShiftMaster.Id=shiftId)) and `AttendanceDate`=? \".$desg_cond.\" and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8 ) order by `name`\", array(\n $date,\n $orgid\n ));\n $data['lateComings'] = $query->result();\n\t}else if($datafor=='earlyleavings'){\t\t\n ////////today_early\n /*$query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out FROM `AttendanceMaster` WHERE (time(TimeOut) < (select time(TimeOut) from ShiftMaster where ShiftMaster.Id=shiftId) and TimeOut!='00:00:00' ) and `AttendanceDate`=? \".$desg_cond.\" and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8 ) order by `name`\", array( $date, $orgid ));\n $data['earlyLeavings'] = $query->result();*/\n\t\t\t\n\t\t $query = $this->db->query(\"select Shift,Id , FirstName , LastName from EmployeeMaster where OrganizationId = $orgid and Id IN (select EmployeeId from AttendanceMaster where OrganizationId = $orgid and AttendanceDate='$date' and TimeIn != '00:00:00' $desg_cond ) AND is_Delete=0 order by FirstName\");\n\t\t $res = array() ;\n\t\t $cond = '';\n foreach ($query->result() as $row) {\n $ShiftId = $row->Shift;\n $EId = $row->Id;\n $query = $this->db->query(\"select TimeIn,TimeOut,shifttype from ShiftMaster where Id = $ShiftId\");\n if ($data123 = $query->row()) {\n $shiftout = $data123->TimeOut;\n $shiftout1 = $date. ' '.$data123->TimeOut;\n\t\t\t\tif($data123->shifttype==2)\n\t\t\t\t{\n\t\t\t\t\t$nextdate = date('Y-m-d',strtotime($date . \"+1 days\"));\n\t\t\t\t\t $shiftout1 = $nextdate.' '.$data123->TimeOut;\n\t\t\t\t}\n $shift = substr($data123->TimeIn, 0, 5) . ' - ' . substr($data123->TimeOut, 0, 5);\n $ct = date('H:i:s');\n \n if ($cdate == $date)\n $cond = \" and TimeOut !='00:00:00'\";\n $query333 = $this->db->query(\"select SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out from AttendanceMaster where EmployeeId =$EId and if(timeoutdate = '0000-00-00' , TimeOut < '$shiftout' , CONCAT(timeoutdate,' ' ,TimeOut) < '$shiftout1' ) and AttendanceDate='$date'\" . $cond);\n\t\t\t\t\t\n\t\t\t\t\t\n if ($row333 = $query333->row()) {\n $a = new DateTime($row333->TimeOut);\n $b = new DateTime($data123->TimeOut);\n $interval = $a->diff($b);\n $data['earlyby'] = $interval->format(\"%H:%I\");\n $data['timeout'] = substr($row333->TimeOut, 0, 5);\n $data['name'] = $row->FirstName . ' ' . $row->LastName;\n $data['shift'] = $shift;\n $data['TimeIn'] = $row333->TimeIn;\n $data['TimeOut'] = $row333->TimeOut;\n $data['CheckOutLoc'] = $row333->CheckOutLoc;\n $data['checkInLoc'] = $row333->checkInLoc;\n $data['latit_in'] = $row333->latit_in;\n $data['longi_in'] = $row333->longi_in;\n $data['latit_out'] = $row333->latit_out;\n $data['longi_out'] = $row333->longi_out;\n $data['status'] = $row333->status;\n $data['date'] = $date;\n $res[] = $data;\n }\n \n }\n }\n\t\t $data['earlyLeavings'] =\t $res; \n\t\t\t\n\t}\t\t\n echo json_encode($data, JSON_NUMERIC_CHECK);\n \n }",
"public function addEvent($validity,$type,$saveType){\r\n\r\n $eventName = Input::get('eventName');\r\n $eventDate = Input::get('eventDate');\r\n $eventTime = Input::get('eventTime');\r\n $eventDescription = Input::get('eventDescription');\r\n $currentUserEmail = Sentinel::getUser()[\"email\"];\r\n\r\n $toID='';\r\n if($saveType=='Request'){\r\n $studentDetails = Student::where('email',$currentUserEmail)->get();\r\n $studentId = $studentDetails[0]->id;\r\n\r\n $studentName = $studentDetails[0]->name;\r\n $projectDetails = Project::where('studentId',$studentId)->get();\r\n $toID = $projectDetails[0]->supervisorId;\r\n $projectName = $projectDetails[0]->title;\r\n $SupervisorId = $projectDetails[0]->supervisorId;\r\n\r\n $eventName= $eventName.\" about \". $projectName. \" project\" .\" with \". $studentName ;\r\n $from = $studentDetails[0]->regId;\r\n $email = PanelMember::where('id',$SupervisorId)->pluck('email');\r\n\r\n\r\n Notifynder::category('SupervisorMeetingRequestForSupervisor')\r\n ->from($from.'')\r\n ->to($email)\r\n ->url('')\r\n ->send();\r\n\r\n }else{\r\n $toID = PanelMember::where('email',$currentUserEmail)->pluck('id');\r\n $from = $toID;\r\n }\r\n\r\n $entry = new event_time_line;\r\n $entry->memberID = $toID;\r\n $entry->eventType = $type;\r\n $entry->eventName = $eventName;\r\n $entry->eventDate = $eventDate;\r\n $entry->eventTime = $eventTime;\r\n $entry->eventDescription = $eventDescription;\r\n $entry->validity = $validity;\r\n $entry->from = $from;\r\n if($entry->save()){\r\n return $eventName;\r\n }\r\n\r\n\r\n }",
"public function run()\n {\n DB::table('attendances')->insert([\n \t'id_pet'\t\t\t=> 3,\n \t'date_attendance'\t=> '2020-10-01',\n \t'description' \t\t=> 'Consulta Periódica',\n \t'created_at' \t=> now(),\n 'updated_at' \t=> now()\n ]);\n\n DB::table('attendances')->insert([\n \t'id_pet'\t\t\t=> 1,\n \t'date_attendance'\t=> '2020-10-03',\n \t'description' \t\t=> 'Vacina 123',\n \t'created_at' \t=> now(),\n 'updated_at' \t=> now()\n ]);\n\n DB::table('attendances')->insert([\n \t'id_pet'\t\t\t=> 2,\n \t'date_attendance'\t=> '2020-10-05',\n \t'description'\t\t=> 'Retirada de Pontos',\n \t'created_at' \t=> now(),\n 'updated_at' \t=> now()\n ]);\n }",
"public function store($internal_training_id)\n\t{\n\t\tdate_default_timezone_set('Asia/Manila');\n\t\t$currentTimeDate = date(\"Y-m-d H:i:s\"); \n\t\t$currentTime = time(\"H:i:s\"); \n\t\t$currentDate = date(\"Y-m-d\");\n\n\t\t//excel file must contain 2 columns (employee_number & time)\n\t\tif(Input::get('isIndividual') == 0) { //IF UPLOAD OPTION IS SELECTED\n\t\t\tif(file_exists(Input::file('file'))) {\n\t\t\t\tExcel::load(Input::file('file'), function($reader) {\n\t\t\t\t\t$results = $reader->get();\n\n\t\t\t\t\t//save the contents to the it_attendance table\n\t\t\t\t\tfor ($i = 0; $i < count($results) ; $i++) { \n\t\t\t\t\t\t$it_attendances = new Participant_Attendance;\n\n\t\t\t\t\t\t$exists = IT_Participant::where('employee_id', '=', $results[i]->employee_number)->where('internal_training_id', '=', $internal_training_id)->get();\n\t\t\t\t\t\t//$exists = Employee::where('employee_number', '=', $results[i]->employee_number)->where('isActive', '=', true);\n\t\t\t\t\t\tif($exists != null)\t\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$it_attendances->date = $currentDate; //Check this please\n\t\t\t\t\t\t\tif($results[$i]->time != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$it_attendances->time = $results[$i]->time;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$it_attendances->time = $currentTime; //Check this please\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$it_attendances->it_participant_id = $exists->id;\n\t\t\t\t\t\t\t//$it_attendances->save();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$emp_valid = Employee::where('employee_number', '=', $results[i]->employee_number)->where('isActive', '=', true)->get();\n\t\t\t\t\t\t\tif($emp_valid != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//WRITE TO IT_PARTICIPANTS\n\t\t\t\t\t\t\t\t$it_participant = new IT_Participant;\n\t\t\t\t\t\t\t\t$it_participant->employee_id = Employee::where('employee_number', '=', $results[i]->employee_number)->where('isActive', '=', 1)->pluck('id');\n\n\t\t\t\t\t\t\t\t/**$emp_desig_temp = Employee_Designation::where('employee_id', '=', Employee::where('employee_number', '=', $results[i]->employee_number)->pluck('id'))->first();\n\t\t\t\t\t\t\t\t$it_participant->employee_designation_id = Employee_Designation::where('')*/\n\n\t\t\t\t\t\t\t\t$it_participant->internal_training_id = $internal_training_id;\n\t\t\t\t\t\t\t\t$it_participant->save();\n\n\t\t\t\t\t\t\t\t//WRITE TO PARTICIPANT_ATTENDANCES\n\t\t\t\t\t\t\t\t$exists2 = IT_Participant::where('employee_id', '=', $results[i]->employee_number)->where('internal_training_id', '=', $internal_training_id)->get();\n\t\t\t\t\t\t\t\t$it_attendances->date = $currentDate; //Check this please\n\t\t\t\t\t\t\t\tif($results[$i]->time != null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$it_attendances->time = $results[$i]->time;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$it_attendances->time = $currentTime; //Check this please\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$it_attendances->it_participant_id = $exists2->id;\n\t\t\t\t\t\t\t\t$it_attendances->save();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\treturn Redirect::to('/internal_trainings/'.$internal_training_id.'/participants')\n\t\t\t\t\t\t\t\t\t->withErrors('Employee number doesn\\'t exist');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$it_attendances->save();\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\techo 'No file selected';\n\t\t\t}\n\t\t}\n\t\telse if(Input::get('isIndividual') == 1) { //IF INDIVIDUAL OPTION IS SELECTED\n\t\t\tif(Input::get('individual_id') != \"\") {\n\t\t\t\t$individual_id = Input::get('individual_id');\n\t\t\t\t$it_attendances = new Participant_Attendance;\n\t\t\t\t$exists = IT_Participant::where('employee_id', '=', $individual_id)->where('internal_training_id', '=', $internal_training_id)->get();\n\t\t\t\tif($exists != null)\t\n\t\t\t\t{\n\t\t\t\t\t$it_attendances->date = $currentDate; //Check this please\n\t\t\t\t\t$it_attendances->time = $currentTime; //Check this please\n\n\t\t\t\t\t$it_attendances->it_participant_id = $exists->id;\n\t\t\t\t\t//$it_attendances->save();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$emp_valid = Employee::where('employee_number', '=', $individual_id)->where('isActive', '=', true)->get();\n\t\t\t\t\tif($emp_valid != null)\n\t\t\t\t\t{\n\t\t\t\t\t\t//WRITE TO IT_PARTICIPANTS\n\t\t\t\t\t\t$it_participant = new IT_Participant;\n\t\t\t\t\t\t$it_participant->employee_id = Employee::where('employee_number', '=', $individual_id)->where('isActive', '=', 1)->pluck('id');\n\t\t\t\t\t\t\n\t\t\t\t\t\t/**$emp_desig_temp = Employee_Designation::where('employee_id', '=', Employee::where('employee_number', '=', $results[i]->employee_number)->pluck('id'))->first();\n\t\t\t\t\t\t$it_participant->employee_designation_id = Employee_Designation::where('')*/\n\t\t\t\t\t\t\n\t\t\t\t\t\t$it_participant->internal_training_id = $internal_training_id;\n\t\t\t\t\t\t$it_participant->save();\n\t\t\t\t\t\t\n\t\t\t\t\t\t//WRITE TO PARTICIPANT_ATTENDANCES\n\t\t\t\t\t\t$exists2 = IT_Participant::where('employee_id', '=', $individual_id)->where('internal_training_id', '=', $internal_training_id)->get();\n\t\t\t\t\t\t$it_attendances->date = $currentDate; //Check this please\n\t\t\t\t\t\t$it_attendances->time = $currentTime; //Check this please\n\t\t\t\t\t\t\n\t\t\t\t\t\t$it_attendances->it_participant_id = $exists2->id;\n\t\t\t\t\t\t//$it_attendances->save();\n\t\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\treturn Redirect::to('/internal_trainings/'.$internal_training_id.'/participants')\n\t\t\t\t\t\t\t->withErrors('Employee number doesn\\'t exist');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$it_attendances->save();\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn Redirect::to('/internal_trainings/'.$internal_training_id.'/participants')\n\t\t\t\t\t->withErrors('Please input an employee number');\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn Redirect::to('/internal_trainings/'.$internal_training_id.'/participants')\n\t\t\t\t->withErrors('Select if individual or batch');\n\t\t}\n\t\treturn Redirect::to('/internal_trainings/'.$internal_training_id.'/participants');\n\t}",
"public function store(Request $request)\n {\n $this->validate($request, [\n 'class' => 'required',\n 'section' => 'required',\n 'date' => 'required|date|unique:student_attendances',\n 'students' => 'required|array'\n ]);\n $attendance = StudentAttendance::create(['session_id' => active_session()->id, 'academic_class_id' => $request->class, 'section_id' => $request->section, 'date' => $request->date]);\n // Store attandance data\n for ($i = 0; $i < count($request->students); $i++) {\n StudentAttendanceData::create([\n 'student_attendance_id' => $attendance->id,\n 'user_id' => $request->students[$i]['id'],\n 'status' => $request->students[$i]['status'] ?? false,\n 'remark' => $request->students[$i]['remark'] ?? null,\n ]);\n }\n return Redirect::route('admin.student-attendances.index')->with('success', 'Attendances Data Successfully Saved.');\n }",
"private function createMeeting($data)\n {\n $user = Auth::user(); //get authenticated user\n $meeting = new \\App\\Meeting();\n $meeting->course_id = $data->course_id;\n $meeting->instructorMeeting = $data->instructorMeeting;\n $meeting->start_time = $data->start_time;\n $meeting->end_time = $data->end_time;\n $meeting->save();\n //attach authenticated user and instructor XOR student to the meeting\n $meeting->users()->attach($user);\n if($data->instructorMeeting){\n $meeting->users()->attach($data->instructor);\n }else{\n $meeting->users()->attach($data->student);\n }\n }",
"public function storeFcAttendence(Request $request)\n\t{\n\t\t$user = user_master::where('email', $request->fc)->get();\n\t\t$checkAttendence = attendence::where('date', date(\"Y-m-d\"))\n\t\t\t->where('s_e_id', $request->s_e_id)\n\t\t\t->get();\n\t\tif (count($checkAttendence) == 0) {\n\t\t\t$storedAtt = new attendence([\n\t\t\t\t's_e_id' => $request->s_e_id,\n\t\t\t\t'u_id' => $user[0]->u_id,\n\t\t\t\t'present' => json_encode('[' . $request->present . ']'),\n\t\t\t\t'date' => date(\"Y-m-d\")\n\t\t\t]);\n\t\t\tif ($storedAtt->save()) {\n\t\t\t\treturn back()->with('success', 'Attendence added Successfully');\n\t\t\t} else {\n\t\t\t\treturn back()->with('error', 'Attendence not Added');\n\t\t\t}\n\t\t} else {\n\t\t\treturn back()->with('error', \"Today's Attendence Already Taken\");\n\t\t}\n\t}",
"public function update_attendance(){ \n\t\t$this->loadModel('HrAttendance');\n\t\tforeach($this->request->data as $key => $data){\n\t\t\t$count = count($data['date']);\n\t\t\t// iterate all the values\n\t\t\tfor($i = 0; $i < $count; $i++){ \n\t\t\t\t// for waive off requests\n\t\t\t\tif($data['chk'][$i] == 'on'){\n\t\t\t\t\t$status = 'A';\n\t\t\t\t\t$waive = '1';\n\t\t\t\t}else{\n\t\t\t\t\t$status = 'R';\n\t\t\t\t\t$waive = NULL;\n\t\t\t\t}\n\t\t\t\t$month = $data['date'][$i];\n\t\t\t\t$user_att_data = $this->HrAttendance->find('all', array('fields' => array('HrAttendance.id'), \n\t\t\t\t'conditions' => array(\"in_time like\" => $data['date'][$i].'%', \n\t\t\t\t'app_users_id' => $this->request->data['HrAttWaive']['user_id']), 'limit' => '1'));\n\t\t\t\t// format array\n\t\t\t\t$ar_data = array('modified_date' => $this->Functions->get_current_date(), 'att_waive' => $waive, 'waive_msg' => $data['remark'][$i]);\n\t\t\t\t$fieldList = array('att_waive', 'modified_date', 'waive_msg');\n\t\t\t\t$this->HrAttendance->id = $user_att_data[0]['HrAttendance']['id'];\n\t\t\t\tif($this->HrAttendance->id != ''){\n\t\t\t\t\tif($this->HrAttendance->save($ar_data, true, $fieldList)){\n\t\t\t\t\t\t// save in the waive off request table\n\t\t\t\t\t\t$ar_data = array('id' => $data['id'][$i], 'status' => $status, 'approve_date' => $this->Functions->get_current_date(),\n\t\t\t\t\t\t'remark' => $data['remark'][$i], 'approve_by' => $this->Session->read('USER.Login.id'));\n\t\t\t\t\t\t$fieldList = array('approve_date', 'remark', 'approve_by', 'id','status');\n\t\t\t\t\t\t$this->HrAttWaive->save($ar_data, true, $fieldList);\n\t\t\t\t\t\t$this->Session->setFlash('<button type=\"button\" class=\"close\" data-dismiss=\"alert\">×</button>Waive-off request approved successfully', 'default', array('class' => 'alert alert-success'));\t\n\t\t\t\t\t\t$req_status = 'success';\n\t\t\t\t\t}else{ \n\t\t\t\t\t\t$this->Session->setFlash('<button type=\"button\" class=\"close\" data-dismiss=\"alert\">×</button>Problem in updating the attendance, pls contact admin..', 'default', array('class' => 'alert alert-error'));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// send mail to user\n\t\tif($req_status == 'success'){\n\t\t\t$this->notify_user($this->request->data['HrAttWaive']['user_id'], date('M, Y', strtotime($month)));\n\t\t}else{\n\t\t\t$this->Session->setFlash('<button type=\"button\" class=\"close\" data-dismiss=\"alert\">×</button>Problem in updating the attendance, pls contact admin..', 'default', array('class' => 'alert alert-error'));\n\t\t}\n\t\t$this->redirect('/hrattwaive/');\t\n\t\t\n\t}",
"public function create()\n\t{\t\n\t\t\n\t\t// load the create form (app/views/fbf_time/create.blade.php)\n\t\t$this->layout->content = View::make('fbf_time.create')\n;\n\t}",
"public function actionCreate()\n {\n \n $modelDay= Days::find()->all();\n $modelClasses= Classes::find()->all();\n $model = new Schedule();\n //Ako je primljen post zahtev obradjujemo primljene podatke\n if($model->load(Yii::$app->request->post()) ) {\n //Prvo proveravamo koliko imamo dana u nedelji i za svaki dan obradjujemo podatke\n for($j=0;$j<count($modelDay);$j++){ \n $day = $modelDay[$j]['title'];\n \n //Brojimo casove po danu i u zavisnosti od casa dodeljujemo vrednosti\n for($i=0;$i<count($modelClasses);$i++){\n $subject_name_attribute = $day.$i;\n $model->setIsNewRecord(true);\n $model->id = null;\n //Posto brojac petlje krece od nule, day_id mora da ima vrednost brojaca +1\n $model->days_id = $j+1;\n //Posto brojac petlje krece od nule, classes_id mora da ima vrednost brojaca +1\n $model->classes_id =$i+1;\n //Ako nije definisan predmet za dati cas, predmet za taj cas ima vrednost null.\n //Ako je definisan predmet za dati cas on se poziva preko name atributa i dodeljuje mu se vrednosst\n if(!isset($_POST[$subject_name_attribute])){\n $model->subject_id = null;\n }else{\n $model->subject_id = $_POST[$subject_name_attribute];\n }\n $model->save();\n }\n }\n Yii::$app->session->setFlash('success', \"Schedule created successfully.\"); \n return $this->redirect(['index']);\n }\n return $this->render('create', [\n 'model' => $model,\n 'modelDay'=>$modelDay,\n 'modelClasses'=>$modelClasses\n ]);\n }",
"public function store(Request $request)\n {\n // return $request->all();\n $date = $request->att_date;\n $att_date = DB::table('attandances')->where('att_date', $date)->first();\n if($att_date == null){\n foreach($request->user_id as $id){\n $data[] = [\n \"user_id\" => $id,\n \"attandance\" => $request->attandance[$id],\n \"att_date\" => $request->att_date,\n \"att_year\" => $request->att_year,\n \"month\" => $request->month,\n ];\n }\n $att = DB::table('attandances')->insert($data);\n return redirect()->back()->with('message','Attadanse Added Successfully');\n\n }else{\n return redirect()->back()->with('error','Attadanse Already Taken');\n\n }\n }",
"function create()\n\t{\n\n\t\t$kStudent = $this->uri->segment(3);\n\t\t$this->load->model(\"student_model\",\"student\");\n\t\t$this->load->model(\"teacher_model\",\"teacher\");\n\t\t$this->load->model(\"menu_model\",\"menu\");\n\t\t$data[\"ranks\"] = get_keyed_pairs($this->menu->get_pairs(\"report_rank\"),array(\"value\",\"label\"));\n\t\t$data[\"kTeach\"] = $this->session->userdata(\"userID\");\n\t\t//if the individual is not a teacher, show a dropdown list of teachers on whose behalf.\n\t\t//Include the author as an option\n\t\t$data[\"is_teacher\"] = TRUE;\n\t\tif($this->session->userdata('dbRole') != 2){\n\t\t\t$this->load->model(\"teacher_model\");\n\t\t\t$teachers = $this->teacher_model->get_teacher_pairs();\n\t\t\t$data['teachers'] = get_keyed_pairs($teachers, array('kTeach', 'teacher'),NULL,NULL,array('value'=>\"Myself\",'name'=>$data[\"kTeach\"]));\n\t\t\t$data[\"is_teacher\"] = FALSE;\n\t\t}\n\t\t$data[\"kStudent\"] = $kStudent;\n\t\t$report = $this->student->get($kStudent,\"stuFirst,stuLast,stuNickname,teacher.teachFirst as advisorFirst,teacher.teachLast as advisorLast,teacher.kTeach as kAdvisor\",TRUE);\n\t\t$data[\"student\"] = format_name($report->stuFirst,$report->stuLast,$report->stuNickname);\n\t\t$data[\"advisor\"] = format_name($report->advisorFirst,$report->advisorLast);\n\t\t$data[\"report\"] = $report;\n\t\t$data[\"methods\"] = array(\"In Person\",\"Over the Phone\",\"Via Email\");\n\n\t\t$data[\"statuses\"] = get_keyed_pairs($this->menu->get_pairs(\"report_status\"),array(\"value\",\"label\"));\n\t\t$data[\"categories\"] = get_keyed_pairs($this->menu->get_pairs(\"report_category\"),array(\"value\",\"label\"));\n\t\t$data[\"methods\"] = $this->menu->get_pairs(\"report_contact_method\");\n\t\t$data[\"action\"] = \"insert\";\n\t\t$data[\"title\"] = sprintf(\"Adding an %s for %s\", STUDENT_REPORT, $data[\"student\"]);\n\t\t$data[\"target\"] = \"report/edit\";\n\t\t$this->_view($data);\n\t\t\n\t}",
"public function actionCreateappointment(): bool\n {\n $request = Yii::$app->request;\n \n if ($request->isPost) { \n $appointment = new Appointments;\n $appointment->client_id = $request->post('user_id');\n $appointment->service_id = $request->post('service_id');\n $appointment->date = substr(str_replace('T', ' ', $request->post('date')), 0, 18);\n $appointment->status = Appointments::STATUS_ACTIVE;\n\n return ($appointment->save()) ? true : false;\n }\n \n return false;\n }",
"public function createAction(){\n $type = $this->session->get('auth')['type'];\n $id = $this->session->get('auth')['id'];\n if (!$this->request->isPost()){ return $this->dispatcher->forward(array(\n \"controller\" => \"education\",\"action\" => \"index\" ));\n }\n if($type == 1 || $type == 2){\n $u = $_POST['user'];\n if(!empty($u)){ $iduser = $u['iduser'];}\n else{ $iduser = $this->request->getPost(\"iduser\");}\n }else{ $iduser = $id; }\n $educationlog= serialize($_POST);\n $education = new Education();\n $education->iduser = $iduser;\n $education->title = $this->request->getPost(\"title\");\n $education->description = $this->request->getPost(\"description\");\n $education->from_date = $this->request->getPost(\"from_date\");\n $education->to_date = $this->request->getPost(\"to_date\");\n $education->college = $this->request->getPost(\"college\");\n $education->grade = $this->request->getPost(\"grade\");\n $education->stream = $this->request->getPost(\"stream\");\n $education->created_by = $this->request->getPost(\"created_by\");\n $education->updated_by = $this->request->getPost(\"updated_by\");\n $education->created_on = $this->request->getPost(\"created_on\");\n $education->updated_on = $this->request->getPost(\"updated_on\");\n if (!$education->save()) {\n DataLogger::education('error', \"\\n\\n education not create \\n {$educationlog} \\n\\n\");\n foreach ($education->getMessages() as $message) {\n $this->flash->error($message);}\n $this->view->disable();\n if($type == 1 || $type ==2){\n return $this->response->redirect(\"user/edit/\".$iduser);\n }else{ return $this->response->redirect(\"education/new\");\n } \n }else{\n $this->flash->success(\"Education created successfully\"); \n $this->view->disable();\n if($type == 1 || $type ==2){\n $id = $education->iduser; \n return $this->response->redirect($this->request->getHTTPReferer());\n //return $this->response->redirect(\"user/edit/\".$iduser); \n }else{ return $this->response->redirect(\"education/index\");\n }\n } \n }",
"public function AutomaticCreateBasedAdmin(){\n $resp = employees::find(1);\n if(!$resp){\n employees::create([\n 'emp_name'=>'admin',\n 'emp_password'=>'test',\n 'emp_address'=>'abc',\n 'emp_phone'=>'0000000000',\n 'emp_dob'=> new DateTime(),\n 'pos_id'=>1,\n ]);\n }else{\n $resp->pos_id = 1;\n $resp->save();\n }\n }",
"function create($student,$year,$month,$datevalue)\n {\n if ( $this->cek($student,$year) == FALSE ){ $this->edit($student,$year,$month,$datevalue); }\n else { $this->new_add($student,$year,$month,$datevalue); }\n }",
"public function create()\n {\n $userInfo= Auth::user()->initials; \n $now = Carbon::now()->settings([\n 'locale' => 'fr_FR',\n 'timezone' => 'Europe/Paris',\n ]);\n $weekDays = array(\n $now->startOfWeek()->addDays(7)->isoFormat('ddd D.MM'),\n $now->startOfWeek()->addDay()->isoFormat('ddd D.MM'),\n $now->startOfWeek()->addDays(2)->isoFormat('ddd D.MM'),\n $now->startOfWeek()->addDays(3)->isoFormat('ddd D.MM'),\n $now->startOfWeek()->addDays(4)->isoFormat('ddd D.MM'),\n );\n $now2 = Carbon::now()->settings([\n 'locale' => 'fr_FR',\n 'timezone' => 'Europe/Paris',\n ]);\n $weekDates = array(\n $now2->startOfWeek()->addDays(7)->format('Y-m-d H:i:s'),\n $now2->startOfWeek()->addDay()->format('Y-m-d H:i:s'),\n $now2->startOfWeek()->addDays(2)->format('Y-m-d H:i:s'),\n $now2->startOfWeek()->addDays(3)->format('Y-m-d H:i:s'),\n $now2->startOfWeek()->addDays(4)->format('Y-m-d H:i:s'),\n );\n\n $now3 = Carbon::now()->settings([\n 'locale' => 'fr_FR',\n 'timezone' => 'Europe/Paris',\n ]);\n $weekNum = $now3->addDays(7)->weekOfYear;\n $planning = Planning::where('weeknumber', $weekNum)->where('user_id', Auth::user()->id)->get();\n $startWeek= $now3->startOfWeek()->isoFormat('D.MM.YYYY');\n $endweek=$now->startOfWeek()->addDays(4)->isoFormat('DD.MM.YYYY');\n return view('am.create', ['userInfo'=>$userInfo, \n 'weekDays' => $weekDays, \n 'weekDates'=>$weekDates,\n 'weeknum'=>$weekNum,\n 'startWeek'=>$startWeek, \n 'endWeek'=>$endweek,\n 'planning' => $planning]);\n }",
"public function actionCreate()\n {\n $model = new Patient();\n $model->StatusId = DictionaryDetail::PATIENT_STATUS_NEW;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n if (!empty($model->interestPoint)) {\n foreach ($model->interestPoint as $interestPoint) {\n $modelInterestPoint = new InterestPointXPatient();\n $modelInterestPoint->PatientId = $model->Id;\n $modelInterestPoint->InterestPointId = $interestPoint;\n $modelInterestPoint->save();\n }\n }\n return $this->redirect(['view', 'id' => $model->Id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"function AfterAdd(&$values,&$keys,$inline,&$pageObject)\n{\n\n\t\tglobal $conn;\n\n$attend_id=$values['attend_id'];\n\n//select shecdule ID from timetable\n$sql_at= \"SELECT scheduleID,courseID,date,(end_time-start_time) AS hour FROM schedule_timetable WHERE id='$attend_id'\";\n$query_at=db_query($sql_at,$conn);\n$row_at=db_fetch_array($query_at);\n\n$scheduleID=$row_at['scheduleID'];\n\n//select related schedule id from schedule\n$sql_at2= \"SELECT programID,batchID,groupID FROM schedule WHERE scheduleID='$scheduleID'\";\n$query_at2=db_query($sql_at2,$conn);\n$row_at2=db_fetch_array($query_at2);\n\n$program=$row_at2['programID'];\n$batch=$row_at2['batchID'];\n$class=$row_at2['groupID'];\n\n//update program , batch, class to student_attendance table\n$date=$row_at['date'];\n$hour=$row_at['hour'];\n$course=$row_at['courseID'];\n$id=$keys['id'];\n$sql_up= \"Update student_attendance set programID ='$program', batchID='$batch',class='$class',course='$course',date='$date',hour='$hour' where id='$id'\";\n$query_up=db_exec($sql_up,$conn);\n\n//query the total hour for this module\n$sql_th= \"SELECT total_hour FROM program_course WHERE programID='$program' && CourseID=$course\";\n$query_th=db_query($sql_th,$conn);\n$row_th=db_fetch_array($query_th);\n\n$totalhour=$row_th['total_hour'];\n//the percentage wight of absentee ( $hour/$totalhour)\n$weight_absent=($hour/$totalhour*100);\n\n//query current attendance status for this student, program , module\n$studentID=$values['StudentID'];\n$sql_at3=\"SELECT Attendance FROM student_course WHERE StudentID=$studentID AND programID=$program AND CourseID=$course AND Exam_Remark IS NULL\";\n$query_at3=db_query($sql_at3,$conn);\n$row_at3=db_fetch_array($query_at3);\n\n$current_attendance=$row_at3['Attendance'];\n//update student_course attendance\n\n$net_attendance=$current_attendance-$weight_absent;\n\n$sql_ups= \"Update student_course SET Attendance='$net_attendance' where StudentID='$studentID' && programID='$program' && CourseID=$course AND Exam_Remark IS NULL\";\n$query_ups=db_exec($sql_ups,$conn);\n;\t\t\n}",
"public function store(Request $request)\n {\n $APIKey = '2bbbd0e93e2a249b20a19534c940d9ddec08ba48';\n $info = \\Illuminate\\Support\\Facades\\Input::all();\n // dd($request->all());\n $class_id = $info['class_id'];\n $date = $info['date'];\n $attendance_type_id = $info['attendance_type'];\n // dd($info);\n $attendance_type_name = DmcSetup::find( $attendance_type_id )->report_type;\n parse_str($info['data'], $input);\n\n foreach($input['student_id'] as $i => $student_id) {\n StudentsAttendance::create([\n 'class_id' => $class_id,\n 'class_name' => StudentsClass::find( $class_id )->class_name,\n 'date' => $date,\n 'student_id' => $student_id,\n 'first_name' => $input['first_name'][$i],\n 'last_name' => $input['last_name'][$i],\n 'attendance' => $input['attendance'][$i],\n 'year' => date('Y', strtotime($date)),\n 'attendance_type' => $attendance_type_name,\n 'attendance_type_id' => $attendance_type_id,\n ]);\n }\n\n $input = $request->all();\n parse_str(urldecode($input['data']), $arr);\n foreach ($arr['attendance'] as $j => $attendance) {\n if ($attendance == \"Absent\") {\n $student = DB::table('students')->where('student_id', '=', $arr['student_id'][$j])->get();\n $receiver = $student[0]->guardian_phone_no;\n $sender = 'Hasnain khan';\n $textmessage = \"Dear \" . $student[0]->guardian_name.' Your child '. $student[0]->first_name.' '.$student[0]->last_name\n .' is Absent today in the class';\n\n $url = \"http://api.smilesn.com/sendsms?hash=\" . $APIKey . \"&receivenum=\" . $receiver . \"&sendernum=\" . urlencode($sender) . \"&textmessage=\" . urlencode($textmessage);\n $ch = curl_init();\n $timeout = 30;\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);\n $response = curl_exec($ch);\n curl_close($ch);\n\n Sms::create(['message' => $textmessage,\n 'sent_by' => ucfirst(Auth::user()->username),\n 'student_name' => $student[0]->first_name.' '.$student[0]->last_name,\n 'guardian_phone_no' => $student[0]->guardian_phone_no,\n 'student_id' => $student[0]->student_id, 'class'=>$student[0]->students_class_id]);\n }\n }\n\n return url(config('student_promotion_url.connections.student_attendance_url'));\n\n }",
"public function create()\n {\n if (Sentry::check()) {\n // Find active user and set default variables to null\n $user = Sentry::getUser();\n $groups = null;\n $schoolName = null;\n\n // Permission checks\n if ($user->hasAnyAccess(['school', 'event'])) {\n\n // If user is a superAdmin, show all possible groups to add an event to\n if ($user->hasAccess(['school'])) {\n $groups = Group::where('school_id', '<>', '')->get();\n $opening = '';\n } else {\n // If the user isn't a superAdmin, only show the groups to which the user has permissions\n $user->load('school.groups.appointments');\n $groups = $user->school->groups;\n $opening = $user->school->opening;\n }\n\n // Transform recieved objectList (from database) into array to send with view\n $smartgroup = [];\n foreach ($groups as $group) {\n $smartgroup[$group->id] = $group->name;\n }\n\n // Show the form where users can add appointments\n return View::make('calendar.create')->with('groups', $smartgroup)->with('opening', $opening);\n\n } else {\n // If no permissions, redirect the user to the calendar index page\n return Redirect::route('calendar.index');\n }\n } else {\n return Redirect::route('landing');\n }\n }",
"public function store(Request $request)\n {\n $data = $request->all();\n $seperateTime = explode(' - ', $request->checkTime);\n $data['check_in'] = $seperateTime[0];\n $data['check_out'] = $seperateTime[1];\n unset($data['checkTime']);\n $attendance = new Attendance();\n $attendance->create($data);\n\n $notification = array(\n 'title' => 'Sucessful',\n 'message' =>\n 'The attendance ' .\n $attendance['id'] .\n ' has been created sucessfull',\n 'alert-type' => 'success'\n );\n return redirect()\n ->route('attendances.index')\n ->with($notification);\n }",
"public function create()\n {\n<<<<<<< HEAD\n $student = Students::all();\n return view('attendance.create',\n [\n 'student' => $student\n ]);\n=======\n //\n>>>>>>> 8d9ec8ba7c2c9b69eac32a358538dc7914468874\n }",
"public function create()\n\t{\n\t\t//\n\t\treturn view('checkup_shedules.create');\n\t}",
"public function edit($int_proj_no)\n {\t\n \n if(session()->get('user')->int_status==1)\n {\n $date=date('Y-m-d');\n \n $attendance=tbl_intern_attend::where('att_intern',session()->get('user')->int_no)->where('att_date',$date)->first();\n \n $interns=tbl_intern_attend::where('att_intern',session()->get('user')->int_no)->first();\n }\n elseif(session()->get('user')->int_status==-1){\n $date=date('Y-m-d');\n \n $attendance=tbl_intern_attend::where('att_intern',session()->get('user')->int_no)->where('att_date',$date)->first();\n \n $interns=tbl_intern_attend::where('att_intern',session()->get('user')->int_no)->first();\n }else{\n \n $date=date('Y-m-d');\n $attendance=tbl_intern_attend::where('att_intern',session()->get('user')->int_no)->where('att_date',$date)->first();\n \n $begin = new DateTime(session()->get('user')->int_join_date);\n $end = new DateTime($date);\n $daterange = new DatePeriod($begin, new DateInterval('P1D'), $end);\n \n foreach($daterange as $d)\n { \n if($d>$date)\n {\n $att=tbl_intern_attend::where('att_intern',session()->get('user')->int_no)->where('att_date',$d->format('Y-m-d'))->first();\n if($att==null)\n {\n $add=tbl_intern_attend::create([\n // 'att_marked_on'=>$request->input('att_marked_on'),\n 'att_intern'=>session()->get('user')->int_no,\n 'att_date'=>$d->format('Y-m-d'),\n 'att_marked_on'=>$d->format('Y-m-d'),\n 'att_in'=>\"00:00:00\",\n 'att_out'=>\"00:00:00\",\n 'att_holiday'=>\"1\",\n ]);\n }\n }\n else\n {\n break;\n }\n }\n }\n \n\n \n \n \n \n \n \n \n \n \n \n \n return view('discussionboard',compact('project','int_proj_no','attendance'));\n\n }",
"public function generate_voc_program_attendance_report(){\n $this->crud->credibilityAuth(array('Administrator','Registrar'));\n // get inputs\n $condition= array('vocational_program'=>$this->input->post('vocational_program'),'batch_year'=> $this->input->post('batch_year_id'));\n $range1 = $this->input->post('date_range1');\n $range2 = $this->input->post('date_range2');\n // get necessary report data\n $voc_program= $this->vocational_program_model->getVocationalPrograms('s',array('voc_program_id'=>$condition['vocational_program']));\n $students = $this->admin_model->getStudentsBasicInfo($condition,'a');\n $attendance = $this->admin_model->getStudentAttendanceByVocationalProgram($students,$range1,$range2,$condition['batch_year']);\n $att_record = $this->admin_model->getStudentDailyAttendanceRecord($students,$range1,$range2,$condition['batch_year']);\n $att_dates = $this->crud->getDistinctValueOnAssociativeArray($attendance,'attendance_date');\n // generate report data in pdf or csv format from admin_report_model\n if((!empty($condition['vocational_program']) && !empty($range1) && !empty($range2)) && ($range1 <= $range2)){\n if(!empty($attendance)){\n if($this->input->post('export_csv')){\n $this->admin_report_model->generateStudentAttendanceByVocationalProgramCsv($attendance,$att_record,$att_dates,$voc_program,$range1,$range2);\n exit;\n }else if($this->input->post('export_pdf')){\n $this->admin_report_model->generateVocProgramAttendanceReportPdf($attendance,$voc_program,$range1,$range2);\n }\n }\n $this->session->set_flashdata('warning', 'No reports found!.');\n redirect('attendance_report');\n }\n $this->session->set_flashdata('danger', 'Invalid input.');\n redirect('attendance_report');\n \n }",
"public function create()\n {\n $this->resetFields();\n //DAN MEMBUKA AREA\n $this->openUser();\n }"
] | [
"0.7010989",
"0.679887",
"0.6583544",
"0.65722966",
"0.6540496",
"0.653836",
"0.653384",
"0.65201986",
"0.64918983",
"0.64174944",
"0.6417152",
"0.6416023",
"0.63674814",
"0.63487476",
"0.6340577",
"0.63238573",
"0.62925875",
"0.6267811",
"0.6243443",
"0.6238801",
"0.62239254",
"0.62168235",
"0.61827105",
"0.6172308",
"0.6169862",
"0.6169428",
"0.6161783",
"0.61529",
"0.6140005",
"0.61231405",
"0.6121073",
"0.6103506",
"0.6096284",
"0.6093241",
"0.60834706",
"0.6068166",
"0.6053264",
"0.6047934",
"0.60477823",
"0.60283464",
"0.60177773",
"0.6007477",
"0.59983855",
"0.5998226",
"0.5994311",
"0.5990106",
"0.5987805",
"0.597697",
"0.5976003",
"0.5971035",
"0.5969914",
"0.59634125",
"0.5947354",
"0.5933414",
"0.5907014",
"0.59065515",
"0.5889772",
"0.5884327",
"0.5881538",
"0.5846883",
"0.5841153",
"0.58410186",
"0.5827774",
"0.58272594",
"0.5826964",
"0.5824934",
"0.5800558",
"0.57999855",
"0.5798765",
"0.5795259",
"0.5791118",
"0.5790952",
"0.5790213",
"0.5781249",
"0.5771376",
"0.5769497",
"0.57607293",
"0.57598585",
"0.57493496",
"0.5744829",
"0.57431376",
"0.5739672",
"0.57368314",
"0.5730126",
"0.57186854",
"0.57100296",
"0.5698282",
"0.56970066",
"0.5692266",
"0.5691195",
"0.5686766",
"0.56848514",
"0.5681229",
"0.5677435",
"0.5673704",
"0.5673643",
"0.5668572",
"0.5663358",
"0.56629086",
"0.56601816"
] | 0.6078178 | 35 |
/ fetch the class and section type / fetch the attendance report | public function report($typeId = null, $reportDate = null, $numOfDays = null, $classId = null, $sectionId = null)
{
$year = substr($reportDate, 0, 4);
$month = substr($reportDate, 5, 7);
$classData = $this->model_classes->fetchClassData($classId);
$sectionData = $this->model_section->fetchSectionByClassSection($classId, $sectionId);
// student
$div = '<div class="well">
<center>
<h4> Ngành học: '.$classData['class_name'].'<br> Lớp học : '.$sectionData['section_name'].'<h4>
<h4> Năm : '.$year.' - Month :'.$month.'<h4>
<small>
1 : Tiết 1-2 ( 7h00-8h45) <br />
2 : Tiết 3-4 (9h-10h45) <br />
3 : Tiết 5-6 (13h - 14h45)<br />
4 : Tiết 7-8 (15h-16h45)<br />
5 : Tiết 9-10 (17h00 - 18h45)<br />
</small>
</center>
</div>
<div style="overflow-x:auto;">
<table class="table table-bordered" style="width:100%;">
<tbody style="width:100%;">
<tr>
<td style="width:25%;">Môn học</td>
';
// loop for days
for($i = 1; $i <= $numOfDays; $i++) {
$div .= '
<td style="width:10%;">'.$i.'</td>';
} // /for
$div .= '</tr>';
$subjectInfo = $this->model_subject->fetchSubjectDataByClass($classId);
foreach ($subjectInfo as $key => $value) {
$subjectName = $value['name'];
$div .= '
<tr>
<td>'.$subjectName.'</td>';
for($i = 1; $i <= $numOfDays; $i++) {
// $attendanceData = $this->model_attendance->getAttendance($i, $reportDate, $value['student_id'], $typeId, $classId, $sectionId);
$scheduleData = $this->model_schedule->getAttendance($i, $reportDate, $value['subject_id'], $sectionId);
$div .= '<td>';
foreach ($scheduleData as $scheduleKey => $scheduleValue) {
if($scheduleValue['schedule_type'] == 1) {
// Có mặt
$scheduleStatus = '<span class="label label-success">1</span>';
} else if($scheduleValue['schedule_type'] == 2) {
// Vắng
$scheduleStatus = '<span class="label label-primary">2</span>';
} else if($scheduleValue['schedule_type'] == 3) {
// Trễ
$scheduleStatus = '<span class="label label-warning">3</span>';
} else if($scheduleValue['schedule_type'] == 4) {
// Trễ
$scheduleStatus = '<span class="label label-warning">4</span>';
}
else
{
// Không xác định
$scheduleStatus = '<span class="label label-danger">5</span>';
}
$div .= $scheduleStatus;
}
$div .= '
</td>';
} // /for
$div .= '</tr>';
} // /foreach
$div .= '</tbody>
</table>
<div>';
echo $div;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function get_student_class_attendance($class_id)\n\t\t{\n\t\t\t$array = array(\"attendance.status\"=>2,\"attendance.student_id !=\"=>0,\"attendance.attandence_class\"=>$class_id);\n\t\t\t$this->db->select('*');\n\t\t\t$this->db->from('attendance');\n\t\t\t$this->db->join('student', 'student.student_id = attendance.student_id');\n\t\t\t$this->db->where($array);\n\t\t\t$query = $this->db->get();\n\t\t\t$attendance =$query->result();\n\t\t\tforeach($attendance as $row){\n\t\t\t\techo '<tr class=\"gradeA\"><td>' .date(\"d-M-Y\", strtotime($row->date)) . '</td>\n\t\t\t\t<td>'. $row->class_id.'</td>\t\n\t\t\t\t<td>'. $row->name.'</td>\n\t\t\t\t<td>'. $row->description.'</td>\n\t\t\t\t</tr>';\n\t\t\t} \n\t\t}",
"public function retrieveStudentAttendance($class_id, $class_type, $class_arm, $session_id, $term_id, $student_id){\n\t\t\t$query = $this->connection()->prepare(\"SELECT * FROM attendance WHERE student_id='$student_id' AND clazz_id='$class_id' AND clazz_type_id='$class_type' AND class_arm_id='$class_arm' AND session_id='$session_id' AND term_id='$term_id'\");\n\t\t\t$query->execute();\n\t\t\treturn $query->fetch();\n\t\t}",
"public function dispAttendence ($class_id,$stud_id)\n\t{\n\t\t\t$year_id = $this->getYear();\n\n\t\t\t$total_days_query = \"SELECT * FROM `edu_attendence` WHERE ac_year='$year_id' AND class_id='$class_id'\";\n\t\t\t$total_days_res = $this->db->query($total_days_query);\n\t\t\t$total_days_result= $total_days_res->result();\n\t\t\t$total_days_count = $total_days_res->num_rows();\n\n\t\t\tif($total_days_res->num_rows()==0){\n\t\t\t\t $response = array(\"status\" => \"error\", \"msg\" => \"Attendance not yet taken!\");\n\t\t\t}else{\n\t\t\t // $total_days = $total_days_count/2;\n\t\t\t $total_days = $total_days_count;\n\n\t\t\t foreach($total_days_result as $rows){\n \t\t\t\t$at_id = $rows->at_id;\n\t\t\t }\n\n \t\t\t$absent_query = \"SELECT * FROM `edu_attendance_history` WHERE class_id='$class_id' AND student_id='$stud_id' AND a_status = 'A' \";\n \t\t\t$absent_res = $this->db->query($absent_query);\n \t\t\t$absent_result= $absent_res->result();\n \t\t\t$absent_count = $absent_res->num_rows();\n\n \t\t\tif($absent_res->num_rows()>0){\n \t\t\t\t//$absent_days = $absent_count/2;\n \t\t\t\t$absent_days = $absent_count;\n \t\t\t} else {\n \t\t\t $absent_days = 0;\n \t\t\t}\n\n \t\t\t$leave_query = \"SELECT * FROM `edu_attendance_history` WHERE class_id='$class_id' AND student_id='$stud_id' AND a_status = 'L' \";\n \t\t\t$leave_res = $this->db->query($leave_query);\n \t\t\t$leave_result= $leave_res->result();\n \t\t\t$leave_count = $leave_res->num_rows();\n\n \t\t\tif($leave_res->num_rows()>0){\n \t\t\t\t //$leave_days = $leave_count/2;\n \t\t\t\t $leave_days = $leave_count;\n \t\t\t} else {\n \t\t\t $leave_days = 0;\n \t\t\t}\n\n \t\t\t$od_query = \"SELECT * FROM `edu_attendance_history` WHERE class_id='$class_id' AND student_id='$stud_id' AND a_status = 'OD' \";\n \t\t\t$od_res = $this->db->query($od_query);\n \t\t\t$od_result= $od_res->result();\n \t\t\t$od_count = $od_res->num_rows();\n\n \t\t\tif($od_res->num_rows()>0){\n \t\t\t\t //$od_days = $od_count/2;\n \t\t\t\t $od_days = $od_count;\n \t\t\t} else {\n \t\t\t $od_days = 0;\n \t\t\t}\n\t\t\t $total_leave = $absent_days+$leave_days+$od_days;\n\t\t\t $present_days = $total_days-$total_leave;\n\n\t\t\t \t$attendence_history = array(\"total_working_days\"=>$total_days, \"absent_days\"=>$absent_days, \"leave_days\"=>$leave_days, \"od_days\"=>$od_days, \"present_days\"=>$present_days);\n\n \t\t\t$attend_query = \"SELECT\n COUNT(B.abs_date) AS abs_count,\n A.at_id,\n B.student_id,\n B.abs_date,\n B.a_status\n FROM\n edu_attendence A,\n edu_attendance_history B\n WHERE\n A.ac_year = '$year_id' AND B.class_id = '$class_id' AND B.student_id = '$stud_id' AND B.attend_id = A.at_id\n GROUP BY\n B.abs_date\";\n \t\t\t$attend_res = $this->db->query($attend_query);\n \t\t\t$attend_result= $attend_res->result();\n \t\t\t$attend_count = $attend_res->num_rows();\n\n \t\t\t if($attend_res->num_rows()==0){\n \t\t\t\t $response = array(\"status\" => \"success\", \"msg\" => \"View Attendence\",\"attendenceHistory\"=>$attendence_history, \"attendenceDetails\"=>$attend_result);\n \t\t\t}else{\n \t\t\t\t$response = array(\"status\" => \"success\", \"msg\" => \"View Attendence\",\"attendenceHistory\"=>$attendence_history, \"attendenceDetails\"=>$attend_result);\n \t\t\t}\n\t\t\t}\n\t\t\treturn $response;\n\t}",
"public function getAttendances_yes()\n {\n $orgid = isset($_REQUEST['refno']) ? $_REQUEST['refno'] : 0;\n $empid = isset($_REQUEST['empid']) ? $_REQUEST['empid'] : 0;\n $att = isset($_REQUEST['att']) ? $_REQUEST['att'] : 0;\n $datafor = isset($_REQUEST['datafor']) ? $_REQUEST['datafor'] : 0;\n //$zone = getTimeZone($orgid);\n if($empid!=0)\n \t$zone = getEmpTimeZone($empid,$orgid); // to set the timezone by employee country.\n else\n \t$zone = getTimeZone($orgid);\n date_default_timezone_set($zone);\n $date =date('Y-m-d', strtotime(' -1 day'));\n $time = date('H:i:s');\n $data = array();\n\t if($datafor=='present'){\n //today attendance\n\t\t$query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out FROM `AttendanceMaster` WHERE `AttendanceDate`=? and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8 ) AND EmployeeId in (SELECT Id from EmployeeMaster where OrganizationId = $orgid AND Is_Delete = 0) order by `name`\", array(\n\t\t\t\t$date,\t$orgid ));\n $data['present'] = $query->result();\n\t }else if($datafor=='absent'){\n\t\t\t$query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , '-' as `TimeOut` ,'-' as TimeIn FROM `AttendanceMaster` WHERE `AttendanceDate`=? and OrganizationId=? and (AttendanceStatus=2 or AttendanceStatus=6 or AttendanceStatus=7 ) AND EmployeeId in (SELECT Id from EmployeeMaster where OrganizationId = $orgid AND Is_Delete = 0) order by `name`\", array($date,$orgid));\n $this->db->close();\n $data['absent'] = $query->result(); \n\t}else if($datafor=='latecomings'){\t\t\n //////// today_late\n $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out FROM `AttendanceMaster` WHERE (time(TimeIn) > (select time(TimeIn) from ShiftMaster where ShiftMaster.Id=shiftId)) and `AttendanceDate`=? and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8) AND EmployeeId in (SELECT Id from EmployeeMaster where OrganizationId = $orgid AND Is_Delete = 0) order by `name`\", array(\n $date,\n $orgid\n ));\n $data['lateComings'] = $query->result();\n\t}else if($datafor=='earlyleavings'){\t\n ////////today_early\n /* $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out FROM `AttendanceMaster` WHERE (time(TimeOut) < (select time(TimeOut) from ShiftMaster where ShiftMaster.Id=shiftId) and TimeOut!='00:00:00' ) and `AttendanceDate`=? and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8) AND EmployeeId in (SELECT Id from EmployeeMaster where OrganizationId = $orgid AND Is_Delete = 0) order by `name`\", array( $date,$orgid ));\n $data['earlyLeavings'] = $query->result();*/\n\t\t$query = $this->db->query(\"select Shift,Id , FirstName , LastName from EmployeeMaster where OrganizationId = $orgid and Id IN (select EmployeeId from AttendanceMaster where OrganizationId = $orgid and AttendanceDate='$date' and TimeIn != '00:00:00' ) AND is_Delete=0 order by FirstName\");\n\t\t $res = array();\n\t\t $cond = '';\n foreach ($query->result() as $row) {\n $ShiftId = $row->Shift;\n $EId = $row->Id;\n $query = $this->db->query(\"select TimeIn,TimeOut,shifttype from ShiftMaster where Id = $ShiftId\");\n if ($data123 = $query->row()) {\n $shiftout = $data123->TimeOut;\n $shiftout1 = $date. ' '.$data123->TimeOut;\n\t\t\t\tif($data123->shifttype==2)\n\t\t\t\t{\n\t\t\t\t\t$nextdate = date('Y-m-d',strtotime($date . \"+1 days\"));\n\t\t\t\t\t $shiftout1 = $nextdate.' '.$data123->TimeOut;\n\t\t\t\t}\n $shift = substr($data123->TimeIn, 0, 5) . ' - ' . substr($data123->TimeOut, 0, 5);\n $ct = date('H:i:s');\n \n \n $query333 = $this->db->query(\"select SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out from AttendanceMaster where EmployeeId =$EId and if(timeoutdate = '0000-00-00' , TimeOut < '$shiftout' , CONCAT(timeoutdate,' ' ,TimeOut) < '$shiftout1' ) and AttendanceDate='$date' and TimeOut !='00:00:00' \");\n\t\t\t\t\t\n\t\t\t\t\t\n if ($row333 = $query333->row()) {\n $a = new DateTime($row333->TimeOut);\n $b = new DateTime($data123->TimeOut);\n $interval = $a->diff($b);\n $data1['earlyby'] = $interval->format(\"%H:%I\");\n $data1['timeout'] = substr($row333->TimeOut, 0, 5);\n $data1['name'] = $row->FirstName . ' ' . $row->LastName;\n $data1['shift'] = $shift;\n $data1['status'] = $row333->status;\n $data1['TimeIn'] = $row333->TimeIn;\n $data1['TimeOut'] = $row333->TimeOut;\n $data1['CheckOutLoc'] = $row333->CheckOutLoc;\n $data1['checkInLoc'] = $row333->checkInLoc;\n $data1['EntryImage'] = $row333->EntryImage;\n $data1['ExitImage'] = $row333->ExitImage;\n $data1['latit_in'] = $row333->latit_in;\n $data1['longi_in'] = $row333->longi_in;\n $data1['latit_out'] = $row333->latit_out;\n $data1['longi_out'] = $row333->longi_out;\n $data1['date'] = $date;\n $res[] = $data1;\n }\n \n }\n }\n $data['earlyLeavings'] =$res;\n\t}\n echo json_encode($data, JSON_NUMERIC_CHECK);\n \n }",
"public function get_attendance() {\n\t\t$view_type = ($this->uri->segment(3) === NULL)? 'daily': $this->uri->segment(3);\n\n\t\t$data['view_header'] = $this->get_sched_header($view_type);\n\t\t$data['view_type'] = $view_type;\n\t\t$data['type'] = ($this->type === NULL)? 'active': $this->type;\n\n\t\t$result = $this->Member_Model->get_attendance($view_type);\n\t\t$data['members'] = $result;\n\n\t\t$this->breadcrumbs->set(['Members Attendance' => 'members/attendance']);\n\n\t\t$this->render('attendance', $data);\n\t}",
"function professor_class_routine_attendance($professor_id, $date) {\n return $this->db->select()\n ->from('class_routine')\n ->join('subject_manager', 'subject_manager.sm_id = class_routine.SubjectID')\n ->join('degree', 'degree.d_id = class_routine.DepartmentID')\n ->join('course', 'course.course_id = class_routine.BranchID')\n ->join('semester', 'semester.s_id = class_routine.SemesterID')\n ->join('class', 'class.class_id = class_routine.ClassID')\n ->where(array(\n //'class_routine.DepartmentID' => $where['department_id'],\n 'DATE_FORMAT(class_routine.Start, \"%Y-%m-%d\") <= ' => date('Y-m-d', strtotime($date)),\n //'class_routine.BranchID' => $where['branch_id'],\n // 'class_routine.BatchID' => $where['batch_id'],\n //'class_routine.SemesterID' => $where['semester_id'],\n //'class_routine.ClassID' => $where['class_id'],\n 'class_routine.ProfessorID' => $professor_id\n ))->order_by('class_routine.ClassRoutineId', 'ASC')->get()->result();\n }",
"function getAttendanceLecturer($classid,$crdate){\r\ninclude 'dbConnect.php';\r\n$sql= 'SELECT Student.SID, Classroom.ClassID, Course.CourseID, Student.SName, Course.CourseName, Classroom.Location, Classroom.StartTime, Classroom.EndTime, CRDate, Attendance_Status \r\nFROM Attendance\r\nINNER JOIN Student ON Attendance.SID = Student.SID\r\nINNER JOIN Classroom ON Attendance.ClassID = Classroom.ClassID\r\nINNER JOIN Course ON Attendance.CourseID = Course.CourseID\r\nWHERE Classroom.ClassID = '.$classid.'\r\nAND CRDate = \"'.$crdate.'\";';\r\n$result = mysqli_query($conn, $sql);\r\n$table = 'Attendance';\r\n$link = exportToCsv($sql,$table,$conn);\r\nif(isset($result)){\r\n\tif(mysqli_num_rows($result) > 0){\r\n\t\t$view = '<div class=\"alert alert-warning\">\r\n\t\t\t\t\t\t<strong>Warning!</strong> You have recorded this classroom before. You can only edit this attendance!\r\n\t\t\t\t</div>\r\n\t\t\t\t<form method=\"post\" action=\"attendance.php\">\r\n\t\t\t\t<table id=\"attendanceTable\" class=\"table table-striped custab\">\r\n\t\t\t\t<thead>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<th>Student Name</th>\r\n\t\t\t\t\t\t<th>Course Name</th>\r\n\t\t\t\t\t\t<th>Location</th>\r\n\t\t\t\t\t\t<th>Start Time</th>\r\n\t\t\t\t\t\t<th>End Time</th>\r\n\t\t\t\t\t\t<th>Class Date</th>\r\n\t\t\t\t\t\t<th>Attendance</th>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</thead><tbody>';\r\n\t\t$count = 0;\r\n\t\twhile($row = mysqli_fetch_assoc($result))\r\n\t\t{\r\n\t\t$dt = strtotime($row['CRDate']);\r\n\t\t$day = date(\"l\", $dt);\r\n\t\t\r\n\t\t$view.= '<tr>\r\n <td>'.$row['SName'].'</td>\r\n <td>'.$row['CourseName'].'</td>\r\n\t\t\t\t<td>'.$row['Location'].'</td>\r\n\t\t\t\t<td>'.$row['StartTime'].'</td>\r\n\t\t\t\t<td>'.$row['EndTime'].'</td>\r\n\t\t\t\t<td>'.$row['CRDate'].' / ('.$day.')</td>\r\n\t\t\t\t<td>\r\n\t\t\t\t<div class=\"switch-field\">';\r\n\t\tif($row['Attendance_Status'] == 'Present'){\r\n\t\t\t$view.= '<input type=\"radio\" id=\"switch_left'.$count.'\" name=\"tableRow['.$count.'][attendance]\" value=\"Present\" checked/>';\r\n\t\t}else{\r\n\t\t\t$view.= '<input type=\"radio\" id=\"switch_left'.$count.'\" name=\"tableRow['.$count.'][attendance]\" value=\"Present\" />';\r\n\t\t}\r\n\t\t$view.=\t'<label for=\"switch_left'.$count.'\">Present</label>';\r\n\t\tif($row['Attendance_Status'] == 'Absent'){\r\n\t\t\t$view.=\t'<input type=\"radio\" id=\"switch_right'.$count.'\" name=\"tableRow['.$count.'][attendance]\" value=\"Absent\" checked/>';\r\n\t\t}else{\r\n\t\t\t$view.=\t'<input type=\"radio\" id=\"switch_right'.$count.'\" name=\"tableRow['.$count.'][attendance]\" value=\"Absent\" />';\r\n\t\t}\r\n\t\t$view.=\t'<label for=\"switch_right'.$count.'\">Absent</label>\r\n\t\t\t\t</div>\r\n\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<div><input type=\"hidden\" name=\"tableRow['.$count.'][sid]\" value=\"'.$row[\"SID\"].'\"/></div>\r\n\t\t\t\t<div><input type=\"hidden\" name=\"tableRow['.$count.'][classid]\" value=\"'.$row[\"ClassID\"].'\"/></div>\r\n\t\t\t\t<div><input type=\"hidden\" name=\"tableRow['.$count.'][courseid]\" value=\"'.$row[\"CourseID\"].'\"/></div>\r\n\t\t\t\t<div><input type=\"hidden\" name=\"tableRow['.$count.'][crdate]\" value=\"'.$row[\"CRDate\"].'\"/></div>';\r\n\t\t$count++;\r\n\t\t}\r\n\t\t$view.= '</tbody></table>\r\n\t\t\t\t<input class=\"btn btn-warning\" type=\"submit\" name=\"edit\" value=\"Edit Attendance\"/>\r\n\t\t\t\t</form>\r\n\t\t\t\t</br>\r\n\t\t\t\t<a class=\"btn btn-success\" href='.$link.'>Export to Excel</a>\r\n\t\t\t\t';\r\n\t\t\t\t\r\n\t}else{\r\n\t\t$view = '<div class=\"alert alert-danger\">\r\n\t\t\t\t No student register this class yet!\r\n\t\t\t\t</div>';\r\n\t}\r\n}else{\r\n\t$view = 'Database Connection Error.';\r\n}\r\n\treturn $view;\r\n}",
"public function getEventClassSections();",
"function get_course_class_starttime($data_arr) {\n \n if (!empty($data_arr)) \n {\n $arr = array();\n foreach ($data_arr as $row) \n {\n if($row->lock_status==1){\n $loked=\"<strong>Class Attendance :</strong> Locked(\".$row->lock_status.\")\";\n }else{\n $loked=\"\";\n }\n $arr[$row->class_id] = \"<strong>Course Name:</strong> \" . $row->crse_name . \" (\" . $row->course_id \n . \") <strong>Class Name</strong>: \" . $row->class_name . \" (\" . $row->class_id \n . \") <strong>Start Date: </strong>\" . date('d/m/Y (h:i A)', strtotime($row->class_start_datetime)) \n . \" ---- <strong>End Date:</strong> \" . date('d/m/Y (h:i A)', strtotime($row->class_end_datetime)).\"<br /> \".$loked;\n \n \n }\n return $arr;\n }\n}",
"public function attendance(){\n\t\t\t$data['title'] = 'Students Attendences Course name '; \n\n\t\t\t$course_code = $_GET['course_code'];\n\t\t\t\n\t\t\t$ids = $this->register_model->ids($course_code);\n\n\t\t\t$course_id;\n\t\t\tforeach ($ids as $id) {\n\t\t\t\t\t$course_id = $id['id'];\n\t\t\t\t\t$data['course_name'] = $id['course_name'];\n\t\t\t}\t\t\t\n\t\t\t$data['courses'] = $this->register_model->get_attendance($course_id);\n\n\t\t\t$this->load->view('admin/header1');\n\t\t\t$this->load->view('admin/attendance', $data);\n\t\t\t$this->load->view('admin/footer');\n\t\t}",
"public function get_attendance($id,$start,$end){\n \t $id = \"CB0\".$id;\n $attendance = AttendanceData::whereEmployee_id($id)\n ->whereDate('attendance_date','>=', $start) \n ->whereDate('attendance_date','<=', $end) \n ->orderBy('attendance_date','ASC')\n ->get(['attendance_date','status']); \n\t\t\t\n\t\t\t\n\t\t\t// print_r($attendance); \n\t\t\t// die; \n\t\t\t\n\t\t\tif(empty($attendance)){\n\t\t\t\t$data['present'] = 0;\n\t\t\t\t$data['leaves'] = 0;\n\t\t\t\t$data['half_day'] = 0;\n\t\t\t\t$data['ui'] = 0;\n\t\t\t\t$data['sandwich_leave'] = 0;\n\t\t\t\treturn $data;\n\t\t\t}\n\t\t\t\n $attendance = $attendance->toArray(); \n \n $startdate = strtotime($start); \n $enddate = strtotime('+' . (date('t',$startdate) - 1). ' days',$startdate);\n $currentdate = $startdate;\n $p = $ab = $ui = $hd = $sw = 0; \n $sw_status = false;\n $holydays = ['Sun','Sat'];\n while ($currentdate <= $enddate){\n $day = date('D', $currentdate);\n $date = date('Y-m-d', $currentdate);\n if(in_array($day, $holydays)){ \n ++$p;\n }else{ \n $found_key = array_search(date('Y-m-d', $currentdate), array_column($attendance, 'attendance_date'));\n if(!empty($found_key) || $found_key===0){ \n $status = $attendance[$found_key]['status'];\n\n if($day==\"Fri\" && ($status==\"AB\" || $status==\"UI\"))\n $sw_status =true; \n switch($status){\n case 'P': \n ++$p;\n break;\n case 'AB':\n ++$ab;\n break;\n case 'UI':\n ++$ui;\n break;\n case 'HD':\n ++$hd;\n $p = ($p + 0.5); \n break;\n }\n if($day==\"Mon\" && ($sw_status==true) && ($status==\"AB\" || $status==\"UI\")){\n ++$sw; \n $sw_status =false; \n $p = $p-2;\n $ab = $ab+2; \n }\n }else{\n $check_holyday = Holiday::whereDate('date',$date)->first(); \n if(!empty($check_holyday))\n ++$p; \n }\n }\n $currentdate = strtotime('+1 day', $currentdate);\n } \n //echo \"<br> $id P => $p HD => $hd AB => $ab UI => $ui \";\n $data['present'] = $p;\n $data['leaves'] = $ab;\n $data['half_day'] = $hd;\n $data['ui'] = $ui;\n $data['sandwich_leave'] = $sw;\n\t\t\treturn $data;\n }",
"public function getStudentSessionReport($student_id, $class_id, $class_type, $class_arm_id, $session_id){\n\t\t\t$query = $this->connection()->prepare(\"SELECT * FROM student_session_final_report WHERE student_id='$student_id' AND clazz_id ='$class_id' AND clazz_type_id='$class_type' AND class_arm_id='$class_arm_id' AND sessionz_id='$session_id'\"); \n \t\t$query->execute();\n \t\treturn $query->fetch();\n\t\t}",
"public function getAllAttendance($class_id) {\n return $this->get('get_all_attendance', ['class_id' => $class_id]);\n }",
"function get_list()\n\t{\n\t\t$type = $this->uri->segment(3);\n\t\t$key = $this->uri->segment(4);\n\t\t$data[\"student_report\"] = STUDENT_REPORT;\n\n\t\tif($type && $key){\n\t\t\t$data[\"report_key\"] = $key;\n\t\t\t$data[\"report_type\"] = $type;\n\t\t\tswitch($type){\n\t\t\t\tcase \"student\":\n\t\t\t\t\t$this->load->model(\"student_model\",\"student\");\n\t\t\t\t\t$person = $this->student->get($key,\"stuFirst,stuLast,stuNickname,student.*,(`baseGrade`+\" . get_current_year() . \"-`baseYear`) as stuGrade\");\n\t\t\t\t\t$title = sprintf(\"for %s\" , format_name($person->stuFirst,$person->stuLast, $person->stuNickname));\n\t\t\t\t\t$data[\"kStudent\"] = $key;\n\n\t\t\t\t\t//$data[\"target\"] = \"report/\" . $type . \"_list\";\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"teacher\":\n\t\t\t\t\t$this->load->model(\"teacher_model\",\"teacher\");\n\t\t\t\t\t$person = $this->teacher->get($key,\"teachFirst,teachLast,dbRole,isAdvisor,gradeStart,gradeEnd,kTeach\");\n\t\t\t\t\t$title = sprintf(\"by %s %s\", $person->teachFirst,$person->teachLast);\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"advisor\":\n\t\t\t\t\t$this->load->model(\"teacher_model\",\"teacher\");\n\t\t\t\t\t$person = $this->teacher->get($key,\"teachFirst as advisorFirst,teachLast as advisorLast,dbRole,isAdvisor,gradeStart,gradeEnd,kTeach\");\n\t\t\t\t\t$title = sprintf(\"to %s %s\",$person->advisorFirst,$person->advisorLast);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$options = array();\n\t\t\tif($this->input->get(\"date_start\") && $this->input->get(\"date_end\")){\n\t\t\t\t$date_start = $this->input->get(\"date_start\");\n\t\t\t\t$date_end = $this->input->get(\"date_end\");\n\t\t\t\t$options[\"date_range\"][\"date_start\"] = $date_start;\n\t\t\t\t$options[\"date_range\"][\"date_end\"] = $date_end;\n\n\t\t\t\t//$this->session->set_userdata(\"date_start\",$date_start);\n\t\t\t\t//$this->session->set_userdata(\"date_end\",$date_end);\n\t\t\t\tbake_cookie(\"date_start\", $date_start);\n\t\t\t\tbake_cookie(\"date_end\", $date_end);\n\t\t\t}\n\n\t\t\tif($this->input->get(\"category\")){\n\t\t\t\t$options[\"category\"] = $this->input->get(\"category\");\n\t\t\t}\n\n\t\t\t$data[\"options\"] = $options;\n\t\t\t$data[\"target\"] = \"report/list\";\n\t\t\t$data[\"person\"] = $person;\n\n\t\t\t$data[\"reports\"] = $this->report->get_list($type,$key,$options);\n\t\t\t$data[\"type\"] = $type;\n\t\t\t$data[\"title\"] = sprintf(\"%ss Submitted %s\", $data[\"student_report\"], $title);\n\t\t\t$this->load->view(\"page/index\",$data);\n\n\n\t\t}\n\t}",
"public function pcAttendance_report() {\n BackendMenu::setContext('Olabs.Oims', 'reports', 'pcattendance_report');\n $this->searchFormWidget = $this->createAttendanceSearchFormWidget();\n $this->pageTitle = 'Petty Contractor Attendance Report';\n $reports = array();\n\n $oimsSetting = \\Olabs\\Oims\\Models\\Settings::instance();\n\n $searchForm = $this->searchFormWidget;\n\n $this->vars['search'] = false;\n $this->vars['msg'] = false;\n $this->vars['searchFormWidget'] = $searchForm;\n $this->vars['reports'] = $reports;\n\n $this->vars['oimsSetting'] = $oimsSetting;\n }",
"public function getAttendanceMobile()\n {\n $orgid = isset($_REQUEST['refno']) ? $_REQUEST['refno'] : 0;\n $att = isset($_REQUEST['att']) ? $_REQUEST['att'] : 0;\n $zone = getTimeZone($orgid);\n date_default_timezone_set($zone);\n $date = date('Y-m-d');\n $time = date('H:i:s');\n $data = array();\n if ($att == 'today') { //today attendance\n $query = $this->db->query(\"SELECT count(`Id`) as total FROM `EmployeeMaster` WHERE `OrganizationId`=\" . $orgid . \" and archive=1 and Is_Delete=0 \");\n //and CAST('$time' as time) > (select TimeIn from ShiftMaster where ShiftMaster.Id=shift)\n $data['total'] = $query->result();\n $query = $this->db->query(\"SELECT count(`EmployeeId`) as exited FROM AttendanceMaster WHERE `AttendanceDate` ='\" . $date . \"' and `TimeOut` !='00:00:00' and `OrganizationId`=\" . $orgid);\n $data['exited'] = $query->result();\n $query = $this->db->query(\"SELECT count(`EmployeeId`) as timedin FROM AttendanceMaster WHERE `AttendanceDate` ='\" . $date . \"' and `OrganizationId`=\" . $orgid); //and `TimeOut` ='00:00:00'\n $data['timedin'] = $query->result();\n $query = $this->db->query(\"SELECT count(TimeFrom) as onbreak FROM `Timeoff` where TimeofDate=? and (TimeTo ='00:00:00' or TimeTo IS NULL) and OrganizationId=?\", array(\n $date,\n $orgid\n ));\n $data['onbreak'] = $query->result();\n $query = $this->db->query(\"select count(Id) as latecomers from AttendanceMaster where `AttendanceDate` ='\" . $date . \"' and `OrganizationId`=\" . $orgid . \" and time(TimeIn) > (select time(TimeIn) from ShiftMaster where ShiftMaster.Id=shiftId)\");\n $data['latecomers'] = $query->result();\n $query = $this->db->query(\"select count(Id) as earlyleavers from AttendanceMaster where `AttendanceDate` ='\" . $date . \"' and `OrganizationId`=\" . $orgid . \" and TimeOut !='00:00:00' and time(TimeOut) < (select time(TimeOut) from ShiftMaster where ShiftMaster.Id=shiftId)\");\n $data['earlyleavers'] = $query->result();\n $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , `TimeIn`, `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc FROM `AttendanceMaster` WHERE `AttendanceDate`=? and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8) order by `name`\", array(\n $date,\n $orgid\n ));\n $data['elist'] = $query->result();\n //---managing off (weekly and holiday)\n $dt = $date;\n \n // day of month : 1 sun 2 mon --\n $dayOfWeek = 1 + date('w', strtotime($dt));\n $weekOfMonth = weekOfMonth($dt);\n $week = '';\n $query = $this->db->query(\"SELECT `WeekOff` FROM `WeekOffMaster` WHERE `OrganizationId` =? AND `Day` = ?\", array(\n $orgid,\n $dayOfWeek\n ));\n if ($row = $query->result()) {\n $week = explode(\",\", $row[0]->WeekOff);\n }\n if ($week[$weekOfMonth - 1] == 1) {\n $data['absentees'] = '';\n } else {\n $query = $this->db->query(\"SELECT `DateFrom`, `DateTo` FROM `HolidayMaster` WHERE OrganizationId=? and (? between `DateFrom` and `DateTo`) \", array(\n $orgid,\n $dt\n ));\n if ($query->num_rows() > 0) {\n //-----managing off (weekly and holiday) - close \n $query = $this->db->query(\"SELECT CONCAT(FirstName,' ',LastName) as name,'-' as TimeIn,'-' as TimeOut ,'Absent' as status from EmployeeMaster where `OrganizationId` =$orgid and EmployeeMaster.archive=1 and EmployeeMaster.Id not in(select AttendanceMaster.`EmployeeId` from AttendanceMaster where `AttendanceDate`='$date' and `OrganizationId` =$orgid) and CAST('$time' as time) > (select TimeIn from ShiftMaster where ShiftMaster.Id=shift) order by `name`\", array(\n $orgid,\n $date,\n $orgid\n ));\n $data['absentees'] = $query->result();\n } else {\n $data['absentees'] = '';\n }\n }\n } else if ($att == 'today_late') {\n $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , `TimeIn`, `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc FROM `AttendanceMaster` WHERE (time(TimeIn) > (select time(TimeIn) from ShiftMaster where ShiftMaster.Id=shiftId)) and `AttendanceDate`=? and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8) order by `name`\", array(\n $date,\n $orgid\n ));\n $data['elist'] = $query->result();\n } else if ($att == 'today_early') {\n $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , `TimeIn`, `TimeOut` ,'Present' as status,EntryImage,ExitImage, SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc FROM `AttendanceMaster` WHERE (time(TimeOut) < (select time(TimeOut) from ShiftMaster where ShiftMaster.Id=shiftId) and TimeOut!='00:00:00' ) and `AttendanceDate`=? and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8) order by `name`\", array(\n $date,\n $orgid\n ));\n $data['elist'] = $query->result();\n } else if ($att == 'today_abs') {\n \n \n $q2 = \"select (select count(EmployeeMaster.Id)-count(AttendanceMaster.Id) from EmployeeMaster where OrganizationId =\" . $orgid . \") as total, AttendanceDate from AttendanceMaster where AttendanceDate ='$date' and OrganizationId =\" . $orgid . \" group by AttendanceDate\";\n $query = $this->db->query($q2);\n $d = array();\n $res = array();\n foreach ($query->result() as $row) {\n '<br/>total: ' . $row->total . ' date: ' . $row->AttendanceDate . '<br/>';\n $query1 = $this->db->query(\"SELECT Id as EmployeeId ,FirstName,Shift,Department,Designation, Id ,'\" . $row->AttendanceDate . \"' as absentdate\n FROM `EmployeeMaster` \n WHERE EmployeeMaster.OrganizationId =\" . $orgid . \"\n AND archive=1 and IF(EmployeeMaster.CreatedDate!='0000-00-00 00:00:00', CreatedDate < '\" . $row->AttendanceDate . \"', 1) and Id \n NOT IN (\n SELECT `EmployeeId` \n FROM `AttendanceMaster` \n WHERE `AttendanceDate` \n IN (\n '\" . $row->AttendanceDate . \"'\n )\n AND AttendanceMaster.OrganizationId =\" . $orgid . \"\n AND `AttendanceStatus` not in(3,5,6)\n )\n ORDER BY EmployeeMaster.Id \");\n $count = $query1->num_rows();\n foreach ($query1->result() as $row) {\n $data = array();\n //$data['name']=ucwords(getEmpName($row->Id));\n $data['name'] = getEmpName($row->EmployeeId);\n $data['status'] = 'Absent';\n $data['TimeIn'] = '-';\n $data['TimeOut'] = '-';\n $res[] = $data;\n }\n }\n $this->db->close();\n $data['elist'] = $res;\n } else if ($att == 'yesterday') { //yesterday attendance\n $date = date('Y-m-d', strtotime(\"-1 days\"));\n $query = $this->db->query(\"SELECT count(`Id`) as total FROM `EmployeeMaster` WHERE archive=1 and `OrganizationId`=\" . $orgid);\n $data['total'] = $query->result();\n $query = $this->db->query(\"SELECT count(`Id`) as timedin FROM `AttendanceMaster` WHERE AttendanceDate='\" . $date . \"' and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8) and `OrganizationId`=\" . $orgid);\n $data['timedin'] = $query->result();\n $query = $this->db->query(\"select count(Id) as latecomers from AttendanceMaster where `AttendanceDate` ='\" . $date . \"' and `OrganizationId`=\" . $orgid . \" and time(TimeIn) > (select time(TimeIn) from ShiftMaster where ShiftMaster.Id=shiftId)\");\n $data['latecomers'] = $query->result();\n $query = $this->db->query(\"select count(Id) as earlyleavers from AttendanceMaster where `AttendanceDate` ='\" . $date . \"' and `OrganizationId`=\" . $orgid . \" and TimeOut !='00:00:00' and time(TimeOut) < (select time(TimeOut) from ShiftMaster where ShiftMaster.Id=shiftId)\");\n $data['earlyleavers'] = $query->result();\n //$query = $this->db->query(\"SELECT count(`EmployeeId`) as exited FROM AttendanceMaster WHERE `AttendanceDate` ='\".$date.\"' and `TimeOut` !='00:00:00' and `OrganizationId`=\".$orgid);\n //$data['exited']=$query->result();\n // $query = $this->db->query(\"SELECT count(`EmployeeId`) as timedin FROM AttendanceMaster WHERE `AttendanceDate` ='\".$date.\"' and `TimeOut` ='00:00:00' and `OrganizationId`=\".$orgid);\n // $data['timedin']=$query->result();\n // $query = $this->db->query(\"SELECT count(BreakOn) as onbreak FROM `BreakMaster` where Date=? and BreakOff ='00:00:00' and OrganizationId=?\",array($date,$orgid));\n // $data['onbreak']=$query->result();\n \n $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , `TimeIn`, `TimeOut` ,'Present' as status,EntryImage,ExitImage FROM `AttendanceMaster` WHERE (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8) and `AttendanceDate`=? and OrganizationId=? order by `name`\", array(\n $date,\n $orgid\n ));\n $data['elist'] = $query->result();\n //---managing off (weekly and holiday)\n $dt = $date;\n \n // day of month : 1 sun 2 mon --\n $dayOfWeek = 1 + date('w', strtotime($dt));\n $weekOfMonth = weekOfMonth($dt);\n $week = '';\n $query = $this->db->query(\"SELECT `WeekOff` FROM `WeekOffMaster` WHERE `OrganizationId` =? AND `Day` = ?\", array(\n $orgid,\n $dayOfWeek\n ));\n if ($row = $query->result()) {\n $week = explode(\",\", $row[0]->WeekOff);\n }\n if ($week[$weekOfMonth - 1] == 1) {\n $data['absentees'] = '';\n } else {\n $query = $this->db->query(\"SELECT `DateFrom`, `DateTo` FROM `HolidayMaster` WHERE OrganizationId=? and (? between `DateFrom` and `DateTo`) \", array(\n $orgid,\n $dt\n ));\n if ($query->num_rows() > 0) {\n \n //-----managing off (weekly and holiday) - close \n $query = $this->db->query(\"SELECT CONCAT(FirstName,' ',LastName) as name,'-' as TimeIn,'-' as TimeOut ,'Absent' as status from EmployeeMaster where `OrganizationId` =$orgid and EmployeeMaster.archive=1 and EmployeeMaster.Id in(select AttendanceMaster.`EmployeeId` from AttendanceMaster where `AttendanceDate`='$date' and AttendanceStatus<>1 and `OrganizationId` =$orgid) and CAST('$time' as time) > (select TimeIn from ShiftMaster where ShiftMaster.Id=shift) order by `name`\", array(\n $orgid,\n $date,\n $orgid\n ));\n $data['absentees'] = $query->result();\n } else {\n $data['absentees'] = '';\n }\n }\n } else if ($att == 'yes_late') {\n $date = date('Y-m-d', strtotime(\"-1 days\"));\n $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , `TimeIn`, `TimeOut` ,'Present' as status,EntryImage,ExitImage FROM `AttendanceMaster` WHERE (time(TimeIn) > (select time(TimeIn) from ShiftMaster where ShiftMaster.Id=shiftId)) and `AttendanceDate`=? and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8) order by `name`\", array(\n $date,\n $orgid\n ));\n $data['elist'] = $query->result();\n } else if ($att == 'yes_early') {\n $date = date('Y-m-d', strtotime(\"-1 days\"));\n $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , `TimeIn`, `TimeOut` ,'Present' as status,EntryImage,ExitImage FROM `AttendanceMaster` WHERE (time(TimeOut) < (select time(TimeOut) from ShiftMaster where ShiftMaster.Id=shiftId) and TimeOut!='00:00:00' ) and `AttendanceDate`=? and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8) order by `name`\", array(\n $date,\n $orgid\n ));\n $data['elist'] = $query->result();\n } else if ($att == 'yes_abs') {\n $date = date('Y-m-d', strtotime(\"-1 days\"));\n $q2 = \"select (select count(EmployeeMaster.Id)-count(AttendanceMaster.Id) from EmployeeMaster where OrganizationId =\" . $orgid . \") as total, AttendanceDate from AttendanceMaster where AttendanceDate ='$date' and OrganizationId =\" . $orgid . \" group by AttendanceDate\";\n $query = $this->db->query($q2);\n $d = array();\n $res = array();\n foreach ($query->result() as $row) {\n '<br/>total: ' . $row->total . ' date: ' . $row->AttendanceDate . '<br/>';\n $query1 = $this->db->query(\"SELECT Id as EmployeeId ,FirstName,Shift,Department,Designation, Id ,'\" . $row->AttendanceDate . \"' as absentdate\n FROM `EmployeeMaster` \n WHERE EmployeeMaster.OrganizationId =\" . $orgid . \"\n AND archive=1 and IF(EmployeeMaster.CreatedDate!='0000-00-00 00:00:00', CreatedDate < '\" . $row->AttendanceDate . \"', 1) and Id \n NOT IN (\n SELECT `EmployeeId` \n FROM `AttendanceMaster` \n WHERE `AttendanceDate` \n IN (\n '\" . $row->AttendanceDate . \"'\n )\n AND AttendanceMaster.OrganizationId =\" . $orgid . \"\n AND `AttendanceStatus` not in(3,5,6)\n )\n ORDER BY EmployeeMaster.Id \");\n $count = $query1->num_rows();\n foreach ($query1->result() as $row) {\n $data = array();\n //$data['name']=ucwords(getEmpName($row->Id));\n $data['name'] = getEmpName($row->EmployeeId);\n $data['status'] = 'Absent';\n $data['TimeIn'] = '-';\n $data['TimeOut'] = '-';\n $res[] = $data;\n }\n }\n $this->db->close();\n $data['elist'] = $res;\n } else if ($att == 'cdate') { //custom date attendance\n $cdate = isset($_REQUEST['cdate']) ? date('Y-m-d', strtotime($_REQUEST['cdate'])) : 0;\n $cond = '';\n if ($cdate == $date)\n $cond = \" and CAST('$time' as time) > (select TimeIn from ShiftMaster where ShiftMaster.Id=shift)\";\n $query = $this->db->query(\"SELECT count(`Id`) as total FROM `EmployeeMaster` WHERE `OrganizationId`=\" . $orgid . \" and archive=1 \" . $cond);\n $data['total'] = $query->result();\n $query = $this->db->query(\"SELECT count(`EmployeeId`) as marked FROM AttendanceMaster WHERE AttendanceDate ='\" . $cdate . \"' and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8) and `OrganizationId`=\" . $orgid);\n $data['marked'] = $query->result();\n $query = $this->db->query(\"select count(Id) as latecomers from AttendanceMaster where `AttendanceDate` ='\" . $cdate . \"' and `OrganizationId`=\" . $orgid . \" and time(TimeIn) > (select time(TimeIn) from ShiftMaster where ShiftMaster.Id=shiftId)\");\n $data['latecomers'] = $query->result();\n $query = $this->db->query(\"select count(Id) as earlyleavers from AttendanceMaster where `AttendanceDate` ='\" . $cdate . \"' and `OrganizationId`=\" . $orgid . \" and TimeOut !='00:00:00' and time(TimeOut) < (select time(TimeOut) from ShiftMaster where ShiftMaster.Id=shiftId)\");\n $data['earlyleavers'] = $query->result();\n $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , `TimeIn`, `TimeOut`,'Present' as status ,AttendanceDate FROM `AttendanceMaster` WHERE AttendanceDate =? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8) and OrganizationId=? order by `AttendanceDate` desc,name\", array(\n $cdate,\n $orgid\n ));\n $data['elist'] = $query->result();\n //---managing off (weekly and holiday)// \n $dt = $cdate;\n \n // day of month : 1 sun 2 mon --\n $dayOfWeek = 1 + date('w', strtotime($dt));\n $weekOfMonth = weekOfMonth($dt);\n $week = '';\n $query = $this->db->query(\"SELECT `WeekOff` FROM `WeekOffMaster` WHERE `OrganizationId` =? AND `Day` = ?\", array(\n $orgid,\n $dayOfWeek\n ));\n if ($row = $query->result()) {\n $week = explode(\",\", $row[0]->WeekOff);\n }\n if ($week[$weekOfMonth - 1] == 1) {\n $data['absentees'] = '';\n } else {\n $query = $this->db->query(\"SELECT `DateFrom`, `DateTo` FROM `HolidayMaster` WHERE OrganizationId=? and (? between `DateFrom` and `DateTo`) \", array(\n $orgid,\n $dt\n ));\n if ($query->num_rows() == 0) {\n //-----managing off (weekly and holiday) - close\n $query = $this->db->query(\"SELECT CONCAT(FirstName,' ',LastName) as name,'-' as TimeIn,'-' as TimeOut ,'Absent' as status,'\" . $cdate . \"' as AttendanceDate from EmployeeMaster where `OrganizationId` =? and EmployeeMaster.archive=1 and EmployeeMaster.Id in(select AttendanceMaster.`EmployeeId` from AttendanceMaster where `AttendanceDate`=? and AttendanceStatus<>1 and `OrganizationId` =?) \" . $cond . \" order by `name`\", array(\n $orgid,\n $cdate,\n $orgid\n ));\n //$query = $this->db->query(\"select * from AttendanceMaster where AttendanceStatus<>1 and AttendanceDate='2018-01-01'\",array());\n $data['absentees'] = $query->result();\n } else {\n $data['absentees'] = '';\n }\n }\n } else if ($att == 'cd_late') {\n $date = isset($_REQUEST['cdate']) ? date('Y-m-d', strtotime($_REQUEST['cdate'])) : 0;\n $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , `TimeIn`, `TimeOut` ,'Present' as status,EntryImage,ExitImage FROM `AttendanceMaster` WHERE (time(TimeIn) > (select time(TimeIn) from ShiftMaster where ShiftMaster.Id=shiftId)) and `AttendanceDate`=? and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8) order by `name`\", array(\n $date,\n $orgid\n ));\n $data['elist'] = $query->result();\n } else if ($att == 'cd_early') {\n $date = isset($_REQUEST['cdate']) ? date('Y-m-d', strtotime($_REQUEST['cdate'])) : 0;\n $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , `TimeIn`, `TimeOut` ,'Present' as status,EntryImage,ExitImage FROM `AttendanceMaster` WHERE (time(TimeOut) < (select time(TimeOut) from ShiftMaster where ShiftMaster.Id=shiftId) and TimeOut!='00:00:00' ) and `AttendanceDate`=? and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8)order by `name`\", array(\n $date,\n $orgid\n ));\n $data['elist'] = $query->result();\n } else if ($att == 'cd_abs') {\n $date = isset($_REQUEST['cdate']) ? date('Y-m-d', strtotime($_REQUEST['cdate'])) : 0;\n $q2 = \"select (select count(EmployeeMaster.Id)-count(AttendanceMaster.Id) from EmployeeMaster where OrganizationId =\" . $orgid . \") as total, AttendanceDate from AttendanceMaster where AttendanceDate ='$date' and OrganizationId =\" . $orgid . \" group by AttendanceDate\";\n $query = $this->db->query($q2);\n $d = array();\n $res = array();\n foreach ($query->result() as $row) {\n '<br/>total: ' . $row->total . ' date: ' . $row->AttendanceDate . '<br/>';\n $query1 = $this->db->query(\"SELECT Id as EmployeeId ,FirstName,Shift,Department,Designation, Id ,'\" . $row->AttendanceDate . \"' as absentdate\n FROM `EmployeeMaster` \n WHERE EmployeeMaster.OrganizationId =\" . $orgid . \"\n AND archive=1 and IF(EmployeeMaster.CreatedDate!='0000-00-00 00:00:00', CreatedDate < '\" . $row->AttendanceDate . \"', 1) and Id \n NOT IN (\n SELECT `EmployeeId` \n FROM `AttendanceMaster` \n WHERE `AttendanceDate` \n IN (\n '\" . $row->AttendanceDate . \"'\n )\n AND AttendanceMaster.OrganizationId =\" . $orgid . \"\n AND `AttendanceStatus` not in(3,5,6)\n )\n ORDER BY EmployeeMaster.Id \");\n $count = $query1->num_rows();\n foreach ($query1->result() as $row) {\n $data = array();\n //$data['name']=ucwords(getEmpName($row->Id));\n $data['name'] = getEmpName($row->EmployeeId);\n $data['status'] = 'Absent';\n $data['TimeIn'] = '-';\n $data['TimeOut'] = '-';\n $res[] = $data;\n }\n }\n $this->db->close();\n $data['elist'] = $res;\n } else if ($att == 'absentees') { //custom date absentees\n $cdate = isset($_REQUEST['cdate']) ? date('Y-m-d', strtotime($_REQUEST['cdate'])) : 0;\n ////////////////\n $query = $this->db->query(\"SELECT CONCAT(FirstName,' ',LastName) as name,'-' as TimeIn,'-' as TimeOut ,'Absent' as status,'\" . $cdate . \"' as AttendanceDate from EmployeeMaster where `OrganizationId` =\" . $orgid . \" and EmployeeMaster.Id not in(select AttendanceMaster.`EmployeeId` from AttendanceMaster WHERE `AttendanceDate` ='\" . $cdate . \"' and `OrganizationId`=\" . $orgid . \" and CAST('$time' as time) > (select TimeIn from ShiftMaster where ShiftMaster.Id=shift) order by DATE(AttendanceDate),name)\");\n $data['absentees'][] = $query->result();\n ////////////////\n $query = $this->db->query(\"SELECT count(`Id`) as total FROM `EmployeeMaster` WHERE `OrganizationId`=\" . $orgid);\n $data['total'] = $query->result();\n $query = $this->db->query(\"SELECT count(`EmployeeId`) as marked FROM AttendanceMaster WHERE AttendanceDate ='\" . $cdate . \"' and `OrganizationId`=\" . $orgid);\n $data['marked'] = $query->result();\n $query = $this->db->query(\"SELECT CONCAT(FirstName,' ',LastName) as name,'-' as TimeIn,'-' as TimeOut ,'Absent' as status,'\" . $cdate . \"' as AttendanceDate from EmployeeMaster where `OrganizationId` =\" . $orgid . \" and EmployeeMaster.Id not in(select AttendanceMaster.`EmployeeId` from AttendanceMaster WHERE `AttendanceDate` ='\" . $cdate . \"' and `OrganizationId`=\" . $orgid . \" and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8) order by DATE(AttendanceDate),name)\");\n $data['elist'] = $query->result();\n } else if ($att == 'l7') { //last 7 days attendance\n $end_week = date(\"Y-m-d\", strtotime(\"-1 days\"));\n $start_week = date(\"Y-m-d\", strtotime('-6 day', strtotime($end_week)));\n $start_week = \\DateTime::createFromFormat('Y-m-d', $start_week);\n $end_week = \\DateTime::createFromFormat('Y-m-d', $end_week);\n $datePeriod = new \\DatePeriod($start_week, new \\DateInterval('P1D'), $end_week->modify('+1day'));\n foreach ($datePeriod as $date) {\n $dt = $date->format('Y-m-d');\n $query = $this->db->query(\"SELECT count(`EmployeeId`) as total,AttendanceDate FROM AttendanceMaster WHERE `AttendanceDate` ='\" . $dt . \"' and AttendanceStatus<>1 and `OrganizationId`=\" . $orgid);\n $data['rec'][] = $query->result();\n $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , `TimeIn`, `TimeOut` ,AttendanceDate ,'Present' as status FROM `AttendanceMaster` WHERE `AttendanceDate` ='\" . $dt . \"' and `OrganizationId`=\" . $orgid . \" and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8) order by DATE(AttendanceDate) desc,name\");\n $data['elist'][] = $query->result();\n ///////////////abs\n \n //---managing off (weekly and holiday)\n $query = $this->db->query(\"SELECT `DateFrom`, `DateTo` FROM `HolidayMaster` WHERE OrganizationId=? and (? between `DateFrom` and `DateTo`) \", array(\n $orgid,\n $dt\n ));\n if ($query->num_rows() > 0)\n continue;\n // day of month : 1 sun 2 mon --\n $dayOfWeek = 1 + date('w', strtotime($dt));\n $weekOfMonth = weekOfMonth($dt);\n $week = '';\n $query = $this->db->query(\"SELECT `WeekOff` FROM `WeekOffMaster` WHERE `OrganizationId` =? AND `Day` = ?\", array(\n $orgid,\n $dayOfWeek\n ));\n if ($row = $query->result()) {\n $week = explode(\",\", $row[0]->WeekOff);\n }\n if ($week[$weekOfMonth - 1] == 1)\n continue;\n //-----managing off (weekly and holiday) - close\n $query = $this->db->query(\"SELECT CONCAT(FirstName,' ',LastName) as name,'-' as TimeIn,'-' as TimeOut ,'Absent' as status,'\" . $dt . \"' as AttendanceDate from EmployeeMaster where `OrganizationId` =\" . $orgid . \" and EmployeeMaster.archive=1 and EmployeeMaster.Id in(select AttendanceMaster.`EmployeeId` from AttendanceMaster WHERE `AttendanceDate` ='\" . $dt . \"' and AttendanceStatus<>1 and `OrganizationId`=\" . $orgid . \") and CAST('$time' as time) > (select TimeIn from ShiftMaster where ShiftMaster.Id=shift) order by DATE(AttendanceDate),name\");\n $data['absentees'][] = $query->result();\n \n //////////abs\n \n \n }\n } else if ($att == 'l7_late') {\n $end_week = date(\"Y-m-d\", strtotime(\"-1 days\"));\n $start_week = date(\"Y-m-d\", strtotime('-6 day', strtotime($end_week)));\n $start_week = \\DateTime::createFromFormat('Y-m-d', $start_week);\n $end_week = \\DateTime::createFromFormat('Y-m-d', $end_week);\n $datePeriod = new \\DatePeriod($start_week, new \\DateInterval('P1D'), $end_week->modify('+1day'));\n $res = array();\n foreach ($datePeriod as $date) {\n $data1 = array();\n $dt = $date->format('Y-m-d');\n $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , `TimeIn`, `TimeOut` ,AttendanceDate ,'Present' as status,EntryImage,ExitImage FROM `AttendanceMaster` WHERE (time(TimeIn) > (select time(TimeIn) from ShiftMaster where ShiftMaster.Id=shiftId)) and `AttendanceDate` ='\" . $dt . \"' and `OrganizationId`=\" . $orgid . \" and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8) order by DATE(AttendanceDate) desc,name\");\n $res[] = $query->result();\n }\n $data['elist'] = $res;\n \n } else if ($att == 'l7_early') {\n $end_week = date(\"Y-m-d\", strtotime(\"-1 days\"));\n $start_week = date(\"Y-m-d\", strtotime('-6 day', strtotime($end_week)));\n $start_week = \\DateTime::createFromFormat('Y-m-d', $start_week);\n $end_week = \\DateTime::createFromFormat('Y-m-d', $end_week);\n $datePeriod = new \\DatePeriod($start_week, new \\DateInterval('P1D'), $end_week->modify('+1day'));\n $res = array();\n foreach ($datePeriod as $date) {\n $data1 = array();\n $dt = $date->format('Y-m-d');\n $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , `TimeIn`, `TimeOut` ,AttendanceDate ,'Present' as status,EntryImage,ExitImage FROM `AttendanceMaster` WHERE (time(TimeOut) < (select time(TimeOut) from ShiftMaster where ShiftMaster.Id=shiftId) and TimeOut!='00:00:00' ) and `AttendanceDate` ='\" . $dt . \"' and `OrganizationId`=\" . $orgid . \" and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8) order by DATE(AttendanceDate) desc,name\");\n $res[] = $query->result();\n }\n $data['elist'] = $res;\n } else if ($att == 'l7_abs') {\n $end_week = date(\"Y-m-d\", strtotime(\"-1 days\"));\n $start_week = date(\"Y-m-d\", strtotime('-6 day', strtotime($end_week)));\n $start_week = \\DateTime::createFromFormat('Y-m-d', $start_week);\n $end_week = \\DateTime::createFromFormat('Y-m-d', $end_week);\n $datePeriod = new \\DatePeriod($start_week, new \\DateInterval('P1D'), $end_week->modify('+1day'));\n \n $res = array();\n foreach ($datePeriod as $date) {\n $data1 = array();\n $dt = $date->format('Y-m-d');\n $q2 = \"select (select count(EmployeeMaster.Id)-count(AttendanceMaster.Id) from EmployeeMaster where OrganizationId =\" . $orgid . \") as total, AttendanceDate from AttendanceMaster where AttendanceDate ='$dt' and OrganizationId =\" . $orgid . \" group by AttendanceDate\";\n $query = $this->db->query($q2);\n $d = array();\n //$res=array();\n foreach ($query->result() as $row) {\n $date = $row->AttendanceDate;\n // '<br/>total: '.$row->total.' date: '.$row->AttendanceDate .'<br/>';\n $query1 = $this->db->query(\"SELECT Id as EmployeeId ,FirstName,Shift,Department,Designation, Id ,'\" . $row->AttendanceDate . \"' as absentdate\n FROM `EmployeeMaster` \n WHERE EmployeeMaster.OrganizationId =\" . $orgid . \"\n AND archive=1 and IF(EmployeeMaster.CreatedDate!='0000-00-00 00:00:00', CreatedDate < '\" . $row->AttendanceDate . \"', 1) and Id \n NOT IN (\n SELECT `EmployeeId` \n FROM `AttendanceMaster` \n WHERE `AttendanceDate` \n IN (\n '\" . $row->AttendanceDate . \"'\n )\n AND AttendanceMaster.OrganizationId =\" . $orgid . \"\n AND `AttendanceStatus` not in(3,5,6)\n )\n ORDER BY EmployeeMaster.Id \");\n $count = $query1->num_rows();\n foreach ($query1->result() as $row) {\n $data = array();\n //$data['name']=ucwords(getEmpName($row->Id));\n $data['name'] = getEmpName($row->EmployeeId);\n $data['AttendanceDate'] = $date;\n $data['status'] = 'Absent';\n $data['TimeIn'] = '-';\n $data['TimeOut'] = '-';\n $res[] = $data;\n }\n }\n //$res1[]=$query->result();\n }\n $this->db->close();\n $data['elist'] = $res;\n } else if ($att == 'thismonth') { //current month attendance\n $month = date('m');\n $year = date('Y');\n $query = $this->db->query(\"SELECT count(`Id`) as total FROM `EmployeeMaster` WHERE `OrganizationId`=\" . $orgid);\n $data['total'] = $query->result();\n $query = $this->db->query(\"SELECT count(`EmployeeId`) as marked FROM AttendanceMaster WHERE EXTRACT(MONTH from AttendanceDate) ='\" . $month . \"' and EXTRACT(YEAR from AttendanceDate) ='\" . $year . \"' and `OrganizationId`=\" . $orgid);\n $data['marked'] = $query->result();\n $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , `TimeIn`, `TimeOut`,'Present' as status ,AttendanceDate FROM `AttendanceMaster` WHERE EXTRACT(MONTH from AttendanceDate) =? and EXTRACT(YEAR from AttendanceDate) =? and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8) order by DATE(AttendanceDate),name\", array(\n $month,\n $year,\n $orgid\n ));\n $data['elist'] = $query->result();\n $query = $this->db->query(\"select count(Id) as latecomers from AttendanceMaster where EXTRACT(MONTH from AttendanceDate) ='\" . $month . \"' and `OrganizationId`=\" . $orgid . \" and time(TimeIn) > (select time(TimeIn) from ShiftMaster where ShiftMaster.Id=shiftId)\");\n $data['latecomers'] = $query->result();\n $query = $this->db->query(\"select count(Id) as earlyleavers from AttendanceMaster where EXTRACT(MONTH from AttendanceDate) ='\" . $month . \"' and `OrganizationId`=\" . $orgid . \" and TimeOut !='00:00:00' and time(TimeOut) < (select time(TimeOut) from ShiftMaster where ShiftMaster.Id=shiftId)\");\n $data['earlyleavers'] = $query->result();\n $start_week = date('Y-m-01');\n $end_week = date('Y-m-d');\n $start_week = \\DateTime::createFromFormat('Y-m-d', $start_week);\n $end_week = \\DateTime::createFromFormat('Y-m-d', $end_week);\n $datePeriod = new \\DatePeriod($start_week, new \\DateInterval('P1D'), $end_week->modify('+1day'));\n foreach ($datePeriod as $date) {\n $dt = $date->format('Y-m-d');\n //---managing off (weekly and holiday)\n $query = $this->db->query(\"SELECT `DateFrom`, `DateTo` FROM `HolidayMaster` WHERE OrganizationId=? and (? between `DateFrom` and `DateTo`) \", array(\n $orgid,\n $dt\n ));\n if ($query->num_rows() > 0)\n continue;\n // day of month : 1 sun 2 mon --\n $dayOfWeek = 1 + date('w', strtotime($dt));\n $weekOfMonth = weekOfMonth($dt);\n $week = '';\n $query = $this->db->query(\"SELECT `WeekOff` FROM `WeekOffMaster` WHERE `OrganizationId` =? AND `Day` = ?\", array(\n $orgid,\n $dayOfWeek\n ));\n if ($row = $query->result()) {\n $week = explode(\",\", $row[0]->WeekOff);\n }\n if ($week[$weekOfMonth - 1] == 1)\n continue;\n //-----managing off (weekly and holiday) - close\n $query = $this->db->query(\"SELECT CONCAT(FirstName,' ',LastName) as name,'-' as TimeIn,'-' as TimeOut ,'Absent' as status,'\" . $dt . \"' as AttendanceDate from EmployeeMaster where `OrganizationId` =\" . $orgid . \" and EmployeeMaster.archive=1 and EmployeeMaster.Id in(select AttendanceMaster.`EmployeeId` from AttendanceMaster WHERE `AttendanceDate` ='\" . $dt . \"' and AttendanceStatus<>1 and `OrganizationId`=\" . $orgid . \") and CAST('$time' as time) > (select TimeIn from ShiftMaster where ShiftMaster.Id=shift) order by DATE(AttendanceDate),name asc\");\n $data['absentees'][] = $query->result();\n }\n } else if ($att == 'tm_late') {\n $start_week = date('Y-m-01');\n $end_week = date('Y-m-d');\n $start_week = \\DateTime::createFromFormat('Y-m-d', $start_week);\n $end_week = \\DateTime::createFromFormat('Y-m-d', $end_week);\n $datePeriod = new \\DatePeriod($start_week, new \\DateInterval('P1D'), $end_week->modify('+1day'));\n $res = array();\n foreach ($datePeriod as $date) {\n $data1 = array();\n $dt = $date->format('Y-m-d');\n $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , `TimeIn`, `TimeOut` ,AttendanceDate ,'Present' as status,EntryImage,ExitImage FROM `AttendanceMaster` WHERE (time(TimeIn) > (select time(TimeIn) from ShiftMaster where ShiftMaster.Id=shiftId)) and `AttendanceDate` ='\" . $dt . \"' and `OrganizationId`=\" . $orgid . \" and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8) order by DATE(AttendanceDate) desc,name\");\n $res[] = $query->result();\n }\n $data['elist'] = $res;\n \n } else if ($att == 'tm_early') {\n $start_week = date('Y-m-01');\n $end_week = date('Y-m-d');\n $start_week = \\DateTime::createFromFormat('Y-m-d', $start_week);\n $end_week = \\DateTime::createFromFormat('Y-m-d', $end_week);\n $datePeriod = new \\DatePeriod($start_week, new \\DateInterval('P1D'), $end_week->modify('+1day'));\n $res = array();\n foreach ($datePeriod as $date) {\n $data1 = array();\n $dt = $date->format('Y-m-d');\n $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , `TimeIn`, `TimeOut` ,AttendanceDate ,'Present' as status,EntryImage,ExitImage FROM `AttendanceMaster` WHERE (time(TimeOut) < (select time(TimeOut) from ShiftMaster where ShiftMaster.Id=shiftId) and TimeOut!='00:00:00' ) and `AttendanceDate` ='\" . $dt . \"' and `OrganizationId`=\" . $orgid . \" and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8) order by DATE(AttendanceDate) desc,name\");\n $res[] = $query->result();\n }\n $data['elist'] = $res;\n } else if ($att == 'tm_abs') {\n $start_week = date('Y-m-01');\n $end_week = date('Y-m-d');\n $start_week = \\DateTime::createFromFormat('Y-m-d', $start_week);\n $end_week = \\DateTime::createFromFormat('Y-m-d', $end_week);\n $datePeriod = new \\DatePeriod($start_week, new \\DateInterval('P1D'), $end_week->modify('+1day'));\n $res = array();\n foreach ($datePeriod as $date) {\n $data1 = array();\n $dt = $date->format('Y-m-d');\n $q2 = \"select (select count(EmployeeMaster.Id)-count(AttendanceMaster.Id) from EmployeeMaster where OrganizationId =\" . $orgid . \") as total, AttendanceDate from AttendanceMaster where AttendanceDate ='$dt' and OrganizationId =\" . $orgid . \" group by AttendanceDate\";\n $query = $this->db->query($q2);\n $d = array();\n //$res=array();\n foreach ($query->result() as $row) {\n $date = $row->AttendanceDate;\n // '<br/>total: '.$row->total.' date: '.$row->AttendanceDate .'<br/>';\n $query1 = $this->db->query(\"SELECT Id as EmployeeId ,FirstName,Shift,Department,Designation, Id ,'\" . $row->AttendanceDate . \"' as absentdate\n FROM `EmployeeMaster` \n WHERE EmployeeMaster.OrganizationId =\" . $orgid . \"\n AND archive=1 and IF(EmployeeMaster.CreatedDate!='0000-00-00 00:00:00', CreatedDate < '\" . $row->AttendanceDate . \"', 1) and Id \n NOT IN (\n SELECT `EmployeeId` \n FROM `AttendanceMaster` \n WHERE `AttendanceDate` \n IN (\n '\" . $row->AttendanceDate . \"'\n )\n AND AttendanceMaster.OrganizationId =\" . $orgid . \"\n AND `AttendanceStatus` not in(3,5,6)\n )\n ORDER BY EmployeeMaster.Id \");\n $count = $query1->num_rows();\n foreach ($query1->result() as $row) {\n $data = array();\n //$data['name']=ucwords(getEmpName($row->Id));\n $data['name'] = getEmpName($row->EmployeeId);\n $data['AttendanceDate'] = $date;\n $data['status'] = 'Absent';\n $data['TimeIn'] = '-';\n $data['TimeOut'] = '-';\n $res[] = $data;\n }\n }\n //$res1[]=$query->result();\n }\n $this->db->close();\n $data['elist'] = $res;\n } else if ($att == 'lastweek') { //lasweek attendance\n $previous_week = strtotime(\"-1 week +1 day\");\n $start_week = strtotime(\"last monday midnight\", $previous_week);\n $end_week = strtotime(\"next sunday\", $start_week);\n $start_week = date(\"Y-m-d\", $start_week);\n $end_week = date(\"Y-m-d\", $end_week);\n $start_week = \\DateTime::createFromFormat('Y-m-d', $start_week);\n $end_week = \\DateTime::createFromFormat('Y-m-d', $end_week);\n $datePeriod = new \\DatePeriod($start_week, new \\DateInterval('P1D'), $end_week->modify('+1day'));\n foreach ($datePeriod as $date) {\n $dt = $date->format('Y-m-d');\n $query = $this->db->query(\"SELECT count(`EmployeeId`) as total,AttendanceDate FROM AttendanceMaster WHERE `AttendanceDate` ='\" . $dt . \"' and `OrganizationId`=\" . $orgid);\n $data['rec'][] = $query->result();\n $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , `TimeIn`, `TimeOut` ,AttendanceDate,'Present' as status FROM `AttendanceMaster` WHERE `AttendanceDate` ='\" . $dt . \"' and `OrganizationId`=\" . $orgid . \" and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8) order by DATE(AttendanceDate),name \");\n $data['elist'][] = $query->result();\n //---managing off (weekly and holiday)\n $query = $this->db->query(\"SELECT `DateFrom`, `DateTo` FROM `HolidayMaster` WHERE OrganizationId=? and (? between `DateFrom` and `DateTo`) \", array(\n $orgid,\n $dt\n ));\n if ($query->num_rows() > 0)\n continue;\n // day of month : 1 sun 2 mon --\n $dayOfWeek = 1 + date('w', strtotime($dt));\n $weekOfMonth = weekOfMonth($dt);\n $week = '';\n $query = $this->db->query(\"SELECT `WeekOff` FROM `WeekOffMaster` WHERE `OrganizationId` =? AND `Day` = ?\", array(\n $orgid,\n $dayOfWeek\n ));\n if ($row = $query->result()) {\n $week = explode(\",\", $row[0]->WeekOff);\n }\n if ($week[$weekOfMonth - 1] == 1)\n continue;\n //-----managing off (weekly and holiday) - close\n $query = $this->db->query(\"SELECT CONCAT(FirstName,' ',LastName) as name,'-' as TimeIn,'-' as TimeOut ,'Absent' as status,'\" . $dt . \"' as AttendanceDate from EmployeeMaster where `OrganizationId` =\" . $orgid . \" and EmployeeMaster.Id not in(select AttendanceMaster.`EmployeeId` from AttendanceMaster WHERE `AttendanceDate` ='\" . $dt . \"' and `OrganizationId`=\" . $orgid . \") order by DATE(AttendanceDate),name\");\n $data['absentees'][] = $query->result(); \n }\n //$data['elist']=$query->result();\n }\n echo json_encode($data, JSON_NUMERIC_CHECK);\n \n }",
"public function reportPeriodicClassWiseTopAbsentListView(Request $request)\n {\n $year = trim($request->year) ;\n $shift = trim($request->shift);\n $dept = trim($request->dept);\n $semister = trim($request->semister);\n $section = trim($request->section);\n $date_form = trim($request->from); \n $from = date (\"Y-m-d\", strtotime($date_form));\n $date_to = trim($request->to); \n $date_too = trim($request->to);\n $to = date (\"Y-m-d\", strtotime($date_to));\n\n $result = DB::table('student_attendent')\n ->join('students','student_attendent.studentId','=','students.id')\n ->join('student','students.id','=','student.studentID')\n ->select('student_attendent.*','student.roll','student.registration', DB::raw(\"COUNT(student_attendent.studentId) AS count\"))\n ->where('student_attendent.year',$year)\n ->where('student_attendent.shift_id',$shift)\n ->where('student_attendent.dept_id',$dept)\n ->where('student_attendent.semister_id',$semister)\n ->where('student_attendent.section_id',$section)\n ->where('student.year',$year)\n ->where('student.shift_id',$shift)\n ->where('student.dept_id',$dept)\n ->where('student.semister_id',$semister)\n ->where('student.section_id',$section)\n ->whereBetween('student_attendent.created_at', [$from, $to])\n ->groupBy('student_attendent.studentId')\n ->orderBy('count','ASC')\n ->orderBy('student_attendent.roll','ASC')\n ->get();\n\n $get_holiday = DB::table('holiday')\n ->where('year',$year)\n ->whereNotIn('type',[1])\n ->whereBetween('holiday_date', [$from, $to])->get();\n\n \n $total_holiday_class = 0 ;\n foreach ($get_holiday as $holidays) {\n $day_no = date('D', strtotime($holidays->holiday_date));\n //echo $day_no;\nif($day_no == 'Sat'){\n $day = '1';\n}elseif($day_no == 'Sun'){\n $day = '2';\n}elseif($day_no == 'Mon'){\n $day = '3';\n}elseif($day_no == 'Tue'){\n $day = '4';\n}elseif($day_no == 'Wed'){\n $day = '5';\n}elseif($day_no == 'Thu'){\n $day = '6';\n}elseif($day_no == 'Fri'){\n $day = '7';\n}\n// count total holiday class\n$holiday_total_class = DB::table('routine')\n->where('year',$year)\n->where('shift_id',$shift)\n->where('dept_id',$dept)\n->where('semister_id',$semister)\n->where('section_id',$section)\n->where('day',$day)->count();\n$total_holiday_class = $total_holiday_class+$holiday_total_class;\n }\n#-----------------end total holiday class calulation---------------------#\n // total holiday \n $get_all_holiday = DB::table('holiday')\n ->where('year',$year)\n ->whereBetween('holiday_date', [$from, $to])->get(['holiday_date']);\n $data = array();\n foreach ($get_all_holiday as $data1) {\n $data[] = $data1->holiday_date;\n }\n\n \n$date_from = strtotime($from); \n$date_to = strtotime($to); \n$list = array();\nfor ($i=$date_from; $i<=$date_to; $i+=86400) { \n $list[] = date(\"Y-m-d\", $i); \n} \n$total_class_day = array_diff($list,$data);\n$totalClassNo = 0 ; \nforeach ($total_class_day as $total_class_days) {\n $class_day_no = date('D', strtotime($total_class_days));\n if($class_day_no == 'Sat'){\n $day_number = '1';\n}elseif($class_day_no == 'Sun'){\n $day_number = '2';\n}elseif($class_day_no == 'Mon'){\n $day_number = '3';\n}elseif($class_day_no == 'Tue'){\n $day_number = '4';\n}elseif($class_day_no == 'Wed'){\n $day_number = '5';\n}elseif($class_day_no == 'Thu'){\n $day_number = '6';\n}elseif($class_day_no == 'Fri'){\n $day_number = '7';\n}\n// count total holiday class\n$count_total_class_month = DB::table('routine')\n->where('year',$year)\n->where('shift_id',$shift)\n->where('dept_id',$dept)\n->where('semister_id',$semister)\n->where('section_id',$section)\n->where('day',$day_number)->count();\n$totalClassNo = $totalClassNo+$count_total_class_month;\n}\nforeach($result as $value) {\n //do something\n $attentdent_id[] = $value->studentId;\n}\n$absent_result = DB::table('students')\n ->join('student', 'students.id', '=', 'student.studentID')\n ->select('student.*', 'students.studentName','students.studentMobile','students.studentImage','student.registration')\n ->where('student.year',$year)\n ->where('student.shift_id',$shift)\n ->where('student.dept_id',$dept)\n ->where('student.semister_id',$semister)\n ->where('student.section_id',$section)\n ->whereNotIn('student.studentID',$attentdent_id)\n ->orderBy('student.roll','asc')\n ->get();\n\n $shift_name = DB::table('shift')->where('id',$shift)->first();\n $dept_name = DB::table('department')->where('id',$dept)->first();\n $semister_name = DB::table('semister')->where('id',$semister)->first();\n $section_name = DB::table('section')->where('id',$section)->first();\n return view('view_report.reportPeriodicClassWiseTopAbsentListView')->with('result',$result)->with('totalClassNo',$totalClassNo)->with('total_holiday_class',$total_holiday_class)->with('from',$from)->with('to',$to)->with('year',$year)->with('shift_name',$shift_name)->with('dept_name',$dept_name)->with('semister_name',$semister_name)->with('section_name',$section_name)->with('dept',$dept)->with('shift',$shift)->with('semister',$semister)->with('section',$section)->with('date_form',$date_form)->with('date_to',$date_too)->with('absent_result',$absent_result);\n }",
"function getStudentReport( $datetypeselect, $startdate, $enddate, $classyear,\r\n\t\t\t\t $residenceselect, $ethnic, $userselect, $watched, $redflag, $vip,\r\n\t\t\t\t $acpro, $housingwaitlist, $field1, $field2, $field3 ) {\r\n\t\t\r\n\t\t$userid = $_SESSION['userid'];\r\n\t\t\r\n\t\tif( $datetypeselect == 0 ) $left = \"left\";\r\n\t\t\r\n\t\t\r\n\t\tif( $startdate ) $datestuff .= \" and c.datecreated >= '\".getMySqlDate( $startdate ).\" 00:00:00'\";\r\n\t\tif( $enddate ) $datestuff .= \" and c.datecreated <= '\".getMySqlDate( $enddate ).\" 23:59:59'\";\r\n\t\t\r\n\t\t$query = \"\r\n\t\t\tSELECT x.ID,\r\n\t\t\t concat( x.LAST_NAME, ', ', x.FIRST_NAME, ' ', x.MIDDLE_NAME ) as FullName,\r\n\t\t\t concat( u.LastName, ', ', u.FirstName, ' ', u.MiddleIn ) as AssignedToName,\r\n\t\t\t s.AssignedTo,\r\n\t\t\t x.ENROLL_STATUS,\r\n\t\t\t x.CAMPUS_PHONE,\r\n\t\t\t x.CELL_PHONE,\r\n\t\t\t x.WOOSTER_EMAIL,\r\n\t\t\t x.PRIMARY_EMAIL,\r\n\t\t\t x.CAMPUS_BOX,\r\n\t\t\t x.CLASS_YEAR,\r\n\t\t\t s.AcProbation,\r\n\t\t\t s.HousingWaitList,\r\n\t\t\t s.Field1,\r\n\t\t\t s.Field2,\r\n\t\t\t s.Field3,\r\n\t\t\t s.VIP,\r\n\t\t\t s.RedFlag,\r\n\t\t\t x.HOME_PHONE,\r\n\t\t\t concat( x.HOUSING_BLDG, ' ', x.HOUSING_ROOM ) as HousingAssignment,\r\n\t\t\t x.ETHNIC,\r\n\t\t\t x.ADVISOR\r\n\t\t\tFROM X_PNSY_STUDENT x, students s, users u, contacts c, `contacts-students` cs\r\n\t\t\tWHERE x.ID = s.StudentID AND cs.ContactID = c.ID $datestuff AND cs.StudentID = x.ID\r\n\t\t\tAND s.StudentID IN (SELECT ID FROM X_PNSY_STUDENT WHERE ID = s.StudentID)\r\n\t\t\";\r\n\t\t\r\n\t\tif( $classyear ) $query .= \" and x.CLASS_YEAR = '$classyear'\";\r\n\r\n\t\tif( $residenceselect ) $query .= \" and x.HOUSING_BDLG = '$residenceselect'\";\r\n\t\tif( $userselect ) $query .= \" and s.assignedto = '$userselect'\";\r\n\t\tif( isset($watched) ) $query .= \" and x.ID in (select studentid from studentwatch where userid = '$userid')\";\r\n\t\tif( isset($redflag) ) $query .= \" and s.redflag != ''\";\r\n\t\tif( isset($vip) ) $query .= \" and s.vip != ''\";\r\n\t\tif( isset($acpro) ) $query .= \" and s.acprobation = 1\";\r\n\t\tif( isset($housingwaitlist) ) $query .= \" and s.housingwaitlist = 1\";\r\n\t\tif( isset($field1) ) $query .= \" and s.Field1 = 1\";\r\n\t\tif( isset($field2) ) $query .= \" and s.Field2 = 1\";\r\n\t\tif( isset($field3) ) $query .= \" and s.Field3 = 1\";\r\n\t\t$query .= \" group by x.ID order by x.LAST_NAME\";\r\n\t\t\t\t\r\n\t\t$return = array();\r\n\t\t$result = mysql_query( $query );\r\n\t\twhile( $row = mysql_fetch_assoc( $result ) ) {\r\n\t\t\tarray_push( $return, $row );\r\n\t\t}\r\n\t\t\r\n\t\tforeach( $return as $rowNumber => $row ) {\r\n\t\t\t\r\n\t\t\t// include the number of contacts\r\n\t\t\t$query = \"select count(*) as NumContacts from contacts\r\n\t\t\t\t where id in (\r\n\t\t\t\t \tselect distinct contactid from `contacts-students` cs\r\n\t\t\t\t\twhere cs.studentid = '\".$row['ID'].\"'\r\n\t\t\t\t )\";\r\n\t\t\t$result = mysql_query( $query );\r\n\t\t\tif( $numContactsArray = mysql_fetch_assoc( $result ) ) {\r\n\t\t\t\t$return[$rowNumber]['NumContacts'] = $numContactsArray['NumContacts'];\r\n\t\t\t}\r\n\t\t\telse $return[$rowNumber]['NumContacts'] = false;\r\n\t\t\t\r\n\t\t\t// include the number of contacts in the date range\r\n\t\t\t$query = \"select count(*) as NumContactsInRange from contacts\r\n\t\t\t\t where id in (\r\n\t\t\t\t \tselect distinct c.id from contacts c\r\n\t\t\t\t\tjoin `contacts-students` cs\r\n\t\t\t\t\ton cs.contactid = c.id\r\n\t\t\t\t\tand cs.studentid = '\".$row['ID'].\"'$datestuff\r\n\t\t\t\t )\";\r\n\t\t\t$result = mysql_query( $query );\r\n\t\t\tif( $numContactsArray = mysql_fetch_assoc( $result ) ) {\r\n\t\t\t\t$return[$rowNumber]['NumContactsInRange'] = $numContactsArray['NumContactsInRange'];\r\n\t\t\t}\r\n\t\t\telse $return[$rowNumber]['NumContactsInRange'] = false;\r\n\t\t\t\r\n\t\t\t// include all the users associated with the contacts\r\n\t\t\t$query = \"select distinct u.ID,\r\n\t\t\t\t\t concat( u.LastName, ', ', u.FirstName, ' ', u.MiddleIn ) as FullName,\r\n\t\t\t\t\t u.Email\r\n\t\t\t\t from users u, `contacts-users` cu, `contacts-students` cs, contacts c\r\n\t\t\t\t where u.id = cu.userid\r\n\t\t\t\t and cu.contactid = cs.contactid\r\n\t\t\t\t and cs.studentid = '\".$row['ID'].\"'\r\n\t\t\t\t and cs.contactid = c.id$datestuff\r\n\t\t\t\t \";\r\n\t\t\t$usersArray = array();\r\n\t\t\t$result = mysql_query( $query );\r\n\t\t\twhile( $userrow = mysql_fetch_assoc( $result ) ) {\r\n\t\t\t\tarray_push( $usersArray, $userrow );\r\n\t\t\t}\r\n\t\t\t$return[$rowNumber]['Users'] = $usersArray;\r\n\t\t\t\r\n\t\t\t$return[$rowNumber]['StartDate'] = $startdate;\r\n\t\t\t$return[$rowNumber]['EndDate'] = $startdate;\r\n\t\t}\r\n\t\treturn $return;\r\n\t}",
"public function get_student_details_by_id($type = \"\", $id = \"\") {\n\t\t$enrol_data = array();\n\t\tif ($type == \"section\") {\n\t\t\t$checker = array(\n\t\t\t\t'section_id' => $id,\n\t\t\t\t'session' => $this->active_session,\n\t\t\t\t'school_id' => $this->school_id\n\t\t\t);\n\t\t\t$enrol_data = $this->db->get_where('enrols', $checker)->result_array();\n\t\t\tforeach ($enrol_data as $key => $enrol) {\n\t\t\t\t$student_details = $this->db->get_where('students', array('id' => $enrol['student_id']))->row_array();\n\t\t\t\t$enrol_data[$key]['code'] = $student_details['code'];\n\t\t\t\t$enrol_data[$key]['user_id'] = $student_details['user_id'];\n\t\t\t\t$enrol_data[$key]['parent_id'] = $student_details['parent_id'];\n\t\t\t\t$user_details = $this->db->get_where('users', array('id' => $student_details['user_id']))->row_array();\n\t\t\t\t$enrol_data[$key]['name'] = $user_details['name'];\n\t\t\t\t$enrol_data[$key]['email'] = $user_details['email'];\n\t\t\t\t$enrol_data[$key]['role'] = $user_details['role'];\n\t\t\t\t$enrol_data[$key]['address'] = $user_details['address'];\n\t\t\t\t$enrol_data[$key]['phone'] = $user_details['phone'];\n\t\t\t\t$enrol_data[$key]['birthday'] = $user_details['birthday'];\n\t\t\t\t$enrol_data[$key]['gender'] = $user_details['gender'];\n\t\t\t\t$enrol_data[$key]['blood_group'] = $user_details['blood_group'];\n\n\t\t\t\t$class_details = $this->crud_model->get_class_details_by_id($enrol['class_id'])->row_array();\n\t\t\t\t$section_details = $this->crud_model->get_section_details_by_id('section', $enrol['section_id'])->row_array();\n\n\t\t\t\t$enrol_data[$key]['class_name'] = $class_details['name'];\n\t\t\t\t$enrol_data[$key]['section_name'] = $section_details['name'];\n\t\t\t}\n\t\t}\n\t\telseif ($type == \"class\") {\n\t\t\t$checker = array(\n\t\t\t\t'class_id' => $id,\n\t\t\t\t'session' => $this->active_session,\n\t\t\t\t'school_id' => $this->school_id\n\t\t\t);\n\t\t\t$enrol_data = $this->db->get_where('enrols', $checker)->result_array();\n\t\t\tforeach ($enrol_data as $key => $enrol) {\n\t\t\t\t$student_details = $this->db->get_where('students', array('id' => $enrol['student_id']))->row_array();\n\t\t\t\t$enrol_data[$key]['code'] = $student_details['code'];\n\t\t\t\t$enrol_data[$key]['user_id'] = $student_details['user_id'];\n\t\t\t\t$enrol_data[$key]['parent_id'] = $student_details['parent_id'];\n\t\t\t\t$user_details = $this->db->get_where('users', array('id' => $student_details['user_id']))->row_array();\n\t\t\t\t$enrol_data[$key]['name'] = $user_details['name'];\n\t\t\t\t$enrol_data[$key]['email'] = $user_details['email'];\n\t\t\t\t$enrol_data[$key]['role'] = $user_details['role'];\n\t\t\t\t$enrol_data[$key]['address'] = $user_details['address'];\n\t\t\t\t$enrol_data[$key]['phone'] = $user_details['phone'];\n\t\t\t\t$enrol_data[$key]['birthday'] = $user_details['birthday'];\n\t\t\t\t$enrol_data[$key]['gender'] = $user_details['gender'];\n\t\t\t\t$enrol_data[$key]['blood_group'] = $user_details['blood_group'];\n\n\t\t\t\t$class_details = $this->crud_model->get_class_details_by_id($enrol['class_id'])->row_array();\n\t\t\t\t$section_details = $this->crud_model->get_section_details_by_id('section', $enrol['section_id'])->row_array();\n\n\t\t\t\t$enrol_data[$key]['class_name'] = $class_details['name'];\n\t\t\t\t$enrol_data[$key]['section_name'] = $section_details['name'];\n\t\t\t}\n\t\t}\n\t\telseif ($type == \"student\") {\n\t\t\t$checker = array(\n\t\t\t\t'student_id' => $id,\n\t\t\t\t'session' => $this->active_session,\n\t\t\t\t'school_id' => $this->school_id\n\t\t\t);\n\t\t\t$enrol_data = $this->db->get_where('enrols', $checker)->row_array();\n\t\t\t$student_details = $this->db->get_where('students', array('id' => $enrol_data['student_id']))->row_array();\n\t\t\t$enrol_data['code'] = $student_details['code'];\n\t\t\t$enrol_data['user_id'] = $student_details['user_id'];\n\t\t\t$enrol_data['parent_id'] = $student_details['parent_id'];\n\t\t\t$user_details = $this->db->get_where('users', array('id' => $student_details['user_id']))->row_array();\n\t\t\t$enrol_data['name'] = $user_details['name'];\n\t\t\t$enrol_data['email'] = $user_details['email'];\n\t\t\t$enrol_data['role'] = $user_details['role'];\n\t\t\t$enrol_data['address'] = $user_details['address'];\n\t\t\t$enrol_data['phone'] = $user_details['phone'];\n\t\t\t$enrol_data['birthday'] = $user_details['birthday'];\n\t\t\t$enrol_data['gender'] = $user_details['gender'];\n\t\t\t$enrol_data['blood_group'] = $user_details['blood_group'];\n\n\t\t\t$class_details = $this->crud_model->get_class_details_by_id($enrol_data['class_id'])->row_array();\n\t\t\t$section_details = $this->crud_model->get_section_details_by_id('section', $enrol_data['section_id'])->row_array();\n\n\t\t\t$enrol_data['class_name'] = $class_details['name'];\n\t\t\t$enrol_data['section_name'] = $section_details['name'];\n\t\t}\n\t\treturn $enrol_data;\n\t}",
"public function getAttendance($class_id, $date_and_time) {\n return $this->get('get_attendance', ['class_id' => $class_id, 'date_and_time' => $date_and_time]);\n }",
"public function reportPeriodicClassWiseTopPresentListView(Request $request)\n {\n $year = trim($request->year) ;\n $shift = trim($request->shift);\n $dept = trim($request->dept);\n $semister = trim($request->semister);\n $section = trim($request->section);\n $date_form = trim($request->from); \n $from = date (\"Y-m-d\", strtotime($date_form));\n $date_to = trim($request->to); \n $date_too = trim($request->to);\n $to = date (\"Y-m-d\", strtotime($date_to));\n\n $result = DB::table('student_attendent')\n ->join('students','student_attendent.studentId','=','students.id')\n ->join('student','students.id','=','student.studentID')\n ->select('student_attendent.*','student.roll','student.registration', DB::raw(\"COUNT(student_attendent.studentId) AS count\"))\n ->where('student_attendent.year',$year)\n ->where('student_attendent.shift_id',$shift)\n ->where('student_attendent.dept_id',$dept)\n ->where('student_attendent.semister_id',$semister)\n ->where('student_attendent.section_id',$section)\n ->where('student.year',$year)\n ->where('student.shift_id',$shift)\n ->where('student.dept_id',$dept)\n ->where('student.semister_id',$semister)\n ->where('student.section_id',$section)\n ->whereBetween('student_attendent.created_at', [$from, $to])\n ->groupBy('student_attendent.studentId')\n ->orderBy('count','DESC')\n ->orderBy('student_attendent.roll','ASC')\n ->get();\n\n $get_holiday = DB::table('holiday')\n ->where('year',$year)\n ->whereNotIn('type',[1])\n ->whereBetween('holiday_date', [$from, $to])->get();\n\n \n $total_holiday_class = 0 ;\n foreach ($get_holiday as $holidays) {\n $day_no = date('D', strtotime($holidays->holiday_date));\n //echo $day_no;\nif($day_no == 'Sat'){\n $day = '1';\n}elseif($day_no == 'Sun'){\n $day = '2';\n}elseif($day_no == 'Mon'){\n $day = '3';\n}elseif($day_no == 'Tue'){\n $day = '4';\n}elseif($day_no == 'Wed'){\n $day = '5';\n}elseif($day_no == 'Thu'){\n $day = '6';\n}elseif($day_no == 'Fri'){\n $day = '7';\n}\n// count total holiday class\n$holiday_total_class = DB::table('routine')\n->where('year',$year)\n->where('shift_id',$shift)\n->where('dept_id',$dept)\n->where('semister_id',$semister)\n->where('section_id',$section)\n->where('day',$day)->count();\n$total_holiday_class = $total_holiday_class+$holiday_total_class;\n }\n#-----------------end total holiday class calulation---------------------#\n // total holiday \n $get_all_holiday = DB::table('holiday')\n ->where('year',$year)\n ->whereBetween('holiday_date', [$from, $to])->get(['holiday_date']);\n $data = array();\n foreach ($get_all_holiday as $data1) {\n $data[] = $data1->holiday_date;\n }\n\n \n$date_from = strtotime($from); \n$date_to = strtotime($to); \n$list = array();\nfor ($i=$date_from; $i<=$date_to; $i+=86400) { \n $list[] = date(\"Y-m-d\", $i); \n} \n$total_class_day = array_diff($list,$data);\n$totalClassNo = 0 ; \nforeach ($total_class_day as $total_class_days) {\n $class_day_no = date('D', strtotime($total_class_days));\n if($class_day_no == 'Sat'){\n $day_number = '1';\n}elseif($class_day_no == 'Sun'){\n $day_number = '2';\n}elseif($class_day_no == 'Mon'){\n $day_number = '3';\n}elseif($class_day_no == 'Tue'){\n $day_number = '4';\n}elseif($class_day_no == 'Wed'){\n $day_number = '5';\n}elseif($class_day_no == 'Thu'){\n $day_number = '6';\n}elseif($class_day_no == 'Fri'){\n $day_number = '7';\n}\n// count total holiday class\n$count_total_class_month = DB::table('routine')\n->where('year',$year)\n->where('shift_id',$shift)\n->where('dept_id',$dept)\n->where('semister_id',$semister)\n->where('section_id',$section)\n->where('day',$day_number)->count();\n$totalClassNo = $totalClassNo+$count_total_class_month;\n}\n\nforeach($result as $value) {\n //do something\n $attentdent_id[] = $value->studentId;\n}\n$absent_result = DB::table('students')\n ->join('student', 'students.id', '=', 'student.studentID')\n ->select('student.*', 'students.studentName','students.studentMobile','students.studentImage','student.registration')\n ->where('student.year',$year)\n ->where('student.shift_id',$shift)\n ->where('student.dept_id',$dept)\n ->where('student.semister_id',$semister)\n ->where('student.section_id',$section)\n ->whereNotIn('student.studentID',$attentdent_id)\n ->orderBy('student.roll','asc')\n ->get();\n\n\n\n $shift_name = DB::table('shift')->where('id',$shift)->first();\n $dept_name = DB::table('department')->where('id',$dept)->first();\n $semister_name = DB::table('semister')->where('id',$semister)->first();\n $section_name = DB::table('section')->where('id',$section)->first();\n return view('view_report.reportPeriodicClassWiseTopPresentListView')->with('result',$result)->with('totalClassNo',$totalClassNo)->with('total_holiday_class',$total_holiday_class)->with('from',$from)->with('to',$to)->with('year',$year)->with('shift_name',$shift_name)->with('dept_name',$dept_name)->with('semister_name',$semister_name)->with('section_name',$section_name)->with('dept',$dept)->with('shift',$shift)->with('semister',$semister)->with('section',$section)->with('date_form',$date_form)->with('date_to',$date_too)->with('absent_result',$absent_result);\n\n\n }",
"public function mark_attendance($message = NULL) {\n $data['sideMenuData'] = fetch_non_main_page_content();\n $tenant_id = $this->tenant_id;\n $course_id = $this->input->post('course_id');\n $class_id = $this->input->post('class_id');\n $subsidy = $this->input->post('subsidy');\n $sort_by = $this->input->get('b');\n $sort_order = $this->input->get('o');\n $class_details = $this->class->get_class_by_id($tenant_id, $course_id, $class_id);\n \n $from_date = parse_date($class_details->class_start_datetime, SERVER_DATE_TIME_FORMAT);///added by shubhranshu\n $to_date = parse_date($class_details->class_end_datetime, SERVER_DATE_TIME_FORMAT);//added by shubhranshu\n $week_start_date = parse_date($this->input->post('week_start'), CLIENT_DATE_FORMAT);//added by shubhranshu\n //echo print_r($from_date);print_r($to_date);print_r($week_start_date);exit;\n \n $week = $this->input->post('week');\n $export = $this->input->post('export');\n $export1 = $this->input->post('export1');\n $this->load->helper('attendance_helper');\n if (!empty($export)) \n {\n $class_details = $this->class->get_class_details_for_report($tenant_id, $course_id, $class_id);\n $class_start = parse_date($class_details->class_start_datetime, SERVER_DATE_TIME_FORMAT);\n $class_end = parse_date($class_details->class_end_datetime, SERVER_DATE_TIME_FORMAT);\n if (empty($class_start))\n $class_start = new DateTime();\n if (empty($class_end))\n $class_end = new DateTime();\n $class_schedule = $this->class->get_all_class_schedule($tenant_id, $class_id);\n $class_schedule_data = array();\n foreach ($class_schedule as $row) {\n $session_arr = array('S1' => '1', 'BRK' => '3', 'S2' => '2');\n $class_schedule_data[date('d/m/y', strtotime($row['class_date']))][$session_arr[$row['session_type_id']]] = date('h:i A', strtotime($row['session_start_time']));\n }\n \n if ($export == 'xls') \n {\n $results = $this->classtraineemodel->get_class_trainee_list_for_attendance($tenant_id, $course_id, $class_id, $subsidy, $class_start, $class_end, $sort_by, $sort_order);\n $this->load->helper('export_helper');\n export_attendance($results, $class_details, $class_start, $class_end, $class_schedule_data);\n } \n else \n {\n $results = $this->classtraineemodel->get_class_trainee_list_for_attendance($tenant_id, $course_id, $class_id, $subsidy, $class_start, $class_end, $sort_by, $sort_order);\n $tenant_details = $this->classtraineemodel->get_tenant_masters($tenant_id);\n $tenant_details->tenant_state = rtrim($this->course->get_metadata_on_parameter_id($tenant_details->tenant_state), ', ');\n $tenant_details->tenant_country = rtrim($this->course->get_metadata_on_parameter_id($tenant_details->tenant_country), ', ');\n\t\t$mark_count = $this->classtraineemodel->get_rows_count($course_id,$class_id);\n \n if ($export == 'xls_week'){\n $this->load->helper('export_helper');\n return generate_class_attendance_sheet_xls($results, $class_details, $class_start, $class_end, $tenant_details, $class_schedule_data);\n }\n $this->load->helper('pdf_reports_helper');\n if ($export == 'pdf') {\n //return generate_class_attendance_pdf($results, $class_details, $tenant_details, $class_schedule_data, $mark_count);\n //print_r($results);exit;\n return generate_class_attendance_pdf($results, $class_details, $tenant_details, $class_schedule_data,$mark_count); // removed mark count by shubhranshu\n \n } else if ($export == 'pdf_week') {\n return generate_class_attendance_sheet_pdf($results, $class_details, $tenant_details, $class_schedule_data);\n }\n }\n \n } \n else \n {\n if($export1=='lock')\n { \n $lock_msg=$this->classtraineemodel->lock_class_attendance($tenant_id,$course_id,$class_id);\n if($lock_msg==TRUE){\n $this->session->set_flashdata(\"success\", \"Succesfully Locked.\");\n }else{\n $this->session ->set_flashdata(\"error\",\"Something went wrong while locking.\");\n }\n }else if($export1=='unlock'){\n $lock_msg=$this->classtraineemodel->unlock_class_attendance($tenant_id,$course_id,$class_id);\n if($lock_msg==TRUE){\n $this->session->set_flashdata(\"success\",\"Succesfully Unocked\");\n }else{\n $this->session->set_flashdata(\"error\",\"Somthing went wrong while Unlocking !\");\n \n }\n }\n \n \n $data = get_data_for_renderring_attendance($tenant_id, $course_id, $class_id, $subsidy, $from_date, $to_date, $week_start_date, $week, $sort_by, $sort_order,'');\n \n $data['class_schedule'] = $this->class->get_all_class_schedule($tenant_id, $class_id);\n $att = $this->classtraineemodel->get_attendance_lock_status($tenant_id,$course_id, $class_id);\n $data['lock_status']=$att->lock_status;\n $data['class_start_datetime']=$att->class_start_datetime;\n\t\t\t$data['user'] = $this->user;\n\t\t\t$data['controllerurl'] = 'class_trainee/mark_attendance';\n $data['page_title'] = 'Class Trainee Enrollment - Mark Attendance';\n $data['main_content'] = 'classtrainee/markattendance';\n //$data['week_start'] = $from_date;\n //$data['sideMenuData'] = $this->sideMenu;\n if (!empty($message))\n $data['message'] = $message;\n $this->load->view('layout', $data);\n }\n }",
"function attendance_get_user_sessions_log_full($userid, $pageparams) {\n global $DB;\n // All taken sessions (including previous groups).\n\n $usercourses = enrol_get_users_courses($userid);\n list($usql, $uparams) = $DB->get_in_or_equal(array_keys($usercourses), SQL_PARAMS_NAMED, 'cid0');\n\n $coursesql = \"(1 = 1)\";\n $courseparams = array();\n $now = time();\n if ($pageparams->sesscourses === 'current') {\n $coursesql = \"(c.startdate = 0 OR c.startdate <= :now1) AND (c.enddate = 0 OR c.enddate >= :now2)\";\n $courseparams = array(\n 'now1' => $now,\n 'now2' => $now,\n );\n }\n\n $datesql = \"(1 = 1)\";\n $dateparams = array();\n if ($pageparams->startdate && $pageparams->enddate) {\n $datesql = \"ats.sessdate >= :sdate AND ats.sessdate < :edate\";\n $dateparams = array(\n 'sdate' => $pageparams->startdate,\n 'edate' => $pageparams->enddate,\n );\n }\n\n if ($pageparams->groupby === 'date') {\n $ordersql = \"ats.sessdate ASC, c.fullname ASC, att.name ASC, att.id ASC\";\n } else {\n $ordersql = \"c.fullname ASC, att.name ASC, att.id ASC, ats.sessdate ASC\";\n }\n\n // WHERE clause is important:\n // gm.userid not null => get unmarked attendances for user's current groups\n // ats.groupid 0 => get all sessions that are for all students enrolled in course\n // al.id not null => get all marked sessions whether or not user currently still in group.\n $sql = \"SELECT ats.id, ats.groupid, ats.sessdate, ats.duration, ats.description, ats.statusset,\n al.statusid, al.remarks, ats.studentscanmark, ats.allowupdatestatus, ats.autoassignstatus,\n ats.preventsharedip, ats.preventsharediptime, ats.studentsearlyopentime,\n ats.attendanceid, att.name AS attname, att.course AS courseid, c.fullname AS cname\n FROM {attendance_sessions} ats\n JOIN {attendance} att\n ON att.id = ats.attendanceid\n JOIN {course} c\n ON att.course = c.id\n LEFT JOIN {attendance_log} al\n ON ats.id = al.sessionid AND al.studentid = :uid\n LEFT JOIN {groups_members} gm\n ON (ats.groupid = gm.groupid AND gm.userid = :uid1)\n WHERE (gm.userid IS NOT NULL OR ats.groupid = 0 OR al.id IS NOT NULL)\n AND att.course $usql\n AND $datesql\n AND $coursesql\n ORDER BY $ordersql\";\n\n $params = array(\n 'uid' => $userid,\n 'uid1' => $userid,\n );\n $params = array_merge($params, $uparams);\n $params = array_merge($params, $dateparams);\n $params = array_merge($params, $courseparams);\n $sessions = $DB->get_records_sql($sql, $params);\n\n foreach ($sessions as $sess) {\n if (empty($sess->description)) {\n $sess->description = get_string('nodescription', 'attendance');\n } else {\n $modinfo = get_fast_modinfo($sess->courseid);\n $cmid = $modinfo->instances['attendance'][$sess->attendanceid]->get_course_module_record()->id;\n $ctx = context_module::instance($cmid);\n $sess->description = format_text(file_rewrite_pluginfile_urls($sess->description,\n 'pluginfile.php', $ctx->id, 'mod_attendance', 'session', $sess->id));\n }\n }\n\n return $sessions;\n}",
"public function Get_Document($type,$course_id,$instructor_id,$teacher_id,$semester,$year)\n {\n $semester_id = $this->DEADLINE->Search_Semester_id($semester,$year);\n //check responsible\n if($teacher_id != null)\n {\n $check_access = $this->Check_Access($teacher_id,$course_id);\n }\n else\n {\n $check_access = null;\n }\n if($type == 'evaluate')\n {\n $sql = \"SELECT ce.`course_evaluate_id`,ce.`exam_evaluate_id`,ce.`num_section`,ce.`credit_total`,ce.`course_id`,ce.`noorspe`,ce.`type`,ce.`type_other`,ce.`teacher_co`,ce.`absent`,ce.`syllabus`,ce.`submit_user_id`,ce.`submit_date`,cg.*,me.*,ee.* \";\n $sql .=\" FROM `course_evaluate` ce, `criterion_grade` cg, `measure_evaluate` me, `exam_evaluate` ee \";\n $sql .=\" WHERE ce.`criterion_grade_id` = cg.`criterion_grade_id` AND ce.`measure_evaluate_id` = me.`measure_evaluate_id` AND ce.`exam_evaluate_id` = ee.`exam_evaluate_id` AND ce.`course_id` = '\".$course_id.\"' AND `semester_id` = '\".$semester_id.\"'\";\n $result = $this->DB->Query($sql);\n if($result)\n {\n $data = $result[0];\n if($data['syllabus'] == null)\n {\n $data['syllabus'] = false;\n }\n }\n else\n {\n $data = false;\n }\n $data['student'] = array();\n if(isset($data['course_evaluate_id']))\n {\n $sql = \"SELECT `section`,`student` FROM `student_evaluate` WHERE `course_evaluate_id` = \".$data['course_evaluate_id'];\n $result = $this->DB->Query($sql);\n if($result)\n {\n for($i=0;$i<count($result);$i++)\n {\n $data['student'][$result[$i]['section'] -1] = $result[$i]['student'];\n }\n }\n }\n\n $data['exam_mid1_committee_lec'] = array();\n $sql = \"SELECT `teacher_id`,`name_type` FROM `exam_commitee` WHERE `exam_evaluate_id` = '\".$data['exam_evaluate_id'].\"' AND `type` = 'MID1' AND `type_commitee` = 'LEC' ORDER BY `updated_date` ASC\";\n $result = $this->DB->Query($sql);\n if($result)\n {\n for($i=0;$i<count($result);$i++)\n {\n $teacher_name = $this->PERSON->Get_Teacher_Name($result[$i]['teacher_id'],$result[$i]['name_type']);\n if($teacher_name != false)\n {\n $temp = explode(\" \",$teacher_name);\n $teacher_name = '';\n for($j=1;$j<count($temp);$j++)\n {\n $teacher_name .= $temp[$j].\" \";\n }\n $teacher_name = trim($teacher_name,\" \");\n }\n array_push($data['exam_mid1_committee_lec'],$teacher_name);\n }\n }\n\n $data['exam_mid1_committee_lab'] = array();\n $sql = \"SELECT `teacher_id`,`name_type` FROM `exam_commitee` WHERE `exam_evaluate_id` = '\".$data['exam_evaluate_id'].\"' AND `type` = 'MID1' AND `type_commitee` = 'LAB' ORDER BY `updated_date` ASC\";\n $result = $this->DB->Query($sql);\n if($result)\n {\n for($i=0;$i<count($result);$i++)\n {\n $teacher_name = $this->PERSON->Get_Teacher_Name($result[$i]['teacher_id'],$result[$i]['name_type']);\n if($teacher_name != false)\n {\n $temp = explode(\" \",$teacher_name);\n $teacher_name = '';\n for($j=1;$j<count($temp);$j++)\n {\n $teacher_name .= $temp[$j].\" \";\n }\n $teacher_name = trim($teacher_name,\" \");\n }\n array_push($data['exam_mid1_committee_lab'],$teacher_name);\n }\n }\n\n $data['exam_mid2_committee_lec'] = array();\n $sql = \"SELECT `teacher_id`,`name_type` FROM `exam_commitee` WHERE `exam_evaluate_id` = '\".$data['exam_evaluate_id'].\"' AND `type` = 'MID2' AND `type_commitee` = 'LEC' ORDER BY `updated_date` ASC\";\n $result = $this->DB->Query($sql);\n if($result)\n {\n for($i=0;$i<count($result);$i++)\n {\n $teacher_name = $this->PERSON->Get_Teacher_Name($result[$i]['teacher_id'],$result[$i]['name_type']);\n if($teacher_name != false)\n {\n $temp = explode(\" \",$teacher_name);\n $teacher_name = '';\n for($j=1;$j<count($temp);$j++)\n {\n $teacher_name .= $temp[$j].\" \";\n }\n $teacher_name = trim($teacher_name,\" \");\n }\n array_push($data['exam_mid2_committee_lec'],$teacher_name);\n }\n }\n\n $data['exam_mid2_committee_lab'] = array();\n $sql = \"SELECT `teacher_id`,`name_type` FROM `exam_commitee` WHERE `exam_evaluate_id` = '\".$data['exam_evaluate_id'].\"' AND `type` = 'MID2' AND `type_commitee` = 'LAB' ORDER BY `updated_date` ASC\";\n $result = $this->DB->Query($sql);\n if($result)\n {\n for($i=0;$i<count($result);$i++)\n {\n $teacher_name = $this->PERSON->Get_Teacher_Name($result[$i]['teacher_id'],$result[$i]['name_type']);\n if($teacher_name != false)\n {\n $temp = explode(\" \",$teacher_name);\n $teacher_name = '';\n for($j=1;$j<count($temp);$j++)\n {\n $teacher_name .= $temp[$j].\" \";\n }\n $teacher_name = trim($teacher_name,\" \");\n }\n array_push($data['exam_mid2_committee_lab'],$teacher_name);\n }\n }\n\n $data['exam_final_committee_lec'] = array();\n $sql = \"SELECT `teacher_id`,`name_type` FROM `exam_commitee` WHERE `exam_evaluate_id` = '\".$data['exam_evaluate_id'].\"' AND `type` = 'FINAL' AND `type_commitee` = 'LEC' ORDER BY `updated_date` ASC\";\n $result = $this->DB->Query($sql);\n if($result)\n {\n for($i=0;$i<count($result);$i++)\n {\n $teacher_name = $this->PERSON->Get_Teacher_Name($result[$i]['teacher_id'],$result[$i]['name_type']);\n if($teacher_name != false)\n {\n $temp = explode(\" \",$teacher_name);\n $teacher_name = '';\n for($j=1;$j<count($temp);$j++)\n {\n $teacher_name .= $temp[$j].\" \";\n }\n $teacher_name = trim($teacher_name,\" \");\n }\n array_push($data['exam_final_committee_lec'],$teacher_name);\n }\n }\n\n $data['exam_final_committee_lab'] = array();\n $sql = \"SELECT `teacher_id`,`name_type` FROM `exam_commitee` WHERE `exam_evaluate_id` = '\".$data['exam_evaluate_id'].\"' AND `type` = 'FINAL' AND `type_commitee` = 'LAB' ORDER BY `updated_date` ASC\";\n $result = $this->DB->Query($sql);\n if($result)\n {\n for($i=0;$i<count($result);$i++)\n {\n $teacher_name = $this->PERSON->Get_Teacher_Name($result[$i]['teacher_id'],$result[$i]['name_type']);\n if($teacher_name != false)\n {\n $temp = explode(\" \",$teacher_name);\n $teacher_name = '';\n for($j=1;$j<count($temp);$j++)\n {\n $teacher_name .= $temp[$j].\" \";\n }\n $teacher_name = trim($teacher_name,\" \");\n }\n array_push($data['exam_final_committee_lab'],$teacher_name);\n }\n }\n $data['teacher'] = array();\n $sql = \"SELECT `teacher_id`,`name_type` FROM `teacher_exam_evaluate` WHERE `course_eveluate_id` = \".$data['course_evaluate_id'].\" ORDER BY `updated_date` ASC\";\n $result = $this->DB->Query($sql);\n if($result)\n {\n for($i=0;$i<count($result);$i++)\n {\n $teacher_name = $this->PERSON->Get_Teacher_Name($result[$i]['teacher_id'],$result[$i]['name_type']);\n if($teacher_name != false)\n {\n $temp = explode(\" \",$teacher_name);\n $teacher_name = '';\n for($j=1;$j<count($temp);$j++)\n {\n $teacher_name .= $temp[$j].\" \";\n }\n $teacher_name = trim($teacher_name,\" \");\n }\n array_push($data['teacher'],$teacher_name);\n }\n }\n }\n else if($type == 'special')\n {\n $check_access = true;\n $lecture_detail = array();\n $sql = \"SELECT st.`topic_name`,st.`teaching_date`,st.`teaching_time_start`,st.`teaching_time_end`,st.`teaching_room` FROM `special_lecture_teach` st, `course_hire_special_instructor` ci \";\n $sql .= \"WHERE ci.`instructor_id` = \".$instructor_id.\" AND ci.`course_id` = '\".$course_id.\"' AND st.`hire_id` = ci.`hire_id` AND ci.`semester_id` = \".$semester_id;\n $result = $this->DB->Query($sql);\n if($result)\n {\n $numtable = count($result);\n for ($i=0; $i < count($result); $i++)\n {\n $lecture_detail[$i] = $result[$i];\n }\n }\n else\n {\n $numtable = 0;\n $data['lecture_detail'] = null;\n }\n $sql = \"SELECT si.`instructor_id`,si.`prefix`,si.`firstname`,si.`lastname`,si.`position`,si.`qualification`,si.`work_place`,si.`phone`,si.`phone_sub`,si.`phone_mobile`,si.`cv`,si.`email`,si.`invited`,ei.`level_teacher`,ei.`level_descript`,ei.`payment_method`,ei.`expense_lec_checked`,ei.`expense_lec_number`,ei.`expense_lec_hour`,ei.`expense_lec_cost`,ei.`expense_lab_checked`,ei.`expense_lab_number`,ei.`expense_lab_hour`,ei.`expense_lab_cost`,ei.`expense_plane_check`,ei.`expense_plane_depart`,ei.`expense_plane_arrive`,ei.`expense_plane_cost`,ei.`expense_taxi_check`,ei.`expense_taxi_depart`,ei.`expense_taxi_arrive`,ei.`expense_taxi_cost`,ei.`expense_car_check`,ei.`expense_car_distance`,ei.`expense_car_unit`,ei.`expense_car_cost`,ei.`expense_hotel_choice`,ei.`expense_hotel_per_night`,ei.`expense_hotel_number`,ei.`expense_hotel_cost`,ei.`cost_total`, ci.*\";\n $sql .= \" FROM `special_instructor` si,`expense_special_instructor` ei, `course_hire_special_instructor` ci \";\n $sql .= \"WHERE ci.`instructor_id` = \".$instructor_id.\" AND ci.`course_id` = '\".$course_id.\"' AND ci.`instructor_id` = si.`instructor_id` AND ci.`expense_id` = ei.`expense_id` AND ci.`semester_id` = \".$semester_id;\n $result = $this->DB->Query($sql);\n if($result)\n {\n $data = $result[0];\n if($data['cv'] == null)\n {\n $data['cv'] = false;\n }\n $data['num_table'] = $numtable;\n $data['lecture_detail'] = $lecture_detail;\n }\n else\n {\n $data = false;\n }\n }\n else\n {\n die(\"รูปแบบข้อมูลผิดพลาด กรุณาติดต่อผู้ดูแลระบบ\");\n }\n $data['ACCESS'] = $check_access;\n return $data;\n }",
"public function students_with_attendance($class_days_id,$exam_id)\n\t{\n\t\t$data['update'] = $this->attendance_model->isset_students_attendance($class_days_id,$exam_id);\n\t\t$data['results'] = $this->attendance_model->students_with_attandance($class_days_id,$exam_id);\n\t\treturn $data;\n\t}",
"public function generate_subject_code_attendance_report(){\n $this->crud->credibilityAuth(array('Administrator','Registrar','Faculty'));\n // get inputs\n $con = array('subject_code'=>$this->input->post('subject_code'),'batch_year'=> $this->input->post('batch_year_id'));\n $range1 = $this->input->post('date_range1');\n $range2 = $this->input->post('date_range2');\n // get necessary report data\n $students = $this->admin_model->getStudentsBasicInfo($con,'a');\n $attendance = $this->admin_model->getStudentAttendanceBySubjectCode($range1,$range2,$con['subject_code'],$con['batch_year']);\n $att_record = $this->admin_model->getStudentSubjectCodeAttendanceRecord($students,$range1,$range2,$con['subject_code'],$con['batch_year']);\n $att_dates = $this->crud->getDistinctValueOnAssociativeArray($attendance,'attendance_date');\n // generate report data in pdf or csv format from admin_report_model\n if((!empty($con['subject_code']) && !empty($range1) && !empty($range2)) && ($range1 <= $range2)){\n if(!empty($attendance) && !empty($att_record)){\n if($this->input->post('export_csv')){\n $this->admin_report_model->generateStudentAttendanceBySubjectCodeCsv($attendance,$att_record,$att_dates,$con,$range1,$range2);\n exit;\n }else if($this->input->post('export_pdf')){\n $this->admin_report_model->generateSubjectCodeAttendanceReportPdf($attendance,$con,$range1,$range2);\n }\n }\n $this->session->set_flashdata('warning', 'No reports found!.');\n }else{\n $this->session->set_flashdata('danger', 'Invalid input.');\n }\n redirect('attendance_report');\n }",
"function getReservationLecturer($classid,$crdate){\r\ninclude 'dbConnect.php';\r\n$sql= 'SELECT Student.SID, Classroom.ClassID, Course.CourseID, Student.SName, Course.CourseName, Classroom.Location, Classroom.StartTime, Classroom.EndTime, CRDate \r\nFROM ClassReservation\r\nINNER JOIN Student ON ClassReservation.SID = Student.SID\r\nINNER JOIN Classroom ON ClassReservation.ClassID = Classroom.ClassID\r\nINNER JOIN Course ON ClassReservation.CourseID = Course.CourseID\r\nWHERE Classroom.ClassID = '.$classid.'\r\nAND CRDate = \"'.$crdate.'\";';\r\n$result = mysqli_query($conn, $sql);\r\nif(isset($result)){\r\n\tif(mysqli_num_rows($result) > 0){\r\n\t\t$view = '<form method=\"post\" action=\"attendance.php\">\r\n\t\t\t\t<table class=\"table table-striped custab\">\r\n\t\t\t\t<thead>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<th>Student Name</th>\r\n\t\t\t\t\t\t<th>Course Name</th>\r\n\t\t\t\t\t\t<th>Location</th>\r\n\t\t\t\t\t\t<th>Start Time</th>\r\n\t\t\t\t\t\t<th>End Time</th>\r\n\t\t\t\t\t\t<th>Class Date</th>\r\n\t\t\t\t\t\t<th>Attendance</th>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</thead><tbody>';\r\n\r\n\t\t$count = 0;\r\n\t\twhile($row = mysqli_fetch_assoc($result))\r\n\t\t{\r\n\t\t$dt = strtotime($row['CRDate']);\r\n\t\t$day = date(\"l\", $dt);\r\n\t\t\r\n\t\t$view.= '<tr>\r\n <td>'.$row['SName'].'</td>\r\n <td>'.$row['CourseName'].'</td>\r\n\t\t\t\t<td>'.$row['Location'].'</td>\r\n\t\t\t\t<td>'.$row['StartTime'].'</td>\r\n\t\t\t\t<td>'.$row['EndTime'].'</td>\r\n\t\t\t\t<td>'.$row['CRDate'].' / ('.$day.')</td>\r\n\t\t\t\t<td>\r\n\t\t\t\t<div class=\"switch-field\">\r\n\t\t\t\t <input type=\"radio\" id=\"switch_left'.$count.'\" name=\"tableRow['.$count.'][attendance]\" value=\"Present\" checked/>\r\n\t\t\t\t <label for=\"switch_left'.$count.'\">Present</label>\r\n\t\t\t\t <input type=\"radio\" id=\"switch_right'.$count.'\" name=\"tableRow['.$count.'][attendance]\" value=\"Absent\" />\r\n\t\t\t\t <label for=\"switch_right'.$count.'\">Absent</label>\r\n\t\t\t\t</div>\r\n\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<div><input type=\"hidden\" name=\"tableRow['.$count.'][sid]\" value=\"'.$row[\"SID\"].'\"/></div>\r\n\t\t\t\t<div><input type=\"hidden\" name=\"tableRow['.$count.'][classid]\" value=\"'.$row[\"ClassID\"].'\"/></div>\r\n\t\t\t\t<div><input type=\"hidden\" name=\"tableRow['.$count.'][courseid]\" value=\"'.$row[\"CourseID\"].'\"/></div>\r\n\t\t\t\t<div><input type=\"hidden\" name=\"tableRow['.$count.'][crdate]\" value=\"'.$row[\"CRDate\"].'\"/></div>';\r\n\t\t$count++;\r\n\t\t}\r\n\t\t$view.= '</tbody></table>\r\n\t\t\t\t<div><input type=\"hidden\" name=\"lid\" value=\"'.$_SESSION[\"Luserid\"].'\"/></div>\r\n\t\t\t\t<input class=\"btn btn-success\" type=\"submit\" name=\"record\" value=\"Record Attendance\"/>\r\n\t\t\t\t</form>';\r\n\t}else{\r\n\t\t$view = '<div class=\"alert alert-danger\">\r\n\t\t\t\t No student register this class yet!\r\n\t\t\t\t</div>';\r\n\t}\r\n}else{\r\n\t$view = 'Database Connection Error.';\r\n}\r\n\treturn $view;\r\n}",
"public function getCDateAttendances_new()\n {\n $orgid = isset($_REQUEST['refno']) ? $_REQUEST['refno'] : 0;\n $att = isset($_REQUEST['att']) ? $_REQUEST['att'] : 0;\n $date = isset($_REQUEST['date']) ? $_REQUEST['date'] : '';\n $datafor = isset($_REQUEST['datafor']) ? $_REQUEST['datafor'] : '';\n $empid = isset($_REQUEST['empid']) ? $_REQUEST['empid'] : ''; \n $zone = getTimeZone($orgid);\n date_default_timezone_set($zone);\n $date =date('Y-m-d',strtotime($date));\n $time = date('H:i:s');\n $data = array();\n $cdate = date('Y-m-d');\n\t $adminstatus = getAdminStatus($empid);\n\t\t$cond = \"\";\n\t\t$cond1 = \"\";\n\t\tif($adminstatus == '2')\n\t\t{ \n\t \t$dptid = getDepartmentIdByEmpID($empid);\n\t\t\t$cond = \" AND Department = $dptid \";\n\t\t\t$cond1 = \" AND Dept_id = $dptid \";\n\t\t\t\n\t\t}\n\t \n\t \n //today attendance\n\t\t if($datafor=='present'){\n\t\t$query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out FROM `AttendanceMaster` WHERE `AttendanceDate`=? $cond1 and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8 ) AND EmployeeId in (SELECT Id from EmployeeMaster where OrganizationId = ? AND Is_Delete = 0 ) order by `name`\", array($date,$orgid,$orgid));\n $data['present'] = $query->result();\n\t\t\t\n\t\t\t }else if($datafor=='absent'){/*\n //---managing off (weekly and holiday)\n $dt = $date; \n // day of month : 1 sun 2 mon --\n $dayOfWeek = 1 + date('w', strtotime($dt));\n $weekOfMonth = weekOfMonth($dt);\n $week = '';\n $query = $this->db->query(\"SELECT `WeekOff` FROM `WeekOffMaster` WHERE `OrganizationId` =? AND `Day` = ?\", array(\n $orgid,\n $dayOfWeek\n ));\n if ($row = $query->result()) {\n $week = explode(\",\", $row[0]->WeekOff);\n }\n if ($week[$weekOfMonth - 1] == 1) {\n $data['absentees'] = '';\n } else {\n $query = $this->db->query(\"SELECT `DateFrom`, `DateTo` FROM `HolidayMaster` WHERE OrganizationId=? and (? between `DateFrom` and `DateTo`) \", array(\n $orgid,\n $dt\n ));\n if ($query->num_rows() > 0) {\n //-----managing off (weekly and holiday) - close \n $query = $this->db->query(\"SELECT CONCAT(FirstName,' ',LastName) as name,'-' as TimeIn,'-' as TimeOut ,'Absent' as status from EmployeeMaster where `OrganizationId` =$orgid and EmployeeMaster.archive=1 and EmployeeMaster.Id not in(select AttendanceMaster.`EmployeeId` from AttendanceMaster where `AttendanceDate`='$date' and `OrganizationId` =$orgid) and CAST('$time' as time) > (select TimeIn from ShiftMaster where ShiftMaster.Id=shift) order by `name`\", array(\n $orgid,\n $date,\n $orgid\n ));\n $data['absentees'] = $query->result();\n } \n }*/\n\t\t\t//////////today_abs\n\t\t\t\n\t\t\tif($date != date('Y-m-d')){// for other deay's absentees\n\t\t\t\t$query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , '-' as `TimeOut` ,'-' as TimeIn FROM `AttendanceMaster` WHERE `AttendanceDate`=? $cond1 and OrganizationId=? and (AttendanceStatus=2 or AttendanceStatus=6 or AttendanceStatus=7 ) AND EmployeeId in (SELECT Id from EmployeeMaster where OrganizationId = $orgid AND Is_Delete = 0) order by `name`\", array($date,$orgid));\n\t\t\t\t$this->db->close();\n\t\t\t\t$data['absent'] = $query->result();\n\t\t\t}else{ // for today's absentees\n\t\t\t\t$query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , '-' as `TimeOut` ,'-' as TimeIn FROM `AttendanceMaster` WHERE `AttendanceDate`=? $cond1 and OrganizationId=? \nand AttendanceStatus in (2,6,7) AND EmployeeId in (SELECT Id from EmployeeMaster where OrganizationId = $orgid AND Is_Delete = 0 ) order by `name` \",array($date,$orgid));\n\t\t\t$temp=array();\n $temp = $query->result();\n\t\t\t\n\t\t\t$query = $this->db->query(\"SELECT CONCAT(FirstName,' ',LastName) as name, '-' as `TimeOut` ,'-' as TimeIn FROM `EmployeeMaster` WHERE `OrganizationId` =? AND Is_Delete=0 $cond AND ARCHIVE =1 AND is_Delete = 0 AND (DOL='0000-00-00' OR DOL>CURDATE()) AND Id NOT IN ( SELECT EmployeeId FROM AttendanceMaster WHERE AttendanceDate = ? AND `OrganizationId` =? ) AND ( SELECT `TimeIn` FROM `ShiftMaster` WHERE `Id` = Shift AND TimeIn < ? )\",array($orgid,$date,$orgid,$time));\n\t\t\t\n\t\t\t\t$data['absent']= array_merge($temp,$query->result());\t\n\t\t\t}\n\t\t\t\n\t}else if($datafor=='latecomings'){\n //////// today_late\n $query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out FROM `AttendanceMaster` WHERE (time(TimeIn) > (select time(TimeIn) from ShiftMaster where ShiftMaster.Id=shiftId)) and `AttendanceDate`=? $cond1 and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8 ) AND EmployeeId in (SELECT Id from EmployeeMaster where OrganizationId = $orgid AND Is_Delete = 0 ) order by `name`\", array(\n $date,\n $orgid\n ));\n $data['lateComings'] = $query->result();\n\t}else if($datafor=='earlyleavings'){\t\t\n ////////today_early\n /*$query = $this->db->query(\"SELECT (select CONCAT(FirstName,' ',LastName) from EmployeeMaster where id= `EmployeeId`) as name , SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out FROM `AttendanceMaster` WHERE (time(TimeOut) < (select time(TimeOut) from ShiftMaster where ShiftMaster.Id=shiftId) and TimeOut!='00:00:00' ) and `AttendanceDate`=? $cond1 and OrganizationId=? and (AttendanceStatus=1 or AttendanceStatus=3 or AttendanceStatus=4 or AttendanceStatus=5 or AttendanceStatus=8 ) AND EmployeeId in (SELECT Id from EmployeeMaster where OrganizationId = $orgid AND Is_Delete = 0) order by `name`\", array( $date,$orgid ));\n $data['earlyLeavings'] = $query->result();*/\n\t\t\t\n\t\t $query = $this->db->query(\"select Shift,Id , FirstName , LastName from EmployeeMaster where OrganizationId = $orgid and Id IN (select EmployeeId from AttendanceMaster where OrganizationId = $orgid and AttendanceDate='$date' and TimeIn != '00:00:00' ) AND is_Delete=0 order by FirstName\");\n\t\t $res = array();\n\t\t $cond = '';\n foreach ($query->result() as $row) {\n $ShiftId = $row->Shift;\n $EId = $row->Id;\n $query = $this->db->query(\"select TimeIn,TimeOut,shifttype from ShiftMaster where Id = $ShiftId\");\n if ($data123 = $query->row()) {\n $shiftout = $data123->TimeOut;\n $shiftout1 = $date. ' '.$data123->TimeOut;\n\t\t\t\tif($data123->shifttype==2)\n\t\t\t\t{\n\t\t\t\t\t$nextdate = date('Y-m-d',strtotime($date . \"+1 days\"));\n\t\t\t\t\t $shiftout1 = $nextdate.' '.$data123->TimeOut;\n\t\t\t\t}\n $shift = substr($data123->TimeIn, 0, 5) . ' - ' . substr($data123->TimeOut, 0, 5);\n $ct = date('H:i:s');\n \n if ($cdate == $date)\n $cond = \" and TimeOut !='00:00:00'\";\n $query333 = $this->db->query(\"select SUBSTR(TimeIn, 1, 5) as `TimeIn`, SUBSTR(TimeOut, 1, 5) as `TimeOut` ,'Present' as status,EntryImage,ExitImage,SUBSTR(checkInLoc, 1, 40) as checkInLoc, SUBSTR(CheckOutLoc, 1, 40) as CheckOutLoc,latit_in,longi_in,latit_out,longi_out from AttendanceMaster where EmployeeId =$EId and if(timeoutdate = '0000-00-00' , TimeOut < '$shiftout' , CONCAT(timeoutdate,' ' ,TimeOut) < '$shiftout1' ) and AttendanceDate='$date' and TimeOut !='00:00:00' \");\n\t\t\t\t\t\n\t\t\t\t\t\n if ($row333 = $query333->row()) {\n $a = new DateTime($row333->TimeOut);\n $b = new DateTime($data123->TimeOut);\n $interval = $a->diff($b);\n $data1['earlyby'] = $interval->format(\"%H:%I\");\n $data1['timeout'] = substr($row333->TimeOut, 0, 5);\n $data1['name'] = $row->FirstName . ' ' . $row->LastName;\n $data1['shift'] = $shift;\n $data1['status'] = $row333->status;\n $data1['TimeIn'] = $row333->TimeIn;\n $data1['TimeOut'] = $row333->TimeOut;\n $data1['CheckOutLoc'] = $row333->CheckOutLoc;\n $data1['checkInLoc'] = $row333->checkInLoc;\n $data1['EntryImage'] = $row333->EntryImage;\n $data1['ExitImage'] = $row333->ExitImage;\n $data1['latit_in'] = $row333->latit_in;\n $data1['longi_in'] = $row333->longi_in;\n $data1['latit_out'] = $row333->latit_out;\n $data1['longi_out'] = $row333->longi_out;\n $data1['date'] = $date;\n $res[] = $data1;\n }\n \n }\n }\n\t\t $data['earlyLeavings'] =\t $res;\n\t\t\t\n\t}\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n \n \n \n echo json_encode($data, JSON_NUMERIC_CHECK);\n \n }",
"public function generate_voc_program_attendance_report(){\n $this->crud->credibilityAuth(array('Administrator','Registrar'));\n // get inputs\n $condition= array('vocational_program'=>$this->input->post('vocational_program'),'batch_year'=> $this->input->post('batch_year_id'));\n $range1 = $this->input->post('date_range1');\n $range2 = $this->input->post('date_range2');\n // get necessary report data\n $voc_program= $this->vocational_program_model->getVocationalPrograms('s',array('voc_program_id'=>$condition['vocational_program']));\n $students = $this->admin_model->getStudentsBasicInfo($condition,'a');\n $attendance = $this->admin_model->getStudentAttendanceByVocationalProgram($students,$range1,$range2,$condition['batch_year']);\n $att_record = $this->admin_model->getStudentDailyAttendanceRecord($students,$range1,$range2,$condition['batch_year']);\n $att_dates = $this->crud->getDistinctValueOnAssociativeArray($attendance,'attendance_date');\n // generate report data in pdf or csv format from admin_report_model\n if((!empty($condition['vocational_program']) && !empty($range1) && !empty($range2)) && ($range1 <= $range2)){\n if(!empty($attendance)){\n if($this->input->post('export_csv')){\n $this->admin_report_model->generateStudentAttendanceByVocationalProgramCsv($attendance,$att_record,$att_dates,$voc_program,$range1,$range2);\n exit;\n }else if($this->input->post('export_pdf')){\n $this->admin_report_model->generateVocProgramAttendanceReportPdf($attendance,$voc_program,$range1,$range2);\n }\n }\n $this->session->set_flashdata('warning', 'No reports found!.');\n redirect('attendance_report');\n }\n $this->session->set_flashdata('danger', 'Invalid input.');\n redirect('attendance_report');\n \n }",
"public function index()\n {\n// $attendences=Attendence::with('student','teacher')->get();\n// dd($attendences);\n //$status=Student_Attendance::with('attendance')->get();\n //dd($status);\n $attendences=Attendence::\n join('student__attendances','student__attendances.attendence_id','attendences.id')\n ->join('teachers','attendences.teacher_id','teachers.id')\n\n ->join('students','student__attendances.student_id','students.id')\n\n ->join('class_news','attendences.class_id','class_news.id')\n\n ->select('class_news.class','teachers.name as teacherName','attendences.date','student__attendances.status','students.name as studentName')\n\n ->get();\n //dd($attendences);\n return view('Backend.attendences.index', compact('attendences'));\n\n }",
"public function attendance($param1 = '', $param2 = '', $param3 = ''){\n\n\t\tif($param1 == 'take_attendance'){\n\t\t\t$response = $this->crud_model->take_attendance();\n\t\t\techo $response;\n\t\t}\n\n\t\tif($param1 == 'filter'){\n\t\t\t$date = '01 '.$this->input->post('month').' '.$this->input->post('year');\n\t\t\t$page_data['attendance_date'] = strtotime($date);\n\t\t\t$page_data['class_id'] = $this->input->post('class_id');\n\t\t\t$page_data['section_id'] = $this->input->post('section_id');\n\t\t\t$page_data['month'] = $this->input->post('month');\n\t\t\t$page_data['year'] = $this->input->post('year');\n\t\t\t$this->load->view('backend/admin/attendance/list', $page_data);\n\t\t}\n\n\t\tif($param1 == 'student'){\n\t\t\t$page_data['attendance_date'] = strtotime($this->input->post('date'));\n\t\t\t$page_data['class_id'] = htmlspecialchars($this->input->post('class_id'));\n\t\t\t$page_data['section_id'] = htmlspecialchars($this->input->post('section_id'));\n\t\t\t$this->load->view('backend/admin/attendance/student', $page_data);\n\t\t}\n\n\t\tif(empty($param1)){\n\t\t\t$page_data['folder_name'] = 'attendance';\n\t\t\t$page_data['page_title'] = 'attendance';\n\t\t\t$this->load->view('backend/index', $page_data);\n\t\t}\n\t}",
"public function fetchAttendaceType($id = null) \n\t{\n\t\t\n\t\t\t$classData = $this->model_section->fetchSectionDataByClass($id);\n\t\t\t$form = '<div class=\"form-group\">\n\t\t <label for=\"sectionName\" class=\"col-sm-2 control-label\">Lớp học</label>\n\t\t <div class=\"col-sm-10\">\n\t\t <select class=\"form-control\" name=\"sectionName\" id=\"sectionName\">\n\t\t \n\t\t \t';\n\t\t\tforeach ($classData as $key => $value) {\n\t\t \t\t$form .= '<option value=\"'.$value['section_id'].'\">'.$value['section_name'].'</option>';\n\t\t \t} // /froeac\n\t\t \t$form .='</select>\n\t\t </div>\n\t\t </div>\n\t\t <div class=\"form-group\">\n\t\t <label for=\"date\" class=\"col-sm-2 control-label\">Ngày</label>\n\t\t <div class=\"col-sm-10\">\n\t\t <input type=\"text\" class=\"form-control\" id=\"date\" name=\"date\" placeholder=\"Date\" autocomplete=\"off\">\n\t\t </div>\n\t\t </div>\n\t\t <div class=\"form-group\">\n\t\t <div class=\"col-sm-offset-2 col-sm-10\">\n\t\t <button type=\"submit\" class=\"btn btn-primary\">Submit</button>\n\t\t </div>\n\t\t </div>';\t\t \n\t\t\n\t\t\n\n\t\techo $form;\n\t}",
"public function showHodReport()\n {\n $data = [];\n $query = \"\";\n\n if (!empty($_POST['academic_year'])) {\n $query .= \" academic_id = ? \";\n $this->acd_year = $this->verifyInput($_POST['academic_year']);\n $data[] = $this->acd_year;\n }\n if (!empty($_POST['year'])) {\n $query .= \" AND c.s_class_id = ? \";\n $this->year = $this->verifyInput($_POST['year']);\n $data[] = $this->year;\n }\n if (!empty($_POST['div'])) {\n $query .= \" AND c.div_id = ? \";\n $this->s_div = $this->verifyInput($_POST['div']);\n $data[] = $this->s_div;\n }\n if (!empty($_POST['sem_id']) || !empty($_POST['sem'])) {\n $query .= \" AND c.sem_id = ?\";\n $this->sem = isset($_POST['sem_id']) ? $this->verifyInput($_POST['sem_id']) : $this->verifyInput($_POST['sem']);\n $data[] = $this->sem;\n }\n if (!empty($_POST['class'])) {\n $query .= \" AND c.class_id = ? \";\n $this->class = $this->verifyInput($_POST['class']);\n $data[] = $this->class;\n }\n if ($_SESSION['role_id'] == 0) {\n if (isset($_POST['dept']) && !empty($_POST['dept'])) {\n $query .= \" AND c.dept_id = ? \";\n $this->dept = $this->verifyInput($_POST['dept']);\n $data[] = $this->dept;\n }\n } else if ($_SESSION['role_id'] == 1) {\n if (isset($_SESSION['dept'])) {\n $query .= \" AND c.dept_id = ? \";\n $this->dept = $this->verifyInput($_SESSION['dept']);\n $data[] = $this->dept;\n }\n } else {\n $query .= \" AND c.dept_id = ? \";\n $this->dept = $this->verifyInput($_SESSION['dept']);\n $data[] = $this->dept;\n }\n\n $result = $this->getStudentByDeptDivisionAndYear([$this->dept, $this->year, $this->s_div]);\n if (!$result) return json_encode(array(\"error\" => \"nostudent\"));\n\n if ((!empty($_POST['from-date']) && !empty($_POST['till-date'])) || ($_POST['from-date'] != \"\" && $_POST['till-date'] != \"\")) {\n $query .= \" AND DATE(date_time) >= DATE(?) AND DATE(date_time) <= DATE(?) \";\n $this->from_date = $this->verifyInput($_POST['from-date']);\n $this->till_date = $this->verifyInput($_POST['till-date']);\n $data[] = date('Y-m-d', strtotime($this->from_date));\n $data[] = date('Y-m-d', strtotime($this->till_date));\n\n $result = $this->getAttendanceByDate(\"date_time >= DATE(?) AND date_time <= DATE(?)\", [$this->dept, $this->year, $this->s_div, date('Y-m-d', strtotime($this->from_date)), date('Y-m-d', strtotime($this->till_date))]);\n\n if (!$result) return (array(\"error\" => \"noattend\"));\n } else if (!empty($_POST['from-date']) || $_POST['from-date'] != \"\") {\n $query .= \" AND DATE(date_time) >= DATE(?) \";\n $this->from_date = $this->verifyInput($_POST['from-date']);\n $data[] = date('Y-m-d', strtotime($this->from_date));\n $from_data = $this->getAttendanceByDate(\"DATE(date_time) >= DATE(?)\", [$this->dept, $this->year, $this->s_div, date('Y-m-d', strtotime($this->from_date))]);\n if (!$from_data) return (array(\"error\" => \"noattend\"));\n } else if (!empty($_POST['till-date']) || $_POST['till-date'] != \"\") {\n $query .= \" AND DATE(date_time) <= DATE(?) \";\n $this->till_date = $this->verifyInput($_POST['till-date']);\n $data[] = date('Y-m-d', strtotime($this->till_date));\n\n $till_data = $this->getAttendanceByDate(\"date_time <= DATE(?)\", [$this->dept, $this->year, $this->s_div, $this->sem_id, date('Y-m-d', strtotime($this->till_date))]);\n if (!$till_data) return (array(\"error\" => \"noattend\"));\n }\n\n $result = $this->getClassByYearDivisionAcademicAndDept([$_POST['academic_year'], $this->class, $this->s_div, $this->dept]);\n if (!$result) json_encode(array(\"error\" => \"noclass\"));\n else {\n //var_dump($_POST);\n //var_dump($query);\n $result = $this->getHodReportYearWise($query, $data);\n // if(empty($_POST['class_id'])){\n // $result = $this->getHodReportYearWise($query,$data);\n // }else{\n // $result[\"each_total\"], \"total\" => $result['total'], \"lectures\" =>$result['total_lectures']\n // } \n if (isset($result['e'])) return json_encode(array(\"error\" => \"notfound\"));\n return json_encode(array(\"error\" => \"none\", \"data\" => $result['report'], \"lectures\" => $result['lectures']));\n // if($from == 1 && $till == 1){\n // $query .= \" AND date_time >= DATE(?) AND date_time <= DATE(?) \";\n // $getTotal = $this->getReportTotalClassWise([(int)$this->class,$_POST['form-date'],$_POST['till-date']]);\n // }else if($from == 1 && $till == 0){\n // $query .= \" AND date_time >= DATE(?) \";\n // $getTotal = $this->getReportTotalClassWise([(int)$this->class,$_POST['form-date'], '9999-12-31']);\n // }else if($from = 0 && $till == 1){\n // $query .= \" AND date_time <= DATE(?) \";\n // $getTotal = $this->getReportTotalClassWise([(int)$this->class,'0000-00-00',$_POST['till-date']]);\n // }else{\n // $getTotal = $this->getReportTotalClassWise([(int)$this->class]);\n // }\n\n //return json_encode(array(\"error\" => \"none\",\"data\" => $result,\"total\" => $getTotal));\n }\n }",
"function student_attendance()\n\t{\n\t\t\n\t\t$usercode = $_REQUEST['usercode'];\n\t\t$userdt\t\t\t\t=\t$this->ObjM->get_user_by_usercode($usercode);\n\t\t$yearly_acccount \t= $this->ObjM->student_yearly_acccount($userdt[0]['idcode']);\n\t\t\n\t\t$arr=array('student_yearly_code' =>$yearly_acccount[0]['student_yearly_code'],'attendance_month'=>$_REQUEST['month']);\n\t\t$stud_att\t\t\t\t=\t$this->ObjM->get_student_attendance($arr);\n\t\t\n\t\tif(count($stud_att)<1){\n\t\t\t$json_arr[]=array('validation'=>'false');\t\n\t\t\techo json_encode($json_arr);\n\t\t\texit;\t \n\t\t}\n\t\t\n\t\tfor($i=0;$i<count($stud_att);$i++){\n\t\t\t\t$attendance_date = date('d-m-Y',$stud_att[$i]['attendance_date']);\n\t\t\t\t$json_arr[]=array(\n\t\t\t\t\t'attendance_date'\t\t=>\t$attendance_date,\n\t\t\t\t\t'attendance'\t\t\t=>\t$stud_att[$i]['attendance'],\n\t\t\t\t\t'validation'\t \t\t=>\t'true' );\n\t\t }\n\t\t echo json_encode($json_arr);\n\t\t\texit;\n\t}",
"function report_availabilty($student_id)\n {\n global $CFG;\n\n $now=time();\n\n //if a maximum number of entries has been set lets see if the student has reached this number\n if (!empty($this->reportmaxentries)) {\n $studententries = $this->dbc->count_report_entries($this->report_id,$student_id);\n\n if ($studententries >= $this->reportmaxentries) {\n $extension = $this->extension_check('reportmaxentries');\n\n if (empty($extension) || $studententries >= $extension->value) {\n $temp = new stdClass();\n $temp->entries = $studententries;\n $temp->maxentries = (!empty($extension))? $extension->value : $this->reportmaxentries;\n return false;\n }\n }\n }\n\n //if this report has a lock date check if the date has passed\n if ($this->reporttype == ILP_RT_RECURRING_FINALDATE || $this->reporttype == ILP_RT_FINALDATE) {\n\n if ( $this->reportlockdate < $now ) {\n //find out if this student has been given a report extension\n $extension = $this->extension_check('reportlockdate');\n if (empty($extension) || $extension->value < $now) {\n $temp = new stdClass();\n $temp->expiredate = (!empty($extension))? date('d-m-Y',$extension->value) : date('d-m-Y',$this->reportlockdate);\n return false;\n }\n }\n }\n\n //if the report is a recurring report\n if ($this->reporttype == ILP_RT_RECURRING || $this->reporttype == ILP_RT_RECURRING_FINALDATE) {\n $recurringstart = 0;\n\n if ($this->recurstart == ILP_RECURRING_REPORTCREATION) {\n //rules started at report creation\n $recurringstart = $this->timecreated;\n } else if ($this->recurstart == ILP_RECURRING_SPECIFICDATE) {\n //rules started at specific date\n $recurringstart = $this->recurdate;\n } else {\n //rules started at first entry\n $studententries = $this->dbc->get_user_report_entries($this->id,$student_id);\n\n if (!empty($studententries)) {\n //get the creation time of the first user entry\n $recurringstart = reset($studententries);\n $recurringstart = $recurringstart->timecreated;\n }\n }\n\n if (!empty($recurringstart)) {\n $recurringperiod = $this->recurring_period($recurringstart,$this->recurfrequency);\n\n $entriescount = $this->dbc->count_report_entries($this->id,$student_id,$recurringperiod['start'],$recurringperiod['end']);\n\n if (!empty($entriescount) && $entriescount >= $this->recurmax) {\n $extension = $this->extension_check('recurmax');\n if (empty($extension) || $extension->value <= $entriescount) {\n $temp = new stdClass();\n $temp->entries = $entriescount;\n $temp->maxentries = (!empty($extension))? $extension->value : $this->recurmax;\n return false;\n }\n }\n }\n }\n return true;\n }",
"public static function getFacultyReport($start,$end)\n {\n;\n $user = User::findBySql(\"SELECT i.*,GROUP_CONCAT(ei.ei_id, '|', ei.ei_graduation_year ORDER BY ei.ei_graduation_year) as student FROM education_information ei \".\n // 'join education_information ei on ue.ei_id = ei.ei_id '.\n // 'join institution i on ei.inst_id = i.inst_id '.\n \"JOIN course c on ei.course_id = c.course_id \".\n \"JOIN institution_course ic on c.course_id = ic.course_id \".\n \"JOIN institution i on ei.inst_id = i.inst_id \".\n 'join university u on i.uni_id = u.uni_id '.\n \"WHERE ei.ei_graduation_year BETWEEN \".$start.\" AND \".$end.\" \".\n // 'WHERE ei.ei_graduation_year BETWEEN '.$start.' AND '.$end.' '.\n 'AND u.uni_status = \"1\" '.\n 'GROUP BY i.inst_id')\n ->asArray()\n ->all();\n\n return $user;\n }",
"public function excel_report_sectionmngr($grp)\n\t{\n\t\t$this->data['fields'] = $this->reports_personnel_schedule_model->crystal_report_working_schedule_attendance();\n\t\t$this->data['grp'] = $grp;\n\t\t$this->load->view('employee_portal/report_personnel/schedule/excel_report_sectionmngr',$this->data);\t\t\n\t}",
"public function execute() {\n\t\t$period_id = @$_GET[\"period\"];\n\t\t$sections = array();\n\t\tif ($period_id <> null) {\n\t\t\t// we are on a period\n\t\t\t// get all students for this period\n\t\t\t$q_students = PNApplication::$instance->students->getStudentsQueryForBatchPeriod($period_id, true, false, false, false);\n\t\t\t$q_students->orderBy(\"People\", \"last_name\");\n\t\t\t$q_students->orderBy(\"People\", \"first_name\");\n\t\t\t$students = $q_students->execute();\n\t\t\t$students_ids = array();\n\t\t\tforeach ($students as $s) array_push($students_ids, $s[\"people\"]);\n\t\t\t// get class assignment\n\t\t\tif (count($students) > 0) {\n\t\t\t\t$q = SQLQuery::create()->select(\"StudentClass\");\n\t\t\t\tPNApplication::$instance->curriculum->joinAcademicClass($q, \"StudentClass\", \"class\", $period_id);\n\t\t\t\t$q->whereIn(\"StudentClass\", \"people\", $students_ids);\n\t\t\t\t$q->field(\"StudentClass\", \"people\", \"people\");\n\t\t\t\t$q->field(\"AcademicClass\", \"id\", \"class\");\n\t\t\t\t$students_classes = $q->execute();\n\t\t\t} else\n\t\t\t\t$students_classes = array();\n\t\t\tforeach ($students as &$s) {\n\t\t\t\tforeach ($students_classes as $sc) {\n\t\t\t\t\tif ($sc[\"people\"] == $s[\"people\"]) {\n\t\t\t\t\t\t$s[\"class\"] = $sc[\"class\"];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!isset($s[\"class\"])) $s[\"class\"] = null;\n\t\t\t}\n\t\t\t// check if this period is specialized\n\t\t\t$specializations = PNApplication::$instance->curriculum->getBatchPeriodSpecializationsWithName($period_id);\n\t\t\t$classes = PNApplication::$instance->curriculum->getAcademicClassesForPeriod($period_id);\n\t\t\tif (count($specializations) > 0) {\n\t\t\t\t// specialized period\n\t\t\t\tforeach ($specializations as $spe) {\n\t\t\t\t\t$list_students = array();\n\t\t\t\t\tforeach ($students as &$s) if ($s[\"specialization\"] == $spe[\"id\"]) array_push($list_students, $s);\n\t\t\t\t\t$list_classes = array();\n\t\t\t\t\tforeach ($classes as $cl) if ($cl[\"specialization\"] == $spe[\"id\"]) array_push($list_classes, $cl);\n\t\t\t\t\tarray_push($sections, array($spe[\"name\"],$list_classes,$list_students));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// not specialized period\n\t\t\t\tarray_push($sections, array(null,$classes,$students));\n\t\t\t}\n\t\t} else {\n\t\t\t// we are on a class\n\t\t\t$class = PNApplication::$instance->curriculum->getAcademicClass($_GET[\"class\"]);\n\t\t\t$period_id = $class[\"period\"];\n\t\t\tif ($class[\"specialization\"] <> null) {\n\t\t\t\t// specialized class\n\t\t\t\t// get classes in this specialization\n\t\t\t\t$classes = PNApplication::$instance->curriculum->getAcademicClassesForPeriod($period_id, $class[\"specialization\"]);\n\t\t\t\t// get students from the specialization\n\t\t\t\t$q_students = PNApplication::$instance->students->getStudentsQueryForBatchPeriod($period_id, true, false, $class[\"specialization\"],false);\n\t\t\t\t$q_students->orderBy(\"People\", \"last_name\");\n\t\t\t\t$q_students->orderBy(\"People\", \"first_name\");\n\t\t\t\t$students = $q_students->execute();\n\t\t\t} else {\n\t\t\t\t// not specialized class\n\t\t\t\t$classes = PNApplication::$instance->curriculum->getAcademicClassesForPeriod($period_id);\n\t\t\t\t$q_students = PNApplication::$instance->students->getStudentsQueryForBatchPeriod($period_id, true, false, false,false);\n\t\t\t\t$q_students->orderBy(\"People\", \"last_name\");\n\t\t\t\t$q_students->orderBy(\"People\", \"first_name\");\n\t\t\t\t$students = $q_students->execute();\n\t\t\t}\n\t\t\t$students_ids = array();\n\t\t\tforeach ($students as &$s) array_push($students_ids, $s[\"people\"]);\n\t\t\t// get class assignment\n\t\t\tif (count($students) > 0) {\n\t\t\t\t$q = SQLQuery::create()->select(\"StudentClass\");\n\t\t\t\tPNApplication::$instance->curriculum->joinAcademicClass($q, \"StudentClass\", \"class\", $period_id);\n\t\t\t\t$q->whereIn(\"StudentClass\", \"people\", $students_ids);\n\t\t\t\t$q->field(\"StudentClass\", \"people\", \"people\");\n\t\t\t\t$q->field(\"AcademicClass\", \"id\", \"class\");\n\t\t\t\t$students_classes = $q->execute();\n\t\t\t} else\n\t\t\t\t$students_classes = array();\n\t\t\tforeach ($students as &$s) {\n\t\t\t\tforeach ($students_classes as $sc) {\n\t\t\t\t\tif ($sc[\"people\"] == $s[\"people\"]) {\n\t\t\t\t\t\t$s[\"class\"] = $sc[\"class\"];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!isset($s[\"class\"])) $s[\"class\"] = null;\n\t\t\t}\n\t\t\tarray_push($sections, array(null, $classes, $students));\n\t\t}\n\t\t\n\t\t// get previous period if any, and students assignments\n\t\t$period = PNApplication::$instance->curriculum->getAcademicPeriodAndBatchPeriod($period_id);\n\t\t$previous_academic_period = PNApplication::$instance->curriculum->getPreviousAcademicPeriod($period[\"academic_period_start\"]);\n\t\twhile ($previous_academic_period <> null) {\n\t\t\t$previous_classes = null;\n\t\t\t$previous_batch_period = PNApplication::$instance->curriculum->getBatchPeriodFromAcademicPeriod($period[\"batch\"], $previous_academic_period[\"id\"]);\n\t\t\tif ($previous_batch_period <> null) {\n\t\t\t\t$previous_classes = PNApplication::$instance->curriculum->getAcademicClassesForPeriod($previous_batch_period[\"id\"]);\n\t\t\t\t$previous_classes_ids = array();\n\t\t\t\tforeach ($previous_classes as $pc) array_push($previous_classes_ids, $pc[\"id\"]);\n\t\t\t\t$previous_classes_students = SQLQuery::create()->select(\"StudentClass\")->whereIn(\"StudentClass\",\"class\",$previous_classes_ids)->execute();\n\t\t\t\tif (count($previous_classes) > 0) break;\n\t\t\t}\n\t\t\t$previous_academic_period = PNApplication::$instance->curriculum->getPreviousAcademicPeriod($previous_academic_period[\"start\"]);\n\t\t}\n\t\t\n\t\t$this->requireJavascript(\"assign_elements.js\");\n\t\t$this->requireJavascript(\"section.js\");\n\t\t?>\n\t\t<div style='width:100%;height:100%;overflow-x:auto;display:flex;flex-direction:column;'>\n\t\t<div id='top_container' style='display:flex;flex-direction:row;flex:1 1 auto;'></div> \n\t\t</div>\n\t\t<script type='text/javascript'>\n\t\tvar popup = window.parent.get_popup_window_from_frame(window);\n\t\tpopup.addIconTextButton(theme.icons_16.save, \"Save\", 'save', save);\n\t\tpopup.disableButton('save');\n\t\tpopup.addCloseButton();\n\n\t\tfunction display_people(people, container) {\n\t\t\tcontainer.appendChild(document.createTextNode(people.last_name+\" \"+people.first_name));\n\t\t}\n\t\t\n\t\tvar assign, container, sec;\n\t\tvar assigns = [];\n\n\t\tvar classes = [];\n\t\tfunction getClassName(id) {\n\t\t\tfor (var i = 0; i < classes.length; ++i)\n\t\t\t\tif (classes[i].id == id) return classes[i].name;\n\t\t\treturn \"\";\n\t\t}\n\t\tvar students = <?php echo PeopleJSON::Peoples($students);?>;\n\t\tfunction getStudent(id) {\n\t\t\tfor (var i = 0; i < students.length; ++i) if (students[i].id == id) return students[i];\n\t\t\treturn null;\n\t\t}\n\n\t\tvar previous_classes = <?php echo json_encode($previous_classes);?>;\n\t\t<?php\n\t\tif ($previous_classes <> null && count($previous_classes) > 0)\n\t\t\techo \"var previous_assignments = \".json_encode($previous_classes_students).\";\"; \n\t\t?>\n\n\t\tfunction fromPreviousPeriod(button, assign) {\n\t\t\trequire(\"context_menu.js\",function() {\n\t\t\t\tvar menu = new context_menu();\n\t\t\t\tfor (var i = 0; i < previous_classes.length; ++i) {\n\t\t\t\t\tmenu.addIconItem(null, \"Class \"+previous_classes[i].name, function(ev,class_id) {\n\t\t\t\t\t\tvar elements = [];\n\t\t\t\t\t\tfor (var i = 0; i < previous_assignments.length; ++i)\n\t\t\t\t\t\t\tif (previous_assignments[i][\"class\"] == class_id) {\n\t\t\t\t\t\t\t\tvar student = getStudent(previous_assignments[i][\"people\"]);\n\t\t\t\t\t\t\t\tif (student != null)\n\t\t\t\t\t\t\t\t\telements.push(student);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tassign.selectUnassigned(elements);\n\t\t\t\t\t}, previous_classes[i].id);\n\t\t\t\t}\n\t\t\t\tmenu.showBelowElement(button);\n\t\t\t});\n\t\t}\n\n\t\tfunction changed() {\n\t\t\tvar has_change = false;\n\t\t\tfor (var i = 0; i < assigns.length && !has_change; ++i) {\n\t\t\t\tvar changes = assigns[i].getChanges();\n\t\t\t\tif (changes.length > 0) has_change = true;\n\t\t\t}\n\t\t\tif (has_change)\n\t\t\t\tpopup.enableButton('save');\n\t\t\telse\n\t\t\t\tpopup.disableButton('save');\n\t\t}\n\t\t\n\t\t<?php\n\t\tforeach ($sections as $section) {\n\t\t\t$section_name = $section[0];\n\t\t\t$classes = $section[1];\n\t\t\t$students = $section[2];\n\t\t\tif ($section_name <> null) {\n\t\t\t\techo \"container = document.createElement('DIV');\\n\";\n\t\t\t\t//echo \"container.style.height = '100%';\\n\";\n\t\t\t\techo \"container.style.backgroundColor = '#f0f0f0';\\n\";\n\t\t\t\techo \"sec = new section(null,\".json_encode($section_name).\",container,false,true);\\n\";\n\t\t\t\t//echo \"sec.element.style.display = 'inline-block';\\n\";\n\t\t\t\t//echo \"sec.element.style.margin = '5px';\\n\";\n\t\t\t\techo \"document.getElementById('top_container').appendChild(sec.element);\\n\";\n\t\t\t} else\n\t\t\t\techo \"container = document.getElementById('top_container');\\n\";\n\t\t\techo \"assign = new assign_elements(container,\".($section_name<>null?\"'sub'\":\"null\").\",null,display_people,function(assign){\\n\";\n\t\t\tforeach ($classes as $cl) {\n\t\t\t\techo \"\\tassign.addPossibleAssignment(\".$cl[\"id\"].\",null,\".json_encode($cl[\"name\"]).\");\\n\";\n\t\t\t\techo \"\\tclasses.push({id:\".$cl[\"id\"].\",name:\".json_encode($cl[\"name\"]).\"});\\n\";\n\t\t\t}\n\t\t\tforeach ($students as &$s) {\n\t\t\t\techo \"\\tassign.addElement(getStudent(\".$s[\"people_id\"].\"),\".json_encode($s[\"class\"]).\",true);\\n\";\n\t\t\t}\n\t\t\techo \"\\tif (previous_classes) assign.addUnassignedButton(null,'From '+\".json_encode($previous_batch_period[\"name\"]).\",function(){fromPreviousPeriod(this,assign);});\\n\";\n\t\t\techo \"\\tassign.onchange.add_listener(changed);\\n\";\n\t\t\techo \"\\tlayout.changed(assign.container);\\n\";\n\t\t\techo \"});\\n\";\n\t\t\techo \"assigns.push(assign);\\n\";\n\t\t}\n\t\t?>\n\t\tfunction save() {\n\t\t\tvar lock = lock_screen(null, \"Saving class assignments...\");\n\t\t\tvar changes = [];\n\t\t\tfor (var i = 0; i < assigns.length; ++i) changes.push(assigns[i].getChanges());\n\t\t\tvar next = function(index_assign, index_people) {\n\t\t\t\tvar peoples = changes[index_assign];\n\t\t\t\tif (index_people == peoples.length) {\n\t\t\t\t\tassigns[index_assign].changesSaved();\n\t\t\t\t\tif (index_assign == assigns.length-1) {\n\t\t\t\t\t\t<?php if (isset($_GET[\"onsave\"])) echo \"window.frameElement.\".$_GET[\"onsave\"].\"();\"?>\n\t\t\t\t\t\tunlock_screen(lock);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tnext(index_assign+1,0);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tvar original = peoples[index_people].original;\n\t\t\t\tvar current = peoples[index_people].current;\n\t\t\t\tvar people = peoples[index_people].element;\n\t\t\t\tif (current == null)\n\t\t\t\t\tset_lock_screen_content(lock,\"Unassign \"+people.first_name.toHTML()+\" \"+people.last_name.toHTML()+\" from class \"+getClassName(original).toHTML());\n\t\t\t\telse\n\t\t\t\t\tset_lock_screen_content(lock,\"Assign \"+people.first_name.toHTML()+\" \"+people.last_name.toHTML()+\" to class \"+getClassName(current).toHTML());\n\t\t\t\tservice.json(\"students\",\"assign_class\",{student:people.id,clas:current,period:<?php echo $period_id;?>},function(res){\n\t\t\t\t\tnext(index_assign,index_people+1);\n\t\t\t\t});\n\t\t\t};\n\t\t\tnext(0,0);\n\t\t}\n\t\t</script>\n\t\t<?php \n\t}",
"private function getCourseSection() {\n $this->openConn();\n\n $courseID = $_POST['courseID'];\n\n $sql = \"SELECT Course.courseID, subject, courseNum,\n Section.sectionID, secNo, daysMet, startTime, endTime, totalEnrolment\n FROM Course, Section\n LEFT JOIN SectionTA ON Section.sectionID = SectionTA.sectionID\n LEFT JOIN TA ON SectionTA.taID = TA.taID\n LEFT JOIN Student ON TA.sID = Student.sID\n LEFT JOIN UserAccount ON Student.uID = UserAccount.uID\n WHERE Section.courseID = Course.courseID\n and Course.courseID = :courseID\";\n $stmt = $this->conn->prepare($sql);\n $stmt->execute(array(':courseID'=>$courseID));\n\n $this->results = \"\";\n // Loop through every row\n while($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\n $subject = $row['subject'];\n $courseNum = $row['courseNum'];\n $sectionID = $row['sectionID'];\n $secNo = $row['secNo'];\n $daysMet = $row['daysMet'];\n $startTime = $row['startTime'];\n $endTime = $row['endTime'];\n $totalEnrolment = $row['totalEnrolment'];\n\n\n //display rows\n $this->results = $this->results .'\n <tr class=\"lab-info-row\" name='.$sectionID.'>\n <td><input id=\"sectioncheckbox\" type=\"checkbox\"></td>\n <td id=\"lab-id\" >'.$secNo.'</td>\n <td id=\"lab-time\">'.$daysMet.' | '.$startTime.' - '.$endTime.'</td>\n <td id=\"lab-num\">'.$totalEnrolment.'</td>\n </tr>';\n }\n\n $this->closeConn();\n return $this->results;\n\n }",
"function attendance_get_user_courses_attendances($userid) {\n global $DB;\n\n $usercourses = enrol_get_users_courses($userid);\n\n list($usql, $uparams) = $DB->get_in_or_equal(array_keys($usercourses), SQL_PARAMS_NAMED, 'cid0');\n\n $sql = \"SELECT att.id as attid, att.course as courseid, course.fullname as coursefullname,\n course.startdate as coursestartdate, att.name as attname, att.grade as attgrade\n FROM {attendance} att\n JOIN {course} course\n ON att.course = course.id\n WHERE att.course $usql\n ORDER BY coursefullname ASC, attname ASC\";\n\n $params = array_merge($uparams, array('uid' => $userid));\n\n return $DB->get_records_sql($sql, $params);\n}",
"public function reportDatewiseClassWiseAttendentView(Request $request)\n {\n $year = trim($request->year) ;\n $shift = trim($request->shift);\n $dept = trim($request->dept);\n $semister = trim($request->semister);\n $section = trim($request->section);\n $date_form = trim($request->from); \n $from = date (\"Y-m-d\", strtotime($date_form));\n $date_to = trim($request->to); \n $date_too = trim($request->to);\n $to = date (\"Y-m-d\", strtotime($date_to));\n $result = DB::table('student')->where('year',$year)->where('shift_id',$shift)->where('dept_id', $dept )->where('semister_id',$semister)->where('section_id',$section)->orderBy('roll','asc')->get();\n #----------------total holiday without friday class calculation-------------------#\n $get_holiday = DB::table('holiday')\n ->where('year',$year)\n ->whereNotIn('type',[1])\n ->whereBetween('holiday_date', [$from, $to])->get();\n\n \n $total_holiday_class = 0 ;\n foreach ($get_holiday as $holidays) {\n $day_no = date('D', strtotime($holidays->holiday_date));\n //echo $day_no;\nif($day_no == 'Sat'){\n $day = '1';\n}elseif($day_no == 'Sun'){\n $day = '2';\n}elseif($day_no == 'Mon'){\n $day = '3';\n}elseif($day_no == 'Tue'){\n $day = '4';\n}elseif($day_no == 'Wed'){\n $day = '5';\n}elseif($day_no == 'Thu'){\n $day = '6';\n}elseif($day_no == 'Fri'){\n $day = '7';\n}\n// count total holiday class\n$holiday_total_class = DB::table('routine')\n->where('year',$year)\n->where('shift_id',$shift)\n->where('dept_id',$dept)\n->where('semister_id',$semister)\n->where('section_id',$section)\n->where('day',$day)->count();\n$total_holiday_class = $total_holiday_class+$holiday_total_class;\n }\n#-----------------end total holiday class calulation---------------------#\n // total holiday \n $get_all_holiday = DB::table('holiday')\n ->where('year',$year)\n ->whereBetween('holiday_date', [$from, $to])->get(['holiday_date']);\n $data = array();\n foreach ($get_all_holiday as $data1) {\n $data[] = $data1->holiday_date;\n }\n\n \n$date_from = strtotime($from); \n$date_to = strtotime($to); \n$list = array();\nfor ($i=$date_from; $i<=$date_to; $i+=86400) { \n $list[] = date(\"Y-m-d\", $i); \n} \n$total_class_day = array_diff($list,$data);\n$totalClassNo = 0 ; \nforeach ($total_class_day as $total_class_days) {\n $class_day_no = date('D', strtotime($total_class_days));\n if($class_day_no == 'Sat'){\n $day_number = '1';\n}elseif($class_day_no == 'Sun'){\n $day_number = '2';\n}elseif($class_day_no == 'Mon'){\n $day_number = '3';\n}elseif($class_day_no == 'Tue'){\n $day_number = '4';\n}elseif($class_day_no == 'Wed'){\n $day_number = '5';\n}elseif($class_day_no == 'Thu'){\n $day_number = '6';\n}elseif($class_day_no == 'Fri'){\n $day_number = '7';\n}\n// count total holiday class\n$count_total_class_month = DB::table('routine')\n->where('year',$year)\n->where('shift_id',$shift)\n->where('dept_id',$dept)\n->where('semister_id',$semister)\n->where('section_id',$section)\n->where('day',$day_number)->count();\n$totalClassNo = $totalClassNo+$count_total_class_month;\n}\n $shift_name = DB::table('shift')->where('id',$shift)->first();\n $dept_name = DB::table('department')->where('id',$dept)->first();\n $semister_name = DB::table('semister')->where('id',$semister)->first();\n $section_name = DB::table('section')->where('id',$section)->first();\n return view('report.reportDatewiseClassWiseAttendentView')->with('result',$result)->with('totalClassNo',$totalClassNo)->with('total_holiday_class',$total_holiday_class)->with('from',$from)->with('to',$to)->with('year',$year)->with('shift_name',$shift_name)->with('dept_name',$dept_name)->with('semister_name',$semister_name)->with('section_name',$section_name)->with('dept',$dept)->with('shift',$shift)->with('semister',$semister)->with('section',$section)->with('date_form',$date_form)->with('date_to',$date_too);\n \n }",
"public function attendances()\n {\n return $this->hasMany('App\\Models\\Attendance', 'personnel_no', 'personnel_no');\n }",
"public function details (){\n $connection = new database();\n $table = new simple_table_ops();\n\n $id = $_GET['id']; // timetable_id\n $content = \"<div class='link_button'>\n <a href='?controller=teachers&action=export'>Export to EXCEL</a>\n <a href='?controller=curricula&action=index'>Curricula</a>\n </div>\";\n\n $content .= \"<div class='third_left'>\";\n $content .='<p>You can configure the timetable for the following course:<p>';\n\n $sql = \"SELECT curricula.curriculum_id, CONCAT (teachers.nom, ' ', teachers.prenom, ' | ', teachers.nom_khmer, ' ', teachers.prenom_khmer, ' | ', sexes.sex) as teacher, subjects.subject, levels.level\n FROM curricula\n JOIN courses ON curricula.course_id = courses.course_id\n JOIN subjects ON curricula.subject_id = subjects.subject_id\n JOIN teachers ON teachers.teacher_id = curricula.teacher_id\n JOIN sexes ON teachers.sex_id = sexes.sex_id\n JOIN levels ON courses.level_id = levels.level_id\n JOIN timetables ON timetables.curriculum_id = curricula.curriculum_id\n WHERE timetables.timetable_id = {$_GET['id']}\";\n\n $curricula_data = $connection->query($sql);\n\n if ($connection->get_row_num() == 0) {\n header(\"Location: http://\".WEBSITE_URL.\"/index.php?controller=curricula&action=index\");\n }\n\n $curricula_data = $curricula_data[0];\n\n $content .='Teacher: '.$curricula_data['teacher'].'<br>';\n $content .='Subject: '.$curricula_data['subject'].'<br>';\n $content .='Level: '.$curricula_data['level'].'<br>';\n\n\n $columns = array ('start_time_id, end_time_id, weekday_id, classroom_id, timetable_period_id');\n\n $neat_columns = array ('Start Time', 'End Time', 'Week Day', 'Classroom', 'Time Period' , 'Update', 'Delete');\n\n // create curriculum_id array\n $sql = \"SELECT curriculum_id FROM timetables WHERE timetable_id = {$id}\";\n\n $curriculum_id_result = $connection->query($sql);\n $curriculum_id_array = $curriculum_id_result[0];\n\n // time_id, weekday_id, curriculum_id, classroom_id,\n $sql = 'SELECT time_id as start_time_id, time_class as time1 FROM time ORDER BY time_id ASC';\n $time1_result = $connection->query($sql);\n\n $sql = 'SELECT time_id as end_time_id, time_class as time2 FROM time ORDER BY time_id ASC';\n $time2_result = $connection->query($sql);\n\n $sql = 'SELECT weekday_id, weekday FROM weekdays ORDER BY weekday_id';\n $weekdays_result = $connection->query($sql);\n\n $sql = \"SELECT timetable_period_id, CONCAT(nom, ', from ', date_from, ' to ', date_to) as timetable_period FROM timetable_periods ORDER BY date_from\";\n $timetable_periods_result = $connection->query($sql);\n\n $sql = 'SELECT classroom_id, classroom FROM classrooms ORDER BY classroom ASC';\n $classrooms_result = $connection->query($sql);\n\n $drop_down = array(\n 'start_time_id' => array('start_time' => $time1_result),\n 'end_time_id' => array('end_time' => $time2_result),\n 'weekday_id' => array('weekday' => $weekdays_result),\n 'timetable_period_id'=>array('timetable_period'=> $timetable_periods_result),\n 'classroom_id' => array('classroom' => $classrooms_result)\n );\n\n /********************************************************************/\n /* CONFIGURES Form structure */\n\n $form = array(\n 'action' => '?controller=timetable&action=update&id='.$id,\n 'div' => \"class='solitary_input'\",\n 'div_button' => \"class='submit_button1'\",\n 'method' => 'post',\n 'action_links' => array(1 => array('delete', '?controller=timetable&action=delete&id=')),\n 'id' => 'top_form',\n 'elements' => array(\n 1 => array ('hidden' => $curriculum_id_array),\n 3 => array ('drop_down' => 'start_time_id'),\n 4 => array ('drop_down' => 'end_time_id'),\n 5 => array ('drop_down' => 'weekday_id'),\n 6 => array ('drop_down' => 'classroom_id'),\n 7 => array ('drop_down' => 'timetable_period_id'),\n 10 => array ('submit' => 'update')\n )\n );\n\n $table->set_top_form($form);\n\n $table->set_table_name('timetables');\n $table->set_id_column('timetable_id');\n\n $table->set_table_column_names($columns);\n $table->set_html_table_column_names($neat_columns);\n\n $table->set_values_form(); // set values found in database into form elements when building top_form\n $table->set_drop_down($drop_down);\n $table->set_form_array($form);\n\n\n $content .= \"</div>\";\n\n $content .= \" <div class='two_thirds_right'><table>\".$table->details().'</table></div>';\n $output['content'] = $content;\n return $output;\n\n }",
"function attendance_report() {\n if ($this->session->userdata('parent_login') != 1)\n redirect(base_url(), 'refresh');\n $student_id = $student_id = $this->session->userdata('parent_id');\n if ($this->input->post('month') != '' && $this->input->post('year') != '') {\n $page_data['month'] = $this->input->post('month');\n $page_data['year'] = $this->input->post('year');\n } else {\n $page_data['month'] = '';\n $page_data['year'] = '';\n }\n $page_data['student'] = $this->db->get_where('student', array('student_id' => $student_id))->row()->name;\n $page_data['student_id'] = $student_id;\n $page_data['page_name'] = 'attendance_report';\n $image = $this->db->get_where('student', array('student_id' => $student_id))->row()->image;\n $image_url = $this->crud_model->get_image_url('student', $image);\n $page_data['parent_page_title'] = \"<img src='$image_url'\" . 'class=\"img-circle\"' . 'width=\"40\"' . \"/>\" . $page_data['student'];\n $page_data['page_title'] = $page_data['student'];\n $this->load->view('backend/index', $page_data);\n }",
"public function attendance_sheet_export_to_pdf($action, $attendance_id, $student_id = 0, $course_id = '')\n {\n $attendance = new Attendance();\n $courseInfo = CourseManager::get_course_information($course_id);\n $attendance->set_course_id($courseInfo['code']);\n $groupId = isset($_REQUEST['group_id']) ? $_REQUEST['group_id'] : null;\n $data_array = array();\n $data_array['attendance_id'] = $attendance_id;\n $data_array['users_in_course'] = $attendance->get_users_rel_course($attendance_id, $groupId);\n\n $filter_type = 'today';\n\n if (!empty($_REQUEST['filter'])) {\n $filter_type = $_REQUEST['filter'];\n }\n\n $my_calendar_id = null;\n if (is_numeric($filter_type)) {\n $my_calendar_id = $filter_type;\n $filter_type = 'calendar_id';\n }\n\n $data_array['attendant_calendar'] = $attendance->get_attendance_calendar(\n $attendance_id,\n $filter_type,\n $my_calendar_id,\n $groupId\n );\n\n if (api_is_allowed_to_edit(null, true) || api_is_drh()) {\n $data_array['users_presence'] = $attendance->get_users_attendance_sheet($attendance_id, 0, $groupId);\n } else {\n if (!empty($student_id)) {\n $user_id = intval($student_id);\n } else {\n $user_id = api_get_user_id();\n }\n $data_array['users_presence'] = $attendance->get_users_attendance_sheet($attendance_id, $user_id, $groupId);\n $data_array['faults'] = $attendance->get_faults_of_user($user_id, $attendance_id, $groupId);\n $data_array['user_id'] = $user_id;\n }\n\n $data_array['next_attendance_calendar_id'] = $attendance->get_next_attendance_calendar_id($attendance_id);\n\n // Set headers pdf.\n $courseCategory = CourseManager::get_course_category($courseInfo['category_code']);\n $teacherInfo = CourseManager::get_teacher_list_from_course_code($courseInfo['code']);\n $teacherName = null;\n foreach ($teacherInfo as $teacherData) {\n if ($teacherName != null) {\n $teacherName = $teacherName.\" / \";\n }\n $teacherName .= api_get_person_name($teacherData['firstname'], $teacherData['lastname']);\n }\n\n // Get data table\n $data_table = array();\n $head_table = array('#', get_lang('Name'));\n foreach ($data_array['attendant_calendar'] as $class_day) {\n $head_table[] =\n api_format_date($class_day['date_time'], DATE_FORMAT_NUMBER_NO_YEAR).' '.\n api_format_date($class_day['date_time'], TIME_NO_SEC_FORMAT);\n }\n $data_table[] = $head_table;\n $data_attendant_calendar = $data_array['attendant_calendar'];\n $data_users_presence = $data_array['users_presence'];\n $count = 1;\n\n if (!empty($data_array['users_in_course'])) {\n foreach ($data_array['users_in_course'] as $user) {\n $cols = 1;\n $result = array();\n $result['count'] = $count;\n $result['full_name'] = api_get_person_name($user['firstname'], $user['lastname']);\n foreach ($data_array['attendant_calendar'] as $class_day) {\n if ($class_day['done_attendance'] == 1) {\n if ($data_users_presence[$user['user_id']][$class_day['id']]['presence'] == 1) {\n $result[$class_day['id']] = get_lang('UserAttendedSymbol');\n } else {\n $result[$class_day['id']] = '<span style=\"color:red\">'.get_lang('UserNotAttendedSymbol').'</span>';\n }\n } else {\n $result[$class_day['id']] = ' ';\n }\n $cols++;\n }\n $count++;\n $data_table[] = $result;\n }\n }\n $max_cols_per_page = 12; //10 dates + 2 name and number\n $max_dates_per_page = $max_dates_per_page_original = $max_cols_per_page - 2;//10\n $rows = count($data_table);\n\n if ($cols > $max_cols_per_page) {\n $number_tables = round(($cols-2)/$max_dates_per_page);\n $headers = $data_table[0];\n $all = array();\n $tables = array();\n $changed = 1;\n\n for ($i= 0; $i <= $rows; $i++) {\n $row = isset($data_table[$i]) ? $data_table[$i] : null;\n $key = 1;\n $max_dates_per_page = 10;\n $item = isset($data_table[$i]) ? $data_table[$i] : null;\n $count_j = 0;\n\n if (!empty($item)) {\n foreach ($item as $value) {\n if ($count_j >= $max_dates_per_page) {\n $key++;\n $max_dates_per_page = $max_dates_per_page_original*$key;\n //magic hack\n $tables[$key][$i][] = $tables[1][$i][0];\n $tables[$key][$i][] = $tables[1][$i][1];\n }\n $tables[$key][$i][] = $value;\n $count_j++;\n }\n }\n }\n\n $content = null;\n if (!empty($tables)) {\n foreach ($tables as $sub_table) {\n $content .= Export::convert_array_to_html($sub_table).'<br /><br />';\n }\n }\n } else {\n $content = Export::convert_array_to_html(\n $data_table,\n array('header_attributes' => array('align' => 'center'))\n );\n }\n\n $params = array(\n 'filename' => get_lang('Attendance').'-'.api_get_local_time(),\n 'pdf_title' => $courseInfo['title'],\n 'course_code' => $courseInfo['code'],\n 'add_signatures' => true,\n 'orientation' => 'landscape',\n 'pdf_teachers' => $teacherName,\n 'pdf_course_category' => $courseCategory['name'],\n 'format' => 'A4-L',\n 'orientation' => 'L'\n );\n\n Export::export_html_to_pdf($content, $params);\n exit;\n }",
"public function attendance($param1 = '', $param2 = '', $param3 = ''){\n\t\tif($param1 == 'filter'){\n\t\t\t$date = '01 '.$this->input->post('month').' '.$this->input->post('year');\n\t\t\t$page_data['attendance_date'] = strtotime($date);\n\t\t\t$page_data['class_id'] = htmlspecialchars($this->input->post('class_id'));\n\t\t\t$page_data['section_id'] = htmlspecialchars($this->input->post('section_id'));\n\t\t\t$page_data['month'] = htmlspecialchars($this->input->post('month'));\n\t\t\t$page_data['year'] = htmlspecialchars($this->input->post('year'));\n\t\t\t$this->load->view('backend/student/attendance/list', $page_data);\n\t\t}\n\n\t\tif(empty($param1)){\n\t\t\t$page_data['folder_name'] = 'attendance';\n\t\t\t$page_data['page_title'] = 'attendance';\n\t\t\t$this->load->view('backend/index', $page_data);\n\t\t}\n\t}",
"public function show(Attendance $attendance)\n {\n //\n }",
"public function show(Attendance $attendance)\n {\n //\n }",
"public function show(Attendance $attendance)\n {\n //\n }",
"public function get_section()\n\t\t{\n\t\t\t$retArr = null;\n\n\t\t\t// Scaffolding Code For Array:\n\t\t\t$objs = $this->obj->find_all();\n\t\t\tforeach($objs as $obj)\n\t\t\t{\n\t\t\t\t$retArr[] = $obj->getBasics();\n\t\t\t}\n\n\t\t\treturn $retArr;\n\t\t}",
"public function dtexamattemptreport()\n {\n $condition = \"\";\n $search_type = $this->input->post('search_type');\n $date_type = $this->input->post('date_type');\n $date_from = $this->input->post('date_from');\n $date_to = $this->input->post('date_to');\n $data['searchlist'] = $this->customlib->get_searchtype();\n $data['date_type'] = $this->customlib->date_type();\n\n $data['date_typeid'] = '';\n if (isset($search_type) && $search_type != '') {\n $dates = $this->customlib->get_betweendate($search_type);\n $data['search_type'] = $search_type;\n } else {\n $dates = $this->customlib->get_betweendate('this_year');\n $data['search_type'] = '';\n }\n\n $start_date = date('Y-m-d', strtotime($dates['from_date']));\n $end_date = date('Y-m-d', strtotime($dates['to_date']));\n\n $data['label'] = date($this->customlib->getSchoolDateFormat(), strtotime($start_date)) . \" \" . $this->lang->line('to') . \" \" . date($this->customlib->getSchoolDateFormat(), strtotime($end_date));\n\n if (isset($_POST['date_type']) && $_POST['date_type'] != '') {\n\n $data['date_typeid'] = $_POST['date_type'];\n\n if ($search_type == 'exam_from_date') {\n\n $condition .= \" and date_format(onlineexam.exam_from,'%Y-%m-%d') between '\" . $start_date . \"' and '\" . $end_date . \"'\";\n\n } elseif ($date_type == 'exam_to_date') {\n $condition .= \" and date_format(onlineexam.exam_to,'%Y-%m-%d') between '\" . $start_date . \"' and '\" . $end_date . \"'\";\n }\n\n } else {\n\n $condition .= \" and date_format(onlineexam.created_at,'%Y-%m-%d') between '\" . $start_date . \"' and '\" . $end_date . \"'\";\n\n }\n\n $result = $this->onlineexam_model->onlineexamatteptreport($condition);\n $sch_setting = $this->sch_setting_detail;\n $resultlist = json_decode($result);\n $dt_data = array();\n\n if (!empty($resultlist->data)) {\n foreach ($resultlist->data as $resultlist_key => $student_value) {\n\n $exams = explode(',', $student_value->exams);\n\n $exam_name = '';\n $exam_from = '';\n $exam_to = '';\n $exam_duration = '';\n $exam_publish = \"\";\n $exam_resultpublish = \"\";\n $exam_publishprint = \"\";\n $exam_resultpublishprint = \"\";\n foreach ($exams as $exams_key => $exams_value) {\n $exam_details = explode('@', $exams_value);\n\n if (count($exam_details) == 9) {\n\n $exam_name .= $exam_details[1];\n $exam_from .= date($this->customlib->getSchoolDateFormat(), $this->customlib->dateYYYYMMDDtoStrtotime($exam_details[3]));\n $exam_to .= date($this->customlib->getSchoolDateFormat(), $this->customlib->dateYYYYMMDDtoStrtotime($exam_details[4]));\n $exam_duration .= $exam_details[5];\n $exam_publish .= ($exam_details[7] == 1) ? \"<i class='fa fa-check-square-o'></i>\" : \"<i class='fa fa-exclamation-circle'></i>\";\n $exam_resultpublish .= ($exam_details[8] == 1) ? \"<i class='fa fa-check-square-o'></i>\" : \"<i class='fa fa-exclamation-circle'></i>\";\n\n $exam_publishprint .= ($exam_details[7] == 1) ? \"<span style='display:none'>Yes</span>\" : \"<span style='display:none'>No</span>\";\n $exam_resultpublishprint .= ($exam_details[8] == 1) ? \"<span style='display:none'>Yes</span>\" : \"<span style='display:none'>No</span>\";\n\n $exam_name .= '<br>';\n $exam_from .= \"<br>\";\n $exam_to .= \"<br>\";\n $exam_duration .= \"<br>\";\n $exam_publish .= \"<br>\";\n $exam_resultpublish .= \"<br>\";\n $exam_publishprint .= \"<br>\";\n $exam_resultpublishprint .= \"<br>\";\n }\n }\n\n $row = array();\n $row[] = $this->customlib->getFullName($student_value->firstname, $student_value->middlename, $student_value->lastname, $sch_setting->middlename, $sch_setting->lastname);\n $row[] = $student_value->admission_no;\n\n $row[] = $student_value->class;\n $row[] = $student_value->section;\n $row[] = $exam_name;\n $row[] = $exam_from;\n $row[] = $exam_to;\n $row[] = $exam_duration;\n $row[] = $exam_publish . $exam_publishprint;\n $row[] = $exam_resultpublish . $exam_resultpublishprint;\n\n $dt_data[] = $row;\n }\n\n }\n $json_data = array(\n \"draw\" => intval($resultlist->draw),\n \"recordsTotal\" => intval($resultlist->recordsTotal),\n \"recordsFiltered\" => intval($resultlist->recordsFiltered),\n \"data\" => $dt_data,\n );\n echo json_encode($json_data);\n }",
"function attendance_construct_sessions_data_for_add($formdata, mod_attendance_structure $att) {\n global $CFG;\n\n $sesstarttime = $formdata->sestime['starthour'] * HOURSECS + $formdata->sestime['startminute'] * MINSECS;\n $sesendtime = $formdata->sestime['endhour'] * HOURSECS + $formdata->sestime['endminute'] * MINSECS;\n $sessiondate = $formdata->sessiondate + $sesstarttime;\n $duration = $sesendtime - $sesstarttime;\n if (empty(get_config('attendance', 'enablewarnings'))) {\n $absenteereport = get_config('attendance', 'absenteereport_default');\n } else {\n $absenteereport = empty($formdata->absenteereport) ? 0 : 1;\n }\n\n $now = time();\n\n if (empty(get_config('attendance', 'studentscanmark'))) {\n $formdata->studentscanmark = 0;\n }\n\n if (empty(get_config('attendance', 'allowupdatestatus'))) {\n $formdata->allowupdatestatus = 0;\n }\n\n $calendarevent = 0;\n if (isset($formdata->calendarevent)) { // Calendar event should be created.\n $calendarevent = 1;\n }\n\n $sessions = array();\n if (isset($formdata->addmultiply)) {\n $startdate = $sessiondate;\n $enddate = $formdata->sessionenddate + DAYSECS; // Because enddate in 0:0am.\n\n if ($enddate < $startdate) {\n return null;\n }\n\n // Getting first day of week.\n $sdate = $startdate;\n $dinfo = usergetdate($sdate);\n if ($CFG->calendar_startwday === '0') { // Week start from sunday.\n $startweek = $startdate - $dinfo['wday'] * DAYSECS; // Call new variable.\n } else {\n $wday = $dinfo['wday'] === 0 ? 7 : $dinfo['wday'];\n $startweek = $startdate - ($wday - 1) * DAYSECS;\n }\n\n $wdaydesc = array(0 => 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat');\n\n while ($sdate < $enddate) {\n if ($sdate < strtotime('+1 week', $startweek)) {\n $dinfo = usergetdate($sdate);\n if (isset($formdata->sdays) && array_key_exists($wdaydesc[$dinfo['wday']], $formdata->sdays)) {\n $sess = new stdClass();\n $sess->sessdate = make_timestamp($dinfo['year'], $dinfo['mon'], $dinfo['mday'],\n $formdata->sestime['starthour'], $formdata->sestime['startminute']);\n $sess->duration = $duration;\n $sess->descriptionitemid = $formdata->sdescription['itemid'];\n $sess->description = $formdata->sdescription['text'];\n $sess->descriptionformat = $formdata->sdescription['format'];\n $sess->calendarevent = $calendarevent;\n $sess->timemodified = $now;\n $sess->absenteereport = $absenteereport;\n $sess->studentpassword = '';\n $sess->includeqrcode = 0;\n $sess->rotateqrcode = 0;\n $sess->rotateqrcodesecret = '';\n $sess->automark = !empty($formdata->automark) ? $formdata->automark : 0;\n $sess->automarkcmid = !empty($formdata->automarkcmid) ? $formdata->automarkcmid : 0;\n $sess->automarkcompleted = 0;\n\n if (!empty($formdata->usedefaultsubnet)) {\n $sess->subnet = $att->subnet;\n } else {\n $sess->subnet = $formdata->subnet;\n }\n if (!empty($formdata->preventsharedip)) {\n $sess->preventsharedip = $formdata->preventsharedip;\n }\n if (!empty($formdata->preventsharediptime)) {\n $sess->preventsharediptime = $formdata->preventsharediptime;\n }\n\n if (isset($formdata->studentscanmark)) { // Students will be able to mark their own attendance.\n $sess->studentscanmark = 1;\n if (isset($formdata->allowupdatestatus)) {\n $sess->allowupdatestatus = $formdata->allowupdatestatus;\n } else {\n $sess->allowupdatestatus = 0;\n }\n if (isset($formdata->autoassignstatus)) {\n $sess->autoassignstatus = 1;\n }\n if (isset($formdata->studentsearlyopentime)) {\n $sess->studentsearlyopentime = $formdata->studentsearlyopentime;\n }\n\n if (!empty($formdata->randompassword)) {\n $sess->studentpassword = attendance_random_string();\n } else if (!empty($formdata->studentpassword)) {\n $sess->studentpassword = $formdata->studentpassword;\n }\n if (!empty($formdata->includeqrcode)) {\n $sess->includeqrcode = $formdata->includeqrcode;\n }\n if (!empty($formdata->rotateqrcode)) {\n $sess->rotateqrcode = $formdata->rotateqrcode;\n $sess->studentpassword = attendance_random_string();\n $sess->rotateqrcodesecret = attendance_random_string();\n }\n if (!empty($formdata->preventsharedip)) {\n $sess->preventsharedip = $formdata->preventsharedip;\n }\n if (!empty($formdata->preventsharediptime)) {\n $sess->preventsharediptime = $formdata->preventsharediptime;\n }\n } else {\n $sess->subnet = '';\n $sess->automark = 0;\n $sess->automarkcompleted = 0;\n $sess->preventsharedip = 0;\n $sess->preventsharediptime = '';\n }\n $sess->statusset = $formdata->statusset;\n\n attendance_fill_groupid($formdata, $sessions, $sess);\n }\n\n $sdate = strtotime(\"+1 day\", $sdate); // Set start to tomorrow.\n } else {\n $startweek = strtotime(\"+\".$formdata->period.' weeks', $startweek);\n $sdate = $startweek;\n }\n }\n } else {\n $sess = new stdClass();\n $sess->sessdate = $sessiondate;\n $sess->duration = $duration;\n $sess->descriptionitemid = $formdata->sdescription['itemid'];\n $sess->description = $formdata->sdescription['text'];\n $sess->descriptionformat = $formdata->sdescription['format'];\n $sess->calendarevent = $calendarevent;\n $sess->timemodified = $now;\n $sess->studentscanmark = 0;\n $sess->allowupdatestatus = 0;\n $sess->autoassignstatus = 0;\n $sess->subnet = '';\n $sess->studentpassword = '';\n $sess->automark = 0;\n $sess->automarkcompleted = 0;\n\n if (!empty($formdata->automarkcmid)) {\n $sess->automarkcmid = $formdata->automarkcmid;\n } else {\n $sess->automarkcmid = 0;\n }\n\n $sess->absenteereport = $absenteereport;\n $sess->includeqrcode = 0;\n $sess->rotateqrcode = 0;\n $sess->rotateqrcodesecret = '';\n\n if (!empty($formdata->usedefaultsubnet)) {\n $sess->subnet = $att->subnet;\n } else {\n $sess->subnet = $formdata->subnet;\n }\n\n if (!empty($formdata->automark)) {\n $sess->automark = $formdata->automark;\n }\n if (!empty($formdata->automark)) {\n $sess->automark = $formdata->automark;\n }\n if (!empty($formdata->preventsharedip)) {\n $sess->preventsharedip = $formdata->preventsharedip;\n }\n if (!empty($formdata->preventsharediptime)) {\n $sess->preventsharediptime = $formdata->preventsharediptime;\n }\n\n if (isset($formdata->studentscanmark) && !empty($formdata->studentscanmark)) {\n // Students will be able to mark their own attendance.\n $sess->studentscanmark = 1;\n if (!empty($formdata->allowupdatestatus)) {\n $sess->allowupdatestatus = $formdata->allowupdatestatus;\n } else {\n $sess->allowupdatestatus = 0;\n }\n if (isset($formdata->autoassignstatus) && !empty($formdata->autoassignstatus)) {\n $sess->autoassignstatus = 1;\n }\n if (!empty($formdata->randompassword)) {\n $sess->studentpassword = attendance_random_string();\n } else if (!empty($formdata->studentpassword)) {\n $sess->studentpassword = $formdata->studentpassword;\n }\n if (!empty($formdata->includeqrcode)) {\n $sess->includeqrcode = $formdata->includeqrcode;\n }\n if (!empty($formdata->rotateqrcode)) {\n $sess->rotateqrcode = $formdata->rotateqrcode;\n $sess->studentpassword = attendance_random_string();\n $sess->rotateqrcodesecret = attendance_random_string();\n }\n if (!empty($formdata->usedefaultsubnet)) {\n $sess->subnet = $att->subnet;\n } else {\n $sess->subnet = $formdata->subnet;\n }\n\n if (!empty($formdata->automark)) {\n $sess->automark = $formdata->automark;\n }\n if (!empty($formdata->preventsharedip)) {\n $sess->preventsharedip = $formdata->preventsharedip;\n }\n if (!empty($formdata->studentsearlyopentime)) {\n $sess->studentsearlyopentime = $formdata->studentsearlyopentime;\n }\n }\n $sess->statusset = $formdata->statusset;\n\n attendance_fill_groupid($formdata, $sessions, $sess);\n }\n\n return $sessions;\n}",
"public function Attendance(){\t\t\n\t\tif($this->IsLoggedIn('cashier')){\t\t\t\n\t\t\t$data = $this->GetDataForCashier(\"Attendance\");\t\t\t\n\t\t\t$data['experts'] = $this->GetExperts();\t\n\t\t\t$data['attendance_today']=$this->CashierModel->CalculateAttendance();\t\t\t\n\t\t\n\t\t\t$data['sidebar_collapsed'] = \"true\";\n\t\t\t// $this->PrettyPrintArray($data);\n\t\t\t// exit;\n\t\t\t$this->load->view('cashier/cashier_attendance_view', $data);\t\n\t\t}\n\t\telse{\n\t\t\t$data['title'] = \"Login\";\n\t\t\t$this->load->view('cashier/cashier_login_view',$data);\n\t\t}\n\t\t\n\n\t}",
"public function reportDatewiseClassWiseAttendentForm()\n {\n $year = DB::table('student')->distinct()->get(array('year'));\n $shift = DB::table('shift')->get();\n $dept = DB::table('department')->where('status',1)->get();\n $semister = DB::table('semister')->where('status',1)->get();\n return view('report.reportDatewiseClassWiseAttendentForm')\n ->with('year',$year)\n ->with('shift',$shift)\n ->with('dept',$dept)\n ->with('semister',$semister);\n }",
"function get_student_month_attendance($month)\n\t\t{\n\t\t\t\n\t\t\t$array = array(\"attendance.status\"=>2,\"attendance.student_id !=\"=>0,\"attendance.month\"=>$month);\n\t\t\t$this->db->select('*');\n\t\t\t$this->db->from('attendance');\n\t\t\t$this->db->join('student', 'student.student_id = attendance.student_id');\n\t\t\t$this->db->where($array);\n\t\t\t$query = $this->db->get();\n\t\t\t$attendance =$query->result();\n\t\t\t//echo $this->db->last_query();\n\t\t\t\n\t\t\tforeach($attendance as $row)\n\t\t\t{\n\t\t\t\techo '\n\t\t\t\t<tr class=\"gradeA\"><td>' .date(\"d-M-Y\", strtotime($row->date)) . '</td>\n\t\t\t\t<td>'. $row->class_id.'</td>\t\n\t\t\t\t<td>'. $row->name.'</td>\n\t\t\t\t<td>'. $row->description.'</td>\n\t\t\t\t</tr>';\n\t\t\t} \n\t\t}",
"abstract public function retrieve_course_summary_data();",
"public function reportMonthlyClassWiseAttendentView(Request $request)\n {\n $year = trim($request->year) ;\n $shift = trim($request->shift);\n $dept = trim($request->dept);\n $semister = trim($request->semister);\n $section = trim($request->section);\n $month = trim($request->month);\n // get student\n $result = DB::table('student')->where('year',$year)->where('shift_id',$shift)->where('dept_id', $dept )->where('semister_id',$semister)->where('section_id',$section)->orderBy('roll','asc')->get();\n \n #---------------- total holiday class calculation-------------------#\n $from = $year.'-'.$month.'-01';\n $to = $year.'-'.$month.'-31';\n $get_holiday = DB::table('holiday')\n ->where('year',$year)\n ->whereNotIn('type',[1])\n ->whereBetween('holiday_date', [$from, $to])->get();\n\n \n $total_holiday_class = 0 ;\n foreach ($get_holiday as $holidays) {\n $day_no = date('D', strtotime($holidays->holiday_date));\n //echo $day_no;\nif($day_no == 'Sat'){\n $day = '1';\n}elseif($day_no == 'Sun'){\n $day = '2';\n}elseif($day_no == 'Mon'){\n $day = '3';\n}elseif($day_no == 'Tue'){\n $day = '4';\n}elseif($day_no == 'Wed'){\n $day = '5';\n}elseif($day_no == 'Thu'){\n $day = '6';\n}elseif($day_no == 'Fri'){\n $day = '7';\n}\n// count total holiday class\n$holiday_total_class = DB::table('routine')\n->where('year',$year)\n->where('shift_id',$shift)\n->where('dept_id',$dept)\n->where('semister_id',$semister)\n->where('section_id',$section)\n->where('day',$day)->count();\n$total_holiday_class = $total_holiday_class+$holiday_total_class;\n }\n#-----------------end total holiday class calulation---------------------#\n // month total holiday \n $get_all_holiday = DB::table('holiday')\n ->where('year',$year)\n ->whereBetween('holiday_date', [$from, $to])->get(['holiday_date']);\n $data = array();\n foreach ($get_all_holiday as $data1) {\n $data[] = $data1->holiday_date;\n }\n$start_date = $year.'-'.$month.'-01';;\n$start_time = strtotime($start_date);\n$end_time = strtotime(\"+1 month\", $start_time);\nfor($i=$start_time; $i<$end_time; $i+=86400)\n{\n $list[] = date('Y-m-d', $i);\n}\n$total_class_day = array_diff($list,$data);\n#--------------------- total class of this month---------------------------#\n$totalClassNo = 0 ;\nforeach ($total_class_day as $total_class_days) {\n $class_day_no = date('D', strtotime($total_class_days));\n\nif($class_day_no == 'Sat'){\n $day_number = '1';\n}elseif($class_day_no == 'Sun'){\n $day_number = '2';\n}elseif($class_day_no == 'Mon'){\n $day_number = '3';\n}elseif($class_day_no == 'Tue'){\n $day_number = '4';\n}elseif($class_day_no == 'Wed'){\n $day_number = '5';\n}elseif($class_day_no == 'Thu'){\n $day_number = '6';\n}elseif($class_day_no == 'Fri'){\n $day_number = '7';\n}\n\n// count total holiday class\n$count_total_class_month = DB::table('routine')\n->where('year',$year)\n->where('shift_id',$shift)\n->where('dept_id',$dept)\n->where('semister_id',$semister)\n->where('section_id',$section)\n->where('day',$day_number)->count();\n$totalClassNo = $totalClassNo+$count_total_class_month;\n}\n//echo $totalClassNo ;\n#------------------------ end total class of this month-----------------------------#\n$month_total_day =cal_days_in_month(CAL_GREGORIAN,$month,$year);\n\n $shift_name = DB::table('shift')->where('id',$shift)->first();\n $dept_name = DB::table('department')->where('id',$dept)->first();\n $semister_name = DB::table('semister')->where('id',$semister)->first();\n $section_name = DB::table('section')->where('id',$section)->first();\n return view('report.reportMonthlyClassWiseAttendentView')->with('result',$result)->with('month_total_day',$month_total_day)->with('from',$from)->with('to',$to)->with('month',$month)->with('year',$year)->with('shift_name',$shift_name)->with('dept_name',$dept_name)->with('semister_name',$semister_name)->with('section_name',$section_name)->with('total_holiday_class',$total_holiday_class)->with('totalClassNo',$totalClassNo)->with('dept',$dept)->with('shift',$shift)->with('semister',$semister)->with('section',$section);\n }",
"public function checkIfStudentAttendance($class_id, $class_type, $class_arm, $session_id, $term_id, $student_id){\n\t\t\t$query = $this->connection()->prepare(\"SELECT * FROM attendance WHERE student_id='$student_id' AND clazz_id='$class_id' AND clazz_type_id='$class_type' AND class_arm_id='$class_arm' AND session_id='$session_id' AND term_id='$term_id'\");\n\t\t\t$query->execute();\n\t\t\treturn $query->rowCount();\n\t\t}",
"public function list_class_section (Request $request) \n {\n $sectionID = $request->search_sy; \n // $data = $request->all();\n $SchoolYearID = \\App\\SchoolYear::where('current', 1)->where('status', 1)->first();\n\n $getIdClassDetails = \\App\\ClassDetail::where(['section_id'=> $sectionID])->where(['school_year_id'=>$SchoolYearID->id])->first();\n\n $EnrollmentID = \\App\\Enrollment::where(['class_details_id'=>$getIdClassDetails->id])->get();\n\n \n\n foreach($EnrollmentID as $dataID)\n {\n // $Grade_sheet_first = new Grade_sheet_firstsem();\n // $Grade_sheet_first->school_year_id = $SchoolYearID->id;\n // $Grade_sheet_first->enrollment_id = $dataID->id;\n // $Grade_sheet_first->section_details_id = $sectionID;\n // $Grade_sheet_first->subject_1 = 0.00;\n // $Grade_sheet_first->subject_2 = 0.00;\n // $Grade_sheet_first->subject_3 = 0.00;\n // $Grade_sheet_first->subject_4 = 0.00;\n // $Grade_sheet_first->subject_5 = 0.00;\n // $Grade_sheet_first->subject_6 = 0.00;\n // $Grade_sheet_first->subject_7 = 0.00;\n // $Grade_sheet_first->subject_8 = 0.00;\n // $Grade_sheet_first->subject_9 = 0.00; \n // $Grade_sheet_first->current = 1;\n // $Grade_sheet_first->status = 1;\n // $Grade_sheet_first->save();\n \n // $Grade_sheet_second = new \\App\\Grade_sheet_firstsemsecond();\n // $Grade_sheet_second->school_year_id = $SchoolYearID->id;\n // $Grade_sheet_second->enrollment_id = $dataID->id;\n // $Grade_sheet_second->section_details_id = $sectionID;\n // $Grade_sheet_second->subject_1 = 0.00;\n // $Grade_sheet_second->subject_2 = 0.00;\n // $Grade_sheet_second->subject_3 = 0.00;\n // $Grade_sheet_second->subject_4 = 0.00;\n // $Grade_sheet_second->subject_5 = 0.00;\n // $Grade_sheet_second->subject_6 = 0.00;\n // $Grade_sheet_second->subject_7 = 0.00;\n // $Grade_sheet_second->subject_8 = 0.00;\n // $Grade_sheet_second->subject_9 = 0.00; \n // $Grade_sheet_second->current = 1;\n // $Grade_sheet_second->status = 1;\n // $Grade_sheet_second->save();\n\n // $Grade_sheet_third = new \\App\\Grade_sheet_secondsemsecond();\n // $Grade_sheet_third->school_year_id = $SchoolYearID->id;\n // $Grade_sheet_third->enrollment_id = $dataID->id;\n // $Grade_sheet_third->section_details_id = $sectionID;\n // $Grade_sheet_third->subject_1 = 0.00;\n // $Grade_sheet_third->subject_2 = 0.00;\n // $Grade_sheet_third->subject_3 = 0.00;\n // $Grade_sheet_third->subject_4 = 0.00;\n // $Grade_sheet_third->subject_5 = 0.00;\n // $Grade_sheet_third->subject_6 = 0.00;\n // $Grade_sheet_third->subject_7 = 0.00;\n // $Grade_sheet_third->subject_8 = 0.00;\n // $Grade_sheet_third->subject_9 = 0.00; \n // $Grade_sheet_third->current = 1;\n // $Grade_sheet_third->status = 1;\n // $Grade_sheet_third->save();\n\n // $Grade_sheet_fourth = new \\App\\Grade11_Second_Sem();\n // $Grade_sheet_fourth->school_year_id = $SchoolYearID->id;\n // $Grade_sheet_fourth->enrollment_id = $dataID->id;\n // $Grade_sheet_fourth->section_details_id = $sectionID;\n // $Grade_sheet_fourth->subject_1 = 0.00;\n // $Grade_sheet_fourth->subject_2 = 0.00;\n // $Grade_sheet_fourth->subject_3 = 0.00;\n // $Grade_sheet_fourth->subject_4 = 0.00;\n // $Grade_sheet_fourth->subject_5 = 0.00;\n // $Grade_sheet_fourth->subject_6 = 0.00;\n // $Grade_sheet_fourth->subject_7 = 0.00;\n // $Grade_sheet_fourth->subject_8 = 0.00;\n // $Grade_sheet_fourth->subject_9 = 0.00; \n // $Grade_sheet_fourth->current = 1;\n // $Grade_sheet_fourth->status = 1;\n // $Grade_sheet_fourth->save();\n\n $Grade_sheet_first = new Grade_sheet_first();\n $Grade_sheet_first->school_year_id = $SchoolYearID->id;\n $Grade_sheet_first->enrollment_id = $dataID->id;\n $Grade_sheet_first->section_details_id = $sectionID;\n $Grade_sheet_first->filipino = 0.00;\n $Grade_sheet_first->english = 0.00;\n $Grade_sheet_first->math = 0.00;\n $Grade_sheet_first->science = 0.00;\n $Grade_sheet_first->ap = 0.00;\n $Grade_sheet_first->ict = 0.00;\n $Grade_sheet_first->mapeh = 0.00;\n $Grade_sheet_first->esp = 0.00;\n $Grade_sheet_first->religion = 0.00; \n $Grade_sheet_first->current = 1;\n $Grade_sheet_first->status = 1;\n $Grade_sheet_first->save();\n \n $Grade_sheet_second = new \\App\\Grade_sheet_second();\n $Grade_sheet_second->school_year_id = $SchoolYearID->id;\n $Grade_sheet_second->enrollment_id = $dataID->id;\n $Grade_sheet_second->section_details_id = $sectionID;\n $Grade_sheet_second->filipino = 0.00;\n $Grade_sheet_second->english = 0.00;\n $Grade_sheet_second->math = 0.00;\n $Grade_sheet_second->science = 0.00;\n $Grade_sheet_second->ap = 0.00;\n $Grade_sheet_second->ict = 0.00;\n $Grade_sheet_second->mapeh = 0.00;\n $Grade_sheet_second->esp = 0.00;\n $Grade_sheet_second->religion = 0.00; \n $Grade_sheet_second->current = 1;\n $Grade_sheet_second->status = 1;\n $Grade_sheet_second->save();\n\n $Grade_sheet_third = new \\App\\Grade_sheet_third();\n $Grade_sheet_third->school_year_id = $SchoolYearID->id;\n $Grade_sheet_third->enrollment_id = $dataID->id;\n $Grade_sheet_third->section_details_id = $sectionID;\n $Grade_sheet_third->filipino = 0.00;\n $Grade_sheet_third->english = 0.00;\n $Grade_sheet_third->math = 0.00;\n $Grade_sheet_third->science = 0.00;\n $Grade_sheet_third->ap = 0.00;\n $Grade_sheet_third->ict = 0.00;\n $Grade_sheet_third->mapeh = 0.00;\n $Grade_sheet_third->esp = 0.00;\n $Grade_sheet_third->religion = 0.00;\n $Grade_sheet_third->current = 1;\n $Grade_sheet_third->status = 1;\n $Grade_sheet_third->save();\n\n $Grade_sheet_fourth = new \\App\\Grade_sheet_fourth();\n $Grade_sheet_fourth->school_year_id = $SchoolYearID->id;\n $Grade_sheet_fourth->enrollment_id = $dataID->id;\n $Grade_sheet_fourth->section_details_id = $sectionID;\n $Grade_sheet_fourth->filipino = 0.00;\n $Grade_sheet_fourth->english = 0.00;\n $Grade_sheet_fourth->math = 0.00;\n $Grade_sheet_fourth->science = 0.00;\n $Grade_sheet_fourth->ap = 0.00;\n $Grade_sheet_fourth->ict = 0.00;\n $Grade_sheet_fourth->mapeh = 0.00;\n $Grade_sheet_fourth->esp = 0.00;\n $Grade_sheet_fourth->religion = 0.00;\n $Grade_sheet_fourth->current = 1;\n $Grade_sheet_fourth->status = 1;\n $Grade_sheet_fourth->save();\n\n // $Grade_sheet_first->subject_1 = 0.00;\n // $Grade_sheet_first->subject_2 = 0.00;\n // $Grade_sheet_first->subject_3 = 0.00;\n // $Grade_sheet_first->subject_4 = 0.00;\n // $Grade_sheet_first->subject_5 = 0.00;\n // $Grade_sheet_first->subject_6 = 0.00;\n // $Grade_sheet_first->subject_7 = 0.00;\n // $Grade_sheet_first->subject_8 = 0.00;\n // $Grade_sheet_first->subject_9 = 0.00; \n\n $Grade_sheet_fourth->filipino = 0.00;\n $Grade_sheet_fourth->english = 0.00;\n $Grade_sheet_fourth->math = 0.00;\n $Grade_sheet_fourth->science = 0.00;\n $Grade_sheet_fourth->ap = 0.00;\n $Grade_sheet_fourth->ict = 0.00;\n $Grade_sheet_fourth->mapeh = 0.00;\n $Grade_sheet_fourth->esp = 0.00;\n $Grade_sheet_fourth->religion = 0.00;\n\n }\n\n return redirect()->back()->with('flash_message_success','Room Reserved Successfuly!');\n \n }",
"private function getData($type) {\n switch($type) {\n case \"users\":\n return eF_getTableData($type, implode(\",\", $this -> types), \"archive = 0\");\n case \"users_to_courses\":\n return eF_getTableData(\"users_to_courses JOIN courses ON courses.id = users_to_courses.courses_ID\", implode(\",\", $this -> types), \"\");\n case \"users_to_groups\":\n return eF_getTableData(\"users_to_groups JOIN groups ON groups.id = users_to_groups.groups_ID\", implode(\",\", $this -> types), \"\");\n return eF_getTableData($type, implode(\",\", $this -> types), \"archive = 0\");\n }\n }",
"public function attendance_sheet($action, $attendance_id, $student_id = 0, $edit = true)\n {\n $attendance = new Attendance();\n $data = array();\n $data['attendance_id'] = $attendance_id;\n $groupId = isset($_REQUEST['group_id']) ? $_REQUEST['group_id'] : null;\n $data['users_in_course'] = $attendance->get_users_rel_course($attendance_id, $groupId);\n\n $filter_type = 'today';\n if (!empty($_REQUEST['filter'])) {\n $filter_type = $_REQUEST['filter'];\n }\n\n $isDrhOfCourse = CourseManager::isUserSubscribedInCourseAsDrh(\n api_get_user_id(),\n api_get_course_info()\n );\n\n if ($edit == true) {\n if (api_is_allowed_to_edit(null, true) || $isDrhOfCourse) {\n $data['users_presence'] = $attendance->get_users_attendance_sheet($attendance_id, 0, $groupId);\n }\n } else {\n if (!empty($student_id)) {\n $user_id = intval($student_id);\n } else {\n $user_id = api_get_user_id();\n }\n\n if (api_is_allowed_to_edit(null, true) ||\n api_is_coach(api_get_session_id(), api_get_course_int_id()) ||\n $isDrhOfCourse\n ) {\n $data['users_presence'] = $attendance->get_users_attendance_sheet($attendance_id, 0, $groupId);\n } else {\n $data['users_presence'] = $attendance->get_users_attendance_sheet($attendance_id, $user_id, $groupId);\n }\n\n $data['faults'] = $attendance->get_faults_of_user($user_id, $attendance_id, $groupId);\n $data['user_id'] = $user_id;\n }\n\n $data['next_attendance_calendar_id'] = $attendance->get_next_attendance_calendar_id($attendance_id);\n $data['next_attendance_calendar_datetime'] = $attendance->get_next_attendance_calendar_datetime($attendance_id);\n\n if (strtoupper($_SERVER['REQUEST_METHOD']) == 'POST') {\n if (isset($_POST['hidden_input'])) {\n foreach ($_POST['hidden_input'] as $cal_id) {\n $users_present = array();\n if (isset($_POST['check_presence'][$cal_id])) {\n $users_present = $_POST['check_presence'][$cal_id];\n }\n $attendance->attendance_sheet_add(\n $cal_id,\n $users_present,\n $attendance_id\n );\n }\n }\n\n $data['users_in_course'] = $attendance->get_users_rel_course($attendance_id, $groupId);\n $my_calendar_id = null;\n if (is_numeric($filter_type)) {\n $my_calendar_id = $filter_type;\n $filter_type = 'calendar_id';\n }\n $data['attendant_calendar'] = $attendance->get_attendance_calendar(\n $attendance_id,\n $filter_type,\n $my_calendar_id,\n $groupId\n );\n $data['attendant_calendar_all'] = $attendance->get_attendance_calendar($attendance_id, 'all', null, $groupId);\n $data['users_presence'] = $attendance->get_users_attendance_sheet($attendance_id, 0, $groupId);\n $data['next_attendance_calendar_id'] = $attendance->get_next_attendance_calendar_id($attendance_id);\n $data['next_attendance_calendar_datetime'] = $attendance->get_next_attendance_calendar_datetime($attendance_id);\n } else {\n $data['attendant_calendar_all'] = $attendance->get_attendance_calendar($attendance_id, 'all', null, $groupId);\n $data['attendant_calendar'] = $attendance->get_attendance_calendar($attendance_id, $filter_type, null, $groupId);\n }\n\n $data['edit_table'] = intval($edit);\n $data['is_locked_attendance'] = $attendance->is_locked_attendance($attendance_id);\n $this->view->set_data($data);\n $this->view->set_layout('layout');\n $this->view->set_template('attendance_sheet');\n $this->view->render();\n }",
"public function Get_Special_Report($semester,$year,$dept_id)\n {\n global $FILE_PATH;\n $semester_id = $this->DEADLINE->Search_Semester_id($semester,$year);\n if($semester_id)\n {\n $temp_course = $this->COURSE->Get_Dept_Course($dept_id,$semester_id);\n $dept_course = array();\n if(!isset($temp_course['status']))\n {\n for($i=0;$i<count($temp_course);$i++)\n {\n array_push($dept_course,$temp_course[$i]['id']);\n }\n }\n $DATA = array();\n $DATA['info'] = array();\n $DATA['download'] = $this->DOWNLOAD_URL.\"?course=all&type=report&dept=\".$dept_id.\"&info=special&semester=\".$semester.\"&year=\".$year;\n $sql = \"SELECT DISTINCT `course_id` FROM `course_hire_special_instructor` WHERE `status` = '1' AND `semester_id` = \".$semester_id;\n $result_course = $this->DB->Query($sql);\n if($result_course)\n {\n for($i=0;$i<count($result_course);$i++)\n {\n if(!in_array($result_course[$i]['course_id'],$dept_course))\n {\n continue;\n }\n $sql = \"SELECT si.`instructor_id`,si.`prefix`,si.`firstname`,si.`lastname`,si.`cv` FROM `course_hire_special_instructor` ci ,`special_instructor` si \";\n $sql.= \"WHERE ci.`instructor_id` = si.`instructor_id` AND ci.`course_id` = '\".$result_course[$i]['course_id'].\"' AND ci.`status` = '1' AND ci.`semester_id` = \".$semester_id;\n $result_instructor = $this->DB->Query($sql);\n $data = array();\n $data['id'] = $result_course[$i]['course_id'];\n $data['name'] = $this->COURSE->Get_Course_Name($data['id']);\n $data['special'] = array();\n if($result_instructor)\n {\n for($j=0;$j<count($result_instructor);$j++)\n {\n $instructor['id'] = $result_instructor[$j]['instructor_id'];\n $instructor['name'] = $result_instructor[$j]['prefix'].' '.$result_instructor[$j]['firstname'].' '.$result_instructor[$j]['lastname'];\n $instructor['cv'] = $this->PERSON->Get_CV($instructor['id']);\n $instructor['pdf'] = $this->VIEW_URL.\"?course=\".$data['id'].\"&id=\".$instructor['id'].\"&type=complete&info=special&semester=\".$semester.\"&year=\".$year;\n array_push($data['special'],$instructor);\n }\n }\n array_push($DATA['info'],$data);\n }\n }\n if(count($DATA['info']) == 0)\n {\n $return['status'] = 'error';\n $return['msg'] = 'ไม่พบข้อมูล';\n return $return;\n }\n else\n {\n return $DATA;\n }\n }\n else\n {\n $return['status'] = 'error';\n $return['msg'] = 'ไม่พบข้อมูล';\n return $return;\n }\n }",
"public function Search_Document($type,$course_id,$teacher_id)\n {\n if($teacher_id != null)\n {\n $check_access = $this->Check_Access($teacher_id,$course_id);\n }\n else\n {\n $check_access = null;\n }\n if($type =='special')\n {\n $check_access = true;\n $sql = \"SELECT DISTINCT si.`instructor_id`,`firstname`,`lastname`,s.`semester_num`,s.`year` FROM `special_instructor` si,`course_hire_special_instructor` ci, `semester` s\n WHERE ci.`course_id` = '\".$course_id.\"' AND ci.`instructor_id` = si.`instructor_id` AND ci.`semester_id` = s.`semester_id` ORDER BY `ci`.`updated_date` DESC\" ;\n }\n else if ($type == 'evaluate')\n {\n $sql = \"SELECT `semester_num`,`year` FROM `course_evaluate` e,`semester` s\n WHERE e.`course_id` = '\".$course_id.\"' AND e.`semester_id` = s.`semester_id` ORDER BY e.`updated_date` DESC\" ;\n }\n $data = array();\n \n $result = $this->DB->Query($sql);\n if($result)\n {\n for($i=0;$i<count($result);$i++)\n {\n if($type == 'special')\n {\n $data['DATA'][$i]['id'] = $result[$i]['instructor_id'];\n $data['DATA'][$i]['name'] = $result[$i]['firstname'].' '.$result[$i]['lastname'];\n }\n $data['DATA'][$i]['semester'] = $result[$i]['semester_num'];\n $data['DATA'][$i]['year'] = $result[$i]['year'];\n }\n }\n else\n {\n $data['DATA'] = false;\n }\n $data['ACCESS'] = $check_access;\n $data['INFO'] = $this->Get_Course_Info($course_id);\n $dept = $this->Search_Course_Dept($course_id,$this->SEMESTER['id']);\n if($dept)\n {\n $data['INFO']['department'] = $dept['id'];\n\n }\n $sql = \"SELECT sum(se.`student`) as num_student FROM `course_evaluate` ce, `student_evaluate` se \";\n $sql .= \"WHERE ce.`course_evaluate_id` = se.`course_evaluate_id` AND ce.`course_id` = '\".$course_id.\"' AND ce.`semester_id` = '\".$this->SEMESTER['id'].\"'\";\n $result = $this->DB->Query($sql);\n if($result)\n {\n\n if(is_null($result[0]['num_student']))\n {\n $data['INFO']['num_student'] = '0';\n }\n else\n {\n $data['INFO']['num_student'] = $result[0]['num_student'];\n }\n }\n //id,name,semester,year\n return $data;\n }",
"function viewStudentSchedule($studentID){\r\n\t \tif($this->userCanViewSchedule('')){\r\n\r\n\t\t\t$course = array();\r\n\t\t\t$schedule = array();\r\n\t\t\t\r\n\t\t\t$query = \"select course_id from `X_PNSY_SCHEDULE` where student_id = '$studentID'\";\r\n\t\t\t$result = mysql_query($query);\r\n\t\t\t\r\n\t\t\tif(mysql_num_rows($result) == 0){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\twhile ($row = mysql_fetch_assoc($result)){\r\n\t\t\t\t$courseID =\t$row['course_id'];\t\t\r\n\t\t\t\t\r\n // course information\t\r\n\t\t\t\t$query = \"select * from `X_PNSY_COURSE` where course_id = '$courseID'\";\r\n\t\t\t\t$courseInfo = mysql_fetch_assoc(mysql_query($query));\r\n\t\t\t\t\r\n // retrieve all the course days/times. note: there can be more than one.\r\n\t\t\t\t$query = \"select * from `X_PNSY_COURSE_DAYS` where course_id = '$courseID'\";\r\n $daysResult = mysql_query($query);\r\n $meetingInfo = array();\r\n while($dayRow = mysql_fetch_assoc($daysResult)){\r\n\t\t\t\t $meetingInfo[] = $dayRow;\r\n }\t\t\t\t\r\n\r\n // retrieve prof\r\n\t\t\t\t$facultyID = $courseInfo['FACULTY_ID'];\r\n if(!empty($facultyID)){\r\n \t\t\t\t$query = \"select * from `X_PNSY_FACULTY` where id = '$facultyID'\";\r\n \t\t\t\t$facultyInfo = mysql_fetch_assoc(mysql_query($query));\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// parse time of day. remember, there can be more than one day/time\r\n $courseDateInfo = '';\r\n for($i = 0; $i < count($meetingInfo); $i++){\r\n if(!empty($meetingInfo[$i]['DAYS'])){\r\n\t\t\t\t $startTime[$i] = explode(' ',$meetingInfo[$i]['START_TIME']);\r\n\t\t\t\t $startTime[$i] = explode(':',$startTime[$i][1]);\r\n\t\t\t\t $startTime[$i] = $startTime[$i][0].':'.$startTime[$i][1];\r\n\t\t\t\t $endTime[$i] = explode(' ',$meetingInfo[$i]['END_TIME']);\r\n\t\t\t\t $endTime[$i] = explode(':',$endTime[$i][1]);\r\n\t\t\t\t $endTime[$i] = $endTime[$i][0].':'.$endTime[$i][1];\r\n\r\n if($i > 0) $courseDateInfo .= '<br>';\r\n \r\n $courseDateInfo .= $meetingInfo[$i]['DAYS'].', '.$startTime[$i].'-'.$endTime[$i].', '.$meetingInfo[$i]['COURSE_BLDG'].' '.$meetingInfo[$i]['COURSE_ROOM'];\r\n }\t\t\t\t\r\n }\r\n\r\n\t\t\t\tunset($course);\t\r\n $course['id'] = 'n/a';\r\n $course['title'] = 'n/a';\r\n $course['info'] = 'n/a';\r\n $course['credits'] = 'n/a';\r\n $course['faculty'] = 'n/a';\r\n $course['email'] = 'n/a';\r\n $course['phone'] = 'n/a';\r\n\r\n\t\t\t\t$course['id'] = $courseID;\r\n\t\t\t\tif(!empty($courseInfo['TITLE'])) $course['title'] = $courseInfo['TITLE'];\r\n if(!empty($courseDateInfo)) $course['info'] = $courseDateInfo;\r\n\t\t\t\tif(!empty($courseInfo['CREDITS'])) $course['credits'] = $courseInfo['CREDITS'];\r\n if(!empty($facultyID)){\r\n\t\t\t\t $course['faculty'] = $facultyInfo['FIRST_NAME'].' '.$facultyInfo['LAST_NAME'];\r\n\t\t\t\t if(!empty($facultyInfo['WOOSTER_EMAIL'])) $course['email'] = $facultyInfo['WOOSTER_EMAIL'];\r\n if(!empty($facultyInfo['CAMPUS_PHONE'])) $course['phone'] = $facultyInfo['CAMPUS_PHONE'];\r\n }\r\n\t\t\t\t\r\n\t\t\t\t$schedule[] = $course;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn $schedule;\r\n\t\t}\r\n\t }",
"public function index_get($mode = 0, $madrasaid = 0, $classid = 0, $studentid = 0, $fromdateid = 0, $uptodateid = 0, $dateid = 0, $morethan = 0, $itsids = 0, $sms = 0)\n {\n if (!empty($mode)) {\n switch ($mode) {\n\n case 'class':\n\n\n if (!empty($classid)) {\n if (!empty($fromdateid) && !empty($uptodateid)) {\n } elseif (!empty($dateid)) {\n } else {\n }\n }\n break;\n\n case 'madrasa':\n\n\n\n if (!empty($madrasaid)) {\n if (!empty($fromdateid) && !empty($uptodateid)) {\n } elseif (!empty($morethan)) {\n $sql = \"SELECT tblstudentmaster.studentid, CONCAT(tblclassmaster.classdesc, '-', tbldivmaster.divdesc) AS class, tblstudentmaster.itsid, tblstudentmaster.firstname, DATE_FORMAT(tblattendance.dateid, '%d-%m-%Y') AS dateid, tblattendance.attended, tblattendance.late, tblattendance.id FROM tblstudentmaster INNER JOIN tbl_student_year_class ON tblstudentmaster.studentid = tbl_student_year_class.studentid INNER JOIN tbl_year_class ON tbl_student_year_class.yearclassid = tbl_year_class.yearclassid INNER JOIN tblmadrasamaster ON tblmadrasamaster.madrasaid = tbl_year_class.madrasaid INNER JOIN tblattendance ON tblstudentmaster.studentid = tblattendance.studentid INNER JOIN tblmozemaster ON tblmozemaster.mozeid = tblmadrasamaster.mozeid INNER JOIN tblclassmaster ON tbl_year_class.classid = tblclassmaster.classid INNER JOIN tbldivmaster ON tbl_year_class.divid = tbldivmaster.divid WHERE tblmadrasamaster.madrasaid = ? and tblattendance.id>=?;\";\n $data = $this->db->query($sql, array($madrasaid, $morethan))->result();\n } else {\n }\n }\n\n break;\n\n\n case 'update':\n\n\n\n if (!empty($madrasaid)) {\n if (!empty($fromdateid) && !empty($uptodateid)) {\n } elseif (!empty($morethan)) {\n $sql = \"SELECT tblstudentmaster.studentid, CONCAT(tblclassmaster.classdesc, '-', tbldivmaster.divdesc) AS class, tblstudentmaster.itsid, tblstudentmaster.firstname, DATE_FORMAT(tblattendance.dateid, '%d-%m-%Y') AS dateid, tblattendance.attended, tblattendance.late, tblattendance.id FROM tblstudentmaster INNER JOIN tbl_student_year_class ON tblstudentmaster.studentid = tbl_student_year_class.studentid INNER JOIN tbl_year_class ON tbl_student_year_class.yearclassid = tbl_year_class.yearclassid INNER JOIN tblmadrasamaster ON tblmadrasamaster.madrasaid = tbl_year_class.madrasaid INNER JOIN tblattendance ON tblstudentmaster.studentid = tblattendance.studentid INNER JOIN tblmozemaster ON tblmozemaster.mozeid = tblmadrasamaster.mozeid INNER JOIN tblclassmaster ON tbl_year_class.classid = tblclassmaster.classid INNER JOIN tbldivmaster ON tbl_year_class.divid = tbldivmaster.divid WHERE tblmadrasamaster.madrasaid = ? and tblattendance.updated >=?;\";\n $data = $this->db->query($sql, array($madrasaid, $morethan))->result();\n } else {\n }\n }\n\n break;\n\n case 'checkmadrasa':\n\n\n\n if (!empty($madrasaid)) {\n $data = $this->checkmadrasa($madrasaid);\n\n\n if (!empty($fromdateid) && !empty($uptodateid)) {\n } elseif (!empty($morethan)) {\n } else {\n }\n }\n\n break;\n\n\n\n case 'single':\n\n if (!empty($studentid)) {\n if (!empty($fromdateid) && !empty($uptodateid)) {\n } elseif (!empty($dateid)) {\n } else {\n }\n }\n break;\n\n case 'maxupdate':\n\n $sql = \"SELECT MAX(updated) as lastupdated FROM tblattendance\";\n $data = $this->db->query($sql, $madrasaid)->result();\n break;\n\n\n case 'lastentry':\n\n $sql = \"SELECT MAX(id) Lastentry FROM tblattendance\";\n $data = $this->db->query($sql, $madrasaid)->result();\n break;\n\n case 'summary':\n if (!empty($madrasaid)) {\n //$sql=\"Select studentid,firstname,class,itsid, max(case when attended = 'n' then NoOfDays ELSE 0 END) as absent, max(case when attended = 'y' then NoOfDays ELSE 0 end)AS present, SUM(NoOfDays) AS workingdays from (SELECT COUNT(tblattendance.attended) AS NoOfDays, tblattendance.studentid, tblstudentmaster.itsid, tblattendance.attended, tblstudentmaster.firstname, CONCAT(tblclassmaster.classdesc, '-', tbldivmaster.divdesc) AS class FROM tblstudentmaster INNER JOIN tblattendance ON tblstudentmaster.studentid = tblattendance.studentid INNER JOIN tbl_student_year_class ON tblattendance.studentid = tbl_student_year_class.studentid INNER JOIN tbl_year_class ON tbl_student_year_class.yearclassid = tbl_year_class.yearclassid INNER JOIN tblclassmaster ON tblclassmaster.classid = tbl_year_class.classid INNER JOIN tbldivmaster ON tbldivmaster.divid = tbl_year_class.divid Where tbl_year_class.madrasaid= ? GROUP BY tblattendance.studentid, tblattendance.attended, tblstudentmaster.firstname, tbldivmaster.divdesc, tblclassmaster.classdesc ) AS TABLE1 group by studentid ; \"\n $sql = \" SELECT TABLE1.studentid, TABLE1.firstname, TABLE1.class, TABLE1.itsid, TABLE1.ClassID, TABLE2.TotalDays, Max(Case When TABLE1.attended = 'n' Then TABLE1.NoOfDays ELSE 0 End) As absent, Max(Case When TABLE1.attended = 'y' Then TABLE1.NoOfDays ELSE 0 End) As present FROM (SELECT Count(tblattendance.attended) As NoOfDays, tblattendance.studentid, tblstudentmaster.itsid, tblattendance.attended, tblstudentmaster.firstname, tbl_year_class.yearclassid As ClassID, Concat(tblclassmaster.classdesc, '-', tbldivmaster.divdesc) As class FROM tblstudentmaster Inner JOIN tblattendance On tblstudentmaster.studentid = tblattendance.studentid Inner JOIN tbl_student_year_class On tblattendance.studentid = tbl_student_year_class.studentid Inner JOIN tbl_year_class On tbl_student_year_class.yearclassid = tbl_year_class.yearclassid Inner JOIN tblclassmaster On tblclassmaster.classid = tbl_year_class.classid Inner JOIN tbldivmaster On tbldivmaster.divid = tbl_year_class.divid WHERE tbl_year_class.madrasaid = ? Group BY tblattendance.studentid, tblattendance.attended, tblstudentmaster.firstname, tbldivmaster.divdesc, tblclassmaster.classdesc) As TABLE1 Inner JOIN (SELECT Max(tblcomplete.NoOfDays) As TotalDays, tblcomplete.classid As ClassID FROM (SELECT Count(tblattendance.attended) As NoOfDays, tblstudentmaster.itsid, tbl_year_class.yearclassid As classid FROM tblstudentmaster Inner JOIN tblattendance On tblstudentmaster.studentid = tblattendance.studentid Inner JOIN tbl_student_year_class On tblattendance.studentid = tbl_student_year_class.studentid Inner JOIN tbl_year_class On tbl_student_year_class.yearclassid = tbl_year_class.yearclassid Inner JOIN tblclassmaster On tblclassmaster.classid = tbl_year_class.classid Inner JOIN tbldivmaster On tbldivmaster.divid = tbl_year_class.divid WHERE tbl_year_class.madrasaid = ? Group BY tbl_year_class.yearclassid, tblattendance.studentid) As tblcomplete Group BY tblcomplete.classid Order BY ClassID) As TABLE2 On TABLE1.ClassID = TABLE2.ClassID Group BY TABLE1.studentid Order BY TABLE1.ClassID ; \";\n $data = $this->db->query($sql, array($madrasaid, $madrasaid))->result();\n }\n break;\n\n case 'summarywithdate':\n if (!empty($madrasaid)) {\n if (!empty($fromdateid) && !empty($uptodateid)) {\n $sql = \" SELECT TABLE1.studentid, TABLE1.firstname, TABLE1.class, TABLE1.itsid, TABLE1.Classes, TABLE2.TotalDays, Max(Case When TABLE1.attended = 'n' Then TABLE1.NoOfDays ELSE 0 End) As absent, Max(Case When TABLE1.attended = 'y' Then TABLE1.NoOfDays ELSE 0 End) As present FROM (SELECT Count(tblattendance.attended) As NoOfDays, tblattendance.studentid, tblstudentmaster.itsid, tblattendance.attended, tblstudentmaster.firstname, tbl_year_class.yearclassid As Classes, Concat(tblclassmaster.classdesc, '-', tbldivmaster.divdesc) As class FROM tblstudentmaster Inner JOIN tblattendance On tblstudentmaster.studentid = tblattendance.studentid Inner JOIN tbl_student_year_class On tblattendance.studentid = tbl_student_year_class.studentid Inner JOIN tbl_year_class On tbl_student_year_class.yearclassid = tbl_year_class.yearclassid Inner JOIN tblclassmaster On tblclassmaster.classid = tbl_year_class.classid Inner JOIN tbldivmaster On tbldivmaster.divid = tbl_year_class.divid WHERE tbl_year_class.madrasaid = ? AND tblattendance.dateid Between ? And ? Group BY tblattendance.studentid, tblattendance.attended, tblstudentmaster.firstname, tbldivmaster.divdesc, tblclassmaster.classdesc) As TABLE1 Inner JOIN (SELECT Max(tblcomplete.NoOfDays) As TotalDays, tblcomplete.classid As ClassID FROM (SELECT Count(tblattendance.attended) As NoOfDays, tblstudentmaster.itsid, tbl_year_class.yearclassid As classid FROM tblstudentmaster Inner JOIN tblattendance On tblstudentmaster.studentid = tblattendance.studentid Inner JOIN tbl_student_year_class On tblattendance.studentid = tbl_student_year_class.studentid Inner JOIN tbl_year_class On tbl_student_year_class.yearclassid = tbl_year_class.yearclassid Inner JOIN tblclassmaster On tblclassmaster.classid = tbl_year_class.classid Inner JOIN tbldivmaster On tbldivmaster.divid = tbl_year_class.divid WHERE tbl_year_class.madrasaid = ? AND tblattendance.dateid Between ? And ? Group BY tbl_year_class.yearclassid, tblattendance.studentid) As tblcomplete Group BY tblcomplete.classid Order BY ClassID) As TABLE2 On TABLE1.Classes = TABLE2.ClassID Group BY TABLE1.studentid Order BY TABLE1.Classes ;\";\n $data = $this->db->query($sql, array($madrasaid, $fromdateid, $uptodateid, $madrasaid, $fromdateid, $uptodateid))->result();\n }\n }\n break;\n\n\n case 'classlist':\n if (!empty($madrasaid)) {\n $sql = \"Select tbl_year_class.yearclassid As YearclassID, Concat(tblclassmaster.classdesc, '-', tbldivmaster.divdesc) As classname, tblclassmaster.classID as darajah, tblmadrasamaster.madrasaname, tblmozemaster.mozename, tblmadrasamaster.madrasaid From tbl_year_class Inner Join tblclassmaster On tblclassmaster.classid = tbl_year_class.classid Inner Join tbldivmaster On tbldivmaster.divid = tbl_year_class.divid Inner Join tblmadrasamaster On tblmadrasamaster.madrasaid = tbl_year_class.madrasaid Inner Join tblmozemaster On tblmozemaster.mozeid = tblmadrasamaster.mozeid Where tbl_year_class.madrasaid = ? ;\";\n $data = $this->db->query($sql, ($madrasaid))->result();\n }\n break;\n\n\n case 'studentattendance':\n if (!empty($studentid)) {\n $sql = \" Select tblstudentmaster.firstname, tblstudentmaster.itsid, tblattendance.dateid, tblattendance.intime, tblattendance.late, tblattendance.attended From tblattendance Inner Join tblstudentmaster On tblstudentmaster.studentid = tblattendance.studentid Where tblstudentmaster.studentid = ? And tblattendance.attended='y' ;\";\n $data = $this->db->query($sql, ($studentid))->result();\n }\n break;\n\n\n\n case 'studentattendancewithdate':\n if (!empty($studentid)) {\n if (!empty($fromdateid) && !empty($uptodateid)) {\n $sql = \" Select tblstudentmaster.firstname, tblstudentmaster.itsid, tblattendance.dateid, tblattendance.intime, tblattendance.late, tblattendance.attended From tblattendance Inner Join tblstudentmaster On tblstudentmaster.studentid = tblattendance.studentid Where tblstudentmaster.studentid = ? And tblattendance.dateid Between ? And ? And tblattendance.attended='y' ;\";\n $data = $this->db->query($sql, array($studentid, $fromdateid, $uptodateid))->result();\n }\n }\n break;\n\n case 'sms':\n if (!empty($studentid)) {\n $data = $this->send_sms($sms, $studentid);\n }\n break;\n\n case 'classsummary':\n if (!empty($classid)) {\n $sql = \" SELECT TABLE1.studentid, TABLE1.firstname, TABLE1.class, TABLE1.itsid, TABLE1.ClassID, TABLE2.TotalDays, Max(Case When TABLE1.attended = 'n' Then TABLE1.NoOfDays ELSE 0 End) As absent, Max(Case When TABLE1.attended = 'y' Then TABLE1.NoOfDays ELSE 0 End) As present FROM (SELECT Count(tblattendance.attended) As NoOfDays, tblattendance.studentid, tblstudentmaster.itsid, tblattendance.attended, tblstudentmaster.firstname, tbl_year_class.yearclassid As ClassID, Concat(tblclassmaster.classdesc, '-', tbldivmaster.divdesc) As class FROM tblstudentmaster Inner JOIN tblattendance On tblstudentmaster.studentid = tblattendance.studentid Inner JOIN tbl_student_year_class On tblattendance.studentid = tbl_student_year_class.studentid Inner JOIN tbl_year_class On tbl_student_year_class.yearclassid = tbl_year_class.yearclassid Inner JOIN tblclassmaster On tblclassmaster.classid = tbl_year_class.classid Inner JOIN tbldivmaster On tbldivmaster.divid = tbl_year_class.divid WHERE tbl_year_class.yearclassid = ? Group BY tblattendance.studentid, tblattendance.attended, tblstudentmaster.firstname, tbldivmaster.divdesc, tblclassmaster.classdesc) As TABLE1 Inner JOIN (SELECT Max(tblcomplete.NoOfDays) As TotalDays, tblcomplete.classid As ClassID FROM (SELECT Count(tblattendance.attended) As NoOfDays, tblstudentmaster.itsid, tbl_year_class.yearclassid As classid FROM tblstudentmaster Inner JOIN tblattendance On tblstudentmaster.studentid = tblattendance.studentid Inner JOIN tbl_student_year_class On tblattendance.studentid = tbl_student_year_class.studentid Inner JOIN tbl_year_class On tbl_student_year_class.yearclassid = tbl_year_class.yearclassid Inner JOIN tblclassmaster On tblclassmaster.classid = tbl_year_class.classid Inner JOIN tbldivmaster On tbldivmaster.divid = tbl_year_class.divid WHERE tbl_year_class.yearclassid = ? Group BY tbl_year_class.yearclassid, tblattendance.studentid) As tblcomplete Group BY tblcomplete.classid Order BY ClassID) As TABLE2 On TABLE1.ClassID = TABLE2.ClassID Group BY TABLE1.studentid Order BY TABLE1.ClassID ; \";\n $data = $this->db->query($sql, array($classid, $classid))->result();\n }\n break;\n\n case 'classsummarywithdate':\n if (!empty($classid)) {\n if (!empty($fromdateid) && !empty($uptodateid)) {\n $sql = \" SELECT TABLE1.studentid, TABLE1.firstname, TABLE1.class, TABLE1.itsid, TABLE1.Classes, TABLE2.TotalDays, Max(Case When TABLE1.attended = 'n' Then TABLE1.NoOfDays ELSE 0 End) As absent, Max(Case When TABLE1.attended = 'y' Then TABLE1.NoOfDays ELSE 0 End) As present FROM (SELECT Count(tblattendance.attended) As NoOfDays, tblattendance.studentid, tblstudentmaster.itsid, tblattendance.attended, tblstudentmaster.firstname, tbl_year_class.yearclassid As Classes, Concat(tblclassmaster.classdesc, '-', tbldivmaster.divdesc) As class FROM tblstudentmaster Inner JOIN tblattendance On tblstudentmaster.studentid = tblattendance.studentid Inner JOIN tbl_student_year_class On tblattendance.studentid = tbl_student_year_class.studentid Inner JOIN tbl_year_class On tbl_student_year_class.yearclassid = tbl_year_class.yearclassid Inner JOIN tblclassmaster On tblclassmaster.classid = tbl_year_class.classid Inner JOIN tbldivmaster On tbldivmaster.divid = tbl_year_class.divid WHERE tbl_year_class.yearclassid = ? AND tblattendance.dateid Between ? And ? Group BY tblattendance.studentid, tblattendance.attended, tblstudentmaster.firstname, tbldivmaster.divdesc, tblclassmaster.classdesc) As TABLE1 Inner JOIN (SELECT Max(tblcomplete.NoOfDays) As TotalDays, tblcomplete.classid As ClassID FROM (SELECT Count(tblattendance.attended) As NoOfDays, tblstudentmaster.itsid, tbl_year_class.yearclassid As classid FROM tblstudentmaster Inner JOIN tblattendance On tblstudentmaster.studentid = tblattendance.studentid Inner JOIN tbl_student_year_class On tblattendance.studentid = tbl_student_year_class.studentid Inner JOIN tbl_year_class On tbl_student_year_class.yearclassid = tbl_year_class.yearclassid Inner JOIN tblclassmaster On tblclassmaster.classid = tbl_year_class.classid Inner JOIN tbldivmaster On tbldivmaster.divid = tbl_year_class.divid WHERE tbl_year_class.yearclassid = ? AND tblattendance.dateid Between ? And ? Group BY tbl_year_class.yearclassid, tblattendance.studentid) As tblcomplete Group BY tblcomplete.classid Order BY ClassID) As TABLE2 On TABLE1.Classes = TABLE2.ClassID Group BY TABLE1.studentid Order BY TABLE1.Classes ;\";\n $data = $this->db->query($sql, array($classid, $fromdateid, $uptodateid, $classid, $fromdateid, $uptodateid))->result();\n }\n }\n break;\n\n\n\n case 'today':\n if (!empty($madrasaid) && !empty($dateid)) {\n $sql = \"SELECT tblstudentmaster.studentid, CONCAT(tblclassmaster.classdesc, '-', tbldivmaster.divdesc) AS class, tblstudentmaster.itsid, tblstudentmaster.firstname, DATE_FORMAT(tblattendance.dateid, '%d-%m-%Y') AS dateid, tblattendance.attended, tblattendance.late, tblattendance.id FROM tblstudentmaster INNER JOIN tbl_student_year_class ON tblstudentmaster.studentid = tbl_student_year_class.studentid INNER JOIN tbl_year_class ON tbl_student_year_class.yearclassid = tbl_year_class.yearclassid INNER JOIN tblmadrasamaster ON tblmadrasamaster.madrasaid = tbl_year_class.madrasaid INNER JOIN tblattendance ON tblstudentmaster.studentid = tblattendance.studentid INNER JOIN tblmozemaster ON tblmozemaster.mozeid = tblmadrasamaster.mozeid INNER JOIN tblclassmaster ON tbl_year_class.classid = tblclassmaster.classid INNER JOIN tbldivmaster ON tbl_year_class.divid = tbldivmaster.divid WHERE tblmadrasamaster.madrasaid =? and tblattendance.dateid=?;\";\n $data = $this->db->query($sql, array($madrasaid, $dateid))->result();\n }\n\n break;\n }\n\n\n $this->response($data, REST_Controller::HTTP_OK);\n } else {\n $this->response([], REST_Controller::HTTP_NO_CONTENT);\n }\n }",
"public function index()\n {\n $class_id = request('class_id');\n $section_id = request('section_id');\n return Inertia::render('Admin/Attendances/Student/Index', [\n 'requests' => request()->all('perPage', 'search', 'page', 'class_id', 'section_id'),\n 'classes' => AcademicClass::select('id', 'name')->get(),\n 'sections' => isset($class_id) ? AcademicClass::find($class_id)->sections : null,\n 'shifts' => Shift::select('id', 'name')->get(),\n 'groups' => Group::select('id', 'name')->get(),\n 'attendances' => StudentAttendance::latest()\n ->session()\n ->filter(request('search'))\n ->paginate(request('perPage') ?? 10),\n ]);\n }",
"function getClassLecturer($courseid){\r\ninclude 'dbConnect.php';\r\n$sql= 'SELECT ClassID, Course.CourseName, Slot, Capacity, Course.CoursePrice, Course.Session, Course.Hours, Location, StartTime, EndTime, ClassDate \r\nFROM Classroom\r\nINNER JOIN Course ON Classroom.CourseID = Course.CourseID\r\nWHERE Classroom.CourseID = '.$courseid.' And Classroom.ClassDate >= DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 7 DAY), \"%m/%d/%Y\");';\r\n$result = mysqli_query($conn, $sql);\r\nif(isset($result)){\r\n\tif(mysqli_num_rows($result) > 0){\r\n\t\t$view = '<table id=\"classroomTable\" class=\"table table-striped custab\">\r\n\t\t\t\t<thead>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<th>Classroom ID</th>\r\n\t\t\t\t\t\t<th>Course Name</th>\r\n\t\t\t\t\t\t<th>Capacity</th>\r\n\t\t\t\t\t\t<th>Day/s</th>\r\n\t\t\t\t\t\t<th>Hours</th>\r\n\t\t\t\t\t\t<th>Location</th>\r\n\t\t\t\t\t\t<th>Start Time</th>\r\n\t\t\t\t\t\t<th>End Time</th>\r\n\t\t\t\t\t\t<th>Class Date</th>\r\n\t\t\t\t\t\t<th class=\"text-center\">Action</th>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</thead>\r\n\t\t\t\t<tbody>';\r\n\r\n\r\n\t\twhile($row = mysqli_fetch_assoc($result))\r\n\t\t{\r\n\t\t$view.= '<tr>\r\n <td>'.$row['ClassID'].'</td>\r\n <td>'.$row['CourseName'].'</td>\r\n\t\t\t\t<td>'.$row['Slot'].' / '.$row['Capacity'].'</td>\r\n\t\t\t\t<td>'.$row['Session'].'</td>\r\n\t\t\t\t<td>'.$row['Hours'].'</td>\r\n\t\t\t\t<td>'.$row['Location'].'</td>\r\n\t\t\t\t<td>'.$row['StartTime'].'</td>\r\n\t\t\t\t<td>'.$row['EndTime'].'</td>\r\n\t\t\t\t<td>'.$row['ClassDate'].'</td>\r\n\t\t\t\t<td>\r\n\t\t\t\t<input class=\"btn btn-success view_data\" type=\"button\" name=\"view\" id=\"'.$row['ClassID'].'\" value=\"Record Attendance\"/>\r\n\t\t\t\t</td>\r\n </tr>';\r\n\t\t}\r\n\t\t$view.= '</tbody></table>';\r\n\t}else{\r\n\t\t$view = '<div class=\"alert alert-danger\">\r\n\t\t\t\t No Class Available!\r\n\t\t\t\t</div>';\r\n\t}\r\n}else{$view = 'Database Connection Error.';\r\n}\r\n\treturn $view;\r\n}",
"function get_columns() {\n\n //determine whether to show the enrolment status column\n $preferences = php_report_filtering_get_active_filter_values($this->get_report_shortname(),\n 'columns_status', $this->filter);\n\n //default to false because empty group returns non-empty info, causing issues\n //and we will always hit a parameter screen before running the report\n $show_status = true;\n if (isset($preferences['0']['value'])) {\n $show_status = $preferences['0']['value'];\n }\n\n //determine whether to show the completion element column\n $preferences = php_report_filtering_get_active_filter_values($this->get_report_shortname(),\n 'columns_completion', $this->filter);\n\n //default to false because empty group returns non-empty info, causing issues\n //and we will always hit a parameter screen before running the report\n $show_completion = true;\n if (isset($preferences['0']['value'])) {\n $show_completion = $preferences['0']['value'];\n }\n\n\n //user idnumber\n $idnumber_heading = get_string('column_idnumber', 'rlreport_course_completion_by_cluster');\n $idnumber_column = new table_report_column('user.idnumber AS useridnumber', $idnumber_heading, 'idnumber');\n\n //user fullname\n $name_heading = get_string('column_user_name', 'rlreport_course_completion_by_cluster');\n $name_column = new table_report_column('user.firstname', $name_heading, 'user_name');\n\n //CM course name\n $course_heading = get_string('column_course', 'rlreport_course_completion_by_cluster');\n $course_column = new table_report_column('course.name AS course_name', $course_heading, 'course');\n\n //whether the course is required in the curriculum\n $required_heading = get_string('column_required', 'rlreport_course_completion_by_cluster');\n $required_column = new table_report_column('curriculum_course.required', $required_heading, 'required');\n\n //\n $class_heading = get_string('column_class', 'rlreport_course_completion_by_cluster');\n $class_column = new table_report_column('class.idnumber AS classidnumber', $class_heading, 'class');\n\n //array of all columns\n $result = array(\n $idnumber_column, $name_column, $course_column, $required_column, $class_column);\n\n //add the enrolment status column if applicable, based on the filter\n if ($show_status) {\n $completed_heading = get_string('column_completed', 'rlreport_course_completion_by_cluster');\n $result[] = new table_report_column('enrol.completestatusid', $completed_heading, 'completed');\n }\n\n //always show the grade column\n $grade_heading = get_string('column_grade', 'rlreport_course_completion_by_cluster');\n $result[] = new table_report_column('enrol.grade', $grade_heading, 'grade');\n\n //show number of completion elements completed if applicable, based on the filter\n if ($show_completion) {\n $completionelements_heading = get_string('column_numcomplete', 'rlreport_course_completion_by_cluster');\n $result[] = new table_report_column('COUNT(class_graded.id) AS numcomplete',\n $completionelements_heading, 'numcomplete');\n }\n\n return $result;\n }",
"public function MondayClassDetail($school_id,$teacherid,$this_week_fst,$tablename)\n\t {\n\t\t//GROUP_CONCAT(schoolnew_section_group.section SEPARATOR \",\") as section\n\t\t$query =\"select concat(class_id,'-',section,'-',short_name)as classes,subjects,master_classid,class_id,section,PT,PS,status from \n $tablename a\n\t\tleft join teacher_subjects on a.PS=teacher_subjects.id\n\t\twhere school_id='\".$school_id.\"' and PT='\".$teacherid.\"' and days=1 and timetable_date='\".$this_week_fst.\"'\n \";\n $result = $this->db->query($query)->result();\n return $result;\n\t }",
"function class_details() {\n\t\t\t\n\t\t\t$this->load->model('admin_career_event_model');\n\t\t\t$this->gen_contents['image_path'] \t\t= $this->config->item('image_upload_url').'thumbs/';\n\t\t\t$image_path = $this->config->item('image_upload_path').'thumbs/';\n\t\t\t\t\n\t\t\t$this->gen_contents['arr_class'] \t\t= $this->admin_career_event_model->dbGetSingleEventDetails($_POST['masterid']);\n\t\t\t\n\t\t\t$this->gen_contents['dated'] \t\t\t= $_POST['currentdate'];\n\t\t\t\n\t\t\t$image = $image_path.$this->gen_contents['arr_class']->image_name;\n\t\t\t\n\t\t\tif($this->gen_contents['arr_class']->image_name && file_exists($image)){\n\t\t\t\t$this->gen_contents['image_url'] = $this->gen_contents['image_path'].$this->gen_contents['arr_class']->image_name;\n\t\t\t}else{\n\t\t\t\t$this->gen_contents['image_url'] = $this->config->item('images').'default_image.jpg';\n\t\t\t}\n\t\t\t$this->gen_contents['adhi_course'] = $this->admin_career_event_model->dbSelectSelcCrashCourse();\n\t\t\t$this->load->view('user/career_event/display_schedule_details', $this->gen_contents);\n\t\t}",
"function getAttendanceList($act_id){\n $data = array(\n 'act_id' => $act_id,\n 'dept_id' => $this->activity_model->fetchDeptID($act_id)->act_department,\n 'att_list' => $this->activity_model->fetchAttendance($act_id)->result()\n );\n return $this->load->view('activitymonitoring/att_list', $data);\n }",
"function getAppointmentByDate($start, $end, $status = ['scheduled'], $type = [], $getFull = FALSE, $page = 0, $pageSize = 10, $patient_id = null, $pdo = null)\n\t{\n\n\t\t$type = (isset($type) && sizeof($type) > 0) ? \"AND g.type IN ('\" . implode($type, \"', '\") . \"')\" : \"\";\n\t\t$Patient = ($patient_id != null && $patient_id != '') ? ' AND g.patient_id = ' . $patient_id : '';\n\t\t$sql = \"SELECT p.*, g.patient_id FROM appointment p LEFT JOIN appointment_group g ON p.group_id=g.id LEFT JOIN appointment_clinic c ON c.id=g.clinic_id WHERE DATE(start_time) BETWEEN '\" . $start . \"' AND '\" . $end . \"' AND `status` IN ('\" . implode($status, \"', '\") . \"'){$type}{$Patient} /*AND g.department_id IS NULL*/ ORDER BY FIELD(status, 'Scheduled', 'Active', 'Completed', 'Missed' , 'Cancelled'), Date(start_time), end_time DESC\";\n\t\t//error_log($sql);\n\t\t$total = 0;\n\t\ttry {\n\t\t\t$pdo = $pdo == null ? $this->conn->getPDO() : $pdo;\n\t\t\t$stmt = $pdo->prepare($sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL));\n\t\t\t$stmt->execute();\n\t\t\t$total = $stmt->rowCount();\n\t\t} catch (PDOException $e) {\n\t\t\terror_log(\"ERROR: Failed to return total number of records\");\n\t\t}\n\n\t\t$page = ($page > 0) ? $page : 0;\n\t\t$offset = ($page > 0) ? $pageSize * $page : 0;\n\n\t\ttry {\n\t\t\t$pdo = $pdo == null ? $this->conn->getPDO() : $pdo;\n\t\t\t$sql .= \" LIMIT $offset, $pageSize\";\n\t\t\t//error_log($sql);\n\t\t\t$appoints = array();\n\t\t\t$stmt = $pdo->prepare($sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL));\n\t\t\t$stmt->execute();\n\t\t\twhile ($row = $stmt->fetch(PDO::FETCH_NAMED, PDO::FETCH_ORI_NEXT)) {\n\t\t\t\t$appoint = new Appointment();\n\t\t\t\t$appoint->setId($row['id']);\n\t\t\t\tif ($getFull) {\n\t\t\t\t\t$group = (new AppointmentGroupDAO())->getAppointmentGroup($row['group_id'], TRUE, $pdo);\n\t\t\t\t\t$editor = (new StaffDirectoryDAO())->getStaff($row['editor_id'], FALSE, $pdo);\n\t\t\t\t} else {\n\t\t\t\t\t$group = new AppointmentGroup();\n\t\t\t\t\t$group->setId($row['group_id']);\n\t\t\t\t\t$editor = new StaffDirectory();\n\t\t\t\t\t$editor->setId($row['editor_id']);\n\t\t\t\t}\n\t\t\t\t$appoint->setGroup($group);\n\t\t\t\t$appoint->setStartTime((explode(\" \", $row['start_time'])[1] === \"00:00:00\") ? explode(\" \", $row['start_time'])[0] : $row['start_time']);\n\t\t\t\t$appoint->setEndTime($row['end_time'] === null ? null : (explode(\" \", $row['end_time'])[1] === \"00:00:00\") ? explode(\" \", $row['end_time'])[0] : $row['end_time']);\n\t\t\t\t$appoint->setAttendedTime($row['attended_time']);\n\t\t\t\t$appoint->setStatus(($row['status'] === \"Scheduled\" && strtotime(explode(\" \", $row['start_time'])[0]) < strtotime(date(\"Y-m-d\"))) ? \"Missed\" : $row['status']);\n\t\t\t\t$appoint->setEditor($editor);\n\t\t\t\t\n\t\t\t\t$appoints[] = $appoint;\n\t\t\t}\n\t\t\t$stmt = null;\n\t\t} catch (PDOException $e) {\n\t\t\t$stmt = null;\n\t\t\t$appoints = array();\n\t\t}\n\t\t$results = (object)null;\n\t\t$results->data = $appoints;\n\t\t$results->total = $total;\n\t\t$results->page = $page;\n\n\t\treturn $results;\n\t}",
"public function dispHomework($class_id,$hw_type)\n\t{\n\t\t\t$year_id = $this->getYear();\n\n\t\t\t$hw_query = \"SELECT A.hw_id,A.hw_type,A.title, A.test_date,A.due_date, A.hw_details, A.mark_status, B.subject_name FROM `edu_homework` A, `edu_subject` B WHERE A.subject_id = B.subject_id AND A.class_id ='$class_id' AND A.year_id='$year_id' AND A.status = 'Active' AND A.hw_type = '$hw_type'\";\n\t\t\t$hw_res = $this->db->query($hw_query);\n\t\t\t$hw_result= $hw_res->result();\n\t\t\t$hw_count = $hw_res->num_rows();\n\n\t\t\t if($hw_res->num_rows()==0){\n\t\t\t\t $response = array(\"status\" => \"error\", \"msg\" => \"Homework/test hasn't been assigned yet!\");\n\t\t\t}else{\n\t\t\t\t$response = array(\"status\" => \"success\", \"msg\" => \"View Homework Details\", \"count\"=>$hw_count, \"homeworkDetails\"=>$hw_result);\n\t\t\t}\n\n\t\t\treturn $response;\n\t}",
"public function show(StudentAttendance $studentAttendance)\n {\n //\n }",
"function generateMeetingAttendanceReport($args) {\r\n\t\tparent::validate();\r\n\t\t$this->setupTemplate();\r\n\t\t$ercMembers = Request::getUserVar('ercMembers');\r\n\t\t\r\n\t\t$fromDate = Request::getUserDateVar('dateFrom', 1, 1);\r\n\t\tif ($fromDate != null) $fromDate = date('Y-m-d H:i:s', $fromDate);\r\n\t\t$toDate = Request::getUserDateVar('dateTo', 32, 12, null, 23, 59, 59);\r\n\t\tif ($toDate != null) $toDate = date('Y-m-d H:i:s', $toDate);\r\n\t\t$meetingDao = DAORegistry::getDAO('MeetingDAO');\r\n\t\t$userDao = DAORegistry::getDAO('UserDAO');\r\n\t\t\r\n\t\theader('content-type: text/comma-separated-values');\r\n\t\theader('content-disposition: attachment; filename=meetingAttendanceReport-' . date('Ymd') . '.csv');\r\n\t\t\r\n\t\t$columns = array(\r\n\t\t'lastname' => Locale::translate('user.lastName'),\r\n\t\t'firstname' => Locale::translate('user.firstName'),\r\n\t\t'middlename' => Locale::translate('user.middleName'),\r\n\t\t'meeting_date' => Locale::translate('editor.reports.meetingDate'),\r\n\t\t'present' => Locale::translate('editor.reports.isPresent'),\r\n\t\t'reason_for_absence' => Locale::translate('editor.reports.reason')\r\n\t\t);\r\n\t\t$yesNoArray = array('present');\r\n\t\t$yesnoMessages = array( 0 => Locale::translate('common.no'), 1 => Locale::translate('common.yes'));\r\n\t\t$fp = fopen('php://output', 'wt');\r\n\t\tString::fputcsv($fp, array_values($columns));\r\n\t\t\r\n\t\tforeach ($ercMembers as $member) {\r\n\t\t\t$user = $userDao->getUser($member);\r\n\t\t\tlist($meetingsIterator) = $meetingDao->getMeetingReportByReviewerId($member, $fromDate, $toDate);\r\n\t\t\r\n\t\t\t$meetings = array();\r\n\t\t\twhile ($row =& $meetingsIterator->next()) {\r\n\t\t\t\tforeach ($columns as $index => $junk) {\r\n\t\t\t\t\tif (in_array($index, $yesNoArray)) {\r\n\t\t\t\t\t\t$columns[$index] = $yesnoMessages[$row[$index]];\r\n\t\t\t\t\t} elseif ($index == \"lastname\") {\r\n\t\t\t\t\t\t$columns[$index] = $user->getLastName();\r\n\t\t\t\t\t} elseif ($index == \"firstname\") {\r\n\t\t\t\t\t\t$columns[$index] = $user->getFirstName();\r\n\t\t\t\t\t} elseif ($index == \"middlename\") {\r\n\t\t\t\t\t\t$columns[$index] = $user->getMiddleName();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$columns[$index] = $row[$index];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tString::fputcsv($fp, $columns);\r\n\t\t\t\tunset($row);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfclose($fp);\r\n\t}",
"public static function getExamMarksList($class_id = 0, $section_id = 0, $subject_id = 0, $exam_id = 0, $session_id = 0)\n\t{\n\t\t$full_marks_pass_marks = new stdClass;\n\t\t$full_marks_pass_marks->full_marks = 0;\n\t\t$full_marks_pass_marks->pass_marks = 0;\n\t\t$full_marks_pass_marks->practical_full_marks = 0;\n\t\t$full_marks_pass_marks->practical_pass_marks = 0;\n\n\t\t$session_id = $session_id ? $session_id : HelperController::getCurrentSession();\n\t\t$student_marks = array();\n\t\t\n\t\t\n\t\tif($class_id && $section_id && $subject_id && $exam_id)\n\t\t{\n\t\t\t$section_code = Section::where('id', $section_id)->first()['section_code'];\n\n\n\t\t\t$exam_marks_table = ExamMarks::getTableName();\n\t\t\t$student_registration_table = StudentRegistration::getTableName();\n\t\t\t$student_table = Student::getTableName();\n\t\t\t$subject_table = Subject::getTableName();\n\t\t\t$section_table = Section::getTableName();\n\n\t\t\t$marks = DB::table($exam_marks_table)\n\t\t\t\t\t\t\t\t\t->rightJoin($subject_table, $subject_table.'.id', '=', $exam_marks_table.'.subject_id')\n\t\t\t\t\t\t\t\t\t->join($section_table, $section_table.'.id', '=', $subject_table.'.section_id')\n\t\t\t\t\t\t\t\t\t->where($subject_table.'.id', $subject_id)\n\t\t\t\t\t\t\t\t\t->where($exam_marks_table . '.session_id', $session_id)\n\t\t\t\t\t\t\t\t\t->where('exam_id', $exam_id)\n\t\t\t\t\t\t\t\t\t->select($exam_marks_table.'.marks',$exam_marks_table.'.practical_marks',\n\t\t\t\t\t\t\t\t\t\t\t$exam_marks_table.'.comments',\n\t\t\t\t\t\t\t\t\t\t\t$subject_table.'.id as subject_id',\n\t\t\t\t\t\t\t\t\t\t\t$exam_marks_table.'.student_id')\n\t\t\t\t\t\t\t\t\t->get();\n\n\t\t\t$students = DB::table($student_table)\n\t\t\t\t\t\t\t\t->join($student_registration_table, $student_registration_table.'.id','=', $student_table.'.student_id')\n\t\t\t\t\t\t\t\t->where($student_table.'.current_class_id', $class_id)\n\t\t\t\t\t\t\t\t->where($student_table.'.current_section_code', $section_code)\n\t\t\t\t\t\t\t\t->select($student_table.'.current_roll_number', \n\t\t\t\t\t\t\t\t\t\t$student_registration_table.'.student_name',\n\t\t\t\t\t\t\t\t\t\t $student_registration_table.'.last_name',\n\t\t\t\t\t\t\t\t\t\t$student_table.'.student_id')\n\t\t\t\t\t\t\t\t->orderBy($student_table . '.current_roll_number', 'ASC')\n\t\t\t\t\t\t\t\t->get();\n\n\t\t\t//dd($students);\n\n\t\t\tforeach($students as $student)\n\t\t\t{\n\t\t\t\t$record = new stdClass;\n\n\t\t\t\t$record->student_name = $student->student_name;\n\t\t\t\t$record->last_name = $student->last_name;\n\t\t\t\t$record->student_id = $student->student_id;\n\t\t\t\t$record->current_roll_number = $student->current_roll_number;\n\t\t\t\t$record->subject_id = $subject_id;\n\t\t\t\t\n\t\t\t\t$record->marks = 0;\n\t\t\t\t$record->practical_marks = 0;\n\t\t\t\t$record->comments = '';\n\n\t\t\t\tforeach($marks as $mark)\n\t\t\t\t{\n\t\t\t\t\tif($mark->student_id == $student->student_id)\n\t\t\t\t\t{\n\t\t\t\t\t\t$record->marks = $mark->marks;\n\t\t\t\t\t\t$record->practical_marks = $mark->practical_marks;\n\t\t\t\t\t\t$record->comments = $mark->comments;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$student_marks[] = $record;\n\t\t\t}\n\n\t\t\t//also get max and min marks\n\t\t\t//exam_id, class_id, section_id\n\t\t\t$full_marks_pass_marks = ExamDetails::where('exam_id', $exam_id)\n\t\t\t\t\t\t\t\t\t\t\t\t->where('subject_id', $subject_id)\n\t\t\t\t\t\t\t\t\t\t\t\t->where('is_active', 'yes')\n\t\t\t\t\t\t\t\t\t\t\t\t->select('pass_marks', 'full_marks', 'practical_full_marks', 'practical_pass_marks')\n\t\t\t\t\t\t\t\t\t\t\t\t->first();\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\tif($full_marks_pass_marks)\n\t\t\t{\n\t\t\t\t$full_marks_pass_marks = $full_marks_pass_marks;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$full_marks_pass_marks = new stdClass;\n\t\t\t\t$full_marks_pass_marks->full_marks = 0;\n\t\t\t\t$full_marks_pass_marks->pass_marks = 0;\n\t\t\t\t$full_marks_pass_marks->practical_full_marks = 0;\n\t\t\t\t$full_marks_pass_marks->practical_pass_marks = 0;\n\t\t\t}\n\n\n\t\t}\n\n\n\t\t$response = array('student_marks' => $student_marks, 'full_marks_pass_marks' => $full_marks_pass_marks);\n\n\t\treturn json_encode($response);\n\t}",
"public function showStudentAttendanceDate($student_id, $class_id, $date)\n {\n $student = Student::find($student_id);\n $num = 1;\n\n $attendances = $student->attendances()->where('room_id', '=', $class_id)->where('date', '=', $date)->get();\n }",
"public function getAllAttendances($id){\n\t\t$query = \"SELECT * FROM attendance where studentId=\".$id;\n\t\t$dbcontroller = new DBController();\n\t\t$this->attendance = $dbcontroller->executeSelectQuery($query);\n\t\treturn $this->attendance;\n }",
"public function index()\n {\n $user = Auth::user();\n $classes = StudentsClass::where('class_teacher', '=', $user->username)->pluck('class_name', 'id');\n if($user->status == 'admin') {\n $classes = StudentsClass::pluck('class_name', 'id');\n } else {\n $classes = StudentsClass::where('class_teacher', '=', $user->username)->pluck('class_name', 'id');\n }\n $attendance_type = DmcSetup::pluck('report_type', 'id');\n return view('admin.students.attendance.index', compact( 'classes', 'attendance_type'));\n }",
"public function generate_subject_code_remarks_report(){\n $this->crud->credibilityAuth(array('Administrator','Registrar','Faculty'));\n // get inputs\n $con = array('subject_code'=>$this->input->post('subject_code'),'batch_year'=> $this->input->post('batch_year_id'));\n $range1 = $this->input->post('date_range1');\n $range2 = $this->input->post('date_range2');\n // get necessary report data\n $students = $this->admin_model->getStudentsBasicInfo($con,'a');\n $attendance = $this->admin_model->getStudentAttendanceBySubjectCode($range1,$range2,$con['subject_code'],$con['batch_year']);\n $att_record = $this->admin_model->getStudentSubjectCodeAttendanceRecord($students,$range1,$range2,$con['subject_code'],$con['batch_year']);\n $att_dates = $this->crud->getDistinctValueOnAssociativeArray($attendance,'attendance_date');\n // generate report data in pdf or csv format from admin_report_model\n if((!empty($con['subject_code']) && !empty($range1) && !empty($range2)) && ($range1 <= $range2)){\n if(!empty($attendance) && !empty($att_record)){\n if($this->input->post('export_csv')){\n $this->admin_report_model->generateStudentRemarksReportBySubjectCodeCsv($attendance,$att_record,$att_dates,$con,$range1,$range2);\n exit;\n }else if($this->input->post('export_pdf')){\n $this->admin_report_model->generateSubjectCodeAttendanceReportPdf($attendance,$con,$range1,$range2);\n }\n }\n $this->session->set_flashdata('warning', 'No reports found!.');\n }else{\n $this->session->set_flashdata('danger', 'Invalid input.');\n }\n redirect('attendance_report');\n }",
"public function std_list_accro_deptORsection($dept_name,$section_info){\n $query = $this->db->get_where('msit_tb_student_info',array('std_dept' =>$dept_name,'\tstd_section' =>$section_info));\n return $query->result();\n }",
"function fetch_user_desig_type() //get all records from database \n\t{ \n\t\t//mandatory requirements for pages loading nav and sidebar\n\t\tif($this->session->userdata('logged_in')==\"\")\n\t\t\theader(\"Location: \".$this->config->base_url().\"Login\");\n\t\t$this->cache_update();\n\t\t$this->check_privilege(11);\n\t\t$this->load->driver('cache',array('adapter' => 'file'));\n\t\t$u_type = array('var'=>$this->cache->get('Active_status'.$this->session->userdata('loginid'))['user_type_id_fk']);\n\t\t$this->load->model('profile_model');\n\t\t$noti = array('meeting'=>$this->profile_model->meeting_notification());\n\t\t$u_type['notification'] = $noti;\n\t\t$u_type['noti1']=$this->profile_model->custom_notification();\n\t\t$this->load->view('dashboard/navbar',$u_type);\n\t\t$da = $this->profile_model->get_profile_info($this->session->userdata('uid'));\n\t\t$this->load->view('dashboard/sidebar',$da);\n\t\t//mandatory requirements end\n\n\t\t$this->load->model('Sup_admin');\n\t \t$query=$this->Sup_admin->fetch_user_desig_type();\n\t\t$data['records']=$query->result();\n\n\t\t$this->load->model('Crud_model');\n\t\t$this->db->trans_off();\n $this->db->trans_strict(FALSE);\n $this->db->trans_start();\n\t\t$this->Crud_model->audit_upload($this->session->userdata('loginid'),\n\t\t\t\t\t\t\tcurrent_url(),\n\t\t\t\t\t\t\t'User type active page visited',\n\t\t\t\t\t\t\t'Custom message here');\n\t\t$this->db->trans_complete();\n\t\t$this->load->view('view_user_type',$data); \n\t\t$this->load->view('dashboard/footer');\n \t}",
"public function getInfo($type){\n $sql= \"SELECT * FROM abilities WHERE Type = ? ORDER BY Stars DESC \";\n $ability = $this->database->getAll($sql, array($type));\n //Returns recordID, Name, SubInfo, Stars, Type\n return $ability;\n }",
"function academic_section_type()\n\t{\n\t $academic_section_type \t= $this->ObjM->all_section_type(); \n\t for($i=0;$i<count($academic_section_type);$i++){\n\t\t\t$academic_section_type[$i]['validation']\t= 'true';\n\t\t}\n\t echo json_encode($academic_section_type);\n\t}",
"function eventclass_student_attendance()\n\t{\n\t\t$this->events[\"AfterAdd\"]=true;\n\n\t\t$this->events[\"AfterEdit\"]=true;\n\n\t\t$this->events[\"AfterDelete\"]=true;\n\n\n//\tonscreen events\n\n\n\t}",
"public function getdetaildataAction ()\r\n {\r\n $request = $this->getRequest();\r\n //Getting Request Parameters\r\n $period_dateobj = new Zend_Date(\r\n $request->getParam('attendance_date'), 'dd-MM-YYYY');\r\n $period_date = $period_dateobj->toString('YYYY-MM-dd');\r\n $department = $request->getParam('department_id');\r\n //$this->_helper->viewRenderer->setNoRender(false);\r\n //$this->_helper->layout()->enableLayout();\r\n $depttObj = new Acad_Model_Department();\r\n $depttObj->setDepartment($department);\r\n $result = $depttObj->getAttendanceDetail($period_date);\r\n $this->_helper->logger($result);\r\n $this->gridparam['page'] = $request->getParam('page', 1); // get the requested page\r\n $this->gridparam['limit'] = $request->getParam('rows', 20); // rows limit in Grid\r\n $this->_count = count($result);\r\n $response = new stdClass();\r\n foreach ($result as $key => $value) {\r\n $response->rows[$key]['id'] = $value['subject_code'];\r\n $response->rows[$key]['cell'] = array($value['staff_id'], \r\n $value['marked_date'], $value['degree_id'], $value['semester_id'], \r\n $value['periods_covered'], $value['subject_code'], \r\n $value['subject_mode_id'], $value['group_id']);\r\n }\r\n $response->page = $this->gridparam['page'];\r\n $response->total = 1;\r\n $response->records = $this->_count;\r\n echo $this->_helper->json($response, false);\r\n }",
"public static function getReportHome()\n {\n$data = User::findBySql(\"SELECT COUNT(ei.ei_id) as totalstudent, i.*,ei.ei_graduation_year FROM university u \".\n \"JOIN institution i on u.uni_id = i.uni_id \".\n \"JOIN education_information ei on i.inst_id = ei.inst_id \".\n \"WHERE ei.ei_graduation_year BETWEEN '2010' AND '2014' AND u.uni_status = '1' \".\n \"AND i.inst_status = '1' GROUP BY ei.inst_id,ei.ei_graduation_year\")\n ->asArray()\n ->all();\n\n return $data;\n }",
"public function getAttendances(){\n try{\n $projectCode = Input::get('projectCode');\n $startDate = Input::get('beginDate');\n $endDate = Input::get('endDate');\n// Log::channel('in_sys')\n// ->info('API/IntegrationController - getAttendances data projectCode = '. $projectCode . \" | beginDate = \".$startDate.\" | endDate = \".$endDate);\n $project = Project::where('code', $projectCode)->first();\n\n if(!DB::table('projects')->where('code', $projectCode)->exists()){\n return Response::json([\n 'error' => 'Project code not found!'\n ], 400);\n }\n if(empty($startDate) || empty($endDate)){\n return Response::json([\n 'error' => 'Please provide Begin Date and End Date!'\n ], 400);\n }\n\n $attendanceAbsents = DB::table('attendance_absents')\n ->join('employees', 'attendance_absents.employee_id', '=', 'employees.id')\n ->join('projects', 'attendance_absents.project_id', '=', 'projects.id')\n ->select('attendance_absents.id as attendance_absent_id',\n 'attendance_absents.shift_type as shift_type',\n 'attendance_absents.is_done as is_done',\n 'attendance_absents.date as date',\n 'attendance_absents.date_checkout as date_checkout',\n 'attendance_absents.created_at as created_at',\n 'employees.id as employee_id',\n 'employees.code as employee_code',\n 'projects.name as project_name',\n 'projects.code as project_code')\n ->whereBetween('attendance_absents.created_at', array($startDate.' 00:00:00', $endDate.' 23:59:00'))\n ->where('attendance_absents.project_id', $project->id)\n ->where('attendance_absents.status_id',6)\n ->get();\n\n// $attendanceAbsents = AttendanceAbsent::where('project_id', $project->id)\n// ->where('status_id', 6)\n// ->whereBetween('created_at', array($startDate.' 00:00:00', $endDate.' 23:59:00'))\n// ->get();\n\n $dataModel = collect();\n// Log::channel('in_sys')\n// ->info('API/IntegrationController - getAttendances data 0 '. count($attendanceAbsents));\n if($attendanceAbsents->count() < 1){\n return Response::json([\n 'error' => 'No Attendances found within allocated time range!'\n ], 400);\n }\n\n// timestamp: ...,\n// projectCode: XXX, //assume project codes are synced\n// beginDate: ..., //date YYYY-MM-DD\n// endDate: ..., //date YYYY-MM-DD\n// data: [\n// {\n// employeeId: ...,\n// employeeCode: ...,\n// transDate: ..., //date YYYY-MM-DD\n// shiftCode: ..., // 1|2|3 or A|B|C or whatever\n// attendanceIn: ..., //timestamp YYYY-MM-DD HH:mm:ss\n// attendanceOut: ..., //timestamp YYYY-MM-DD HH:mm:ss\n// attendanceStatus: ..., // H=Hadir, A=Alpa, U=Unknown\n// ]\n// }\n\n foreach ($attendanceAbsents as $attendanceAbsent){\n $status = \"U\";\n $attendanceOut = \"\";\n if($attendanceAbsent->is_done == 0){\n $status = \"A\";\n }\n else{\n if(!empty($attendanceAbsent->date_checkout)){\n $status = \"H\";\n// $attendanceOut = $attendanceAbsent->date_checkout->format('Y-m-d H:i:s');\n $attendanceOut = $attendanceAbsent->date_checkout;\n }\n else{\n $status = \"A\";\n }\n }\n $createdAt = Carbon::parse($attendanceAbsent->created_at);\n $projectCSOModel = ([\n 'employeeId' => $attendanceAbsent->employee_id,\n 'employeeCode' => $attendanceAbsent->employee_code,\n 'transDate' => $createdAt->format('Y-m-d'),\n 'shiftCode' => $attendanceAbsent->shift_type ?? 0,\n 'attendanceIn' => $attendanceAbsent->date,\n 'attendanceOut' => $attendanceOut,\n 'attendanceStatus' => $status,\n ]);\n $dataModel->push($projectCSOModel);\n// Log::channel('in_sys')\n// ->info('API/IntegrationController - getAttendances data 2 '. json_encode($projectCSOModel));\n }\n $date = Carbon::now('Asia/Jakarta')->timestamp;\n $returnModel = collect([\n 'timestamp' => $date,\n 'projectCode' => $projectCode,\n 'beginDate' => $startDate,\n 'endDate' => $endDate,\n 'data' => $dataModel,\n ]);\n// Log::channel('in_sys')\n// ->info('API/IntegrationController - getAttendances data 3 '.json_encode($returnModel));\n return Response::json($returnModel, 200);\n }\n catch (\\Exception $ex){\n Log::channel('in_sys')->error('API/IntegrationController - getAttendances error EX: '. $ex);\n return Response::json([\n 'error' => $ex\n ], 500);\n }\n }",
"static public function getCourseStatistics( DateTime $start, DateTime $end ) {\n $loc = __CLASS__ . '::' . __FUNCTION__;\n error_log($loc);\n error_log( print_r( $start, true ) );\n error_log( print_r( $end, true ) );\n\n global $wpdb;\n $sql = \"SELECT u.display_name as username\n , m.meta_key\n , m.meta_value as val\n FROM {$wpdb->prefix}usermeta m\n INNER JOIN {$wpdb->prefix}users u on u.ID = m.user_id\n where meta_key = '%s' \";\n $query = $wpdb->prepare( $sql, RecordUserCourseProgress::META_KEY );\n $result = $wpdb->get_results( $query, ARRAY_A );\n\n $retval = array();\n foreach( Course::getCourseDefinitions() as $webinar ) {\n $retval[$webinar['name']] = [RecordUserCourseProgress::PENDING=>0\n ,RecordUserCourseProgress::COMPLETED=>0];\n } \n // error_log(\"Webinar Definitions:\");\n // error_log( print_r($retval, true) ); \n // error_log(\"Query results:\");\n // error_log( print_r($result, true) ); \n\n error_log(\"Each query result:\");\n $ctr = 0;\n foreach( $result as $meta ) {\n ++$ctr;\n $courses = maybe_unserialize( $meta['val'] );\n error_log( \"Meta value #{$ctr}:\" );\n error_log( print_r( $courses, true ) );\n\n if( !is_array( $courses ) ) continue;\n\n foreach($courses as $course) {\n error_log( \"Course:\" );\n error_log( print_r( $course, true ) );\n $strStartDate = @$course['startDate'] ? $course['startDate'] : '1970-01-01';\n $strEndDate = @$course['endDate'] ? $course['endDate'] : $strStartDate;\n\n $courseStartDate = DateTime::createFromFormat('Y-m-d', $strStartDate );\n if( false === $courseStartDate ) {\n $courseStartDate = DateTime::createFromFormat('d-m-Y', $strStartDate);\n if( false === $courseStartDate ) {\n error_log( DateTime::getLastErrors(), \"Error processing start date\" );\n $courseStartDate = DateTime::createFromFormat('Y-m-d', '1970-01-01');\n }\n }\n\n $courseEndDate = DateTime::createFromFormat('Y-m-d', $strEndDate );\n if( false === $courseEndDate ) {\n $courseEndDate = DateTime::createFromFormat('d-m-Y', $strEndDate);\n if( false === $webinarEndDate ) {\n error_log( DateTime::getLastErrors(), \"Error processing end date\" );\n $courseEndDate = $courseStartDate;\n }\n }\n $showStart = $courseStartDate->format('Y-m-d');\n $showEnd = $courseEndDate->format('Y-m-d');\n error_log(\"Course start: {$showStart} end: {$showEnd}\");\n \n if( $courseStartDate < $start || $courseStartDate > $end ) continue;\n\n $status = @$course['status'] ? $course['status'] : RecordUserCourseProgress::PENDING;\n switch( $status ) {\n case RecordUserCourseProgress::COMPLETED:\n $retval[$course['name']][RecordUserCourseProgress::COMPLETED]++;\n break;\n default:\n $retval[$course['name']][RecordUserCourseProgress::PENDING]++;\n break;\n }\n }\n }\n error_log(\"Course Stats\");\n error_log( print_r( $retval, true ) );\n\n\t\treturn $retval;\n }",
"public function reportPeriodicStudentAbsentListView(Request $request)\n {\n $year = trim($request->year) ;\n $shift = trim($request->shift);\n $dept = trim($request->dept);\n $semister = trim($request->semister);\n $section = trim($request->section);\n $date_form = trim($request->from); \n $from = date (\"Y-m-d\", strtotime($date_form));\n $date_to = trim($request->to); \n $date_too = trim($request->to);\n $to = date (\"Y-m-d\", strtotime($date_to));\n $sorting_type = trim($request->sorting_type);\n $attendent_days = trim($request->attendent_days);\n\n $count_holiday = DB::table('holiday')\n ->where('year',$year)\n ->whereBetween('holiday_date', [$from, $to])->count();\n // total day caluclation\n $date1 = date_create($from);\n $date2 = date_create($to);\n //difference between two dates\n $diff = date_diff($date1,$date2);\n $total_day = $diff->format(\"%a\")+1;\n if($sorting_type == '1'){\n $result = DB::table('student_attendent')\n ->join('students','student_attendent.studentId','=','students.id')\n ->join('student','students.id','=','student.studentID')\n ->select('student_attendent.*','student.roll','student.registration', DB::raw(\"COUNT( DISTINCT student_attendent.created_at) AS count\"))\n ->where('student_attendent.year',$year)\n ->where('student_attendent.shift_id',$shift)\n ->where('student_attendent.dept_id',$dept)\n ->where('student_attendent.semister_id',$semister)\n ->where('student_attendent.section_id',$section)\n ->where('student.year',$year)\n ->where('student.shift_id',$shift)\n ->where('student.dept_id',$dept)\n ->where('student.semister_id',$semister)\n ->where('student.section_id',$section)\n ->whereBetween('student_attendent.created_at', [$from, $to])\n ->groupBy('student_attendent.studentId')\n ->orderBy('student_attendent.studentId','ASC')\n ->get();\n }elseif($sorting_type == '2'){\n $result = DB::table('student_attendent')\n ->join('students','student_attendent.studentId','=','students.id')\n ->join('student','students.id','=','student.studentID')\n ->select('student_attendent.*','student.roll','student.registration', DB::raw(\"COUNT( DISTINCT student_attendent.created_at) AS count\"))\n ->where('student_attendent.year',$year)\n ->where('student_attendent.shift_id',$shift)\n ->where('student_attendent.dept_id',$dept)\n ->where('student_attendent.semister_id',$semister)\n ->where('student_attendent.section_id',$section)\n ->where('student.year',$year)\n ->where('student.shift_id',$shift)\n ->where('student.dept_id',$dept)\n ->where('student.semister_id',$semister)\n ->where('student.section_id',$section)\n ->whereBetween('student_attendent.created_at', [$from, $to])\n ->groupBy('student_attendent.studentId')\n ->orderBy('count','ASC')\n ->orderBy('student_attendent.studentId','ASC')\n ->get();\n }elseif($sorting_type == '3'){\n $result = DB::table('student_attendent')\n ->join('students','student_attendent.studentId','=','students.id')\n ->join('student','students.id','=','student.studentID')\n ->select('student_attendent.*','student.roll','student.registration', DB::raw(\"COUNT( DISTINCT student_attendent.created_at) AS count\"))\n ->where('student_attendent.year',$year)\n ->where('student_attendent.shift_id',$shift)\n ->where('student_attendent.dept_id',$dept)\n ->where('student_attendent.semister_id',$semister)\n ->where('student_attendent.section_id',$section)\n ->where('student.year',$year)\n ->where('student.shift_id',$shift)\n ->where('student.dept_id',$dept)\n ->where('student.semister_id',$semister)\n ->where('student.section_id',$section)\n ->whereBetween('student_attendent.created_at', [$from, $to])\n ->groupBy('student_attendent.studentId')\n ->orderBy('count','ASC')\n ->orderBy('student_attendent.studentId','ASC')\n ->get();\n }\n\n foreach($result as $value) {\n //do something\n $attentdent_id[] = $value->studentId;\n}\n$absent_result = DB::table('students')\n ->join('student', 'students.id', '=', 'student.studentID')\n ->select('student.*', 'students.studentName','students.studentMobile','students.studentImage','student.registration')\n ->where('student.year',$year)\n ->where('student.shift_id',$shift)\n ->where('student.dept_id',$dept)\n ->where('student.semister_id',$semister)\n ->where('student.section_id',$section)\n ->whereNotIn('student.studentID',$attentdent_id)\n ->orderBy('student.roll','asc')\n ->get();\n\n $shift_name = DB::table('shift')->where('id',$shift)->first();\n $dept_name = DB::table('department')->where('id',$dept)->first();\n $semister_name = DB::table('semister')->where('id',$semister)->first();\n $section_name = DB::table('section')->where('id',$section)->first();\n return view('view_report.reportPeriodicStudentAbsentListView')->with('result',$result)->with('count_holiday',$count_holiday)->with('total_day',$total_day)->with('from',$from)->with('to',$to)->with('year',$year)->with('shift_name',$shift_name)->with('dept_name',$dept_name)->with('semister_name',$semister_name)->with('section_name',$section_name)->with('shift',$shift)->with('dept',$dept)->with('semister',$semister)->with('section',$section)->with('date_form',$date_form)->with('date_to',$date_to)->with('absent_result',$absent_result)->with('attendent_days',$attendent_days)->with('sorting_type',$sorting_type); \n\n }",
"public function getSectionDetails($section) {\r\n\t\tif ($section == 'Blood_glucose') {\r\n\t\t\t$title = \"Blood Glucose\";\r\n\t\t\t$text = \"Glucose circulates in our blood stream and signals the pancreas to secrete insulin. Insulin is the body's \\\"key\\\" to release glucose. Glucose that enters into our cells is used by your body to create energy. Sometimes, certain conditions, such as excess body fat inhibit insulin ability to absorb glucose, thus leaving excess amounts of glucose in the bloodstream. This test measures the concentration of glucose in your blood.\";\r\n\t\t\t$range = \"Non-Fasting Less than 130 mg/dl<br />Fasting Less than 100 mg/dl\";\r\n\t\t\t$type = $this->data['biometric_data']['glucose_test'];\r\n\t\t\t$score = $this->data['biometric_data']['blood_glucose'];\r\n\t\t\t$image = \"green_chips.png\";\r\n\t\t\tif ($type == \"fasting\") {\r\n\t\t\t\tif ($score > 100) {\r\n\t\t\t\t\t$image = \"yellow_chips.png\";\r\n\t\t\t\t}\r\n\t\t\t\tif ($score > 125) {\r\n\t\t\t\t\t$image = \"red_chips.png\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if ($type == \"non-fasting\") {\r\n\t\t\t\tif ($score > 130) {\r\n\t\t\t\t\t$image = \"yellow_chips.png\";\r\n\t\t\t\t}\r\n\t\t\t\tif ($score > 200) {\r\n\t\t\t\t\t$image = \"red_chips.png\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$score = $score . \" mg/dl (\" . $type . \")\";\r\n\t\t}\r\n\r\n\t\telse if ($section == 'Waist_circumference') {\r\n\t\t\t$title = \"Waist Circumference\";\r\n\t\t\t$text = \"Waist Circumference and Body Mass Index (BMI) are interrelated; however waist circumference can provide an independent prediction of risk in addition to BMI. Body fat that accumulates around the stomach area poses a greater health risk than fat stored in the lower half of the body.\";\r\n\t\t\t$range = \"< 35 inches (female) | < 40 inches (male)\";\r\n\t\t\t$score = $this->data['biometric_data']['waist'];\r\n\t\t\t$image = \"green_chips.png\";\r\n\t\t\tif ($this->demographics['gender'] == 'F') {\r\n\t\t\t\tif ($score >= 35.0) {\r\n\t\t\t\t\t$image = \"red_chips.png\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if ($this->demographics['gender'] == 'M') {\r\n\t\t\t\tif ($score >= 40.0) {\r\n\t\t\t\t\t$image = \"red_chips.png\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$score = $score . \" inches\";\t\t\t\r\n\t\t}\r\n\r\n\t\telse if ($section == \"Body_mass_index\") {\r\n\t\t\t$title = \"Body Mass Index\";\r\n\t\t\t$text = \"Body Mass Index uses a mathematical formula that takes into account both a personīs height and weight. BMI is a personīs weight in kilograms divided by height in meters squared (BMI=kg/m2). BMI correlates with, but does not equal body fat. The relation between body shape and BMI changes with age and gender. BMI is one of many factors related to developing a chronic disease (such as heart disease, cancer or diabetes). Other factors that may be important to consider when assessing your risk for chronic disease include diet, physical activity, waist circumference, blood pressure, blood sugar level, cholesterol level, and family history of disease.\";\r\n\t\t\t$range = \"18.5 - 24.9\";\r\n\t\t\t$score = $this->data['biometric_data']['bmi'];\r\n\t\t\t$image = \"yellow_chips.png\";\r\n\t\t\tif ($score > 30) {\r\n\t\t\t\t$image = \"red_chips.png\";\r\n\t\t\t}\r\n\t\t\telse if ($score > 24.9) {\r\n\t\t\t\t$image = \"yellow_chips.png\";\r\n\t\t\t}\r\n\t\t\telse if ($score >= 18.5) {\r\n\t\t\t\t$image = \"green_chips.png\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\telse if ($section == \"Blood_pressure\") {\r\n\t\t\t$title = \"Blood Pressure\";\r\n\t\t\t$text = \"Blood Pressure is the pressure of the blood against the walls of the arteries. The top number, systolic pressure, the pressure in the arteries as the heart contracts to pump blood to the body. The bottom number, diastolic pressure, measures the pressure in the arterial walls between heart beats. High blood pressure makes your heart work harder than normal. Both the heart and arteries are then more prone to injury. High blood pressure increases the risk of heart attacks, strokes, and/or kidney failure.\";\r\n\t\t\t$range = \"Systolic: < 120 mm Hg | Diastolic: < 80 mm Hg\";\r\n\t\t\t$sys = $this->data['biometric_data']['bp_systolic'];\r\n\t\t\t$dia = $this->data['biometric_data']['bp_diastolic'];\r\n\t\t\tif ($sys > 140) {\r\n\t\t\t\t$sysScore = 1;\r\n\t\t\t}\r\n\t\t\telse if ($sys > 120) {\r\n\t\t\t\t$sysScore = 3;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$sysScore = 5;\r\n\t\t\t}\r\n\t\t\tif ($dia > 90) {\r\n\t\t\t\t$diaScore = 1;\r\n\t\t\t}\r\n\t\t\telse if($dia > 80) {\r\n\t\t\t\t$diaScore = 3;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$diaScore = 5;\r\n\t\t\t}\r\n\t\t\t$tot = (($sysScore + $diaScore) / 2.0) * 20.0;\r\n\t\t\tif ($tot >= 80) {\r\n\t\t\t\t$image = \"green_chips.png\";\r\n\t\t\t}\r\n\t\t\telse if ($tot >= 50) {\r\n\t\t\t\t$image = \"yellow_chips.png\";\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$image = \"red_chips.png\";\r\n\t\t\t}\r\n\t\t\t$score = $sys . \" / \" . $dia . \" mm Hg\";\r\n\t\t}\r\n\r\n\t\telse if ($section == \"Cholesterol\") {\r\n\t\t\t$title = \"Total Cholesterol\";\r\n\t\t\t$text = \"Cholesterol is an essential fatty substance produced by the body used to create bile, hormones and fat soluble vitamins. Cholesterol is found in foods that come from animals such as meats, fish, poultry, eggs and dairy. High levels of circulating cholesterol may form deposits in artery walls leading to narrowing and hardening of the arteries and heart disease. Cholesterol does not dissolve in water and is combined with lipoproteins to assist in its transportation in the blood. Low-density lipoproteins (LDL), high-density lipoproteins (HDL), triglycerides, and other cholesterol levels such as VLDLS are all included in the total cholesterol value.\";\r\n\t\t\t$range = \"< 200 mg/dl\";\r\n\t\t\t$score = $this->data['biometric_data']['cholesterol'];\r\n\t\t\t$image = \"green_chips.png\";\r\n\t\t\tif ($score > 239) {\r\n\t\t\t\t$image = \"red_chips.png\";\r\n\t\t\t}\r\n\t\t\telse if ($score > 199) {\r\n\t\t\t\t$image = \"yellow_chips.png\";\r\n\t\t\t}\r\n\t\t\t$score = $score . \" mg/dl\";\r\n\t\t}\r\n\r\n\t\telse if ($section == \"Hdl\") {\r\n\t\t\t$title = \"High-Density Lipoprotein (HDL) Cholesterol\";\r\n\t\t\t$text = \"HDL cholesterol is nicknamed \\\"good\\\" cholesterol because it removes excess cholesterol from the body and transports it to the liver where it is eliminated from the body. This, in turn, prevents LDL cholesterol accumulation in the arterial walls and can reduce the risk for heart disease. Higher levels of HDL cholesterol are optimal.\";\r\n\t\t\t$range = \"> 50 mg/dl (female) | 40 mg/dl (male)\";\r\n\t\t\t$score = $this->data['biometric_data']['hdl'];\r\n\t\t\t$image = \"green_chips.png\";\r\n\t\t\tif ($score < 30) {\r\n\t\t\t\t$image = \"red_chips.png\";\r\n\t\t\t}\r\n\t\t\telse if ($scoe < 40) {\r\n\t\t\t\t$image = \"yellow_chips.png\";\r\n\t\t\t}\r\n\t\t\t$score = $score . \" mg/dl\";\r\n\t\t}\r\n\r\n\t\telse if ($section == \"Ldl\") {\r\n\t\t\t$title = \"Low Density Lipoprotein (LDL) Cholesterol\";\r\n\t\t\t$text = \"LDL cholesterol is nicknamed the \\\"bad\\\" cholesterol because in excess levels it can build plaque deposits on your arterial wall; a condition known as arteriolosclerosis. Low levels of LDL cholesterol are optimal.\";\r\n\t\t\t$range = \"< 100 mg/dl\";\r\n\t\t\t$score = $this->data['biometric_data']['ldl'];\r\n\t\t\t$image = \"green_chips.png\";\r\n\t\t\tif ($score > 149) {\r\n\t\t\t\t$image = \"red_chips.png\";\r\n\t\t\t}\r\n\t\t\telse if ($score > 139) {\r\n\t\t\t\t$image = \"yellow_chips.png\";\r\n\t\t\t}\r\n\t\t\t$score = $score . \" mg/dl\";\r\n\t\t}\r\n\r\n\t\telse if ($section == \"Triglycerides\") {\r\n\t\t\t$title = \"Triglycerides\";\r\n\t\t\t$text = \"Triglycerides are composed of fatty acids and glycerol. Like cholesterol, it circulates in your blood, but is stored in body fat and is used when the body requires extra energy. Triglyceride levels are very sensitive and can be affected by food consumption before a screening. Optimally, triglyceride levels should be performed on a fasting individual.\";\r\n\t\t\t$range = \"< 150 mg/dl\";\r\n\t\t\t$score = $this->data['biometric_data']['triglycerides'];\r\n\t\t\t$image = \"green_chips.png\";\r\n\t\t\tif ($score > 199) {\r\n\t\t\t\t$image = \"red_chips.png\";\r\n\t\t\t}\r\n\t\t\telse if ($score > 149) {\r\n\t\t\t\t$image = \"yellow_chips.png\";\r\n\t\t\t}\r\n\t\t\t$score = $score . \" mg/dl\";\r\n\t\t}\r\n\r\n\t\telse if ($section == \"TC_HDL_Ratio\") {\r\n\t\t\t$title = \"TC/HDL Cardiac Ratio\";\r\n\t\t\t$text = \"A ratio of total cholesterol divided by HDL cholesterol greater than 4.0 can indicate an increased risk of developing heart disease. A high ratio suggests there is a large amount of LDL cholesterol circulating in the blood that can stick to arterial walls and not enough HDL cholesterol to eliminate the excess.\";\r\n\t\t\t$range = \"< 4.0\";\r\n\t\t\t$score = $this->data['biometric_data']['cholesterol'] / $this->data['biometric_data']['hdl'];\r\n\t\t\t$image = \"green_chips.png\";\r\n\t\t\tif ($score >= 4.0) {\r\n\t\t\t\t$image = \"red_chips.png\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$info = array('title' => $title,\r\n\t\t\t 'text' => $text,\r\n\t\t\t 'image' => $image,\r\n\t\t\t 'score' => $score,\r\n\t\t 'range' => $range\r\n\t );\r\n\r\n\t\treturn $info;\r\n\t}",
"public function get_section_list_for_classs()\n\t{\n\t\t$cls_id = $this->input->post('classid');\n\t\t$result = $this->tmtl->get_sect_by_school_id($cls_id);\n\t\techo json_encode($result); \n\t}",
"public function report(Quarter $quarter, CourseClass $class)\n {\n $attendance = [];\n\n $relationship = $quarter->getClassRelationship();\n $students = $class->$relationship()->with('person')->get();\n\n foreach ($students as $student) {\n $attendance[$student->name]['present'] = AttendanceDay::isQuarter($quarter->id)\n ->isStudent($student->id)->present()->count();\n $attendance[$student->name]['absent'] = AttendanceDay::isQuarter($quarter->id)\n ->isStudent($student->id)->absent()->count();\n $attendance[$student->name]['tardies'] = AttendanceClass::isQuarter($quarter->id)\n ->isStudent($student->id)->unexcusedTardy()->count();\n }\n\n return view('attendance.quarterly_report', compact('attendance', 'quarter', 'class'));\n }",
"public function get_LastSectionB1Bind ($HdrID='') {\n if(isset($_GET['HdrID'])){\n $HdrID = trim($_GET['HdrID']);\n$sql = \"Select CONCAT (if(patient.PatientFname is null,'',patient.PatientFname),' ',if(patient.PatientMidName is null,'',patient.PatientMidName),' ',if(patient.PatientLname is null,'',patient.PatientLname)) as PatientName,patient.PatientHICN as HICN, DATE_FORMAT(patient.PatientDOB, '%m-%d-%Y') as PatientDOB ,CONCAT (if(physician.PhysicianFirstname is null,'',physician.PhysicianFirstname),' ',if(physician.PhysicianMidname is null,'',physician.PhysicianMidname),' ',if(physician.PhysicianLastname is null,'',physician.PhysicianLastname)) as physicianName,cms484hdr.HdrID as HdrID,cms484hdr.MedicalID,cms484det.CertType,DATE_FORMAT(cms484det.CertDate, '%m-%d-%Y') as CertDate\n,cms484det.LengthNeed,cms484det.ICDa,cms484det.ICDb,cms484det.ICDc,cms484det.ICDd,cms484det.Q1AmmHg,cms484det.Q1Bpercent,DATE_FORMAT(cms484det.Q1Cdate, '%m-%d-%Y') as Q1Cdate ,cms484det.Q2cond,cms484det.Q3cond,cms484det.Q4portable,cms484det.Q5O2LPM,cms484det.Q6AmmHg,cms484det.Q6Bpercent,DATE_FORMAT(cms484det.Q6Cdate, '%m-%d-%Y') as Q6Cdate,cms484det.Q7CHF,cms484det.Q8Hypert,cms484det.Q9Herm,cms484det.SignedByName,cms484det.SignedByTitle,cms484det.SignedByEmployer from cms484hdr inner join patient on patient.PatientHICN = cms484hdr.PatientHICN left join physician on physician.PhysicianNPI = cms484hdr.PhysicianNPI inner join cms484det on cms484det.DetailID = cms484hdr.HdrID where cms484hdr.HdrID='$HdrID';\"; \n $result = mysql_query($sql);\n if (!$result) {\n die('Invalid query: ' . $sql . \" \" . mysql_error());\n }\n//Allocate the array\n $app_list = array();\n//Loop through database to add books to array\n while ($row = mysql_fetch_assoc($result)) {\n $icdaDes = $this->fetchICDDescription($row['ICDa']);\n $icdbDes = $this->fetchICDDescription($row['ICDb']);\n $icdcDes = $this->fetchICDDescription($row['ICDc']);\n $icddDes = $this->fetchICDDescription($row['ICDd']);\n if($icdaDes == ''){\n $icdaDes = ''; \n }\n if($icdbDes == ''){\n $icdbDes = ''; \n }\n if($icdcDes == ''){\n $icdcDes = ''; \n }\n if($icddDes == ''){\n $icddDes = ''; \n }\n\n $app_list = array('PatientName'=> $row['PatientName'],\n 'PatientHICN' => $row['HICN'],\n 'CertType' => $row['CertType'],\n 'CertDate' => $row['CertDate'],\n 'PatientDOB'=>$row['PatientDOB'],\n 'physicianName' => $row['physicianName'],\n 'MedicalID' => $row['MedicalID'],\n 'LengthNeed' => $row['LengthNeed'], \n 'ICDa' => $row['ICDa'], \n 'ICDaShortDesc' => $icdaDes,\n \n 'ICDb' => $row['ICDb'], \n 'ICDbShortDesc' => $icdbDes,\n \n 'ICDc' => $row['ICDc'], \n 'ICDcShortDesc' => $icdcDes,\n \n 'ICDd' => $row['ICDd'], \n 'ICDdShortDesc' => $icddDes,\n \n 'Q1AmmHg' => $row['Q1AmmHg'], \n 'Q1Bpercent' => $row['Q1Bpercent'], \n 'Q1Cdate' =>$row['Q1Cdate'], \n 'Q2cond' => trim($row['Q2cond']), \n 'Q3cond' => $row['Q3cond'], \n 'Q4portable' => $row['Q4portable'], \n 'Q5O2LPM' => $row['Q5O2LPM'], \n 'Q6AmmHg' => $row['Q6AmmHg'], \n 'Q6Bpercent' => $row['Q6Bpercent'], \n 'Q6Cdate' => $row['Q6Cdate'], \n 'Q7CHF' => $row['Q7CHF'], \n 'Q8Hypert' => $row['Q8Hypert'], \n 'Q9Herm' => $row['Q9Herm'], \n 'SignedByName' => $row['SignedByName'], \n 'SignedByTitle' => $row['SignedByTitle'], \n 'SignedByEmployer' => $row['SignedByEmployer']);\n }\n }\n // mysql_close($con);\n return json_encode($app_list);\n \n }",
"function viewSubjectGrades(){\n $subject = Input::get('subject');\n $section_id = Input::get('id');\n \n $section = \\App\\TvetSection::find($section_id);\n $students = SectionController::sectionStudents($section);\n \n $class = \\App\\TvetClass::find($section->tvet_section_classes->pluck('class_id')->toArray())->where('subject',$subject)->where('submissionLocked',1);\n \n if(count($class)>0 && GradeAccess::reportEditable($section,$subject)){\n $field = \"section_changeGrade\";\n return view('ajax.sectionsheet',compact('field','subject','section','students'))->render();\n }else{\n $field = \"student_list\";\n return view('ajax.sectionsheet',compact('field','subject','section','students'))->render();\n }\n \n \n }",
"private function getClassesInformation(){\n // Classroom's data\n $classrooms = Classroom::all();\n // Array of string [[class room id, name,their teacher name, students name]]\n $data = array();\n\n foreach ($classrooms as $classroom) {\n // Get Teacher with the same teacher id\n $teacher = $classroom->teacher;\n // Get teacher name\n if($teacher == null) {\n $teacher_name = \"-\";\n } else {\n $teacher_name = $teacher->name;\n }\n\n // Get Student with the same class id\n $students = $classroom->students;\n // Set Students' name to string_students\n $string_students = \"\";\n foreach ($students as $student) {\n if($student != null) {\n if($string_students != \"\") $string_students .= \", \";\n $string_students .= $student->name;\n }\n }\n // If this class has no student, set $string_students to \"-\"\n if($string_students == \"\") $string_students = \"-\";\n\n // Push to array\n array_push($data, [$classroom->id,$classroom->name,$teacher_name,$string_students]);\n }\n\n return $data;\n }",
"public function GetProf_andCourse(){\n\t\t$Prof_andCourse = array();\n\t\t$query = \"SELECT classname, professor from classes;\";\n\t\t$result = pg_query($this->con,$query);\n\t\tif (!$result) {\n \t\t\techo \"An error occurred.\\n\";\n \t\t\texit;\n\t\t}\n\t\twhile($row = pg_fetch_row($result)){\n $input = \"$row[0] $row[1]\";\n array_push($Prof_andCourse, $input);\n\t\t}\n\t\treturn $Prof_andCourse;\n }",
"public function get_information($uid)\n {\n $result = (new AccountTableControl())->select_rows_by_condition(['uid' => $uid]);\n\n if (count($result) < 1)\n return array();\n $result = $result[0];\n $result['class'] = (new SchoolClassTableControl())->getSchoolClassByUid($uid);\n $result['study'] = [];\n $result['study']['total'] = (new StudyDurationTableControl())->get_total_student_study_time($uid);\n $result['study']['this_month'] = (new StudyDurationTableControl())->get_this_month_study_time($uid);\n return $result;\n }",
"public function attendances(){\n return $this->hasMany('Attendance');\n }",
"public function receive_sectionno_mark_da($fileid = '')\n {\n\n if($fileid !='') {\n $rrty = $_SERVER['HTTP_REFERER'];\n $rty1 = explode(\"/\",$rrty);\n $empdetails = empdetails(emp_session_id());\n $filedetails = getFileDetails($fileid);\n\n if($empdetails[0]['role_id'] == 8 || in_array(\"today\",$rty1) || $empdetails[0]['role_id'] == 37 || $empdetails[0]['role_id'] == 14 || $empdetails[0]['role_id'] == 15) //this condition only for section officer .\n {\n $check_sec = getfilesec_id_byfileid($filedetails->file_id,$filedetails->file_mark_section_id,$filedetails->file_type);\n if(!isset($check_sec) && $check_sec == null)\n {\n $sectionno = plusone_fileno_es($filedetails->file_mark_section_id);\n if ($sectionno != 0) { $section_number = $sectionno; } else { $section_number = '1'; }\n\n $file_section = array(\n 'section_id' => $filedetails->file_mark_section_id,\n 'section_number' => $section_number,\n 'file_id' => $fileid,\n 'file_type' => $filedetails->file_type,\n 'file_mark_date' => date('Y-m-d H:i:s'),\n 'file_created_date' => date('Y-m-d H:i:s'),\n 'file_update_date' => date('Y-m-d H:i:s'),\n );\n\n }\n }\n if($this->input->post('carry_fileemp_name')){\n $carry_empname = $this->input->post('carry_fileemp_name');\n }else{\n $carry_empname = '';\n }\n\n $res = filereceive_byofficer($fileid,$carry_empname);\n if($res)\n {\n if($empdetails[0]['role_id'] == 8 || in_array(\"today\",$rty1) || $empdetails[0]['role_id'] == 37 || $empdetails[0]['role_id'] == 14 || $empdetails[0]['role_id'] == 15) {\n if(!isset($check_sec) && $check_sec == null) {\n insertData($file_section, FILES_SECTION);\n\n $this->form_validation->set_rules('Da_name', 'Da_name', 'trim|required|xss_clean');\n $this->form_validation->set_error_delimiters('<div class=\"text-danger\">', '</div>');\n\n if ($this->form_validation->run($this) === TRUE) {\n\n $m_empdetails = empdetails($this->input->post('Da_name')); // marked emp\n $p_empdetails = empdetails(emp_session_id()); // login emp\n\n\n $file_data = array(\n 'file_received_emp_id' => $this->input->post('Da_name'),\n 'file_sender_emp_id' => emp_session_id(),\n 'file_progress_status_id' => '22', // File/Letter is sending to Dealing Assistant . (remark_master)\n 'file_hardcopy_status' => 'not', // only two value will be save received/not\n 'file_level_id' => '30',\n // 'file_unit_level' => getunitid($m_empdetails[0]['role_id']),\n );\n\n $filelog_data = array(\n 'file_id' => $fileid,\n 'section_id' => $filedetails->file_mark_section_id,\n 'to_emp_id' => $this->input->post('Da_name'),\n 'from_emp_id' => emp_session_id(),\n 'flog_remark' => 'File/Letter is send to Dealing Assistant',\n 'flog_other_remark' => $this->input->post('file_remark'),\n 'flog_ip_address' => gethostbyname(gethostbyaddr($_SERVER['REMOTE_ADDR'])),\n 'flog_browser_id' => $_SERVER['HTTP_USER_AGENT'],\n );\n\n $form_data_move1 = array(\n 'fmove_file_id' => $fileid,\n 'fmove_current_user_id' => $this->input->post('Da_name'),\n 'fmove_previous_user_id' => emp_session_id(),\n 'fmove_to_unit_id' => getunitid($m_empdetails[0]['role_id']),\n 'fmove_from_unit_id' => getunitid($p_empdetails[0]['role_id']),\n 'file_return' => $filedetails->file_return,\n );\n\n $res1 = updateData(FILES, $file_data, array('file_id' => $fileid));\n if ($res1) {\n insertData($filelog_data, FILES_LOG);\n insertData($form_data_move1, FILES_MOVEMENT);\n $this->session->set_flashdata('message', '<u>FIleID : ' . $fileid . '</u> Successfully Sent to '.emp_gender($m_empdetails[0]['emp_id']).' '.$m_empdetails[0]['emp_full_name_hi'].' and <b><u>Section no :-'. $section_number .'</u></b>');\n }\n redirect($_SERVER['HTTP_REFERER']);\n }\n }\n $this->session->set_flashdata('message', '<u>FIleID : ' . $fileid . '</u> Successfully Received');\n redirect($_SERVER['HTTP_REFERER']);\n }\n }\n }else{\n redirect($_SERVER['HTTP_REFERER']);\n }\n\n }"
] | [
"0.6391119",
"0.63426715",
"0.62932795",
"0.6200125",
"0.61733025",
"0.61121094",
"0.6055582",
"0.59462315",
"0.59271497",
"0.58695555",
"0.5853994",
"0.58522445",
"0.58189523",
"0.5809726",
"0.5763236",
"0.57507026",
"0.57420826",
"0.5716578",
"0.57094455",
"0.57076055",
"0.5702419",
"0.56475866",
"0.5641319",
"0.56190515",
"0.5562706",
"0.5562704",
"0.5538684",
"0.5536677",
"0.5532496",
"0.5515016",
"0.54936105",
"0.5491862",
"0.5474068",
"0.5464786",
"0.5452494",
"0.5443961",
"0.5443217",
"0.5429344",
"0.54181755",
"0.54078573",
"0.5397769",
"0.5396687",
"0.53938466",
"0.53929555",
"0.5390279",
"0.53901654",
"0.53757083",
"0.53757083",
"0.53757083",
"0.5372923",
"0.53680545",
"0.5357567",
"0.53564256",
"0.5334257",
"0.53338104",
"0.52804166",
"0.5277039",
"0.5259732",
"0.52556485",
"0.52453667",
"0.5240367",
"0.52381194",
"0.5213893",
"0.5203892",
"0.5184855",
"0.5182606",
"0.51764715",
"0.5176449",
"0.51712453",
"0.51629716",
"0.51578665",
"0.5155897",
"0.51461154",
"0.5144592",
"0.513874",
"0.5135647",
"0.51300126",
"0.5124793",
"0.51161283",
"0.5114929",
"0.5108185",
"0.50999147",
"0.5095464",
"0.5090084",
"0.50834906",
"0.5073617",
"0.5068747",
"0.5063807",
"0.5054255",
"0.50518876",
"0.50476694",
"0.5040099",
"0.50168157",
"0.50066715",
"0.5006398",
"0.50046825",
"0.5002878",
"0.49939403",
"0.49882704",
"0.4969472"
] | 0.62899756 | 3 |
Returns false if false, else the string with end removed | public static function endsWith($str,$test) {
if (! (substr( $str, -strlen( $test ) ) == $test) ) {
return false;
}
return substr($str, 0, strlen($str) - strlen($test));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function isLastPartOfStringReturnsFalseForNotMatchingFirstPartDataProvider() {}",
"public function endsWithReturnsFalseForNotMatchingLastPartDataProvider() {}",
"public function testFalseEndsWith()\n {\n $this->assertFalse(Str::endsWith('foo', 'y'));\n }",
"public function isLastPartOfStringReturnsTrueForMatchingFirstPartDataProvider() {}",
"function strEndsWith($haystack,$needle){\n\n if(strlen($haystack)<=strlen($needle)){\n return false;\n }\n $pos=stripos($haystack,$needle,0-strlen($needle));\n\n if($pos==(strlen($haystack)-strlen($needle))){\n return true;\n }\n return false;\n}",
"function string_ends_with( $haystack, $needle ) {\n\t\treturn substr($haystack, -strlen($needle))===$needle;\n\t}",
"function str_endswith($string, $test) {\n $strlen = strlen($string);\n $testlen = strlen($test);\n if ($testlen > $strlen) {\n return false;\n }\n return substr_compare($string, $test, $strlen - $testlen, $testlen) === 0;\n }",
"public function testTrueEndsWith()\n {\n $this->assertTrue(Str::endsWith('foo', 'o'));\n }",
"function endsWith($haystack, $needle) {\n return $needle === \"\" || strpos($haystack, $needle, strlen($haystack) - strlen($needle)) !== FALSE;\n}",
"function endsWith($haystack, $needle) {\r\n return $needle === \"\" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== false);\r\n}",
"public function endsWithReturnsTrueForMatchingLastPartDataProvider() {}",
"function endsWith($haystack, $needle)\n{\n return $needle === \"\" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== FALSE);\n}",
"function endsWith($haystack, $needle)\n{\n return $needle === \"\" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== FALSE);\n}",
"private function endsWith($string, $ending)\n {\n $length = strlen($ending);\n if ($length == 0) {\n return true;\n }\n\n return (substr($string, -$length) === $ending);\n }",
"function check_str_end(string $string, string $end, int $len, $endLength): bool\n{\n return substr($string, $len - $endLength, $endLength) == $end;\n}",
"function endsWith($haystack, $needle) {\n return $needle === \"\" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== false);\n }",
"function endsWith($haystack, $needle) {\n return $needle === \"\" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== FALSE);\n}",
"function endsWith($haystack, $needle) {\n return $needle === \"\" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== FALSE);\n}",
"function endsWith($haystack, $needle) {\n return $needle === \"\" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== FALSE);\n}",
"public function endsWith($suffix) {\n $other = new Str($suffix, $this->charset);\n\n return mb_strrpos($this->rawString, $suffix, 0, $this->charset) === ($this->length() - $other->length());\n }",
"function endsWith($haystack, $needle) {\n\treturn $needle === \"\" || strpos($haystack, $needle, strlen($haystack) - strlen($needle)) !== FALSE;\n}",
"function str_removeFromEnd (string $str, string $needle) : string {\n\t$strLen = strlen($str);\n\t$needleLen = strlen($needle);\n\n\tif($strLen >= $needleLen and str_endsWith($str, $needle)){\n\t\treturn substr($str, 0, $strLen - $needleLen);\n\t}\n\treturn $str;\n}",
"function endsWith($haystack, $needle) {\n return $needle === \"\" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== false);\n}",
"function endsWith($haystack, $needle) {\n return $needle === \"\" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== false);\n}",
"function endsWith($haystack, $needle) {\r\n\t\treturn $needle === \"\" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== FALSE);\r\n\t}",
"function ends_with($haystack, $needle) {\n\treturn $needle === substr($haystack, -strlen($needle));\n}",
"function ends_with($string,...$end)\n{\n if(!$string)\n return false;\n foreach( $end as $e )\n if( substr($string,strlen($string)-strlen($e)) == $e )\n return true;\n return false;\n}",
"function endsBy(string $haystack, string $needle) : bool\n{\n $length = strlen($needle);\n\n return $length === 0 ||\n (substr($haystack, -$length) === $needle);\n}",
"function str_endsWith (string $str, string $needle): bool {\n\t$strLen = strlen($str);\n\t$needleLen = strlen($needle);\n\treturn (substr($str, $strLen - $needleLen, $needleLen) === $needle);\n}",
"public static function endsWith(string $string, string $suffix, &$nonSuffix = null) : bool\n {\n $suffixLength = strlen($suffix);\n\n if ($suffixLength === 0) {\n $nonSuffix = $string;\n return true;\n }\n\n if (empty($string)) {\n $nonSuffix = '';\n return false;\n }\n\n if (substr_compare($string, $suffix, -$suffixLength, $suffixLength) !== 0) {\n $nonSuffix = $string;\n return false;\n }\n\n $nonSuffix = substr($string, 0, -$suffixLength);\n return true;\n }",
"function endsWith($haystack, $needle)\r\n {\r\n return $needle === \"\" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== FALSE);\r\n }",
"function endsWith($haystack, $needle) {\n if(!empty($haystack)) {\n return $needle === \"\" || strpos($haystack, $needle, strlen($haystack) - strlen($needle)) !== FALSE;\n }\n}",
"function endsWith($haystack, $needle) {\n if(!empty($haystack)) {\n return $needle === \"\" || strpos($haystack, $needle, strlen($haystack) - strlen($needle)) !== FALSE;\n }\n}",
"function endWith($haystack, $needle) { \n\n\t\t $length = strlen($needle); \n\t\t if($length == 0)\n\t\t { \n\t\t\t return true; \n\t\t } \n\t\t return (substr($haystack, -$length) === $needle);\n\t }",
"function endsWith($haystack, $needle){\n $length = strlen($needle);\n return $length === 0 ||\n (substr($haystack, -$length) === $needle);\n }",
"function endsWith($haystack, $needle) {\n\t\treturn $needle === \"\" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== false);\n\t}",
"function endsWith($haystack, $needle) {\n // search forward starting from end minus needle length characters\n return $needle === \"\" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== false);\n }",
"function endsWith($needle, $haystack)\n{\n $needle = strrev($needle);\n $haystack = strrev($haystack);\n return (strpos($haystack, $needle) === 0);\n}",
"function ends_with($haystack, $needle) {\r\n $length = strlen($needle);\r\n $start = $length *-1; //negative\r\n return (substr($haystack, $start, $length) === $needle);\r\n}",
"public static function endsWith($str, $suffix) {\n\t\treturn substr($str, strlen($str) - strlen($suffix)) === $suffix;\n\t}",
"function ends_with($haystack, $needle)\n{\n\treturn substr($haystack, -strlen($needle))===$needle;\n}",
"public function endsWithIgnoreCase($suffix) {\n $other = new Str($suffix, $this->charset);\n\n return mb_strripos($this->rawString, $suffix, 0, $this->charset) === ($this->length() - $other->length());\n }",
"public static function endsWith($haystack, $needle) {\n return (strrpos($haystack, $needle) == (strlen($haystack) - strlen(\n $needle\n )));\n }",
"public function isFirstPartOfStrReturnsFalseForNotMatchingFirstPartDataProvider() {}",
"function endsWith($str1,$str2){\n \tif(mb_substr($str1, -mb_strlen($str2)) == $str2){\n \t\treturn mb_substr($str1, 0, mb_strlen($str1)- mb_strlen($str2));\n \t} else {\n \t\treturn -1;\n \t}\n\t}",
"function endsWith($haystack, $needle) {\n\t\t$length = strlen($needle);\n\t\tif ($length == 0) {\n\t\t\treturn true;\n\t\t}\n\t\treturn (substr($haystack, -$length) == $needle);\n\t}",
"private function endsWith($haystack, $needle) {\r\n\t\t\treturn $needle === \"\" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== false);\r\n\t\t}",
"public static function endsWith($string, $end)\n {\n // Needle cannot be found if needle is longer than haystack.\n if (($offset = strlen($string) - strlen($end)) >= 0) {\n return strpos($string, $end, $offset) === $offset;\n }\n\n return false;\n }",
"static function endsWith($haystack, $needle)\n {\n // search forward starting from end minus needle length characters\n return $needle === \"\" ||\n (($temp = strlen($haystack) - strlen($needle)) >= 0 &&\n strpos($haystack, $needle, $temp) !== false);\n }",
"private function endWith($haystack, $needle): bool\n {\n return substr_compare($haystack, $needle, -strlen($needle)) === 0;\n }",
"public static function endsWith(String $haystack, String $needle): bool {\n\t\t$length = strlen($needle);\n\t\tif ($length == 0) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn (substr($haystack, -$length) === $needle);\n\t}",
"public static function endsWith(string $haystack, string $needle): bool\n {\n return stristr($haystack, $needle) !== false && substr($haystack, (strlen($needle) * -1)) === $needle;\n }",
"public static function stringEndsWith($string, $suffix)\n {\n $str_len = strlen($string);\n $suffix_len = strlen($suffix);\n if ($suffix_len > $str_len) return false;\n return substr_compare($string, $suffix, $str_len - $suffix_len, $suffix_len) === 0;\n }",
"public function endsWith(self $path): bool {\n $thisStr = $this.'';\n $pathStr = $path.'';\n\n return $path->length() === 0\n || $this->length() === 0\n || strpos($thisStr, $pathStr) === strlen($thisStr) - strlen($pathStr);\n }",
"function ends_iwith($string,...$end)\n{\n if(!$string)\n return false;\n $string = strtolower($string);\n foreach( $end as $e )\n if( substr($string,strlen($string)-strlen($e)) == strtolower($e) )\n return true;\n return false;\n}",
"public function endsWith($haystack, $needle)\n {\n return $needle === '' || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== false);\n }",
"public function endsWith($needle) {\n\t\treturn ($needle === '') || (substr((string)$this, -strlen($needle)) === $needle);\n\t}",
"public static function endsWith($haystack, $needle)\n {\n return '' === $needle || strrpos($haystack, $needle) === strlen($haystack) - strlen($needle);\n }",
"function endsWith($haystack, $needle) {\n\t\t\t$needle_length = strlen($needle);\n\t\t\t$offset = strlen($haystack) - $needle_length;\n\t\t\t$length = $needle_length;\n\t\t\treturn @substr_compare($haystack, $needle, $offset, $length) === 0;\n\t\t}",
"static function endsWith(string $s, string|array $suffixes): bool {\n foreach ((array) $suffixes as $needle) {\n if (mb_substr($s, -mb_strlen((string) $needle)) === (string) $needle) {\n return true;\n }\n }\n\n return false;\n }",
"public static function endsWith($haystack, $needle) {\n return $needle === \"\" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== FALSE);\n }",
"public static function str_ends_with( $haystack, $needle ) {\n\n\t\tif ( '' === $needle ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( self::multibyte_loaded() ) {\n\n\t\t\treturn mb_substr( $haystack, -mb_strlen( $needle, self::MB_ENCODING ), null, self::MB_ENCODING ) === $needle;\n\n\t\t} else {\n\n\t\t\t$haystack = self::str_to_ascii( $haystack );\n\t\t\t$needle = self::str_to_ascii( $needle );\n\n\t\t\treturn substr( $haystack, -strlen( $needle ) ) === $needle;\n\t\t}\n\t}",
"public static function ends_with( $haystack, $needle ) {\n\t\treturn $needle === substr( $haystack, -strlen( $needle ) );\n\t}",
"public static function ends_with( $needle, $haystack ) {\n\t\treturn '' === $needle || substr( $haystack, -strlen( $needle ) ) === (string) $needle;\n\t}",
"public static function endsWith($haystack, $needle)\n {\n return $needle === \"\" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== FALSE);\n }",
"function ends_with($haystack, $needles)\n {\n foreach ((array)$needles as $needle) {\n if (substr($haystack, -strlen($needle)) === (string)$needle) {\n return true;\n }\n }\n return false;\n }",
"public static function endsWith(string $value, $end, bool $ignoreCase = false): bool\n {\n if ($ignoreCase) {\n $value = mb_strtolower($value);\n }\n $end = is_array($end) ? $end : [$end];\n foreach ($end as $val) {\n if ($ignoreCase) {\n $val = mb_strtolower($val);\n }\n if (mb_substr($value, -mb_strlen($val)) == $val) {\n return true;\n }\n }\n return false;\n }",
"function endsWith($haystack, $needle) {\n\t\t$pos = strlen($haystack) - strlen($needle);\n\t\treturn (strpos($haystack, $needle) === $pos);\n\t}",
"public static function endsWith(string $haystack, string $needle): bool\n {\n return $needle === '' || substr($haystack, -strlen($needle)) === $needle;\n }",
"public static function endsWith(string $haystack, string $needle): bool \n {\n return substr_compare($haystack, $needle, -strlen($needle)) === 0;\n }",
"private function strEndsWith($string, $niddle)\n {\n return mb_substr($string, mb_strlen($string) - mb_strlen($niddle), mb_strlen($niddle)) == $niddle;\n }",
"protected static function endsWith($haystack, $needle) {\n\t\t// search forward starting from end minus needle length characters\n\t\treturn $needle === \"\" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== FALSE);\n\t}",
"protected static function endsWith($haystack, $needle) {\n\t\t// search forward starting from end minus needle length characters\n\t\treturn $needle === \"\" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== FALSE);\n\t}",
"public function beginsWithReturnsFalseForNotMatchingFirstPartDataProvider() {}",
"function startsWith2bm($haystack, $needle) {\r\n return $needle === \"\" || strrpos($haystack, $needle, -strlen($haystack)) !== false;\r\n}",
"protected function ends()\n {\n static $re_all = '/^[\\h\\v]*$/';\n static $re_nnl = '/^[\\h]*$/';\n \n if ($this->data === null)\n return true;\n \n // if $tnl (track new lines) is true: use \\h, else: use \\h\\v\n return preg_match($this->tnl ? $re_nnl : $re_all, $this->data);\n }",
"public static function stringEndsWith($haystack, $needles)\n {\n foreach ((array)$needles as $needle) {\n if ((string)$needle === mb_substr($haystack, -self::stringLength($needle))) {\n return true;\n }\n }\n return false;\n }",
"static function assertStringEndsNotWith($suffix, $string, $message = '')\n {\n try {\n return call_user_func_array('PHPUnit_Framework_Assert::assertStringEndsNotWith', func_get_args());\n } catch (\\Exception $e) {\n self::callSlack($e, debug_backtrace()[1]);\n }\n }",
"protected function _hasTrailingSlash()\n\t{\n\t\t$url = Sh404sefFactory::getPageInfo()->currentSefUrl;\n\t\t$rawPath = explode('?', $url);\n\t\t$rawPath = $rawPath[0]; // query string removed, if any\n\t\t$rawPath = explode('#', $rawPath);\n\t\t$rawPath = $rawPath[0]; // fragment removed, if any\n\t\t$trailingSlash = JString::substr($rawPath, -1) == '/';\n\n\t\treturn $trailingSlash;\n\t}",
"public function endsWith(string $string, string $ends_with = ''): bool\n {\n\n $length = strlen($ends_with);\n\n return $length === 0 || (substr($string, -$length) === $ends_with);\n\n }",
"public function endsWith($haystack, $needle)\n {\n return $needle === '' || substr($haystack, -strlen($needle)) === $needle;\n }",
"function str_ends_with($needle, $haystack)\n {\n return str::endsWith($needle, $haystack);\n }",
"function endsWith($haystack, $needle) // Colorize: green\n { // Colorize: green\n $length = strlen($needle); // Colorize: green\n // Colorize: green\n if ($length == 0) // Colorize: green\n { // Colorize: green\n return true; // Colorize: green\n } // Colorize: green\n // Colorize: green\n return substr($haystack, -$length) === $needle; // Colorize: green\n }",
"public function removeRule(){\n\n $initial = strpos( $this->content, \"# begin \" . $this->module );\n if (false === $initial )\n return true;\n\n $final = strpos( $this->content, \"# end \" . $this->module );\n\n $replace = substr( $this->content, 0, $initial );\n if ( false !== $final )\n $replace .= substr( $this->content, $final + strlen( \"# end $this->module\") + 1 );\n\n\t\tfile_put_contents($this->file, $replace);\n\t\treturn true;\n\n\t}",
"public static function endsWith(string $haystack, string $needle): bool\n\t{\n\t\t$isEight = \\version_compare(PHP_VERSION, '8.0.0') >= 0;\n\t\t$length = strlen($needle);\n\n\t\tif ($isEight)\n\t\t{\n\t\t\treturn \\str_ends_with($haystack, $needle);\n\t\t}\n\n\t\treturn !$length ? true : substr($haystack, -$length) === $needle;\n\t}",
"protected function striped(): bool\n {\n return false;\n }",
"public static function endsWith(string $subject, string $value): bool\n\t{\n\t\tif (function_exists(\"str_ends_with\")) {\n\t\t\treturn str_ends_with($subject, $value);\n\t\t}\n\t\treturn $value === \"\" || (($temp = mb_strlen($subject) - mb_strlen($value)) >= 0 && strpos($subject, $value, $temp) !== false);\n\t}",
"public static function end(string $haystack, string $needle, bool $caseSensitivity = true): bool\n {\n if (!$caseSensitivity) {\n $haystack = strtolower($haystack);\n $needle = strtolower($needle);\n }\n $length = strlen($needle);\n return ($length === 0) || (substr($haystack, -$length) === $needle);\n }",
"public function endsWith( $haystack, $needle ) {\n\t\treturn $needle == substr( $haystack, strlen( $haystack ) - strlen( $needle ) );\n\t}",
"public static function ends_with($haystack, $needle)\n {\n $length = strlen($needle);\n if ($length == 0)\n {\n return true;\n }\n\n return (substr($haystack, -$length) === $needle);\n }",
"public static function endsWith($haystack, $needle)\r\n {\r\n Preconditions::checkIsString($haystack);\r\n Preconditions::checkIsString($needle);\r\n if ($needle == '') return true;\r\n\r\n $needle_length = strlen($needle);\r\n if ($needle_length > strlen($haystack)) {\r\n return false;\r\n }\r\n return substr_compare($haystack, $needle, -$needle_length, $needle_length) === 0;\r\n }",
"public static function endsWith($haystack, $needle)\n {\n return strrpos($haystack, $needle) == strlen($haystack) - strlen($needle);\n }",
"public function isLastPartOfStringReturnsInvalidArgumentDataProvider() {}",
"public static function endsWith($input, $suffix)\n {\n self::initialize();\n\n return strlen($suffix) === 0 || substr($input, -strlen($suffix)) === $suffix;\n }",
"protected function endsWith( $needle, $haystack ) {\n\t\t$len = strlen( $needle );\n\t\tif ( $len === 0 ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn ( substr( $haystack, -$len ) === $needle );\n\t}",
"public function endsWith ($haystack, $needle)\n {\n $length = strlen($needle);\n if ($length === 0) {\n return true;\n }\n return (substr($haystack, -$length) === $needle);\n }",
"public static function endsWith($value, $suffix)\n {\n return ($suffix == substr($value, -strlen($suffix))) ? true : false;\n }",
"function str_iends_with($needle, $haystack)\n {\n return str::endsWithIgnoreCase($needle, $haystack);\n }",
"private function remove_end_slash($str)\n {\n if(strlen($str) > 1) {\n if(substr($str,-1)==\"/\")\n {\n $str=substr($str,0,strlen($str)-1);\n }\n }\n return $str;\n }",
"private function hasValidSEnding($word)\n {\n $lastLetter = UTF8::substr($word, -1, 1);\n if (in_array($lastLetter, array('b', 'c', 'd', 'f', 'g', 'h', 'j', 'l', 'm', 'n', 'o', 'p', 'r', 't', 'v', 'y', 'z'))) {\n return true;\n }\n if ($lastLetter == 'k') {\n $beforeLetter = UTF8::substr($word, -2, 1);\n if (!in_array($beforeLetter, self::$vowels)) {\n return true;\n }\n }\n return false;\n }"
] | [
"0.7759439",
"0.7596207",
"0.735031",
"0.7016631",
"0.6974347",
"0.6906606",
"0.68807906",
"0.6858382",
"0.6850971",
"0.6815804",
"0.6801761",
"0.67987734",
"0.67987734",
"0.6780261",
"0.6776123",
"0.6754282",
"0.6741944",
"0.6741944",
"0.6741944",
"0.67400837",
"0.6732458",
"0.6723437",
"0.670636",
"0.670636",
"0.6683166",
"0.6651875",
"0.66517615",
"0.66479224",
"0.6644734",
"0.66403794",
"0.66217333",
"0.6613159",
"0.6613159",
"0.6602515",
"0.6584677",
"0.6576742",
"0.65261286",
"0.65229505",
"0.65209967",
"0.6491519",
"0.64864016",
"0.64514726",
"0.638581",
"0.6371178",
"0.6363237",
"0.6361061",
"0.6355896",
"0.63509",
"0.6304288",
"0.62932706",
"0.62769884",
"0.6260432",
"0.62407994",
"0.62398016",
"0.62318957",
"0.62239856",
"0.6216044",
"0.6205379",
"0.61917853",
"0.6172747",
"0.6171297",
"0.614882",
"0.61462295",
"0.6137463",
"0.6129115",
"0.6120304",
"0.6112142",
"0.6101737",
"0.6101185",
"0.6081346",
"0.6078318",
"0.6062994",
"0.6062994",
"0.60073495",
"0.5997873",
"0.59908867",
"0.59628814",
"0.5954463",
"0.59349334",
"0.59221333",
"0.591443",
"0.59110487",
"0.5903598",
"0.5893236",
"0.5891846",
"0.58911383",
"0.5882296",
"0.5848315",
"0.5847842",
"0.58456343",
"0.5839175",
"0.5788135",
"0.5780562",
"0.5779453",
"0.57607657",
"0.5736656",
"0.5731566",
"0.5718509",
"0.57180387",
"0.5685629"
] | 0.68450314 | 9 |
Returns the base action/partial name with Action/Parial removed | public static function getMethodBase($methodName) {
BaseController::PARTIAL;
BaseController::ACTION;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getFullActionName()\n\t{\n\t\treturn $this->request->getFullActionName();\n\t}",
"public function getFullActionName()\n {\n return $this->request->getFullActionName();\n }",
"function _get_action()\n {\n $retval = preg_quote($this->object->param('action'), '/');\n $retval = strtolower(preg_replace(\"/[^\\\\w]/\", '_', $retval));\n return preg_replace(\"/_{2,}/\", \"_\", $retval) . '_action';\n }",
"protected function _getFullActionName()\n {\n if ($this->_fullActionName == null) {\n $this->_fullActionName = $this->_request->getFullActionName();\n }\n return $this->_fullActionName;\n }",
"public function getActionNm()\r\n {\r\n\t\t$tabInfo = $this->getPathInfo();\r\n\t\treturn $tabInfo[2];\r\n }",
"private function getActionName()\n {\n return strtolower($this->_request->getActionName());\n }",
"public function getActionTitle()\n {\n $path = explode('/', $this->controller);\n if(count($path) >= 2) {\n return array_pop($path);\n }\n else {\n return '';\n }\n }",
"public function getActionName(){\n\t\tif ( !isset($_GET['action'])){\n\t\t\treturn 'defaultAction';\n\t\t}\n\t\telse{\n\t\t\treturn $_GET['action'];\n\t\t}\n\t}",
"public function getControllerActionName() {}",
"public function getActionName()\n {\n return isset($this->action['controller']) ? $this->action['controller'] : 'Closure';\n }",
"public function getActionName() {\n\t\treturn $this->action;\n\t}",
"public function getActionName()\n {\n return $this->__get(\"action_name\");\n }",
"protected function resolveActionMethodName() {}",
"public function getActionName() {\n\n\t\treturn $this->_action;\n\t}",
"public static function getActionName()\r\n\t{\r\n\t\treturn TRequest::getCmd('controller');\r\n\t}",
"public function getActionName()\n {\n return $this->_action;\n }",
"public function getRouteName($action);",
"public static function action()\n {\n return strtolower(static::name());\n }",
"protected function resolveActionMethodName(): string\n {\n switch ($this->request->getMethod()) {\n case 'HEAD':\n case 'GET':\n $actionName = ($this->request->hasArgument($this->resourceArgumentName)) ? 'show' : 'list';\n return $actionName . 'Action';\n\n // Not supported in Example\n case 'POST':\n case 'PUT':\n case 'DELETE':\n default:\n $this->throwStatus(400, null, 'Bad Request.');\n }\n $this->throwStatus(400, null, 'Bad Request.');\n return '';\n }",
"public function getBaseRouteName(): string;",
"public function getActionName()\n\t{\n\t\t$explodedArray = explode('/', $_SERVER['REQUEST_URI']);\n\n\t\tif(array_key_exists(2, $explodedArray) && !empty($explodedArray[2])){\n\n\t\t\tif (strpos($explodedArray[2], '?')) {\n\t\t\t\t$localAction = explode('?', $explodedArray[2]);\n\t\t\t\t$this->actionName = $localAction[0];\n\t\t\t} else $this->actionName = $explodedArray[2];\n\n\t\t} else\n\t\t\t$this->actionName = 'index';\n\t}",
"function map_action($action) {\n return $action . '_action';\n }",
"protected function resolveActionMethodName()\n {\n // sets correct $this->request actionMethodName:\n $actionMethodName = parent::resolveActionMethodName();\n // replace controllerContext sets which was set ini initializeController callec before actionMethod was replaced\n $this->controllerContext = new ControllerContext($this->request, $this->response, $this->arguments, $this->uriBuilder);\n return $actionMethodName;\n }",
"protected function resolveActionMethodName()\n\t{\n\t\tif ($this->request->getHttpRequest()->getMethod() === 'OPTIONS') {\n\t\t\t$this->request->setControllerActionName('options');\n\t\t}\n\t\tif ($this->request->getControllerActionName() === 'index') {\n\t\t\t$actionName = 'index';\n\t\t\tswitch ($this->request->getHttpRequest()->getMethod()) {\n\t\t\t\tcase 'HEAD':\n\t\t\t\tcase 'GET':\n\t\t\t\t\t$actionName = ($this->request->hasArgument(static::$RESOURCE_ARGUMENT_NAME)) ? 'show' : 'list';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'POST':\n\t\t\t\t\t$actionName = 'create';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'PUT':\n\t\t\t\tcase 'PATCH':\n\t\t\t\t\t$actionName = 'update';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'DELETE':\n\t\t\t\t\t$actionName = 'remove';\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$this->request->setControllerActionName($actionName);\n\t\t}\n\n\t\treturn parent::resolveActionMethodName();\n\t}",
"public function getActionName();",
"public function getActionName();",
"public function name()\n {\n if ($name = $this->route->getName()) {\n return $name;\n }\n\n $name = $this->route->getActionName();\n\n if ($name === 'Closure') {\n return null;\n }\n\n $namespace = array_get($this->route->getAction(), 'namespace');\n\n return str_replace($namespace . '\\\\', '', $name);\n }",
"public function getAction()\n\t{\n\t\t$action = strtolower($this->getParam(self::ACTION_PARAM));\n\t\tif ($action === '' or ! preg_match('/^[a-z0-9_-]+$/', $action)) {\n\t\t\treturn Controller::DEFAULT_ACTION;\n\t\t}\n\n\t\treturn $action;\n\t}",
"public function getName()\n {\n return $this->action['name'] ?? null;\n }",
"public function getActionName() {\n return $this->actionName;\n }",
"public function getActionName(){ }",
"public function action_name() {\n\t\t\n\t\treturn get_class($this);\n\t\t\n\t}",
"protected function setActionName() {\n return NULL;\n }",
"protected function getAction(): string\n\t{\n\t\treturn $this->getActionInput() ?: $this->getDefaultAction($this->getNameInput());\n\t}",
"protected function getDefaultAction(string $name): string\n\t{\n\t\t$name = last(explode('/', $name));\n\n\t\treturn str(Str::ucsplit($name)[0])->lower()->singular();\n\t}",
"public static function routeName() : string\n {\n return str_replace('app_http_actions_', '', snake_case(str_replace('\\\\', '', static::class)));\n }",
"public function obfuscateMethodNames($action)\n\t{\n\treturn $action;\t\n\t}",
"public function get_action_file()\n {\n if (!empty($this->action_map[$this->action])) {\n return $this->action_map[$this->action];\n }\n\n return strtr($this->action, '-', '_') . '.inc';\n }",
"public function getActionName(){\n return $this->actionName;\n }",
"private static function getAction() {\n $action = \"index\";\n if (isset($_GET['action']) && trim($_GET['action']) != \"\") $action = $_GET['action'];\n return $action;\n }",
"public function get_action_view()\n {\n if (empty($this->uri)) {\n $uri = lcfirst($this->request->controller()) . '/' . $this->request->action();\n $dir = lcfirst($this->request->directory());\n\n if (!empty($dir))\n $uri = $dir . '/' . $uri;\n\n $this->uri = $uri;\n unset($uri, $dir);\n }\n return $this->uri;\n }",
"public function GetControllerAction () {\n\t\treturn $this->controller . ':' . $this->action;\n\t}",
"public function get_action() {\n\t\t$action\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t= (isset($_GET['action']))? preg_replace('@[^a-zA-Z0-9_]@', '', $_GET['action']) : $this->conf('default_action');\n\t\t\n\t\t# Return the Action\n\t\treturn $action;\n\t}",
"public function getActionMethod()\n {\n return array_last(explode('@', $this->getActionName()));\n }",
"public function getName()\n {\n return Craft::t('Controller Action');\n }",
"public function getAction()\n\t{\n\t\t\n\t\t$parsed = (array)$this->getAsArray();\n\t\t\n\t\tforeach(array('getPrefix', 'getController') as $method)\n\t\t{\n\t\t\tif( $this->{$method}() )\n\t\t\t{\n\t\t\t\tarray_shift($parsed);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif( empty($parsed) )\n\t\t{\n\t\t\t$action = $this->default_action;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$action = $parsed[0];\n\t\t}\n\t\t\n\t\t$prefix = $this->getPrefix();\n\t\t\n\t\tif( $prefix )\n\t\t{\n\t\t\t$action = $prefix . '_' . $action;\n\t\t}\n\t\t\n\t\treturn $action;\n\t\t\n\t}",
"protected function _getBasePath()\n {\n if (null === $this->_actionController) {\n return './views';\n }\n\n $inflector = $this->getInflector();\n $this->_setInflectorTarget($this->getViewBasePathSpec());\n\n $dispatcher = $this->getFrontController()->getDispatcher();\n $request = $this->getRequest();\n\n $parts = [\n 'module' => (($moduleName = $request->getModuleName()) != '') ? $dispatcher->formatModuleName($moduleName) : $moduleName,\n 'controller' => $request->getControllerName(),\n 'action' => $dispatcher->formatActionName($request->getActionName())\n ];\n\n return $inflector->filter($parts);\n }",
"public function getControllerTitle()\n {\n if(strpos($this->controller, '/') >= 0) {\n return preg_replace(\"/\\/[\\w-_]+$/\", '', $this->controller);\n }\n else {\n return '';\n }\n }",
"public function getAction(): string\n {\n return $this->action;\n }",
"public function getAction(): string\n {\n return $this->action;\n }",
"public function getName()\n\t{\n\t\treturn $this->actionName;\n\t}",
"public function getAction($ucfirst=true){\r\n\t\tif(is_array($this->matchedRoute) && isset($this->matchedRoute['action_regex'])){\r\n\t\t\tif($this->matchedRoute['action_regex'] == true){\r\n\t\t\t\t$this->action = 'Reg'.sha1($this->matchedRoute['action']);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif($ucfirst){\r\n\t\t\t$o = ucfirst($this->action);\r\n\t\t} else {\r\n\t\t\t$o = strtolower($this->action);\r\n\t\t}\r\n\t\treturn $o;\r\n\t}",
"public function getCurrentAction() {\n\t\treturn $this->request->get('action','undefined');\n\t}",
"public function getControllerSimpleName()\n {\n return end(explode('\\\\', $this->controllerName));\n }",
"public function __toString()\n {\n return\n $this->Request->getControllerName() . \"/\" .\n $this->Request->getActionName();\n }",
"public function forTemplate() {\n\t\treturn $this->ActionName;\n\t}",
"public static function getActionName($vars)\n {\n $msgs = DataAccess::getInstance()->get_text(true);\n if ($vars['step'] == 'my_account_links') {\n //short version\n return $msgs[500636];\n } else {\n //action interupted text\n //text \"placing new auction\"\n return $msgs[500391];\n }\n }",
"public function getName()\n {\n return isset($this->action['as']) ? $this->action['as'] : null;\n }",
"function get_action() {\n \t\tglobal $argv;\n\t\treturn strtolower(trim($argv['1']));\n\t}",
"public function getPrefix()\n {\n return $this->action['prefix'] ?? null;\n }",
"private function get_action() {\n\t\treturn $this->action;\n\t}",
"private function get_action() {\n\t\treturn $this->action;\n\t}",
"private function get_action() {\n\t\treturn $this->action;\n\t}",
"public function get_action() {\n\t\treturn $this->action ? $this->action : 'import';\n\t}",
"public function getAction() : string{\n return $this->action;\n }",
"public function get_action() {\r\n\t\treturn esc_url_raw( $this->action ? $this->action : wp_unslash( $_SERVER['REQUEST_URI'] ) );\r\n\t}",
"protected function getActionMethod(string $action): string\n {\n $sentence = preg_replace('/[\\W_]+/', ' ', $action);\n return lcfirst(str_replace(' ', '', ucwords($sentence)));\n }",
"function gtags_action_clean( $action ) {\n\t$action = str_replace( ' started the discussion topic', ' started', $action );\n\t$action = str_replace( ' posted on the discussion topic', ' posted on', $action );\t\n\treturn $action;\n}",
"public function getSuggestedAction()\n {\n return $this->singleValue('//i:suggestedAction');\n }",
"public function getController() : string\n {\n return substr($this->uri, 0, -strlen($this->match)) .\n $this->replacement;\n }",
"protected function _generateDefaultPrefix()\n {\n $default = 'Zend_View';\n if (null === $this->_actionController) {\n return $default;\n }\n\n $class = get_class($this->_actionController);\n\n if (!strstr($class, '_')) {\n return $default;\n }\n\n $module = $this->getModule();\n\n if ('default' == $module) {\n return $default;\n }\n\n return substr($class, 0, strpos($class, '_')) . '_View';\n }",
"public function formatActionName($unformatted)\n {\n $formatted = $this->_formatName($unformatted, true);\n return strtolower(substr($formatted, 0, 1)) . substr($formatted, 1) . 'Action';\n }",
"public function getBaseControllerName(): string;",
"public function getController() : string\n {\n return preg_replace($this->match, $this->replacement, $this->uri);\n }",
"public function getController() : string\n {\n return preg_replace($this->match, $this->replacement, $this->uri);\n }",
"public static function getAction() {\n\t return self::getPathParams()['action'];\n\t}",
"public function getAction()\n {\n $version = $this->modx->getVersionData();\n if (version_compare($version['full_version'], '2.3.0-dev') >= 0) {\n return '\\'?namespace=media\\'';\n }\n\n return 'MODx.action[\"media:index\"]';\n }",
"public function getFormActionRouteName(): string\n {\n return $this->resource->getRouteName($this->getFormActionRouteSuffix());\n }",
"public function formatActionName($unformatted)\n {\n return strtolower(substr($this->_formatName($unformatted),0,1)) . substr($unformatted,1) . 'Action';\n }",
"public function getPrefix()\n {\n return isset($this->action['prefix']) ? $this->action['prefix'] : null;\n }",
"public function getFormActionRouteSuffix(): string\n {\n return $this->getConfig('form_action_route_suffix', $this->getName());\n }",
"protected function getActionInput(): string\n\t{\n\t\treturn trim($this->option('action'));\n\t}",
"protected static function getAjaxName()\n\t{\n\t\tif (self::getGet('act') == 'editAll')\n\t\t{\n\t\t\treturn preg_replace('/.*_([0-9a-zA-Z]+)$/', '$1', self::getPost('name'));\n\t\t}\n\n\t\treturn self::getPost('name');\n\t}",
"public static function name()\n {\n $path = explode('\\\\', get_called_class());\n $controller_name = array_pop($path);\n return trim(str_replace(\"Controller\", \"\", $controller_name));\n }",
"public function getActionClassName()\n {\n return $this->getClassName();\n }",
"public function getAction(): string;",
"public function getAction(): string;",
"public static function fixUpActionName($actionToCheck)\n {\n if ( empty($actionToCheck) ) {\n return $actionToCheck;\n }\n $input = strtolower($actionToCheck);\n switch ($input)\n {\n case 'index':\n case 'listview':\n case 'subpanel':\n $output = 'list';\n break;\n case 'save':\n case 'popupeditview':\n case 'editview':\n case 'create':\n $output = 'edit';\n break;\n case 'read':\n case 'detail':\n case 'detailview':\n $output = 'view';\n break;\n default:\n $output = $input;\n }\n\n return $output;\n }",
"public function getFullNamespace(): string\n {\n return $this->requestStack->getMainRequest()->get('_route') . $this->separator;\n }",
"private function namebase() {\n return $this->module->name;\n }",
"public function getAction(){\r\n return $this->sAction;\r\n }",
"public function action() {\n return $this->action;\n }",
"public static function getActionFunction()\n\t{\n\t\t$params = self::getAllURLParams();\n\t\t$pos = contrlPos + 1;\n\t\treturn (!empty($params[$pos])) ? $params[$pos] : 'index';\n\t}",
"public function getBaseNamespace(): string\n {\n $routeName = $this->requestStack->getMainRequest()->get('_route');\n\n return mb_substr($routeName, 0, mb_strrpos($routeName, $this->separator) + 1);\n }",
"public static function prepareActionName(string $name, bool $full = true): string\n {\n if ($name == Controller::NAME_DEFAULT) {\n $name = self::$options['defaultAction'];\n }\n\n $name = self::prepareName($name, Controller::ACTION_SUFFIX);\n\n // Make action suffixed, skipping special actions (index & error).\n if ($full && ($name != Controller::INDEX_ACTION && $name != Controller::ERROR_ACTION)) {\n $name .= Controller::ACTION_SUFFIX;\n }\n\n return $name;\n }",
"protected static function getActionName($event) {\n switch (strtolower($event)) {\n case 'created':\n case 'creating':\n return 'create';\n case 'updated':\n case 'updating':\n return 'update';\n case 'deleted':\n case 'deleting':\n return 'delete';\n case 'saved':\n case 'saving':\n return 'save';\n default:\n return 'unknown';\n }\n }",
"public function getAction()\n {\n return $this->sAction;\n }",
"public function get_action() {\r\n\t\treturn $this->action;\r\n\t}",
"static function get_default_action()\r\n {\r\n return self :: DEFAULT_ACTION;\r\n }",
"static function get_default_action()\r\n {\r\n return self :: DEFAULT_ACTION;\r\n }",
"public function get_usable_action_name( $action_name ) {\n\n\t\t$action_name = sanitize_title_with_dashes( $action_name, false, 'save' );\n\t\t$action_name = str_replace( '-', '_', $action_name );\n\n\t\treturn $action_name;\n\n\t}"
] | [
"0.7410315",
"0.74086",
"0.72740877",
"0.7240226",
"0.69605225",
"0.69071865",
"0.6815265",
"0.6772319",
"0.6734674",
"0.6706184",
"0.6613988",
"0.6600211",
"0.6589893",
"0.65857226",
"0.65550375",
"0.6550951",
"0.6522431",
"0.6520737",
"0.6452029",
"0.644644",
"0.6441819",
"0.63737565",
"0.63596773",
"0.6307232",
"0.6299255",
"0.6299255",
"0.6280836",
"0.6277398",
"0.6267567",
"0.6263474",
"0.6262579",
"0.6261658",
"0.6241043",
"0.62289935",
"0.6213444",
"0.6211989",
"0.6201301",
"0.6185541",
"0.6160644",
"0.6149605",
"0.6144699",
"0.6131519",
"0.61305404",
"0.61286044",
"0.61282015",
"0.60897607",
"0.60859376",
"0.6082026",
"0.60744816",
"0.60744816",
"0.60703087",
"0.6058946",
"0.60499483",
"0.60451907",
"0.60212415",
"0.59976435",
"0.5997552",
"0.5984932",
"0.59832877",
"0.5975457",
"0.59711355",
"0.59711355",
"0.59711355",
"0.59630346",
"0.5939195",
"0.5936897",
"0.592577",
"0.5916116",
"0.59142506",
"0.590273",
"0.5901467",
"0.58873945",
"0.5886045",
"0.58824515",
"0.58824515",
"0.5875889",
"0.58448064",
"0.58439624",
"0.58399683",
"0.5837945",
"0.58370507",
"0.582856",
"0.5817257",
"0.58043134",
"0.5801646",
"0.58001906",
"0.58001906",
"0.57535696",
"0.5749888",
"0.5747396",
"0.5747068",
"0.5746523",
"0.57425904",
"0.5741748",
"0.5721681",
"0.5709159",
"0.57086796",
"0.56963116",
"0.56758565",
"0.56758565",
"0.5670765"
] | 0.0 | -1 |
Gets the string string "controller/method" for tempaltes | public static function getDefaultTemplate($controllerName, $methodName) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getTemplate()\r\n {\r\n $request = Registry::getInstance()->get('Request');\r\n\r\n return implode(\r\n DIRECTORY_SEPARATOR,\r\n array(\r\n APPLICATION_PATH,\r\n $this->templatePath,\r\n $request->getControllerName(),\r\n $request->getActionName() . $this->templateExtention\r\n )\r\n );\r\n }",
"protected function getActionTemplate() {\r\n\t\t\t$router = Core\\Includer::getRouter();\r\n\t\t\t$routeConf = $router->getRouteConfig(BasicFunctions::getRoute());\r\n\t\t\t$templateFile = $routeConf['template'];\r\n\t\t\t$templateFolder = $routeConf['module'];\r\n\t\t\t\t\r\n\t\t\treturn TEMPLATES_PATH . BasicFunctions::getSkin()\r\n\t\t\t\t. DIRECTORY_SEPARATOR . 'controller'\r\n\t\t\t\t. DIRECTORY_SEPARATOR . $templateFolder\r\n\t\t\t\t. DIRECTORY_SEPARATOR . $templateFile;\r\n }",
"public function getController() : string\n {\n return preg_replace($this->match, $this->replacement, $this->uri);\n }",
"public function getController() : string\n {\n return preg_replace($this->match, $this->replacement, $this->uri);\n }",
"public function getController() : string\n {\n return substr($this->uri, 0, -strlen($this->match)) .\n $this->replacement;\n }",
"public function getTemplate(): string;",
"public function getTemplate(): string;",
"public function getTemplate(): string;",
"public function getTemplate(): string;",
"function get_template($template){\n\n\t\t\t$login_arr = $this->action_parser($this->action,'template') ;\n\n\t\t\t$pos = array_search($template, $login_arr['template']['name']); \n\n\t\t\treturn $login_arr['template']['path'][$pos];\n\n\t\t}",
"private function getTemplate(): string\n {\n $sTemplate = $this->getViewPath() . static::TEMPLATE . static::TEMPLATE_EXT;\n if (!is_file($sTemplate)) {\n $sTemplate = $this->getViewRootDirectory();\n $sTemplate .= $this->getCurrentClassName() . DIRECTORY_SEPARATOR;\n $sTemplate .= static::TEMPLATE . static::TEMPLATE_EXT;\n if (!is_file($sTemplate)) {\n $sTemplate = $this->getViewRootDirectory();\n $sTemplate .= static::TEMPLATE . static::TEMPLATE_EXT;\n }\n }\n\n return $sTemplate;\n }",
"public function forTemplate() {\n\t\treturn $this->ActionName;\n\t}",
"public function get_template_name(){\n\n return str_replace(\"_\",\"\",str_replace(\"_page\", \"\", get_class($this))) . \".tpl\";\n }",
"public function getTemplateName()\n {\n }",
"function get_template($template)\n {\n $login_arr = $this->action_parser($this->action, 'template');\n $pos = array_search($template, $login_arr['template']['name']);\n return $login_arr['template']['path'][$pos];\n }",
"function get_template($template)\n {\n\n $login_arr = $this->action_parser($this->action, 'template');\n\n $pos = array_search($template, $login_arr['template']['name']);\n\n return $login_arr['template']['path'][$pos];\n }",
"protected function resolveViewTemplateName(): string\n {\n $controllerName = ltrim($this->request->getControllerName(), '\\\\');\n $namespaceParts = explode('\\\\', $controllerName);\n $controllerClassName = array_pop($namespaceParts);\n\n // Get rid of module name\n array_shift($namespaceParts);\n\n if (strtolower($namespaceParts[0]) == 'mvc') {\n array_shift($namespaceParts);\n }\n\n if (strtolower($namespaceParts[0]) == 'controller') {\n array_shift($namespaceParts);\n }\n\n $controllerClassName = str_replace('Controller', '', $controllerClassName);\n\n return\n $this->getTemplateDir() . implode(DIRECTORY_SEPARATOR, [\n '',\n 'Templates',\n implode('\\\\', $namespaceParts),\n ucfirst($controllerClassName),\n ucfirst($this->request->getControllerActionName())\n ]) . '.phtml';\n }",
"public static function getActionName()\r\n\t{\r\n\t\treturn TRequest::getCmd('controller');\r\n\t}",
"abstract public function getTemplateName();",
"protected function getTemplatePathAndFilename() {}",
"public function getTemplateName(): string;",
"public function __toString()\n {\n return\n $this->Request->getControllerName() . \"/\" .\n $this->Request->getActionName();\n }",
"public function getActionName()\n {\n return isset($this->action['controller']) ? $this->action['controller'] : 'Closure';\n }",
"function get_method() {\n $parts = explode('/', $this->request_uri);\n if (count($parts) > 3) {\n return $parts[3];\n }\n return 'index';\n }",
"protected function _getBasePath()\n {\n if (null === $this->_actionController) {\n return './views';\n }\n\n $inflector = $this->getInflector();\n $this->_setInflectorTarget($this->getViewBasePathSpec());\n\n $dispatcher = $this->getFrontController()->getDispatcher();\n $request = $this->getRequest();\n\n $parts = [\n 'module' => (($moduleName = $request->getModuleName()) != '') ? $dispatcher->formatModuleName($moduleName) : $moduleName,\n 'controller' => $request->getControllerName(),\n 'action' => $dispatcher->formatActionName($request->getActionName())\n ];\n\n return $inflector->filter($parts);\n }",
"function getTemplateFilename($t)\n{\n\treturn ARC_TEMPLATE_FS . $t . '.php';\n}",
"final public function getTemplate() {\n\t\treturn '';\n\t}",
"protected function getTemplatePath(): string\n {\n return str_replace(\n $this->app->basePath() . DIRECTORY_SEPARATOR,\n '',\n $this->app['config']['view.path']\n );\n }",
"public function getControllerActionName() {}",
"public function getTemplatePathAndFilename() {}",
"public function getViewTpl(){\n return $this->templates['view'];\n }",
"private function __fileContent()\n {\n return VIEWS . DS . $this->__paths['controller'] . DS . $this->__paths['action'] . '.php';\n }",
"public function getRouteName(): string\n {\n $path = str_replace(\"app/site/controllers/\", \"\", str_replace(\"\\\\\", \"/\", strtolower(get_class($this))));\n return str_replace(\"/\", \".\", trim($path, \"/\"));\n }",
"protected function getModuleTemplate() {\r\n\t\t\t$template = Core\\Factory::getTemplateObj();\r\n\t\t\t$router = Core\\Includer::getRouter();\r\n\t\t\t$routeConf = $router->getRouteConfig(BasicFunctions::getRoute());\r\n\t\t\t$templateFile = $routeConf['module'] . 'Module' . $template->templateExtension;\r\n\t\t\t$templateFolder = $routeConf['module'];\r\n\t\t\t\t\r\n\t\t\treturn TEMPLATES_PATH . BasicFunctions::getSkin()\r\n\t\t\t\t. DIRECTORY_SEPARATOR . 'controller'\r\n\t\t\t\t. DIRECTORY_SEPARATOR . $templateFolder\r\n\t\t\t\t. DIRECTORY_SEPARATOR . $templateFile;\r\n }",
"protected function _getTplName()\n {\n // assign template name\n $sTplName = oxRegistry::getConfig()->getRequestParameter('tpl');\n\n if ($sTplName) {\n // security fix so that you cant access files from outside template dir\n $sTplName = basename($sTplName);\n\n //checking if it is template name, not content id\n if (!getStr()->preg_match(\"/\\.tpl$/\", $sTplName)) {\n $sTplName = null;\n } else {\n $sTplName = 'message/' . $sTplName;\n }\n }\n\n return $sTplName;\n }",
"function getViewPath() {\r\n $view_value = $this->getView();\r\n if(is_array($view_value)) {\r\n $controller_name = array_var($view_value, 0, $this->engine->getDefaultControllerName());\r\n $view_name = array_var($view_value, 1, $this->engine->getDefaultActionName());\r\n } else {\r\n $controller_name = $this->getControllerName();\r\n $view_name = trim($view_value) == '' ? $this->getAction() : $view_value;\r\n } // if\r\n \r\n return $this->engine->getViewPath($view_name, $controller_name);\r\n }",
"function route_method(): string\n{\n return RouteController::getCurrentRoute()['method'] ?? '';\n}",
"protected function _getTemplateName()\n {\n $tag = $this->getTemplateTag();\n $lang = app()->getLocale();\n $fallbackLang = config('app.fallback_locale');\n\n $name = \"mail_{$tag}_{$lang}\";\n\n if (empty(setting($name))) return \"mail_{$tag}_{$fallbackLang}\";\n\n return $name;\n }",
"public function getActionTitle()\n {\n $path = explode('/', $this->controller);\n if(count($path) >= 2) {\n return array_pop($path);\n }\n else {\n return '';\n }\n }",
"public static function getControllerName()\r\n\t{\r\n\t\treturn TRequest::getCmd('controller');\r\n\t}",
"public function render()\n {\n return $this->getTemplateName();\n }",
"public function getControllerUrl(): string\n {\n if ($this->getRouteInfo() instanceof RouteInfo) {\n return $this->getUrl($this->getRouteInfo()->getRouteName(), $this->getRouteInfo()->getVars());\n }\n\n $path = str_replace(\"app/site/controllers/\", \"\", str_replace(\"\\\\\", \"/\", strtolower(get_class($this))));\n if (method_exists(static::class, 'getRoutePath')) {\n $path = call_user_func([static::class, 'getRoutePath']);\n if (is_string($path)) {\n $path = explode(\",\", $path);\n }\n $path = reset($path);\n\n if (method_exists(static::class, 'getRouteGroup')) {\n $path = call_user_func([static::class, 'getRouteGroup']) . '/' . $path;\n }\n\n $route_vars = [];\n if ($this->getRouteInfo() instanceof RouteInfo) {\n $route_vars = $this->getRouteInfo()->getVars();\n }\n\n foreach ($route_vars as $var_name => $value) {\n $regexp = \"/\\{\" . $var_name . Web::REGEXP_ROUTEVAR_EXPRESSION . \"\\}/i\";\n $path = preg_replace($regexp, $value, $path);\n }\n\n return $this->getWebRouter()->getBaseUrl() . $path;\n }\n\n $route_name = str_replace(\"/\", \".\", trim($path, \"/\"));\n return $this->getUrl($route_name);\n }",
"public function getControllerTitle()\n {\n if(strpos($this->controller, '/') >= 0) {\n return preg_replace(\"/\\/[\\w-_]+$/\", '', $this->controller);\n }\n else {\n return '';\n }\n }",
"public function getControllerName() {}",
"public function getFormTemplate(): string\n {\n return static::FORM_TEMPLATE;\n }",
"private function getCallerTemplate()\n {\n $template = ['value' => '', 'key' => 0];\n foreach ($this->backtrace as $k => $b) {\n $function = ifset($b, 'function', '');\n if (strpos($function, 'content_') !== false) {\n $file = basename($this->backtrace[$k - 1]['file']);\n $parts = explode('.', $file);\n if (ifset($parts, 1, '') == 'file') {\n unset($parts[0], $parts[1]);\n } else {\n unset($parts[0]);\n }\n $template_name = implode('.', $parts);\n $template_name = rtrim($template_name, '.php');\n $this->backtrace[$k - 1]['file'] = $template_name;\n $template['value'] = $template_name;\n $template['key'] = $k - 1;\n break;\n }\n }\n return $template;\n }",
"public function getFullName(){\n\t\treturn $this->templateSet->getFullName() . '/' . $this->name . $this->suffix;\n\t}",
"public function __toString()\n {\n return $this->viewTemplate;\n }",
"abstract protected function template(): string;",
"protected function template() {\n\t\treturn '';\n\t}",
"public function getJsTemplateName()\n {\n return addcslashes($this->getModel()->getTemplateCode(), \"\\\"\\r\\n\\\\\");\n }",
"function getTemplate($param){\r\n global $modx;\r\n\r\n $template = '';\r\n\r\n if ($modx->getChunk($param) != '') {\r\n $template = $modx->getChunk($param);\r\n } else if(substr($param, 0, 6) == '@FILE:') {\r\n $template = $this->get_file_contents(substr($param, 6));\r\n } else if(substr($param, 0, 6) == '@CODE:') {\r\n $template = substr($param, 6);\r\n } else if(substr($param, 0, 5) == '@FILE') {\r\n $template = $this->get_file_contents(trim(substr($param, 5)));\r\n } else if(substr($param, 0, 5) == '@CODE') {\r\n $template = trim(substr($param, 5));\r\n } else {\r\n $template = '';\r\n }\r\n\r\n return $template;\r\n }",
"protected function template_name() {\r\n return 'transportation/route_planner';\r\n }",
"static function locale() {\n return strtolower(str_replace('controllers\\\\', '', Route::$controller) . '/' . Route::$action);\n }",
"public static function getActionFunction()\n\t{\n\t\t$params = self::getAllURLParams();\n\t\t$pos = contrlPos + 1;\n\t\treturn (!empty($params[$pos])) ? $params[$pos] : 'index';\n\t}",
"function getTemplate();",
"function getTemplateName() {\n\t\treturn $this->templateName;\n\t}",
"function show_template($template) {\n\treturn templates . '/' . $template . '.php';\n}",
"public static function name()\n {\n $path = explode('\\\\', get_called_class());\n $controller_name = array_pop($path);\n return trim(str_replace(\"Controller\", \"\", $controller_name));\n }",
"public function getInspectTemplateName()\n {\n return $this->inspect_template_name;\n }",
"protected function getMethod(): string\n {\n return $this->getTwoStep() ? 'rest/registerPreAuth.do' : 'rest/register.do';\n }",
"public function getTempName() {}",
"private function getControllerName() {\n if(isset($_GET['c']) && !empty($_GET['c'])) {\n return $_GET['c'];\n }\n return Config::getDefaultController();\n }",
"public static function getControllerName()\r\n {\r\n $page = request::get('page', 'homepage'); \r\n\r\n // if a controller file exists with this name\r\n $file_name = $page . '.controller.php';\r\n $file_path = CONTROLLERS_DIR . '/' . $file_name;\r\n if(file_exists($file_path))\r\n {\r\n // return the path to that file\r\n return $page;\r\n }\r\n else\r\n {\r\n // return the path to the error 404 file\r\n return 'error404';\r\n }\r\n }",
"public function getReidentifyTemplateName()\n {\n return $this->reidentify_template_name;\n }",
"public function getControllerExtensionName() {}",
"public function getControllerExtensionName() {}",
"public function customerMethodsPartial(): string\n {\n return 'customermethods';\n }",
"public function getTemplate()\n {\n if ($this->getMethodCode() === Netresearch_OPS_Model_Payment_CcRedirect::CODE\n || $this->getMethodCode() === Netresearch_OPS_Model_Payment_DebitcardRedirect::CODE\n ) {\n return self::FRONTEND_TEMPLATE_CC_REDIRECT;\n }\n\n return self::FRONTEND_TEMPLATE_CC;\n }",
"public function getTemplateName()\n {\n // TODO: Implement getTemplateName() method.\n return 'Tem';\n }",
"public function getPath()\n {\n $controller = str_replace('\\\\', '/', $this->get('controller'));\n\n $path = (empty($controller) ? '' : $controller . '/') . $this->get('name') . '.' . $this->get('engine');\n\n return empty($this->parameters['bundle']) ? $path : '@' . $this->get('bundle') . '/resource/view/' . $path;\n }",
"public function getName()\n {\n return Craft::t('Controller Action');\n }",
"public function getControllerSimpleName()\n {\n return end(explode('\\\\', $this->controllerName));\n }",
"public function getController()\n {\n return ucfirst($this->controller).'Controller';\n }",
"function getTemplate( $atpl ) {\n\t$file_name = \"php/template/{$atpl}.php\";\n\tif (!file_exists($file_name)) return \"TEMPLATE: {$atpl}.{$lang} not found\";\n\treturn join(\"\", file($file_name));\n}",
"public function getActionMethod()\n {\n return array_last(explode('@', $this->getActionName()));\n }",
"protected function getResourceModelTemplate() : string\n {\n return static::TEMPLATE_RESOURCE_MODEL_TEMPLATE_SOURCE;\n }",
"public function actionGetTemplate(){\n $post = Yii::$app->getRequest()->post();\n echo file_get_contents(dirname(\\Yii::getAlias('@webroot')).'/frontend/views/templates/'.$post['template']);\n }",
"public function path()\n {\n try {\n return ($this->engine->getResolveTemplatePath())($this->name);\n } catch (TemplateNotFound $e) {\n return $e->paths()[0];\n }\n }",
"public function getMainTpl(){\n return $this->templates['main'];\n }",
"public function get_action_view()\n {\n if (empty($this->uri)) {\n $uri = lcfirst($this->request->controller()) . '/' . $this->request->action();\n $dir = lcfirst($this->request->directory());\n\n if (!empty($dir))\n $uri = $dir . '/' . $uri;\n\n $this->uri = $uri;\n unset($uri, $dir);\n }\n return $this->uri;\n }",
"public function getTemplateFilePath() {\n\t}",
"function route_pattern(): string\n{\n return RouteController::getCurrentRoute()['pattern'] ?? '';\n}",
"public function getTemplate() {}",
"public function getActionNm()\r\n {\r\n\t\t$tabInfo = $this->getPathInfo();\r\n\t\treturn $tabInfo[2];\r\n }",
"function _get_action()\n {\n $retval = preg_quote($this->object->param('action'), '/');\n $retval = strtolower(preg_replace(\"/[^\\\\w]/\", '_', $retval));\n return preg_replace(\"/_{2,}/\", \"_\", $retval) . '_action';\n }",
"function getRouteName();",
"function template(string $path){\n return 'views/templates/'.$path;\n}",
"public function template_path() {\n return apply_filters( 'iwj_template_path', 'iwj/' );\n }",
"private function getActionName()\n {\n return strtolower($this->_request->getActionName());\n }",
"public function getInstanceView($template = '') {\n return implode('/', [$this->api->instance_parameter, $template]);\n }",
"public function getControllerPath()\n {\n return $this->getUrl('randomproduct/index/index');\n }",
"public function getControllerFileName() // \"controller/ContactosController.php\"\n {\n\n return 'controller/' . $this->getControllerClassName().'.php';\n\n }",
"public static function routeName() : string\n {\n return str_replace('app_http_actions_', '', snake_case(str_replace('\\\\', '', static::class)));\n }",
"public static function getCurrentRoute() {\t\t\n\t\t$route = self::$controller.'/'.self::$method;\n\t\tif( !empty(self::$parameters) ) {\n\t\t\t$route .= '/'.implode('/', self::$parameters);\n\t\t}\n\t\t\n\t\treturn $route;\n\t}",
"protected function _compile_controller_info()\n\t{\n\t\t$output = \"\\n\\n\";\n\t\t$output .= \"\\n\";\n\t\t$output .= '<h4>'.$this->CI->lang->line('profiler_controller_info').'</h4>';\n\t\t$output .= \"\\n\";\n\n\t\t$output .= \"<div>\".$this->CI->router->fetch_class().\"/\".$this->CI->router->fetch_method().\"</div>\";\n\n\t\treturn $output;\n\t}",
"protected function getControllerTemplatePath()\n {\n return __DIR__.'/../Generators/templates/scaffold/controller.txt';\n }",
"public function getBaseControllerName(): string;",
"public function GetControllerAction () {\n\t\treturn $this->controller . ':' . $this->action;\n\t}",
"public function getBaseRouteName(): string;",
"private function getTemplateConfigPath(): string\n {\n return $this->_type === 'price'\n ? self::XML_PATH_EMAIL_PRICE_TEMPLATE\n : self::XML_PATH_EMAIL_STOCK_TEMPLATE;\n }"
] | [
"0.69938076",
"0.67720014",
"0.64068085",
"0.64068085",
"0.6397738",
"0.62549055",
"0.62549055",
"0.62549055",
"0.62549055",
"0.6229369",
"0.6221983",
"0.6206318",
"0.6201155",
"0.60911167",
"0.6085353",
"0.6024694",
"0.602256",
"0.59858596",
"0.5982624",
"0.5938506",
"0.59365195",
"0.5932787",
"0.5931394",
"0.58920085",
"0.5885395",
"0.5871075",
"0.58643967",
"0.5854269",
"0.5848609",
"0.58444947",
"0.58263314",
"0.58224314",
"0.58023036",
"0.57936686",
"0.5776265",
"0.57739514",
"0.5741206",
"0.573684",
"0.573618",
"0.5727382",
"0.57251734",
"0.5705217",
"0.57046",
"0.57022583",
"0.5698496",
"0.56958365",
"0.5693509",
"0.56849635",
"0.56804675",
"0.5677645",
"0.56641936",
"0.5662193",
"0.56497294",
"0.5649563",
"0.5647029",
"0.56127703",
"0.5607723",
"0.56012857",
"0.5600613",
"0.55940604",
"0.55899566",
"0.5587162",
"0.5575479",
"0.55753076",
"0.55706763",
"0.55610454",
"0.55610454",
"0.55591667",
"0.5544905",
"0.554374",
"0.553579",
"0.55337846",
"0.5530267",
"0.5526934",
"0.55255944",
"0.55214876",
"0.55156827",
"0.5513967",
"0.55101943",
"0.55053675",
"0.550448",
"0.5501135",
"0.5500915",
"0.54966044",
"0.549056",
"0.5490418",
"0.5488771",
"0.54811496",
"0.54781055",
"0.54769796",
"0.547554",
"0.5472095",
"0.5460314",
"0.5458766",
"0.5457504",
"0.5454614",
"0.5441855",
"0.54413843",
"0.54383403",
"0.5437113",
"0.54281384"
] | 0.0 | -1 |
Display a listing of the resource. | public function viewBlocks()
{
$title = 'Welcome to Laravel!';
return view('blocks.view-blocks')->with('title',$title);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }",
"public function listing();",
"function index() {\n\t\t$this->show_list();\n\t}",
"public function actionList() {\n $this->_getList();\n }",
"public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }",
"public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }",
"public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }",
"function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}",
"public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }",
"public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }",
"public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}",
"function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}",
"public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }",
"public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}",
"public function actionRestList() {\n\t $this->doRestList();\n\t}",
"public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}",
"public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }",
"public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }",
"public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}",
"public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}",
"public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }",
"public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }",
"public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }",
"public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }",
"public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}",
"public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }",
"public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}",
"public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }",
"public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }",
"public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }",
"public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}",
"public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }",
"public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }",
"public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }",
"public function index()\n {\n return Resources::collection(Checking::paginate());\n }",
"public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }",
"public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }",
"public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }",
"public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }",
"public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }",
"public function view(){\n\t\t$this->buildListing();\n\t}",
"public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }",
"public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }",
"public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }",
"public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }",
"public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }",
"public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }",
"public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }",
"public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }",
"public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }",
"public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}",
"public function listAction() {}",
"public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }",
"public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }",
"public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }",
"public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }",
"public function executeList()\n {\n $this->setTemplate('list');\n }",
"public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }",
"function listing() {\r\n\r\n }",
"public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }",
"public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }",
"public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}",
"public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }",
"public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }",
"public function _index(){\n\t $this->_list();\n\t}",
"public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}",
"function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}",
"public function index()\n {\n $this->booklist();\n }",
"public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }",
"public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }",
"public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }",
"public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }",
"public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }",
"public function indexAction() {\n $this->_forward('list');\n }",
"public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }",
"public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }",
"public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}",
"public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }",
"public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }",
"public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }",
"public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }",
"public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }",
"public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}",
"public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }",
"public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }",
"public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }",
"public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}",
"public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }",
"public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }",
"public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }",
"public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }",
"public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }",
"public function index()\n {\n return view('admin.resources.index');\n }",
"public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}"
] | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.6830523",
"0.6802689",
"0.6797",
"0.67957735",
"0.67871135",
"0.6760129",
"0.67427456",
"0.6730486",
"0.67272323",
"0.67255723",
"0.67255723",
"0.67255723",
"0.67177945",
"0.6707866",
"0.6706713",
"0.6704375",
"0.6664782",
"0.6662871",
"0.6660302",
"0.6659404",
"0.6656656",
"0.6653517",
"0.6647965",
"0.6620322",
"0.66185474",
"0.6618499",
"0.6606105",
"0.6600617",
"0.65996987",
"0.6594775",
"0.6587389",
"0.6585109",
"0.6581641",
"0.6581017",
"0.6577157",
"0.65747666",
"0.6572513",
"0.65721947",
"0.6570553",
"0.65646994",
"0.6563556",
"0.6554194",
"0.65529937",
"0.65460825",
"0.65368485",
"0.653429",
"0.65328294",
"0.6526759",
"0.6526695",
"0.6526284",
"0.65191334",
"0.65183175",
"0.65174305",
"0.651703",
"0.65141153",
"0.6507088",
"0.65061647",
"0.6504046",
"0.64942145",
"0.6491893",
"0.64883405",
"0.6486392",
"0.6485077",
"0.64846045",
"0.6478858",
"0.64756656",
"0.64726377",
"0.6471126",
"0.64701074",
"0.6467418",
"0.6462195",
"0.64618355",
"0.6459199",
"0.6457831",
"0.6454631",
"0.64533997",
"0.6451915",
"0.6450861",
"0.6449301",
"0.64492667",
"0.64469045"
] | 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view('resource.create');\n }",
"public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}",
"public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }",
"public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }",
"public function create()\n {\n return view ('forms.create');\n }",
"public function create ()\n {\n return view('forms.create');\n }",
"public function create()\n\t{\n\t\treturn view('faith.form');\n\t}",
"public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }",
"public function create()\n {\n return view(\"request_form.form\");\n }",
"public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }",
"public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle école'\n\t\t) ) );\n\t}",
"public function create()\n {\n return view($this->forms . '.create');\n }",
"public function create()\n {\n return view('restful.add');\n }",
"public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }",
"public function create()\n {\n return view('admin.createform');\n }",
"public function create()\n {\n return view('admin.forms.create');\n }",
"public function create()\n {\n return view('backend.student.form');\n }",
"public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function create()\n {\n return view('client.form');\n }",
"public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }",
"public function create()\n {\n return view('Form');\n }",
"public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }",
"public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}",
"public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }",
"public function create()\n {\n return view('backend.schoolboard.addform');\n }",
"public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}",
"public function create()\n {\n return view('rests.create');\n }",
"public function create()\n {\n //\n return view('form');\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return view(\"Add\");\n }",
"public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }",
"public function create(){\n return view('form.create');\n }",
"public function create()\n {\n\n return view('control panel.student.add');\n\n }",
"public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}",
"public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }",
"public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }",
"public function create()\n {\n return $this->cView(\"form\");\n }",
"public function create()\n {\n return view(\"dresses.form\");\n }",
"public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}",
"public function createAction()\n {\n// $this->view->form = $form;\n }",
"public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }",
"public function create()\n {\n return view('fish.form');\n }",
"public function create()\n {\n return view('users.forms.create');\n }",
"public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }",
"public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}",
"public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }",
"public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }",
"public function create()\n {\n return view('essentials::create');\n }",
"public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }",
"public function create()\n {\n return view('student.add');\n }",
"public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}",
"public function create()\n {\n return view('url.form');\n }",
"public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }",
"public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}",
"public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }",
"public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function create()\n {\n return view('crud/add'); }",
"public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}",
"public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view(\"List.form\");\n }",
"public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}",
"public function create()\n {\n //load create form\n return view('products.create');\n }",
"public function create()\n {\n return view('article.addform');\n }",
"public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }",
"public function create()\n {\n return view('saldo.form');\n }",
"public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}",
"public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}",
"public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }",
"public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }",
"public function create()\n {\n return view('admin.inverty.add');\n }",
"public function create()\n {\n return view('Libro.create');\n }",
"public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n return view(\"familiasPrograma.create\");\n }",
"public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}",
"public function create()\n {\n return view(\"create\");\n }",
"public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}",
"public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n return view('forming');\n }",
"public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }",
"public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }",
"public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }",
"public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }",
"public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}",
"public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}",
"public function create()\n {\n return view('student::students.student.create');\n }",
"public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }"
] | [
"0.75921303",
"0.75921303",
"0.7586987",
"0.75781953",
"0.756992",
"0.7498765",
"0.7435984",
"0.74298537",
"0.7385191",
"0.7350131",
"0.7336855",
"0.73092943",
"0.72943234",
"0.72800833",
"0.7271207",
"0.7241119",
"0.7229479",
"0.7222803",
"0.71828884",
"0.7176647",
"0.71718425",
"0.7147017",
"0.7141053",
"0.7140619",
"0.7135868",
"0.71249235",
"0.7119748",
"0.7112556",
"0.7112556",
"0.7112556",
"0.7109539",
"0.7090914",
"0.70832956",
"0.70798624",
"0.70769805",
"0.7055401",
"0.7055401",
"0.7053132",
"0.70386326",
"0.7036245",
"0.7033728",
"0.70319915",
"0.70278865",
"0.7024346",
"0.7024193",
"0.7018092",
"0.70155334",
"0.70024955",
"0.7001018",
"0.69984865",
"0.6992834",
"0.69919723",
"0.6991958",
"0.698738",
"0.6985118",
"0.6963932",
"0.6963807",
"0.6954235",
"0.6949909",
"0.69488865",
"0.6946491",
"0.69428456",
"0.6939259",
"0.69382834",
"0.6935725",
"0.69354814",
"0.69354814",
"0.693212",
"0.69308144",
"0.6926547",
"0.6924849",
"0.69206136",
"0.69165045",
"0.69125223",
"0.69093955",
"0.6908298",
"0.69078946",
"0.69061583",
"0.69020784",
"0.6900573",
"0.68988043",
"0.689839",
"0.6892676",
"0.6891245",
"0.6890285",
"0.6890285",
"0.6890134",
"0.6890082",
"0.6886797",
"0.68860483",
"0.68844056",
"0.68816763",
"0.6879666",
"0.6876824",
"0.6874674",
"0.68706644",
"0.6870515",
"0.68691623",
"0.68690854",
"0.6868035",
"0.6867788"
] | 0.0 | -1 |
Store a newly created resource in storage. | public function store(Request $request)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store($data, Resource $resource);",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }",
"public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }",
"public function createStorage();",
"public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"function storeAndNew() {\n $this->store();\n }",
"public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }",
"public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }",
"public function store()\n\t{\n\t\t\n\t\t//\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}"
] | [
"0.72865677",
"0.7145327",
"0.71325725",
"0.6640912",
"0.66209733",
"0.65685713",
"0.652643",
"0.65095705",
"0.64490104",
"0.637569",
"0.63736665",
"0.63657933",
"0.63657933",
"0.63657933",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437"
] | 0.0 | -1 |
Display the specified resource. | public function show($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }",
"private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }",
"function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}",
"public function show(ResourceSubject $resourceSubject)\n {\n //\n }",
"public function show(ResourceManagement $resourcesManagement)\n {\n //\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function retrieve(Resource $resource);",
"public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }",
"public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function show(Dispenser $dispenser)\n {\n //\n }",
"public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }",
"public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}",
"public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }",
"function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}",
"public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }",
"public function get(Resource $resource);",
"public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }",
"public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }",
"function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}",
"public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }",
"function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}",
"public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function show(rc $rc)\n {\n //\n }",
"public function show(Resolucion $resolucion)\n {\n //\n }",
"public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show(Resena $resena)\n {\n }",
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }",
"public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}",
"public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }",
"public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }",
"public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }",
"public function display()\n\t{\n\t\tparent::display();\n\t}",
"public function get_resource();",
"public function show()\n\t{\n\t\t\n\t}",
"function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}",
"public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }",
"public function display($title = null)\n {\n echo $this->fetch($title);\n }",
"public function display(){}",
"public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}",
"public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}",
"public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }",
"#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}",
"public function display() {\n echo $this->render();\n }",
"public function show($id)\n\t{\n\t//\n\t}",
"public function show($id)\n\t{\n\t//\n\t}",
"function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }",
"public function show($id)\n {\n //\n $this->_show($id);\n }",
"public function show()\n\t{\n\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {}",
"static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}",
"public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}",
"public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }",
"public abstract function display();",
"abstract public function resource($resource);",
"public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show(Response $response)\n {\n //\n }",
"public function show()\n {\n return auth()->user()->getResource();\n }",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}"
] | [
"0.8233718",
"0.8190437",
"0.6828712",
"0.64986944",
"0.6495974",
"0.6469629",
"0.6462615",
"0.6363665",
"0.6311607",
"0.62817234",
"0.6218966",
"0.6189695",
"0.61804265",
"0.6171014",
"0.61371076",
"0.61207956",
"0.61067593",
"0.6105954",
"0.6094066",
"0.6082806",
"0.6045245",
"0.60389996",
"0.6016584",
"0.598783",
"0.5961788",
"0.59606946",
"0.5954321",
"0.59295714",
"0.59182066",
"0.5904556",
"0.59036547",
"0.59036547",
"0.59036547",
"0.5891874",
"0.58688277",
"0.5868107",
"0.58676815",
"0.5851883",
"0.58144855",
"0.58124036",
"0.58112013",
"0.5803467",
"0.58012545",
"0.5791527",
"0.57901084",
"0.5781528",
"0.5779676",
"0.5757105",
"0.5756208",
"0.57561266",
"0.57453394",
"0.57435393",
"0.57422745",
"0.5736634",
"0.5736634",
"0.5730559",
"0.57259274",
"0.5724891",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5718969",
"0.5713412",
"0.57091093",
"0.5706405",
"0.57057405",
"0.5704541",
"0.5704152",
"0.57026845",
"0.57026845",
"0.56981397",
"0.5693083",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962"
] | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function edit()\n {\n return view('hirmvc::edit');\n }",
"public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}",
"public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }",
"public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}",
"public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }",
"public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }",
"private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }",
"public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }",
"public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}",
"public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }",
"public function edit($model, $form);",
"function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}",
"public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}",
"public function edit()\n { \n return view('admin.control.edit');\n }",
"public function edit(Form $form)\n {\n //\n }",
"public function edit()\n {\n return view('common::edit');\n }",
"public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\r\n {\r\n return view('petro::edit');\r\n }",
"public function edit($id)\n {\n // show form edit user info\n }",
"public function edit()\n {\n return view('escrow::edit');\n }",
"public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }",
"public function edit()\n {\n return view('commonmodule::edit');\n }",
"public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit(form $form)\n {\n //\n }",
"public function actionEdit($id) { }",
"public function edit()\n {\n return view('admincp::edit');\n }",
"public function edit()\n {\n return view('scaffold::edit');\n }",
"public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }",
"public function edit()\n {\n return view('Person.edit');\n }",
"public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }",
"public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}",
"public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }",
"public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}",
"public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }",
"public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }",
"public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }",
"function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}",
"public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"protected function _edit(){\n\t\treturn $this->_editForm();\n\t}",
"public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }",
"public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }",
"public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}",
"public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}",
"public function edit($id)\n {\n return view('models::edit');\n }",
"public function edit()\n {\n return view('home::edit');\n }",
"public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }",
"public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }",
"public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }",
"public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('consultas::edit');\n }",
"public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }",
"public function edit()\n {\n return view('dashboard::edit');\n }",
"public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }",
"public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }",
"public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }",
"public function edit() {\n return view('routes::edit');\n }",
"public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }",
"public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('cataloguemodule::edit');\n }",
"public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }",
"public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }",
"public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }",
"public function edit()\n {\n return view('website::edit');\n }",
"public function edit()\n {\n return view('inventory::edit');\n }",
"public function edit()\n {\n return view('initializer::edit');\n }",
"public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }",
"public function edit($id)\n {\n return view('backend::edit');\n }",
"public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }",
"public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }",
"public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}",
"public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }",
"public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }",
"public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }",
"public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }",
"public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}"
] | [
"0.78550774",
"0.7692893",
"0.7273195",
"0.7242132",
"0.7170847",
"0.70622855",
"0.7053459",
"0.6982539",
"0.69467914",
"0.6945275",
"0.6941114",
"0.6928077",
"0.69019294",
"0.68976134",
"0.68976134",
"0.6877213",
"0.68636996",
"0.68592185",
"0.68566656",
"0.6844697",
"0.68336326",
"0.6811471",
"0.68060875",
"0.68047357",
"0.68018645",
"0.6795623",
"0.6791791",
"0.6791791",
"0.6787701",
"0.67837197",
"0.67791027",
"0.677645",
"0.6768301",
"0.6760122",
"0.67458534",
"0.67458534",
"0.67443407",
"0.67425704",
"0.6739898",
"0.6735328",
"0.6725465",
"0.6712817",
"0.6693891",
"0.6692419",
"0.6688581",
"0.66879624",
"0.6687282",
"0.6684741",
"0.6682786",
"0.6668777",
"0.6668427",
"0.6665287",
"0.6665287",
"0.66610634",
"0.6660843",
"0.66589665",
"0.66567147",
"0.66545695",
"0.66527975",
"0.6642529",
"0.6633056",
"0.6630304",
"0.6627662",
"0.6627662",
"0.66192114",
"0.6619003",
"0.66153085",
"0.6614968",
"0.6609744",
"0.66086483",
"0.66060555",
"0.6596137",
"0.65950733",
"0.6594648",
"0.65902114",
"0.6589043",
"0.6587102",
"0.65799844",
"0.65799403",
"0.65799177",
"0.657708",
"0.65760696",
"0.65739626",
"0.656931",
"0.6567826",
"0.65663105",
"0.65660435",
"0.65615267",
"0.6561447",
"0.6561447",
"0.65576506",
"0.655686",
"0.6556527",
"0.6555543",
"0.6555445",
"0.65552044",
"0.65543956",
"0.65543705",
"0.6548264",
"0.65475875",
"0.65447706"
] | 0.0 | -1 |
Update the specified resource in storage. | public function update(Request $request, $id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }",
"public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }",
"public function update(Request $request, Resource $resource)\n {\n //\n }",
"public function updateStream($resource);",
"public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }",
"protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }",
"public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }",
"public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}",
"public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }",
"public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }",
"protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }",
"public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }",
"public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }",
"public function update($path);",
"public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }",
"public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }",
"public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}",
"public function updateStream($path, $resource, Config $config)\n {\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }",
"public function update($data) {}",
"public function update($data) {}",
"public function putStream($resource);",
"public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function update($entity);",
"public function update($entity);",
"public function setResource($resource);",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }",
"public function isUpdateResource();",
"public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }",
"public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }",
"public function store($data, Resource $resource);",
"public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }",
"public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }",
"public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }",
"public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }",
"public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }",
"public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }",
"public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }",
"public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }",
"public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }",
"public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }",
"public function update(Qstore $request, $id)\n {\n //\n }",
"public function update(IEntity $entity);",
"public function update($request, $id);",
"protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }",
"function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}",
"public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }",
"protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }",
"public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }",
"abstract public function put($data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function testUpdateSupplierUsingPUT()\n {\n }",
"public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }",
"public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }",
"public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }",
"public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }",
"public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }",
"public abstract function update($object);",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }",
"public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }",
"public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }",
"public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }",
"public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }",
"public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }",
"public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }",
"public function update($entity)\n {\n \n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }",
"public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }",
"public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }",
"public function update($id, $input);",
"public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }",
"public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}",
"public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }",
"public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }",
"public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }",
"public function update($id);",
"public function update($id);",
"public function put($path, $data = null);",
"public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }",
"private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }",
"public function update(Entity $entity);",
"public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }",
"public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }",
"public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }",
"public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }",
"public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }",
"public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }"
] | [
"0.7423347",
"0.70622426",
"0.70568657",
"0.6896551",
"0.65835553",
"0.64519453",
"0.6348333",
"0.6212436",
"0.61450946",
"0.6122591",
"0.6114199",
"0.6101911",
"0.60876113",
"0.60528636",
"0.60177964",
"0.6006609",
"0.59725446",
"0.594558",
"0.59395295",
"0.5938792",
"0.5893703",
"0.5862337",
"0.58523124",
"0.58523124",
"0.5851579",
"0.5815571",
"0.58067423",
"0.5750728",
"0.5750728",
"0.5736541",
"0.5723664",
"0.5715135",
"0.56949675",
"0.5691129",
"0.56882757",
"0.5669375",
"0.5655524",
"0.56517446",
"0.5647158",
"0.5636521",
"0.563466",
"0.5632965",
"0.56322825",
"0.56291395",
"0.56202215",
"0.56087196",
"0.56020856",
"0.5591966",
"0.5581127",
"0.5581055",
"0.558085",
"0.5575458",
"0.55706805",
"0.55670804",
"0.55629116",
"0.5562565",
"0.5558853",
"0.5558505",
"0.5558505",
"0.5558505",
"0.5558505",
"0.5558505",
"0.555572",
"0.5555007",
"0.5553948",
"0.5553837",
"0.5553147",
"0.55429846",
"0.5541925",
"0.5540208",
"0.5539145",
"0.5536157",
"0.55350804",
"0.5534241",
"0.5523782",
"0.5518406",
"0.55147856",
"0.5513397",
"0.550961",
"0.55072165",
"0.55067354",
"0.5503418",
"0.5501671",
"0.55010796",
"0.54998124",
"0.5497327",
"0.54942787",
"0.54942036",
"0.54942036",
"0.54935455",
"0.549267",
"0.5491964",
"0.5489983",
"0.54833627",
"0.54794145",
"0.5478835",
"0.5478348",
"0.5465178",
"0.54648995",
"0.54607797",
"0.54571307"
] | 0.0 | -1 |
Remove the specified resource from storage. | public function destroy($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }",
"public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }",
"public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }",
"public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }",
"protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }",
"public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }",
"public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }",
"public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}",
"public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}",
"public function delete(): void\n {\n unlink($this->getPath());\n }",
"public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }",
"public function remove($path);",
"function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}",
"public function delete(): void\n {\n unlink($this->path);\n }",
"private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }",
"public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function remove() {}",
"public function remove() {}",
"public function remove();",
"public function remove();",
"public function remove();",
"public function remove();",
"function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}",
"public function deleteImage(){\n\n\n Storage::delete($this->image);\n }",
"public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }",
"public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}",
"public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }",
"public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }",
"public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}",
"public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }",
"public function deleteImage(){\n \tStorage::delete($this->image);\n }",
"public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }",
"public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }",
"public function destroy($id)\n {\n Myfile::find($id)->delete();\n }",
"public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }",
"public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }",
"public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }",
"public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }",
"public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }",
"public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }",
"public function delete($path);",
"public function delete($path);",
"public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }",
"public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }",
"public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }",
"public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }",
"public function delete($path, $data = null);",
"public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }",
"public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }",
"public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }",
"public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }",
"public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }",
"public function del($path){\n\t\treturn $this->remove($path);\n\t}",
"public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }",
"public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}",
"public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }",
"public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }",
"public function revoke($resource, $permission = null);",
"public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }",
"function delete($path);",
"public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}",
"public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }",
"public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }",
"public function remove($filePath){\n return Storage::delete($filePath);\n }",
"public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }",
"public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }",
"public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }",
"public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }",
"function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }",
"public function remove($id);",
"public function remove($id);",
"public function deleted(Storage $storage)\n {\n //\n }",
"public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }",
"public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }",
"public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }",
"public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }",
"function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}",
"public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }",
"public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}",
"public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }",
"public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }"
] | [
"0.6672584",
"0.6659381",
"0.6635911",
"0.6632799",
"0.6626075",
"0.65424126",
"0.65416265",
"0.64648265",
"0.62882507",
"0.6175931",
"0.6129922",
"0.60893893",
"0.6054415",
"0.60428125",
"0.60064924",
"0.59337646",
"0.5930772",
"0.59199584",
"0.5919811",
"0.5904504",
"0.5897263",
"0.58962846",
"0.58951396",
"0.58951396",
"0.58951396",
"0.58951396",
"0.5880124",
"0.58690923",
"0.5863659",
"0.5809161",
"0.57735413",
"0.5760811",
"0.5753559",
"0.57492644",
"0.5741712",
"0.57334286",
"0.5726379",
"0.57144034",
"0.57096",
"0.5707689",
"0.5705895",
"0.5705634",
"0.5703902",
"0.5696585",
"0.5684331",
"0.5684331",
"0.56780374",
"0.5677111",
"0.5657287",
"0.5648262",
"0.5648085",
"0.5648012",
"0.5640759",
"0.5637738",
"0.5629985",
"0.5619264",
"0.56167465",
"0.5606877",
"0.56021434",
"0.5601949",
"0.55992156",
"0.5598557",
"0.55897516",
"0.5581397",
"0.5566926",
"0.5566796",
"0.55642897",
"0.55641",
"0.5556583",
"0.5556536",
"0.5550097",
"0.5543172",
"0.55422723",
"0.5540013",
"0.5540013",
"0.55371785",
"0.55365825",
"0.55300397",
"0.552969",
"0.55275744",
"0.55272335",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.5525997",
"0.5525624",
"0.5523911",
"0.5521122",
"0.5517412"
] | 0.0 | -1 |
proses tambah berhasil langsung dialihkan | public function add($data){
$this->db->insert('tbl_petugas', $data);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function tambah()\n\t{\n\t\t$data['departemen'] = $this->Mdepartemen->tampil_departemen();\n\t\t//mengambil data dari fungsi tampil_pegawai\n\t\t$data['pegawai'] = $this->Mpegawai->tampil_pegawai();\n\t\t//mengambil data dari fungsi tampil_kategori\n\t\t$data['kategori'] = $this->Mkategori->tampil_kategori();\n\t\t//mengambil data dari fungsi tampil_hardware\n\t\t$data['hardware'] = $this->Mhardware->tampil_hardware();\n\n\t\t$data['judul'] = \"Form Tambah Hardware\";\n\t\t//Menampilkan form tambahhardware\n\t\t$this->theme->set_ui(\"admin/tambahhardware\", $data);\n\n\t\t//menyimpan inputan dari form tambahhardware\n\t\t$inputan = $this->input->post();\n\n\t\t//jika ada inputan dari form\n\t\tif($inputan)\n\t\t{\n\t\t\t//menjalankan fungsi simpan_hardware\n\t\t\t$this->Mhardware->simpan_hardware($inputan);\n\n\t\t\tredirect(\"admin/hardware\");\n\t\t}\n\t\t\n\n\t}",
"function tambah_pelanggan(){\n\t\t$data = array(\n\t\t\t'kd_pelanggan' => $this->input->post('kd_pelanggan'),\n\t\t\t'nm_pelanggan' => $this->input->post('nm_pelanggan'),\n\t\t\t'alamat' => $this->input->post('alamat'),\n\t\t\t'email' => $this->input->post('email'), \n\t\t);\n\t\t$this->model_app->insertData('tbl_pelanggan',$data);\n\t\tredirect('master_pelanggan');\n\t}",
"public function tambah()\n {\n $data['userdata'] = $this->userdata;\n\n $data['page'] = \"Tambah\";\n $data['judul'] = \"Data Nasabah\";\n $data['deskripsi'] = \"Manage Data Nasabah\";\n\n $data['jenisID'] = $this->M_nasabah->jenisID();\n\n $data['majelis'] = $this->M_nasabah->majelis();\n $data['petugas'] = $this->M_nasabah->petugas();\n $data['sektor_usaha'] = $this->M_nasabah->sektor_usaha();\n $data['kantor'] = $this->M_nasabah->kantor();\n $data['agama'] = $this->M_nasabah->agama();\n $data['status_nikah'] = $this->M_nasabah->status_nikah();\n\n $data['desa'] = $this->M_nasabah->desa();\n $data['kecamatan'] = $this->M_nasabah->kecamatan();\n $data['kota_kab'] = $this->M_nasabah->kota_kab();\n $data['provinsi'] = $this->M_nasabah->provinsi();\n\n $this->template->views('nasabah/tambah_nasabah', $data);\n }",
"public function tambah_toko(){\n\t}",
"public function tambahsoal()\n\t{\n\t\t$data['title'] = 'Tambah Soal';\n\t\t$data['listmapel'] = $this->m_admin->list_mapel()->result();\n\t\t$data['listkelas'] = $this->m_admin->list_kelas()->result();\n\t\t$data['listguru'] = $this->m_admin->list_guru()->result();\n\n\t\t$this->header($data);\n\t\t$this->load->view('tambahsoal');\n\t\t$this->load->view('template/footer');\n\t}",
"public function tambah()\n\t{\n\t\t$this->session->set_userdata('aksi', 'tambah');\n\t\t$data['level'] = $this->session->userdata('level');\n\n\t\t$id_pembeli = $this->input->get('id');\n\t\t$data['data_pembeli'] = $this->mpembeli->get_edit_pembeli($id_pembeli);\n\t\t$this->session->set_flashdata('token', $this->input->get('token'));\n\t\t$data['get_token2'] = $this->input->get('id');\n\n\t\t$this->load->view('page/admin/tema/head',$data);\n\t\t$this->load->view('page/admin/tema/menu');\n\t\t$this->load->view('page/admin/alamat/tambah_halaman');\n\t\t$this->load->view('page/admin/tema/footer');\n\t}",
"public function tambah_aksi(){\n\t\t$this->simple_login->checkLogin();\n\n\t\t$this->_rule();\n\n\t\tif ($this->form_validation->run() == FALSE) {\n\t\t\t$data['title'] = 'Tambah Pengguna';\n\n\t\t\t$this->view('admin/user/tambah', $data, FALSE);\n\n\t\t}else{\n\t\t\t$data = [\n\t\t\t\t'nama' \t\t\t=> htmlspecialchars($this->input->post('nama', true)),\n\t\t\t\t'email' \t\t=> htmlspecialchars($this->input->post('email', true)),\n\t\t\t\t'username' \t\t=> htmlspecialchars($this->input->post('username', true)),\n\t\t\t\t'password' \t\t=> SHA1($this->input->post('password')),\n\t\t\t\t'alamat' \t\t=> htmlspecialchars($this->input->post('alamat', true)),\n\t\t\t\t'telp' \t\t=> htmlspecialchars($this->input->post('telp', true)),\n\t\t\t\t'akses_level' \t=> 2,\n\t\t\t\t'active'\t\t=> 1,\n\t\t\t\t'tanggal_daftar' => time(),\n\t\t\t\t'tanggal_update' => time(),\n\t\t\t\t'foto' => 'default.jpg'\n\t\t\t];\n\t\t\t$this->user_model->inputDataPengguna('users', $data);\n\t\t\t$this->session->set_flashdata('pesan', '<div class=\"alert alert-success\" role=\"alert\">Data Pelanggan Berhasil Di tambahkan! </div>');\n\t\t\tredirect('admin/user');\n\t\t}\t\n\t}",
"public function tambah()\n {\n $row_id = $this->M_isipaket->getId()->num_rows();\n // mengambil 1 baris data terakhir\n $old_id = $this->M_isipaket->getId()->row();\n\n if($row_id>0){\n // melakukan auto number dari id terakhir\n $id = $this->primslib->autonumber($old_id->id_isi_paket, 3, 12);\n }else{\n // generate id pertama kali jika tidak ada data sama sekali di dalam database\n $id = 'IPT000000000001';\n }\n\n $created_by = \"admin\";\n $created_at = date('Y-m-d H:i:s');\n \n\n // merekam data yang dikirim melalui form\n $data = array(\n 'id_isi_paket' => $id,\n 'nama_isi_paket' => $this->input->post('nama_isi_paket'),\n 'keterangan' => $this->input->post('keterangan', true),\n 'status' => $this->input->post('status'),\n 'created_by' => $created_by,\n 'created_at' => $created_at\n );\n\n // menjalankan fungsi insert pada model_promo untuk menambah data ke database\n $this->M_isipaket->insert($data, 'isi_paket');\n // mengirim pesan berhasil dihapus\n $this->session->set_flashdata('pesan', '\n <div class=\"alert alert-success alert-dismissible fade show\" role=\"alert\">\n <strong>Selamat!</strong> Anda berhasil menambahkan data.\n <button type=\"button\" class=\"close py-auto\" data-dismiss=\"alert\" aria-label=\"Close\">\n <span aria-hidden=\"true\">×</span>\n </button>\n </div>\n ');\n // mengarahkan ke halaman tabel promo\n redirect('admin/C_isipaket');\n }",
"public function tambah(){\n $this->template->views('crud/tambah_mahasiswa'); //untuk menampilkan view tambah_mahasiswa\n }",
"public function tambah($data){\n\t\t$this->db->insert('pinjam_uang', $data);\n\t}",
"public function tambah_dok()\n {\n $id_pros = $this->uri->segment(3);\n\n $data = ['aktif' => 'prospektus',\n 'id_pros' => $id_pros\n ];\n\n $this->template->load('template', 'prospektus/V_tambah_dok', $data);\n }",
"public function prosesTambah()\n {\n $siswa = [\n 'nama' => $this->input->post('nama', true),\n 'alamat' => $this->input->post('alamat', true),\n 'nis' => $this->input->post('nis', true),\n 'kelas' => $this->input->post('kelas', true),\n 'jk' => $this->input->post('jk', true),\n 'no_hp' => $this->input->post('no_hp', true)\n\n ];\n $data = $this->siswa->insert_siswa($siswa);\n }",
"function tambah()\n {\n $site = $this->Konfigurasi_model->listing();\n $data = array(\n 'title' => 'Action | ' . $site['nama_website'],\n 'favicon' => $site['favicon'],\n 'site' => $site,\n );\n $this->load->library('form_validation');\n $this->form_validation->set_rules('nama_action', 'Nama Action', 'required');\n if ($this->form_validation->run()) {\n\n $params = array(\n 'nama_action' => $this->input->post('nama_action'),\n );\n $this->Config_model->input_data($params);\n redirect('admin/config/action');\n } else {\n $this->template->load('alayout/template', 'admin/config/add', $data);\n }\n }",
"function tambah_aksi()\n\t\t{\n\t\t\t$data=array(\n\t\t\t\t// 'tanggal'=>$this->input->post('tanggal'),\n\t\t\t\t'tanggal'=>date('Y-m-d'),\n\t\t\t\t'nama'=>$this->input->post('nama'),\n\t\t\t\t'mail'=>$this->input->post('mail'),\n\t\t\t\t'website'=>$this->input->post('website'),\n\t\t\t\t'comment'=>$this->input->post('comment'),\n\n\t\t\t);\n\t\t\t$this->user_model->tambah_data($data);\n\t\t//untuk balik kehalaman mahasiswa\n\t\t\tredirect(site_url('testimoni'));\n\t\t}",
"public function actionTambah()\n {\n $this->layout = '//layouts/box_kecil';\n $model = new Menu;\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['Menu'])) {\n $model->attributes = $_POST['Menu'];\n if ($model->save())\n $this->redirect(['ubah', 'id' => $model->id]);\n }\n\n $this->render('tambah', [\n 'model' => $model,\n ]);\n }",
"public function modelDoAdd(){\n\t\t\t$tenphongban = $_POST[\"tenphongban\"];\n\t\t\t//lay bien ket noi de thao tac csdl\n\t\t\t$conn = Connection::getInstance();\n\t\t\t//chuan bi truy van\n\t\t\t$query = $conn->prepare(\"insert into phongban set tenphongban=:ten\");\n\t\t\t$query->execute(array(\"ten\"=>$tenphongban));\n\t\t}",
"function tambahPeminjaman($nama,$NIM,$Tgl_Peminjaman,$Tgl_Kembali,$Nama_Lab,$Nama_Barang,$Keterangan) {\n\t\n $query = \"INSERT INTO Peminjaman(nama,NIM,Tgl_Peminjaman,Tgl_Kembali,Nama_Lab,Nama_Barang,Keterangan) VALUES ('$nama','$NIM','$Tgl_Peminjaman','$Tgl_Kembali','$Nama_Lab', '$Nama_Barang', '$Keterangan')\";\n $hasil = mysql_query($query);\n\n if ($hasil)\n\t\t echo \"<div class='alert alert-block alert-success'><strong><i></i> DATA BERHASIL DI SIMPAN</strong></div>\";\n\n else\n echo \"<div class='alert alert-block alert-danger'><strong><i></i> DATA GAGAL DI UPDATE</strong></div>\";\n\t\t}",
"public function tambahTransaksiBantuan(){\n\t\t$id_jenis_bantuan = $this->input->post('id_jenis_bantuan');\n\t\t$nik = $this->input->post('nik');\n\t\t$id_surat = $this->input->post('id_surat');\n\t\t$transaksiBantuan = array();\n\t\t$updateSurat = array();\n\n\t\tforeach ($nik as $nik) {\n\t\t\tarray_push($transaksiBantuan, array(\n\t\t\t\t'id_jenis_bantuan' => $id_jenis_bantuan,\n\t\t\t\t'NIK' => $nik\n\t\t\t));\n\t\t}\n\n\t\tforeach ($id_surat as $id_surat) {\n\t\t\tarray_push($updateSurat, array(\n\t\t\t\t'id_surat' => $id_surat,\n\t\t\t\t'persetujuan' => 'Disetujui'\n\t\t\t));\n\t\t}\n\t\t\n\t\t$this->load->model('list_FilterSurat');\n\t\t$tambahkanData = $this->list_FilterSurat->insertBanyak('transaksi_bantuan', $transaksiBantuan);\n\t\t$update = $this->list_FilterSurat->updateBanyak('surat', $updateSurat);\n\t\tif ($update){\n\t\t\techo 1;\n\t\t}\n\t\telse {\n\t\t\techo 0;\n\t\t}\n\t}",
"function TambahDataTemplatePesan()\n\t{\n\t\tinclude '../../koneksi/koneksi.php';\n\n\t\t//inisialisasi\n\t\t$jenis = $_POST['jenis'];\n\t\t$isi = $_POST['isi'];\n\n\t\t//insert ke tabel pesan\n\t\t$sql = \"INSERT INTO pesan (jenis, isi) VALUES(?, ?)\";\n\t\t$stmt = $db->prepare($sql);\n\t\t$stmt->bind_param('ss', $jenis, $isi);\n\t\tif($stmt->execute()){\n\t\t\t$stmt->insert_id;\n\t\t\t$_SESSION['status_operasi_tp'] = \"berhasil_menyimpan\";\n\t\t}else{\n\t\t\t$_SESSION['status_operasi_tp'] = \"gagal_menyimpan\";\n\t\t}\n\t\t$stmt->close();\n\t}",
"public function tambah()\n\t{\n\t\t$this->session->set_userdata('aksi', 'tambah');\n\t\t$data['level'] = $this->session->userdata('level');\n\n\t\t$this->load->view('page/admin/tema/head',$data);\n\t\t$this->load->view('page/admin/tema/menu');\n\t\t$this->load->view('page/admin/sliders/tambah_halaman');\n\t\t$this->load->view('page/admin/tema/footer');\n\t}",
"public function prosesTambah() {\n\t\t$this->form_validation->set_rules('Nama', 'Nama', 'trim|required');\n\t\t$this->form_validation->set_rules('Alamat', 'Alamat', 'trim|required');\n\t\t$this->form_validation->set_rules('Telepon', 'Telepon', 'trim|required');\n\n\t\t$data \t= $this->input->post();\n\t\tif ($this->form_validation->run() == TRUE) {\n\t\t\t$result = $this->M_dpetani->insert($data);\n\n\t\t\tif ($result > 0) {\n\t\t\t\t$out['status'] = '';\n\t\t\t\t$out['msg'] = show_succ_msg('Data Petani Berhasil ditambahkan', '20px');\n\t\t\t} else {\n\t\t\t\t$out['status'] = '';\n\t\t\t\t$out['msg'] = show_err_msg('Data Petani Gagal ditambahkan', '20px');\n\t\t\t}\n\t\t} else {\n\t\t\t$out['status'] = 'form';\n\t\t\t$out['msg'] = show_err_msg(validation_errors());\n\t\t}\n\n\t\techo json_encode($out);\n\t}",
"public function tambah_produk() {\n $dataInputan = array(\n 'nama' => $this->input->post('nama'),\n 'deskripsi' => $this->input->post('deskripsi'),\n 'harga' => $this->input->post('harga'),\n 'stok' => $this->input->post('stok'),\n 'gambar' => $this->modelToko->_uploadImage('gambar'),\n );\n\n $this->modelToko->masukkan('product', $dataInputan);\n redirect(base_url().\"index.php/admin\");\n }",
"public function tambahSiswa()\n {\n $data = [\n 'nis' => htmlspecialchars($this->input->post('nis')),\n 'nama' => htmlspecialchars($this->input->post('nama')),\n 'jurusan' => htmlspecialchars($this->input->post('jurusan')),\n 'tahun_masuk' => htmlspecialchars($this->input->post('tahun-masuk'))\n ];\n $this->db->insert('siswa', $data);\n }",
"public function tambahBarangMasuk()\n {\n //kelas all() berfungsi untuk mengambil semua data pada table bahan baku tanpa terkecuali\n $getBahan = BahanBakuModel::all();//ambil semua data bahan baku\n $header = 'TAMBAH BAHAN BAKU';//setting header\n $breadcrumb = '<li>Transaksi</li><li>Bahan Masuk</li><li class=\"active\">Tambah Bahan Masuk</li>';//setting breadcrumb\n \n //cara membuat ID otomatis\n $getId = collect(\\DB::select(\"select * from tbl_barang_masuk order by id_transaksi desc limit 1\"))->first();//mengambil ID Transaksi yang terakhir\n\n if (!empty($getId)) {\n $num = (int) substr($getId->id_transaksi,3);\n if ($num < 9) {\n $idTransaksi = 'TR-0000'.($num + 1);\n }else if ($num < 99) {\n $idTransaksi = 'TR-000'.($num + 1);\n }else if ($num < 999) {\n $idTransaksi = 'TR-00'.($num + 1);\n }else if ($num < 9999) {\n $idTransaksi = 'TR-0'.($num + 1);\n }else if ($num < 99999) {\n $idTransaksi = 'TR-'.($num + 1);\n }\n }else{\n $idTransaksi = 'TR-00001';\n }\n\n //baris terakhir untuk membuat ID otomatis\n\n //akses view tambah barang masuk beserta parsing data\n return view('tambah_barang_masuk',[\n 'header' => $header,\n 'getBahan' => $getBahan,\n 'idTransaksi' => $idTransaksi,\n 'breadcrumb' => $breadcrumb\n ]);\n }",
"public function tambah(){\n\t\t//$data['grup'] = $this->sinisa_model->getgrup()->result();\n\t\t//$data['user'] = $this->sinisa_model->getAll()->result();\n\t\t$this->load->view('crud/pengajuan_view');\n\t}",
"public function tambah_agama(){\n\t\t$data['ambil_profil_usp']=$this->Tu_model->Select_satu('tbl_profil_usp', 'aktif', 'Ya');\n $data['title'] = \"Agama\";\n $data['target_tambah'] = 'tambah_agama';\n $data['target_kembali'] = 'agama';\n $data['aksi'] = 'Data Agama';\n $this->load->view('tu/head', $data);\n $this->load->view('tu/profile');\n $this->load->view('tu/side_menu');\n $this->load->view('tu/top_nav');\n $this->load->view('tu/add_agama');\n\n if($this->input->method() === 'post') {\n $id_agama = $this->input->post('txtID');\n $simpan['id_agama'] =$id_agama;\n $simpan['agama'] = $this->input->post('txtAgama');\n if($this->Tu_model->Simpan_Content('tbl_agama',$simpan)){\n $data[\"status\"] = \"sukses\";\n $this->load->view('tu/modal_tambah',$data);\n }else{\n $data[\"status\"] = \"error\";\n $this->load->view('tu/modal_tambah');\n }\n\n }\n $this->load->view('tu/footer');\n $this->load->view('tu/js_file');\n $this->load->view('tu/js_mask');\n $this->load->view('tu/end_page');\n }",
"public function tambahJamKerja()\n {\n $cek = $this->jamKerjaModel->where('id_jabatan', $this->request->getVar('id_jabatan'))->first();\n if (!empty($cek) == false) {\n $data = [\n 'jam_kerja_masuk' => $this->request->getVar('jam_kerja_masuk'),\n 'jam_kerja_keluar' => $this->request->getVar('jam_kerja_keluar'),\n 'id_jabatan' => $this->request->getVar('id_jabatan'),\n 'status_aktif' => $this->request->getVar('status_aktif'),\n 'status_jam_kerja' => $this->request->getVar('status_jam_kerja')\n ];\n\n\n $this->jamKerjaModel->insert($data);\n session()->setFlashdata('pesan', 'Jam kerja berhasil ditambah');\n } else {\n session()->setFlashdata('pesan', '<span class=\"text-danger\">Jam kerja sudah ada</span>');\n }\n return redirect()->to(base_url().'/admin/daftarJamKerja/');\n }",
"public function create()\n {\n //KEMUDIAN DI DALAMNYA KITA MENJALANKAN FUNGSI UNTUK MENGOSONGKAN FIELD\n $this->resetFields();\n //DAN MEMBUKA MODAL\n $this->openModal();\n }",
"protected function tambah(Request $request)\n {\n $input =$request->all();\n $pesan = array(\n \t'nisn_siswa.required' \t=> 'NISN Siswa dibutuhkan.', \t \n 'id_mapel.required' \t=> 'ID Mata Pelajaran dibutuhkan.', \n 'id_ujian.required' \t=> 'ID Ujian dibutuhkan.', \n 'nilai_ujian.required' \t=> 'Nilai Ujian dibutuhkan.', \n \n );\n\n $aturan = array(\n 'nisn_siswa' \t=> 'required', \n 'id_mapel' \t=> 'required',\n 'id_ujian' \t=> 'required', \n 'nilai_ujian' \t=> 'required', \n ); \n\n $validator = Validator::make($input,$aturan, $pesan);\n\n if($validator->fails()) {\n # Kembali kehalaman yang sama dengan pesan error\n return Redirect::back()->withErrors($validator)->withInput();\n }\n # Bila validasi sukses\n\n $nilai_ujian = new NilaiUjian;\n $nilai_ujian->nisn_siswa = $request['nisn_siswa'];\n $nilai_ujian->id_mapel \t= $request['id_mapel'];\n $nilai_ujian->id_ujian \t= $request['id_ujian'];\n $nilai_ujian->nilai_ujian = $request['nilai_ujian'];\n \n //melakukan save, jika gagal (return value false) lakukan harakiri\n //error kode 500 - internel server error\n if (! $nilai_ujian->save() )\n App::abort(500);\n\n Session::flash('flash_message', 'Data Nilai Ujian \"'.$request['nisn_siswa'].'\" Berhasil disimpan.');\n\n return Redirect::action('Admin\\NilaiUjianController@index');\n }",
"public function add()\n\t{\n\t\t$data = [\n\t\t\t'BatasNilaiBawah2' => $this->input->post('batas_bawah2'),\n\t\t\t'BatasNilaiAtas2' => $this->input->post('batas_atas2'),\n\t\t\t'PredikatHasil2' => $this->input->post('predikat_hasil2'),\n\t\t\t'KetHasil2' => $this->input->post('ket_hasil2'),\n\t\t];\n\t\t$this->Predikat_hasil2_M->addPredikatHasil2($data);\n\t\t$this->session->set_flashdata('pesan', 'Berhasil ditambahkan!');\n\t\tredirect('nilai/predikat_hasil2');\n\t}",
"public function tambah()\r\n\t{\t\r\n\t\t$this->form_validation->set_rules('id_users', 'Anggota', 'required');\r\n\t\t$this->form_validation->set_rules('id_kwarran', 'Kwarran', 'required');\r\n\t\t$this->form_validation->set_rules('jml_pinjaman', 'Besar Pinjaman', 'required');\r\n\t\t$this->form_validation->set_rules('bsr_bunga', 'BUnga', 'required');\r\n\t\t$this->form_validation->set_rules('lama_angsuran', 'Lama Angsuran', 'required');\r\n\t\t$this->form_validation->set_rules('tgl', 'Tanggal', 'required|trim|xss_clean');\r\n\t\tif ($this->form_validation->run() == FALSE)\r\n\t\t{\r\n\t\t\t$data['propinsi'] = $this->db->get('kwarran');\r\n\t\t\t$this->load->view('admin/pinjaman_tambah', $data);\t\r\n\t\t}else{\r\n\t\t\t$data_pinjaman = array(\r\n\t\t\t\t\t'id_kwarran'\t=> set_value('id_kwarran'),\r\n\t\t\t\t\t'id_users'\t\t=> set_value('id_users'),\r\n\t\t\t\t\t'jml_pinjaman'\t=> set_value('jml_pinjaman'),\r\n\t\t\t\t\t'bsr_bunga'\t\t=> set_value('bsr_bunga'),\r\n\t\t\t\t\t'lama_angsuran'\t=> set_value('lama_angsuran'),\r\n\t\t\t\t\t'tgl'\t\t\t=> set_value('tgl'),\r\n\t\t\t\t\t'status'\t\t=> 'Belum Lunas'\r\n\t\t\t\t);\r\n\t\t\t\t$this->model_pinjaman->tambah_pinjaman($data_pinjaman);\r\n\t\t\t\t$this->session->set_flashdata('add','<div class=\"alert alert-success\"><i class=\"fa fa-exclamation-circle\" aria-hidden=\"true\"></i> Data berhasil ditambah</div>');\r\n\t\t\t\tredirect('pinjaman');\t\t\r\n\t\t}\r\n\t}",
"public function tambah()\n\t{\n\t\t$previllage = 1;\n\t\tcheck_super_user($this->session->tipe_user,$previllage);\n\n\t\t//Load librarynya dulu\n\t\t$this->load->library('form_validation');\n\t\t//Atur validasinya\n\t\t$this->form_validation->set_rules('soal', 'soal', 'min_length[5]');\n\t\t$this->form_validation->set_rules('pil_a', 'pil_a', 'min_length[1]|max_length[60]');\n\t\t$this->form_validation->set_rules('pil_b', 'pil_b', 'min_length[1]|max_length[60]');\n\t\t$this->form_validation->set_rules('pil_c', 'pil_c', 'min_length[1]|max_length[60]');\n\t\t$this->form_validation->set_rules('pil_d', 'pil_d', 'min_length[1]|max_length[60]');\n\t\t$this->form_validation->set_rules('pil_e', 'pil_e', 'min_length[1]|max_length[60]');\n\n\t\t//Pesan yang ditampilkan\n\t\t$this->form_validation->set_message('min_length', '{field} Setidaknya minimal {param} karakter.');\n\t\t$this->form_validation->set_message('max_length', '{field} Seharusnya maksimal {param} karakter.');\n\t\t$this->form_validation->set_message('is_unique', 'Data sudah ada');\n\t\t//Tampilan pesan error\n\t\t$this->form_validation->set_error_delimiters('<span class=\"badge badge-danger\">', '</span>');\n\n\t\tif ($this->form_validation->run() == FALSE) {\n\t\t\t$data['menu'] = \"Tambah Data Soal\";\n\t\t\t$this->templateadmin->load('template/dashboard','soal/tambah',$data);\n\t } else {\n\t $post = $this->input->post(null, TRUE);\t \n\t $this->soal_m->simpan($post);\n\n\t if ($this->db->affected_rows() > 0) {\n\t \t$this->session->set_flashdata('success','Berhasil Disimpan');\n\t }\t\n\t \tredirect('soal');\t \t\n\t }\n\t}",
"protected function tambah(array $data)\n {\n\n $sabuk = new Sabuk();\n $sabuk->sabukKode = $data['sabukKode'];\n $sabuk->sabukNama = $data['sabukNama'];\n\n //melakukan save, jika gagal (return value false) lakukan harakiri\n //error kode 500 - internel server error\n if (! $sabuk->save() )\n App::abort(500);\n }",
"function tambah($koneksi){\n\t\n\tif (isset($_POST['btn_simpan'])){\n\t\t$nik = $_POST['nik'];\n\t\t$id_jk = $_POST['id_jk'];\n\t\t$nm_saksi = $_POST['nm_saksi'];\n\t\t$alamat = $_POST['alamat'];\n\t\t$temp_lahir = $_POST['temp_lahir'];\n\t\t$desa = $_POST['desa'];\n\t\t$tgl_lahir = $_POST['tgl_lahir'];\n\t\t$kecamatan = $_POST['kecamatan'];\n\t\t$pekerjaan = $_POST['pekerjaan'];\n\t\t$kabupaten = $_POST['kabupaten'];\n\t\t$agama = $_POST['agama'];\n\n\t\t\n\t\tif(!empty($nik) && !empty($id_jk) && !empty($nm_saksi) && !empty($alamat) && !empty($temp_lahir)){\n\n\t\t\t$sql =\"INSERT INTO saksi\n (nik_saksi,id_jk,nama_saksi,alamat_saksi,temp_lahir_saksi,desa_saksi,tgl_lahir_saksi,kecamatan_saksi,pekerjaan_saksi,kabupaten_saksi,agama_saksi)\n VALUES('$nik','$id_jk','$nm_saksi','$alamat','$temp_lahir','$desa','$tgl_lahir','$kecamatan','$pekerjaan','$kabupaten','$agama')\";\n\n\t\t\t$simpan = mysqli_query($koneksi, $sql);\n\t\t\tif($simpan && isset($_GET['aksi'])){\n\t\t\t\tif($_GET['aksi'] == 'create'){\n\t\t\t\t\techo \"<meta http-equiv='refresh' content='1;url=entri_saksi.php'>\";\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$pesan = \"Tidak dapat menyimpan, data belum lengkap!\";\n\t\t}\n\t}\n\n\t?> \n\t<div class=\"row\" style=\"margin-top: -400px;\">\n\n\t\t<div class=\"col-xl-12\">\n\n\t\t<form action=\"\" method=\"POST\">\n\t\t\t<div class=\"form-row\">\n<!-- \t\t\t\t\t<fieldset> -->\n\t\t\t\t\t\t<div class=\"table-responsive\">\n\t\t\t\t\t\t\t<table class=\"table table-responsive-sm table-hover\">\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td colspan=\"4\">\n\t\t\t\t\t\t\t\t\t\t<ol class=\"breadcrumb\">\n\t\t\t\t <li class=\"breadcrumb-item active\">\n\t\t\t\t <a href=\"<?= base_url('admin/pemb_berkas');?>\"> Berkas</a>\n\t\t\t\t </li>\n\t\t\t\t <li class=\"breadcrumb-item active\">\n\t\t\t\t <a href=\"<?= base_url('admin/pemb_berkas/dokumen');?>\"> Dokumen</a>\n\t\t\t\t </li>\n\t\t\t\t <li class=\"breadcrumb-item active\">\n\t\t\t\t <a href=\"<?= base_url('admin/pemb_berkas/dokumen/entri/entri_pemohon.php');?>\"> Entri</a>\n\t\t\t\t </li>\n\t\t\t\t <li class=\"breadcrumb-item active float-right\">\n\t\t\t\t <a href=\"<?= base_url('admin/pemb_berkas/dokumen/entri/entri_pemohon.php');?>\"> Cetak Risalah Panitia</a>\n\t\t\t\t </li>\n\t\t\t\t </ol>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td colspan='4'>\n\t\t\t\t\t\t\t\t\t\t<h3 class=\"text-center\">RISALAH PENELITIAN DATA YURIDIS</h3>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t<tr>\t\n\t\t\t\t\t\t\t\t\t\t<td colspan='1'></td>\n\t\t\t\t\t\t\t\t\t\t<td>Desa/Kelurahan </td>\n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"desa_kel\" required /></td>\n\t\t\t\t\t\t\t\t\t\t<td colspan='1'></td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td colspan='1'></td>\n\t\t\t\t\t\t\t\t\t\t<td>NIB</td> \n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"nib\" required /></label></td>\n\t\t\t\t\t\t\t\t\t\t<td colspan='1'></td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td colspan='1'></td>\n\t\t\t\t\t\t\t\t\t\t<td>No. Berkas Yuridis </td> \n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"no_yuri\" required/></td>\n\t\t\t\t\t\t\t\t\t\t<td colspan='1'></td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td colspan='1'></td>\n\t\t\t\t\t\t\t\t\t\t<td>Petugas Yuridis</td> \n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t\t<select name=\"id_petugas\" required>\n\t\t\t\t\t\t\t\t\t\t \t<?php \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$datajenis_kelamin = array();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$sql = mysqli_query($koneksi, \"SELECT * FROM jenis_kelamin\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twhile ($jenis_kelamin = mysqli_fetch_assoc($sql)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t $datajenis_kelamin[] = $jenis_kelamin;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t <option disabled selected value=\"\">-Pilih Petugas Yuridis-</option>\n\t\t\t\t\t\t\t\t\t\t <?php foreach ($datajenis_kelamin as $key => $value):?>\n\t\t\t\t\t\t\t\t\t\t <option value=\"<?= $value[\"id_jk\"] ?>\"><?= $value[\"nama_jk\"] ?></option>\n\t\t\t\t\t\t\t\t\t\t <?php endforeach ?>\n\t\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t<td colspan='1'></td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td colspan='4'>\n\t\t\t\t\t\t\t\t\t\t<p class=\"text-center font-weight-bold\">IDENTIFIKASI BIDANG TANAH YANG BERKEPENTNGAN</p>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Nama Pemohon </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"number\" name=\"nik\" required /></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Jenis Pemohon </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"jenis_pemohon\" required />\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Pekerjaan </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"pekerjaan\" required /></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Alamat Pemohon :</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Badan Hukum </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<select name=\"id_bh\" required>\n\t\t\t\t\t\t\t\t\t\t \t<?php \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$datajenis_kelamin = array();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$sql = mysqli_query($koneksi, \"SELECT * FROM jenis_kelamin\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twhile ($jenis_kelamin = mysqli_fetch_assoc($sql)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t $datajenis_kelamin[] = $jenis_kelamin;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t <option disabled selected value=\"\">-Pilih Badan Hukum-</option>\n\t\t\t\t\t\t\t\t\t\t <?php foreach ($datajenis_kelamin as $key => $value):?>\n\t\t\t\t\t\t\t\t\t\t <option value=\"<?= $value[\"id_jk\"] ?>\"><?= $value[\"nama_jk\"] ?></option>\n\t\t\t\t\t\t\t\t\t\t <?php endforeach ?>\n\t\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Desa </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"desa2\" required /></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Akta Pendirian : </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Kecamatan </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"rext\" name=\"kecamatan\" required /></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>No. Akta Pendirian </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"kabupaten\" required /></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Kabupaten </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"rext\" name=\"kabupaten\" required /></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Tgl. Akta Pendirian </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"date\" name=\"tgl_akta_pendirian\" required /></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td colspan='4'>\n\t\t\t\t\t\t\t\t\t\t<p class=\"text-center font-weight-bold\">DATA TENTANG KEPEMILIKAN DAN PENGUASAAN HAK ATAS TANAH</p>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td colspan='4'>\n\t\t\t\t\t\t\t\t\t\t<p class=\"font-weight-bold\">Bukti-Bukti kepemilikan/Penguasaan :</p>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Sertipikat : </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Pelelangan :</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Nomor Sertipikat </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"no_sertipikat\" required /></td>\n\t\t\t\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>No. Risalah Lelang </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"no_rlelang\" required /></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Tanggal Sertipikat </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"date\" name=\"tgl_sertipikat\" required /></td>\n\t\t\t\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Tgl. Risalah Lelang </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"date\" name=\"tgl_rlelang\" required /></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Tempat dan Nama Kantor Lelang </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"tempat_kantor_lelang\" required /></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Warisan : </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Nama Pewaris </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"nm_pewaris\" required /></td>\n\t\t\t\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Putusan Pemberian Hak :</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Meninggal Tahun </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"tahun_meninggal\" required /></td>\n\t\t\t\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Jabatan Yang Memutuskan</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>: <input type=\"text\" name=\"jabatan_yg_memutuskan\" required /></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Surat Keterangan :</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>No. Surat Keputusan</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>: <input type=\"text\" name=\"no_surat_keputusan\" required /></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\t\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Waris </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<select name=\"id_waris\" required>\n\t\t\t\t\t\t\t\t\t\t \t<?php \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$datajenis_kelamin = array();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$sql = mysqli_query($koneksi, \"SELECT * FROM jenis_kelamin\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twhile ($jenis_kelamin = mysqli_fetch_assoc($sql)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t $datajenis_kelamin[] = $jenis_kelamin;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t <option disabled selected value=\"\">-Pilih Waris-</option>\n\t\t\t\t\t\t\t\t\t\t <?php foreach ($datajenis_kelamin as $key => $value):?>\n\t\t\t\t\t\t\t\t\t\t <option value=\"<?= $value[\"id_jk\"] ?>\"><?= $value[\"nama_jk\"] ?></option>\n\t\t\t\t\t\t\t\t\t\t <?php endforeach ?>\n\t\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Tgl. Surat Keputusan</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>: <input type=\"date\" name=\"tgl_surat_keputusan\" required /></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\t\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Wasiat </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<select name=\"id_wasiat\" required>\n\t\t\t\t\t\t\t\t\t\t \t<?php \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$datajenis_kelamin = array();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$sql = mysqli_query($koneksi, \"SELECT * FROM jenis_kelamin\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twhile ($jenis_kelamin = mysqli_fetch_assoc($sql)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t $datajenis_kelamin[] = $jenis_kelamin;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t <option disabled selected value=\"\">-Pilih Wasiat-</option>\n\t\t\t\t\t\t\t\t\t\t <?php foreach ($datajenis_kelamin as $key => $value):?>\n\t\t\t\t\t\t\t\t\t\t <option value=\"<?= $value[\"id_jk\"] ?>\"><?= $value[\"nama_jk\"] ?></option>\n\t\t\t\t\t\t\t\t\t\t <?php endforeach ?>\n\t\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Persyaratan</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>: \n\t\t\t\t\t\t\t\t\t\t\t<select name=\"id_persyaratan\" required>\n\t\t\t\t\t\t\t\t\t\t \t<?php \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$datajenis_kelamin = array();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$sql = mysqli_query($koneksi, \"SELECT * FROM jenis_kelamin\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twhile ($jenis_kelamin = mysqli_fetch_assoc($sql)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t $datajenis_kelamin[] = $jenis_kelamin;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t <option disabled selected value=\"\">-Pilih Persyaratan-</option>\n\t\t\t\t\t\t\t\t\t\t <?php foreach ($datajenis_kelamin as $key => $value):?>\n\t\t\t\t\t\t\t\t\t\t <option value=\"<?= $value[\"id_jk\"] ?>\"><?= $value[\"nama_jk\"] ?></option>\n\t\t\t\t\t\t\t\t\t\t <?php endforeach ?>\n\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\t\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Surat Keterangan Meninggal </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<select name=\"id_stm\" required>\n\t\t\t\t\t\t\t\t\t \t<?php \n\t\t\t\t\t\t\t\t\t\t\t\t\t$datajenis_kelamin = array();\n\t\t\t\t\t\t\t\t\t\t\t\t\t$sql = mysqli_query($koneksi, \"SELECT * FROM jenis_kelamin\");\n\t\t\t\t\t\t\t\t\t\t\t\t\twhile ($jenis_kelamin = mysqli_fetch_assoc($sql)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t $datajenis_kelamin[] = $jenis_kelamin;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t <option disabled selected value=\"\">-Pilih Suket-</option>\n\t\t\t\t\t\t\t\t\t <?php foreach ($datajenis_kelamin as $key => $value):?>\n\t\t\t\t\t\t\t\t\t <option value=\"<?= $value[\"id_jk\"] ?>\"><?= $value[\"nama_jk\"] ?></option>\n\t\t\t\t\t\t\t\t\t <?php endforeach ?>\n\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Hibah/Pemberian : </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Perwakafan :</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Dilakukan Dengan </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<select name=\"id_dk\" required>\n\t\t\t\t\t\t\t\t\t \t<?php \n\t\t\t\t\t\t\t\t\t\t\t\t\t$datajenis_kelamin = array();\n\t\t\t\t\t\t\t\t\t\t\t\t\t$sql = mysqli_query($koneksi, \"SELECT * FROM jenis_kelamin\");\n\t\t\t\t\t\t\t\t\t\t\t\t\twhile ($jenis_kelamin = mysqli_fetch_assoc($sql)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t $datajenis_kelamin[] = $jenis_kelamin;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t <option disabled selected value=\"\">-Pilih-</option>\n\t\t\t\t\t\t\t\t\t <?php foreach ($datajenis_kelamin as $key => $value):?>\n\t\t\t\t\t\t\t\t\t <option value=\"<?= $value[\"id_jk\"] ?>\"><?= $value[\"nama_jk\"] ?></option>\n\t\t\t\t\t\t\t\t\t <?php endforeach ?>\n\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>No. Akta Pengganti Ikrar Wakaf </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"no_akta_pengganti\" required /></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>No. Alash Hak </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"no_alas_hak\" required /></td>\n\t\t\t\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Tgl. Akta Pengganti Ikrar Wakaf </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"date\" name=\"tgl_akta_pengganti\" required /></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Tgl. Alash Hak </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"date\" name=\"tgl_alas_hak\" required /></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Nama Pembuat Alas Hak</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"nm_pembuat_ahak\" required /></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Lain - Lain :</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>No. Alash Hak</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"no_alas_hak2\" required /></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Hibah/Pemberian :</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Tgl. Alash Hak</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"tgl_alas_hak2\" required /></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Dilakukan Dengan </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<select name=\"id_dk\" required>\n\t\t\t\t\t\t\t\t\t \t<?php \n\t\t\t\t\t\t\t\t\t\t\t\t\t$datajenis_kelamin = array();\n\t\t\t\t\t\t\t\t\t\t\t\t\t$sql = mysqli_query($koneksi, \"SELECT * FROM jenis_kelamin\");\n\t\t\t\t\t\t\t\t\t\t\t\t\twhile ($jenis_kelamin = mysqli_fetch_assoc($sql)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t $datajenis_kelamin[] = $jenis_kelamin;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t <option disabled selected value=\"\">-Pilih-</option>\n\t\t\t\t\t\t\t\t\t <?php foreach ($datajenis_kelamin as $key => $value):?>\n\t\t\t\t\t\t\t\t\t <option value=\"<?= $value[\"id_jk\"] ?>\"><?= $value[\"nama_jk\"] ?></option>\n\t\t\t\t\t\t\t\t\t <?php endforeach ?>\n\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Nama Pembuat Alas Hak</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"nm_pembuat_ahak2\" required /></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>No. Alash Hak </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"no_alas_hak3\" required /></td>\n\t\t\t\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Nama Alas Hak</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"nm_alas_hak\" required /></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Tgl. Alash Hak </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"date\" name=\"tgl_alas_hak3\" required /></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Nama Pembuat Alas Hak</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"nm_pembuat_ahak3\" required /></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td colspan='4'>\n\t\t\t\t\t\t\t\t\t\t<p class=\"font-weight-bold\">Bukti Perpajakan</p>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Petok D/Letter C, Girik, ketikir :</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Nomor</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"no_bp\" required /></td>\n\t\t\t\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>IPEDA / PBB / SPPT :</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Tanggal </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"date\" name=\"tgl_bp\" required /></td>\n\t\t\t\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>NOP PBB</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"nop_pbb\" required /></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Kantor yang menerbitkan</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"kantor_ym\" required /></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Tgl. PBB</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"date\" name=\"tgl_pbb\"></td>\n\t\t\t\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Verponding Indonesia : </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Lain – lain sebutkan </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Nomor</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"no_vi\" required /></td>\n\t\t\t\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Nama :</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"nm_ll\"></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Tanggal </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"date\" name=\"tgl_vi\" required /></td>\n\t\t\t\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Nomor</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>: <input type=\"text\" name=\"no_ll\" required /></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Kantor yang menerbitkan :</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"kantor_vi\"></td>\n\t\t\t\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Tanggal</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>: <input type=\"date\" name=\"tgl_ll\" required /></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td colspan='4'>\n\t\t\t\t\t\t\t\t\t\t<p class=\"font-weight-bold\">Kenyataan Penguasaan dan Penggunaan Tanah </p>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Pada Tahun :</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"tahun_kp\"></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>dikuasai/dimiliki oleh </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"pihak1\"></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Berikutnya Pada Tahun</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"tahun_brkt\" required /></td>\n\t\t\t\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>dikuasai/dimiliki oleh </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"nm_pemohon\"></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Berdasarkan </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"j_ahak\" required /></td>\n\t\t\t\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Penggunaan Tanah</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<select name=\"id_pt\" required>\n\t\t\t\t\t\t\t\t\t \t<?php \n\t\t\t\t\t\t\t\t\t\t\t\t\t$datajenis_kelamin = array();\n\t\t\t\t\t\t\t\t\t\t\t\t\t$sql = mysqli_query($koneksi, \"SELECT * FROM jenis_kelamin\");\n\t\t\t\t\t\t\t\t\t\t\t\t\twhile ($jenis_kelamin = mysqli_fetch_assoc($sql)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t $datajenis_kelamin[] = $jenis_kelamin;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t <option disabled selected value=\"\">-Pilih-</option>\n\t\t\t\t\t\t\t\t\t <?php foreach ($datajenis_kelamin as $key => $value):?>\n\t\t\t\t\t\t\t\t\t <option value=\"<?= $value[\"id_jk\"] ?>\"><?= $value[\"nama_jk\"] ?></option>\n\t\t\t\t\t\t\t\t\t <?php endforeach ?>\n\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td colspan='4'>\n\t\t\t\t\t\t\t\t\t\t<p class=\"font-weight-bold\">Bangunan di Atas Tanah </p>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Bangunan di Atas Tanah </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<select name=\"id_bdat\" required>\n\t\t\t\t\t\t\t\t\t \t<?php \n\t\t\t\t\t\t\t\t\t\t\t\t\t$datajenis_kelamin = array();\n\t\t\t\t\t\t\t\t\t\t\t\t\t$sql = mysqli_query($koneksi, \"SELECT * FROM jenis_kelamin\");\n\t\t\t\t\t\t\t\t\t\t\t\t\twhile ($jenis_kelamin = mysqli_fetch_assoc($sql)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t $datajenis_kelamin[] = $jenis_kelamin;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t <option disabled selected value=\"\">-Pilih-</option>\n\t\t\t\t\t\t\t\t\t <?php foreach ($datajenis_kelamin as $key => $value):?>\n\t\t\t\t\t\t\t\t\t <option value=\"<?= $value[\"id_jk\"] ?>\"><?= $value[\"nama_jk\"] ?></option>\n\t\t\t\t\t\t\t\t\t <?php endforeach ?>\n\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Lain - Lain </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"lain_lain\" required /></td>\n\t\t\t\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td colspan='4'>\n\t\t\t\t\t\t\t\t\t\t<p class=\"font-weight-bold\">Status Tanahnya </p>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Tanah Dengan Hak Perorangan </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<select name=\"id_tdhp\" required>\n\t\t\t\t\t\t\t\t\t \t<?php \n\t\t\t\t\t\t\t\t\t\t\t\t\t$datajenis_kelamin = array();\n\t\t\t\t\t\t\t\t\t\t\t\t\t$sql = mysqli_query($koneksi, \"SELECT * FROM jenis_kelamin\");\n\t\t\t\t\t\t\t\t\t\t\t\t\twhile ($jenis_kelamin = mysqli_fetch_assoc($sql)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t $datajenis_kelamin[] = $jenis_kelamin;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t <option disabled selected value=\"\">-Pilih-</option>\n\t\t\t\t\t\t\t\t\t <?php foreach ($datajenis_kelamin as $key => $value):?>\n\t\t\t\t\t\t\t\t\t <option value=\"<?= $value[\"id_jk\"] ?>\"><?= $value[\"nama_jk\"] ?></option>\n\t\t\t\t\t\t\t\t\t <?php endforeach ?>\n\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Tanah Negara </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<select name=\"id_tn\" required>\n\t\t\t\t\t\t\t\t\t \t<?php \n\t\t\t\t\t\t\t\t\t\t\t\t\t$datajenis_kelamin = array();\n\t\t\t\t\t\t\t\t\t\t\t\t\t$sql = mysqli_query($koneksi, \"SELECT * FROM jenis_kelamin\");\n\t\t\t\t\t\t\t\t\t\t\t\t\twhile ($jenis_kelamin = mysqli_fetch_assoc($sql)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t $datajenis_kelamin[] = $jenis_kelamin;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t <option disabled selected value=\"\">-Pilih-</option>\n\t\t\t\t\t\t\t\t\t <?php foreach ($datajenis_kelamin as $key => $value):?>\n\t\t\t\t\t\t\t\t\t <option value=\"<?= $value[\"id_jk\"] ?>\"><?= $value[\"nama_jk\"] ?></option>\n\t\t\t\t\t\t\t\t\t <?php endforeach ?>\n\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Lain - Lain </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"lain_lain\" required /></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Lain - Lain </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"lain_lain\" required /></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Tanah bagi Kepentingan Umum </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<select name=\"id_tbku\" required>\n\t\t\t\t\t\t\t\t\t \t<?php \n\t\t\t\t\t\t\t\t\t\t\t\t\t$datajenis_kelamin = array();\n\t\t\t\t\t\t\t\t\t\t\t\t\t$sql = mysqli_query($koneksi, \"SELECT * FROM jenis_kelamin\");\n\t\t\t\t\t\t\t\t\t\t\t\t\twhile ($jenis_kelamin = mysqli_fetch_assoc($sql)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t $datajenis_kelamin[] = $jenis_kelamin;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t <option disabled selected value=\"\">-Pilih-</option>\n\t\t\t\t\t\t\t\t\t <?php foreach ($datajenis_kelamin as $key => $value):?>\n\t\t\t\t\t\t\t\t\t <option value=\"<?= $value[\"id_jk\"] ?>\"><?= $value[\"nama_jk\"] ?></option>\n\t\t\t\t\t\t\t\t\t <?php endforeach ?>\n\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Tanah Kepentingan Umum </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"tanah_ku\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td class=\"font-weight-bold\">Beban-beban Atas Tanah </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"beban_at\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-6\">\n\t\t\t\t\t\t\t\t\t\t<td colspan='2' class=\"font-weight-bold\">Bangunan Kepentingan Umum dan Sosial </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=bangunan_kus\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td colspan='4'>\n\t\t\t\t\t\t\t\t\t\t<p class=\"font-weight-bold\">Perkara/Sengketa Atas Tanah </p>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Sedang dalam Perkara </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"sdp\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Sedang dalam Sengketa </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td rowspan=\"2\"> : \n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"sds\"> <br> kalau ada uraikan\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr></tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td rowspan=\"2\">YANG MENGUMPULKAN DATA <br> (SATGAS YURIDIS)\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"ymd\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td rowspan=\"2\">YANG BERKEPENTINGAN/ <br> KUASANYA\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"ymd\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr></tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>NIP </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"nip\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td colspan='4'>\n\t\t\t\t\t\t\t\t\t\t<p class=\"font-weight-bold text-center\">KESIMPULAN PANITIA AJUDIKASI PENDAFTARAN TANAH SISTEMATIS LENGKAP KANTOR </p>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td colspan='4'>\n\t\t\t\t\t\t\t\t\t\t<p class=\"font-weight-bold\">Berdasarkan pada penilaian atas fakta dan data yang telah dikumpulkan, maka dengan ini disimpulkan bahwa : </p>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td colspan=\"2\" class=\"font-weight-bold\">Pemiliknya/yang menguasai tanah adalah</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"nama_pemohon\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td colspan='4'>\n\t\t\t\t\t\t\t\t\t\t<p class=\"font-weight-bold\">Status tanahnya adalah </p>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Tanah Hak </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"tanah_hak\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Bekas tanah adat perorangan </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<select name=\"id_btap\" required>\n\t\t\t\t\t\t\t\t\t \t<?php \n\t\t\t\t\t\t\t\t\t\t\t\t\t$datajenis_kelamin = array();\n\t\t\t\t\t\t\t\t\t\t\t\t\t$sql = mysqli_query($koneksi, \"SELECT * FROM jenis_kelamin\");\n\t\t\t\t\t\t\t\t\t\t\t\t\twhile ($jenis_kelamin = mysqli_fetch_assoc($sql)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t $datajenis_kelamin[] = $jenis_kelamin;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t <option disabled selected value=\"\">-Pilih-</option>\n\t\t\t\t\t\t\t\t\t <?php foreach ($datajenis_kelamin as $key => $value):?>\n\t\t\t\t\t\t\t\t\t <option value=\"<?= $value[\"id_jk\"] ?>\"><?= $value[\"nama_jk\"] ?></option>\n\t\t\t\t\t\t\t\t\t <?php endforeach ?>\n\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Tanah Negara </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<select name=\"id_tn\" required>\n\t\t\t\t\t\t\t\t\t \t<?php \n\t\t\t\t\t\t\t\t\t\t\t\t\t$datajenis_kelamin = array();\n\t\t\t\t\t\t\t\t\t\t\t\t\t$sql = mysqli_query($koneksi, \"SELECT * FROM jenis_kelamin\");\n\t\t\t\t\t\t\t\t\t\t\t\t\twhile ($jenis_kelamin = mysqli_fetch_assoc($sql)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t $datajenis_kelamin[] = $jenis_kelamin;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t <option disabled selected value=\"\">-Pilih-</option>\n\t\t\t\t\t\t\t\t\t <?php foreach ($datajenis_kelamin as $key => $value):?>\n\t\t\t\t\t\t\t\t\t <option value=\"<?= $value[\"id_jk\"] ?>\"><?= $value[\"nama_jk\"] ?></option>\n\t\t\t\t\t\t\t\t\t <?php endforeach ?>\n\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Lain-lain </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"ll\"> sebutkan\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td colspan=\"2\">Kepada yang memiliki/menguasai, yaitu </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td > : \n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"nama_pemohon2\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td colspan=\"2\">dapat/tidak dapat </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td > : \n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"dapat\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td colspan=\"2\">diusulkan untuk diberikan Hak </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td > : \n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"jh\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td class=\"font-weight-bold\">Pembebanan atas tanah </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<select name=\"id_pat\" required>\n\t\t\t\t\t\t\t\t\t \t<?php \n\t\t\t\t\t\t\t\t\t\t\t\t\t$datajenis_kelamin = array();\n\t\t\t\t\t\t\t\t\t\t\t\t\t$sql = mysqli_query($koneksi, \"SELECT * FROM jenis_kelamin\");\n\t\t\t\t\t\t\t\t\t\t\t\t\twhile ($jenis_kelamin = mysqli_fetch_assoc($sql)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t $datajenis_kelamin[] = $jenis_kelamin;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t <option disabled selected value=\"\">-Pilih-</option>\n\t\t\t\t\t\t\t\t\t <?php foreach ($datajenis_kelamin as $key => $value):?>\n\t\t\t\t\t\t\t\t\t <option value=\"<?= $value[\"id_jk\"] ?>\"><?= $value[\"nama_jk\"] ?></option>\n\t\t\t\t\t\t\t\t\t <?php endforeach ?>\n\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td class=\"font-weight-bold\">Alat bukti yang diajukan </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"abyd\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td class=\"font-weight-bold\" colspan=\"4\">\n\t\t\t\t\t\t\t\t\t\tDemikian kesimpulan risalah penelitian data yuridis bidang tanah dengan\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>NIB </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"nib_dk\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Dibuat di</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> :\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"dibut\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Oleh </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Tanggal</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> :\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"date\" name=\"dibut\" required>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>KETUA PANITIA AJUDIKASI </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"kpa\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>WAKIL KETUA BIDANG YURIDIS</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> :\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"wkby\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>NIP </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"nip_kpa\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>NIP</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> :\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"nip_wkby\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>WAKIL KETUA BIDANG FISIK </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"wkbf\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>NIP </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"nip_wkbf\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td colspan=\"4\">\n\t\t\t\t\t\t\t\t\t\tAnggota Panitia Ajudikasi PTSL\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Nama </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"nama1\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Nama</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> :\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"nama2\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>NIP </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"nip1\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>NIP</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> :\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"nip2\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Nama </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"nama3\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Nama</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> :\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"nama4\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>NIP </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"nip3\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>NIP</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> :\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"nip4\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Nama </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"nama5\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>NIP </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"nip5\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td colspan=\"4\" class=\"font-weight-bold text-center\">\n\t\t\t\t\t\t\t\t\t\tSANGGAHAN/KEBERATAN\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td colspan=\"4\" class=\"font-weight-bold\">\n\t\t\t\t\t\t\t\t\t\tUraian singkat perkara/sengketa/sanggahan\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Nama Penyanggah </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"nama_penyanggah\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Beserta surat buktinya :</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Desa </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"desa_sanggah\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Nama Surat</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> :\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"nama_surat\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Kecamatan </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"kecamatan_sanggah\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>No. Surat</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> :\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"no_surat\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Kabupaten </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"kabupaten_sanggah\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Tgl. Surat</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> :\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"date\" name=\"tgl_surat\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Gugatan ke Pengadilan </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<select name=\"id_gkp\" required>\n\t\t\t\t\t\t\t\t\t \t<?php \n\t\t\t\t\t\t\t\t\t\t\t\t\t$datajenis_kelamin = array();\n\t\t\t\t\t\t\t\t\t\t\t\t\t$sql = mysqli_query($koneksi, \"SELECT * FROM jenis_kelamin\");\n\t\t\t\t\t\t\t\t\t\t\t\t\twhile ($jenis_kelamin = mysqli_fetch_assoc($sql)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t $datajenis_kelamin[] = $jenis_kelamin;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t <option disabled selected value=\"\">-Pilih-</option>\n\t\t\t\t\t\t\t\t\t <?php foreach ($datajenis_kelamin as $key => $value):?>\n\t\t\t\t\t\t\t\t\t <option value=\"<?= $value[\"id_jk\"] ?>\"><?= $value[\"nama_jk\"] ?></option>\n\t\t\t\t\t\t\t\t\t <?php endforeach ?>\n\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Selama penumuman </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<select name=\"id_sp\" required>\n\t\t\t\t\t\t\t\t\t \t<?php \n\t\t\t\t\t\t\t\t\t\t\t\t\t$datajenis_kelamin = array();\n\t\t\t\t\t\t\t\t\t\t\t\t\t$sql = mysqli_query($koneksi, \"SELECT * FROM jenis_kelamin\");\n\t\t\t\t\t\t\t\t\t\t\t\t\twhile ($jenis_kelamin = mysqli_fetch_assoc($sql)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t $datajenis_kelamin[] = $jenis_kelamin;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t <option disabled selected value=\"\">-Pilih-</option>\n\t\t\t\t\t\t\t\t\t <?php foreach ($datajenis_kelamin as $key => $value):?>\n\t\t\t\t\t\t\t\t\t <option value=\"<?= $value[\"id_jk\"] ?>\"><?= $value[\"nama_jk\"] ?></option>\n\t\t\t\t\t\t\t\t\t <?php endforeach ?>\n\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Alasan Penyanggah </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"ap\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td colspan=\"4\">\n\t\t\t\t\t\t\t\t\t\tdiisi bila ada yang menyanggah\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td colspan=\"2\" class=\"font-weight-bold\">\n\t\t\t\t\t\t\t\t\t\tPenyelesaian perkara/sengketa/sanggahan\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t : \n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"ppss\">\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td colspan=\"4\" class=\"text-center font-weight-bold\">\n\t\t\t\t\t\t\t\t\t\tKESIMPULAN AKHIR KETUA PANITIA AJUDIKASI PENDAFTARAN TANAH SISTEMATIS LENGKAP\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td class=\"font-weight-bold\" colspan=\"2\">Nama Pemilik/yang berkepentingan </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"nama_pemilik\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td class=\"font-weight-bold\" colspan=\"2\">Status Tanah</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<select name=\"id_st\" required>\n\t\t\t\t\t\t\t\t\t \t<?php \n\t\t\t\t\t\t\t\t\t\t\t\t\t$datajenis_kelamin = array();\n\t\t\t\t\t\t\t\t\t\t\t\t\t$sql = mysqli_query($koneksi, \"SELECT * FROM jenis_kelamin\");\n\t\t\t\t\t\t\t\t\t\t\t\t\twhile ($jenis_kelamin = mysqli_fetch_assoc($sql)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t $datajenis_kelamin[] = $jenis_kelamin;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t <option disabled selected value=\"\">-Pilih-</option>\n\t\t\t\t\t\t\t\t\t <?php foreach ($datajenis_kelamin as $key => $value):?>\n\t\t\t\t\t\t\t\t\t <option value=\"<?= $value[\"id_jk\"] ?>\"><?= $value[\"nama_jk\"] ?></option>\n\t\t\t\t\t\t\t\t\t <?php endforeach ?>\n\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td colspan=\"4\">\n\t\t\t\t\t\t\t\t\t\tPertimbangan dalam hal status\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td colspan=\"2\">Berita Acara Pengesahan Pengumuman data fisik</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td colspan=\"2\">Tanah dalam proses perkara/sengketa</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Nomor </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<input type=\"number\" name=\"nomorp\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Perkara</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> :\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"perkara\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Tanggal </td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t\t<input type=\"date\" name=\"tanggalp\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Nomor</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> :\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"number\" name=\"nomorp2\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Tanggal</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> :\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"date\" name=\"tanggalp2\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>pemberian hak</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> :\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"phak\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>* Jika ada</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td colspan=\"4\" class=\"text-center font-weight-bold\">\n\t\t\t\t\t\t\t\t\t\tKEPUTUSAN KETUA PANITIA AJUDIKASI PENDAFTARAN TANAH SISTEMATIS LENGKAP KANTOR PERTANAHAN KABUPATEN BENER MERIAH, PROPINSI ACEH\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td colspan=\"4\">\n\t\t\t\t\t\t\t\t\t\tSurat Keputusan Kepala Kantor Pertanahan Kabupaten BENER MERIAH\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>No. SK Penlok</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> :\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"no_skp\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>Tanggal SK Penlok</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> :\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"date\" name=\"tgl_skp\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td colspan=\"2\">Biaya Perolehan Tanah dan Bangunan (BPHTB) :</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> :\n\t\t\t\t\t\t\t\t\t\t\t<select name=\"id_bphtb\" required>\n\t\t\t\t\t\t\t\t\t \t<?php \n\t\t\t\t\t\t\t\t\t\t\t\t\t$datajenis_kelamin = array();\n\t\t\t\t\t\t\t\t\t\t\t\t\t$sql = mysqli_query($koneksi, \"SELECT * FROM jenis_kelamin\");\n\t\t\t\t\t\t\t\t\t\t\t\t\twhile ($jenis_kelamin = mysqli_fetch_assoc($sql)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t $datajenis_kelamin[] = $jenis_kelamin;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t <option disabled selected value=\"\">-Pilih-</option>\n\t\t\t\t\t\t\t\t\t <?php foreach ($datajenis_kelamin as $key => $value):?>\n\t\t\t\t\t\t\t\t\t <option value=\"<?= $value[\"id_jk\"] ?>\"><?= $value[\"nama_jk\"] ?></option>\n\t\t\t\t\t\t\t\t\t <?php endforeach ?>\n\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td colspan=\"2\">Jika Terhutang sesuai dengan Surat Pernyataan :</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td colspan=\"2\">Nomor</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> :\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"number\" name=\"no_bphtb\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td colspan=\"2\">Tanggal</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> :\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"date\" name=\"tgl_bphtb\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td colspan=\"2\">Pajak Penghasilan (PPh) :</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> :\n\t\t\t\t\t\t\t\t\t\t\t<select name=\"id_pph\" required>\n\t\t\t\t\t\t\t\t\t \t<?php \n\t\t\t\t\t\t\t\t\t\t\t\t\t$datajenis_kelamin = array();\n\t\t\t\t\t\t\t\t\t\t\t\t\t$sql = mysqli_query($koneksi, \"SELECT * FROM jenis_kelamin\");\n\t\t\t\t\t\t\t\t\t\t\t\t\twhile ($jenis_kelamin = mysqli_fetch_assoc($sql)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t $datajenis_kelamin[] = $jenis_kelamin;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t <option disabled selected value=\"\">-Pilih-</option>\n\t\t\t\t\t\t\t\t\t <?php foreach ($datajenis_kelamin as $key => $value):?>\n\t\t\t\t\t\t\t\t\t <option value=\"<?= $value[\"id_jk\"] ?>\"><?= $value[\"nama_jk\"] ?></option>\n\t\t\t\t\t\t\t\t\t <?php endforeach ?>\n\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td colspan=\"2\">Jika Terhutang sesuai dengan Surat Pernyataan :</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td colspan=\"2\">Nomor</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> :\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"number\" name=\"no_pph\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td colspan=\"2\">Tanggal</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td> :\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"date\" name=\"tgl_pph\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t<td><label class=\"ml-2\">\n\t\t\t\t\t\t\t\t\t<input type=\"submit\" name=\"btn_simpan\" value=\"Simpan\"/>\n\t\t\t\t\t\t\t\t\t<input type=\"reset\" name=\"reset\" value=\"Besihkan\"/>\n\t\t\t\t\t\t\t\t</label></td>\n\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\t<?php \n\t\t// echo \"<pre>\";\n\t\t// print_r($datadesa);\n\t\t// echo \"</pre>\";\n\t\t\t\t\t\t\t ?>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t<p><?php echo isset($pesan) ? $pesan : \"\" ?></p>\n<!-- \t\t\t\t</fieldset> -->\n\t\t\t</div>\n\t\t</form>\n\t</div>\n\t\n\t</div>\n <div class=\"row\">\n\n \t<div class=\"col-xl-auto offset-xl-1\">\t\t\n\n\t<?php\n\n}",
"public function tambah($data_sapi) {\n\t\t$data['id_sapi'] = $this->db->insert_id();\n\t\t$this->db->insert('tb_sapi', $data_sapi);\n\t}",
"function tambah_data ($data){\n\t\treturn $this->db->insert($this->nama_table,$data);\n\t}",
"public function add_data_mahasiswa()\n\t{\n\t\t$save = $this->input->post('add_mahasiswa');\n\t\t$kelas = 't_kelas';\n\t\t$tahun = 't_tahun_akademik';\n\t\t$prodi = \"t_prodi\";\n\t\t$data['kelas'] = $this->m_aka->get_all($kelas);\n\t\t$data['tahun_aka'] = $this->m_aka->get_all($tahun);\n\t\t$data['prodi'] = $this->m_aka->get_all($prodi);\n\t\t$data['content'] = 'mahasiswa/tambah_mahasiswa';\n\t\t$this->load->view('content', $data);\n\t}",
"function tambah($koneksi){\n\t\n\tif (isset($_POST['btn_simpan'])){\n\t\t$nik_pemohon = $_POST['nik_pemohon'];\n\t\t$nama_pemohon = $_POST['nama_pemohon'];\n\t\t$no_telp = $_POST['no_telp'];\n\t\t$tempat_lahir = $_POST['tempat_lahir'];\n\t\t$tanggal_lahir = $_POST['tanggal_lahir'];\n\t\t$pekerjaan = $_POST['pekerjaan'];\n\t\t$agama = $_POST['agama'];\n\t\t$desa_pemohon = $_POST['desa_pemohon'];\n\t\t$id_jk = $_POST['id_jk'];\n\t\t$kecamatan_pemohon = $_POST['kecamatan_pemohon'];\n\t\t$id_jenis_pemohon = $_POST['id_jenis_pemohon'];\n\t\t$kabupaten = $_POST['kabupaten'];\n\n\t\t\n\t\tif(!empty($nik_pemohon) && !empty($nama_pemohon) && !empty($no_telp) && !empty($desa_pemohon) && !empty($tempat_lahir) &&\n\t\t\t!empty($tanggal_lahir) && !empty($pekerjaan) && !empty($agama) &&\n\t\t\t!empty($id_jk) && !empty($kecamatan_pemohon) && !empty($id_jenis_pemohon) && !empty($kabupaten)){\n\n\t\t\t$sql =\"INSERT INTO pemohon\n (nik_pemohon,nama_pemohon,no_telp,tempat_lahir,tanggal_lahir,pekerjaan,agama,desa_pemohon,id_jk\n\t\t\t,kecamatan_pemohon, id_jenis_pemohon, kabupaten)\n VALUES('$nik_pemohon','$nama_pemohon','$no_telp','$tempat_lahir','$tanggal_lahir'\n\t\t\t,'$pekerjaan','$agama','$desa_pemohon','$id_jk','$kecamatan_pemohon','$id_jenis_pemohon','$kabupaten')\";\n\n\t\t\t$simpan = mysqli_query($koneksi, $sql);\n\t\t\tif($simpan && isset($_GET['aksi'])){\n\t\t\t\tif($_GET['aksi'] == 'create'){\n\t\t\t\t\theader('location: entri_pemohon.php');\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$pesan = \"Tidak dapat menyimpan, data pemohon belum lengkap!\";\n\t\t}\n\t}\n\n\t?> \n\t<dir class=\"row\">\n\t\t<div class=\"col-xl-6\">\n\t\t<form action=\"\" method=\"POST\">\n\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t<div class=\"table-responsive\">\n\t\t\t\t\t\t\t<table class=\"table table-responsive-sm table-hover\" border=\"0\">\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td>NIK </td>\n\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"nik_pemohon\" required /></td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td>No. Telepon / HP</td> \n\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"no_telp\" required /></label></td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td>Nama Pemohon </td> \n\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"nama_pemohon\" required/></td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td>Tempat Lahir</td> \n\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"tempat_lahir\" required/></td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td>Tanggal Lahir</td> \n\t\t\t\t\t\t\t\t\t<td> : <input type=\"date\" name=\"tanggal_lahir\" required/></td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td>Pekerjaan </td> \n\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"pekerjaan\" required/></td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td>Agama </td> \n\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"agama\" required/></td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\t<?php \n\t\t// echo \"<pre>\";\n\t\t// print_r($datadesa);\n\t\t// echo \"</pre>\";\n\t\t\t\t\t\t\t ?>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</fieldset>\n\t\t\t\t\n\t</div>\n\t<div class=\"col-xl-6\">\n\t\t\n\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t<div class=\"table-responsive\">\n\t\t\t\t\t\t\t<table class=\"table table-responsive-sm table-hover\" border=\"0\">\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td>Jenis Kelamin</td> \n\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t <select name=\"id_jk\" required>\n\t\t\t\t\t\t\t\t \t<?php \n\t\t\t\t\t\t\t\t\t\t\t\t$datajk = array();\n\t\t\t\t\t\t\t\t\t\t\t\t$sql = mysqli_query($koneksi, \"SELECT * FROM jenis_kelamin\");\n\t\t\t\t\t\t\t\t\t\t\t\twhile ($jk = mysqli_fetch_assoc($sql)) {\n\t\t\t\t\t\t\t\t\t\t\t\t $datajk[] = $jk;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t <option disabled selected value=\"\">-Jenis Kelamin-</option>\n\t\t\t\t\t\t\t\t <?php foreach ($datajk as $key => $value):?>\n\t\t\t\t\t\t\t\t <option value=\"<?= $value[\"id_jk\"] ?>\"><?= $value[\"nama_jk\"] ?></option>\n\t\t\t\t\t\t\t\t <?php endforeach ?>\n\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t </td>\n\t\t\t\t\t\t\t </tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td>Alamat</td> \n\t\t\t\t\t\t\t\t\t<td> : </td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td>Desa</td> \n\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"desa_pemohon\" require></input>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td>Kecamatan</td> \n\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"kecamatan_pemohon\" require></input>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td>Kabupaten </td>\n\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"kabupaten\" /></td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t <tr>\n\t\t\t\t\t\t\t\t\t<td>Jenis Pemohon</td> \n\t\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t <select name=\"id_jenis_pemohon\" required>\n\t\t\t\t\t\t\t\t \t<?php \n\t\t\t\t\t\t\t\t\t\t\t\t$datajenispemohon = array();\n\t\t\t\t\t\t\t\t\t\t\t\t$sql = mysqli_query($koneksi, \"SELECT * FROM jenis_pemohon\");\n\t\t\t\t\t\t\t\t\t\t\t\twhile ($jenispemohon = mysqli_fetch_assoc($sql)) {\n\t\t\t\t\t\t\t\t\t\t\t\t $datajenispemohon[] = $jenispemohon;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t <option disabled selected value=\"\">-Pilih Jenis Pemohon-</option>\n\t\t\t\t\t\t\t\t <?php foreach ($datajenispemohon as $key => $value):?>\n\t\t\t\t\t\t\t\t <option value=\"<?= $value[\"id_jenis_pemohon\"] ?>\"><?= $value[\"jenis_pemohon\"] ?></option>\n\t\t\t\t\t\t\t\t <?php endforeach ?>\n\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t </td>\n\t\t\t\t\t\t\t </tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t<td><label class=\"ml-2\">\n\t\t\t\t\t\t\t\t\t<input type=\"submit\" name=\"btn_simpan\" value=\"Simpan\"/>\n\t\t\t\t\t\t\t\t\t<input type=\"reset\" name=\"reset\" value=\"Besihkan\"/>\n\t\t\t\t\t\t\t\t</label></td>\n\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\t<?php \n\t\t// echo \"<pre>\";\n\t\t// print_r($datadesa);\n\t\t// echo \"</pre>\";\n\t\t\t\t\t\t\t ?>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<p><?php echo isset($pesan) ? $pesan : \"\" ?></p>\n\t\t\t\t\t</fieldset>\n\t\t\t\t</form>\n\t</dir>\n\t\n\t</div>\n <div class=\"row\">\n\n \t<div class=\"col-xl-auto offset-xl-1\">\t\t\n\n\t<?php\n\n}",
"function tambahberita($databerita){\n\t\tglobal $koneksi;\n\n\t\t$judul = htmlspecialchars($databerita['judul']);\n\t\t$nama = htmlspecialchars($databerita['nama']);\n\t\t$tanggal = date(\"Y-m-d\");\n\t\t$isi = htmlspecialchars($databerita['isi']);\n\n\t\t//upload gambar\n\t\t$gambar = upload();\n\t\tif( !$gambar ){\n\t\t\treturn false;\n\t\t}\n\n\n\t\t$query = \"INSERT INTO tabelberita VALUES ('','$judul','$nama','$tanggal','$isi','$gambar')\" or die(mysqli_error());\n\n\t\t$hasil = mysqli_query($koneksi, $query );\n\n\t\treturn mysqli_affected_rows($koneksi);\n\t}",
"public function proses_tambah()\n\t{\n\t\t$data = array(\n\t\t\t'page_title' \t=> \"Tambah Latihan Soal\", \n\t\t\t'form_action' => current_url(),\n\t\t\t'submateri'\t\t=> $this->model_adm->fetch_all_materi()\n\t\t\t);\n\n\t\t//fetch input (make sure that the variable name is the same as column name in database!) \n\t\t$params \t\t\t\t= $this->input->post(null, true);\n\t\t$sub_materi \t\t \t\t= $params['sub_materi'];\n\n\t\t$this->form_validation->set_rules('sub_materi', 'Sub Materi', 'required');\n\t\t\n\t\t//run the validation\n\t\tif ($this->form_validation->run() == FALSE) \n\t\t{\n\t\t\talert_error(\"Error\", \"Data gagal ditambahkan\");\n\t\t\t$this->load->view('pg_admin/latihansoal_form', $data);\n\t\t}\n\t\telse \n\t\t{\n\t\t\t//passing input value to Model\n\t\t\t$result = $this->model_adm->add_latihan_soal($sub_materi);\n\t\t\talert_success(\"Sukses\", \"Data berhasil ditambahkan\");\n\t\t\tredirect('pg_admin/latihansoal');\n\t\t\t// echo \"Status Insert: \" . $result;\n\t\t}\t\n\t}",
"public function tambah()\n {\n // Data yang dikirimkan ke views\n $data['title'] = 'Tambah Produk';\n\n // Set rule untuk validasi\n $this->form_validation->set_rules('namaProduk', 'Merk', 'required');\n $this->form_validation->set_rules('labelProduk', 'Varian', 'required');\n $this->form_validation->set_rules('stokProduk', 'Stok', 'required|numeric');\n $this->form_validation->set_rules('terjualProduk', 'Barang terjual', 'required|numeric');\n $this->form_validation->set_rules('hargaBeli', 'Harga beli', 'required|numeric');\n $this->form_validation->set_rules('hargaJual', 'Harga jual', 'required|numeric');\n\n // Cek apakah form yang di input sesuai dgn rules\n if ($this->form_validation->run() == FALSE) {\n // Jika tidak, tampilkan views form + pesan kesalahan\n $this->load->view('templates/header', $data);\n $this->load->view('inventory/tambah');\n $this->load->view('templates/footer');\n } else {\n // Jika sesuai, tambah data ke database dan redirect ke tabel inventory\n $this->Inventory_model->tambahDataProduct();\n\n // Sebelum redirect, buat dulu session untuk flash message data berhasil ditambahkan\n $this->session->set_flashdata('sweetflash', 'Ditambahkan');\n\n // Lalu, redirect ke tabel inventory barang\n redirect('inventory');\n }\n }",
"public static function tambah($data)\n {\n \nerror_reporting(\"E_ALL\") ;\n\n // data\n $detailgaji\t \t\t\t= new Detailgajiku;\n $detailgaji->kd_potongan\t\t= $data['kd_potongan'];\n\t\n $detailgaji->nomor \t\t= $data['nomor'];\n $detailgaji->jumlah \t\t= $data['jumlah'];\t\n\t\n // simpan\n return ($detailgaji->save()) ? true : false;\n }",
"public function add()\n {\n $this->load->view('system_view/petani/data/Tambah');\n }",
"public function actionCreate()\r\n {\r\n $model = new Pelanggaran();\r\n $trans = Yii::$app->db->beginTransaction();\r\n\r\n if ($model->loadAll(Yii::$app->request->post()) && $model->save()) {\r\n $check = $this->checkDetailPoint($model, 'create');\r\n \r\n if( isset($check['failed']) ){\r\n $trans->rollBack();\r\n Yii::$app->session->setFlash('error', $check['failed'] );\r\n return $this->redirect(['index']);\r\n }\r\n\r\n $trans->commit();\r\n Yii::$app->session->setFlash('success','Pelanggaran berhasil ditambahkan.');\r\n return $this->redirect(['index']);\r\n } else {\r\n return $this->render('create', [\r\n 'model' => $model,\r\n ]);\r\n }\r\n }",
"public function tambah($data,$table){ \n return $this->db->insert($table, $data);\n }",
"public function addseksi() // DONE\n { \n $data['judul'] = \"Tambah Seksi | BPS\";\n $data['listmenu'] = getMenuLink(); \n $data['menuform'] = getMenuForm(); \n\n $data['listseksi'] = $this->modeladmin->readData('seksi',0);\n \n $this->form_validation->set_rules('nama_seksi','Nama Seksi','required'); \n\n if ($this->form_validation->run() == FALSE) { \n $this->load->view('template_admin/header',$data);\n $this->load->view('template_admin/sidebar',$data);\n $this->load->view('template_admin/navbar');\n $this->load->view('admin/tambahdata/tambahseksi');\n $this->load->view('template_admin/footer',$data);\n }else{\n $this->modeladmin->createData('seksi',1);\n $this->session->set_flashdata('pesan','Ditambah');\n redirect(base_url('seksi')); \n } \n }",
"function TambahDataBahanBaku() {\n\tinclude '../../koneksi/index.php';\n\n\t//inisialisasi\n\t$kode = strtoupper($_POST['kode']);\n\t$nama = strtoupper($_POST['nama']);\n\t$harga_beli = $_POST['harga_beli'];\n\t$harga_jual = $_POST['harga_jual'];\n\t$stok = $_POST['stok'];\n\n\t//insert\n\t$sql = \"INSERT INTO bahan_baku (kode, nama, harga_beli, harga_jual, stok) VALUES(?, ?, ?, ?, ?)\";\n\t$stmt = $db->prepare($sql);\n\t$stmt->bind_param('ssiii', $kode, $nama, $harga_beli, $harga_jual, $stok);\n\tif ($stmt->execute()) {\n\t\t$stmt->insert_id;\n\t\t$_SESSION['status_operasi_bahan_baku'] = \"berhasil_menyimpan\";\n\t} else {\n\t\t$_SESSION['status_operasi_bahan_baku'] = \"gagal_menyimpan\";\n\t}\n\t$stmt->close();\n}",
"public function tambah_pertanahan()\r\n\t{\r\n\t\t$file_path = $this->upload_file_lampiran(\"pertanahan\");\r\n\r\n\t\t$input = $this->input->post();\r\n\r\n\t\t$id_jenis_sertifikat = $this->jenis_sertifikat->get_id_jenis_sertifikat('pertanahan');\r\n\t\t$tanggal_terbit = DateTime::createFromFormat('m/d/Y', $input['tanggal_terbit'])->format('Y-m-d');\r\n\t\t$tanggal_berakhir = DateTime::createFromFormat('m/d/Y', $input['tanggal_berakhir'])->format('Y-m-d');\r\n\r\n\t\tif ($tanggal_berakhir == '0000-00-00')\r\n\t\t\t$tanggal_berakhir = $this->set_tahun_berakhir_forever();\r\n\r\n\t\t$data = array(\r\n\t\t\t'id_lembaga_sertifikat'\t\t=> $input['lembaga'],\r\n\t\t\t'id_jenis_sertifikat'\t\t=> $id_jenis_sertifikat,\r\n\t\t\t'id_dasar_hukum_sertifikat'\t=> $input['jenis_pertanahan'],\r\n\t\t\t'id_distrik_sertifikat'\t\t=> $input['distrik'],\r\n\t\t\t'no_sertifikat'\t\t\t\t=> $input['no_sertifikat'],\r\n\t\t\t'judul_sertifikat'\t\t\t=> $input['lokasi_sertifikat'],\r\n\t\t\t'tanggal_sertifikasi'\t\t=> $tanggal_terbit,\r\n\t\t\t'tanggal_kadaluarsa'\t\t=> $tanggal_berakhir,\r\n\t\t\t'file_sertifikat'\t\t\t=> $file_path['file_path'],\r\n\t\t\t'nama_file'\t\t\t\t\t=> $file_path['file_name'],\r\n\t\t\t'keterangan'\t\t\t\t=> $input['keterangan'],\r\n\t\t\t'jabatan_pic'\t\t\t\t=> $this->authentifier->get_user_detail()['posisi_pegawai'],\r\n\t\t\t'dibuat_oleh'\t\t\t\t=> $this->authentifier->get_user_detail()['id_pegawai'],\r\n\t\t\t'status_sertifikat'\t\t\t=> 3,\r\n\t\t\t'id_remainder_sertifikat'\t=> $input['remainder']\r\n\t\t\t);\r\n\t\t// Status sertifikat masih menggunakan nilai default\r\n\r\n\t\t$result = $this->sertifikat->tambah_data_pertanahan($data);\r\n\t\t\r\n\t\tif ($result)\r\n\t\t{\r\n\t\t\t$id_pegawai = $this->authentifier->get_user_detail()['id_pegawai'];\r\n\t\t\t$id_sertifikat = $this->sertifikat->get_id_sertifikat_latest_by_user($id_pegawai);\r\n\r\n\t\t\t$this->set_status_sertifikat($id_sertifikat);\r\n\r\n\t\t\t$log_data = array(\r\n\t\t\t\t'nama_tabel'\t\t=> 'sertifikat',\r\n\t\t\t\t'id_pegawai'\t\t=> $id_pegawai,\r\n\t\t\t\t'id_status_log'\t\t=> $this->status->get_id_status_by_nama(\"melakukan create\"),\r\n\t\t\t\t'id_data'\t\t\t=> $id_sertifikat\r\n\t\t\t\t);\r\n\t\t\t$id_log = $this->log_database->write_log($log_data);\r\n\t\t\t// Insert data sukses\r\n\t\t\t$this->authentifier->set_flashdata('error_code', 1);\r\n\t\t\t$this->authentifier->set_flashdata('error_msg', \"Data Pertanahan berhasil ditambahkan\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// Insert data gagal\r\n\t\t\t$this->authentifier->set_flashdata('error_code', 2);\r\n\t\t\t$this->authentifier->set_flashdata('error_msg', \"Data Pertanahan gagal ditambahkan\");\r\n\t\t}\r\n\r\n\t\treturn redirect('form/pertanahan');\r\n\t}",
"function tambahdata() \r\n \t{\r\n\t\t$this->load->model('model_home');\r\n\t\t$data['jenis_dok']=$this->model_home->getJenisDokumen();\r\n\t\t$data['jenis_data']=$this->model_home->getJenisData();\r\n\t\t$data['idnya']=$this->model_home->cariidbaru();\r\n\t\t//$this->load->view('form_rekam',$data);\r\n\t\t$this->load->view('new_header');\r\n\t\t$this->load->view('new_nav');\r\n\t\t$this->load->view('new_form_rekam',$data);\r\n\t}",
"public function tambahLelangPost(Request $request)\n {\n $this->validate($request,[\n 'id_barang' => 'required', \n ]);\n\n //aduh cape ngetik\n //ini untuk mengambil data lelang kalo ada bacaan new itu untuk tambah data\n $data = new \\App\\Lelang;\n\n //ini untuk tabggal\n $date = date(\"Y-m-d\");\n\n $data->id_barang = $request->id_barang;\n $data->tgl_lelang = $date;\n //ini di set 0 karena belum ada penawaran\n $data->harga_akhir = 0;\n //ini di set 0 juga karena belum ada yg nawar \n //jangan lupa bikin user yg id nnya 0\n $data->id_user = 0;\n //ini ngambil id yg login\n $data->id_petugas = Session::get('id_petugas');\n //haaah ini status di set tutup\n $data->status = \"ditutup\";\n //ini buat simpan data\n $statusc = $data->save();\n\n //ini buat pengecekan\n if ($statusc) {\n //kalo berhasil\n return redirect('petugas/home/lelang')->with('alert-success','Kamu berhasil Register');\n } else {\n //kalo gagal\n return redirect('petugas/tambah/lelang')->with('alert-error','register gagal');\n }\n\n }",
"function tambah($data) {\r\n\t//koneksi sudah dilakukan di function\r\n\tglobal $conn;\r\n\t// mengambil data dari tiap elemen dalam form\r\n\t$nama = htmlspecialchars($data[\"nama\"]);\r\n\t$genre = htmlspecialchars($data[\"genre\"]);\r\n\t$harga = htmlspecialchars($data[\"harga\"]);\r\n\r\n\t//query untuk insert atau menambahkan data\r\n\t$query = \"INSERT INTO buku VALUES ('', '$nama', '$genre', $harga)\";\r\n\tmysqli_query($conn, $query);\r\n\t//mengembalikan angka 1 jika berhasil dan -1 jika gagal\r\n\treturn mysqli_affected_rows($conn);\r\n}",
"public function addNew()\n {\n $this->load->model('user_model');\n $data['roles'] = $this->user_model->getUserRoles();\n $data['divisi'] = $this->user_model->getUserDivisi();\n $data['pangkat'] = $this->user_model->getUserPangkat();\n $this->global['pageTitle'] = 'Tambahkan Data Rescuer';\n $this->load->view('includes/header', $this->global);\n $this->load->view('rescuer/addNew', $data);\n $this->load->view('includes/footer');\n }",
"public function tambah_data()\n {\n\n $nik = $this->input->post('nik');\n $nama = $this->input->post('nama');\n $jk = $this->input->post('jk');\n $tgl = $this->input->post('tgl');\n $jenispekerjaan = $this->input->post('jenis_pekerjaan');\n $instansipekerjaan = $this->input->post('instansi_pekerjaan');\n $alamatpekerjaan = $this->input->post('alamat_pekerjaan');\n $nomorhp = $this->input->post('nomor_hp');\n $kodekabkota = $this->input->post('kode_kab_kota');\n $kotakab = $this->input->post('kota_kab');\n $alamat = $this->input->post('alamat_lengkap');\n\n $data = array(\n 'nik' => $nik,\n 'nama' => $nama,\n 'jk' => $jk,\n 'tgl' => $tgl,\n 'jenis_pekerjaan' => $jenispekerjaan,\n 'instansi_pekerjaan' => $instansipekerjaan,\n 'alamat_pekerjaan' => $alamatpekerjaan,\n 'nomor_hp' => $nomorhp,\n 'kode_kab_kota' => $kodekabkota,\n 'kota_kab' => $kotakab,\n 'alamat_lengkap' => $alamat,\n );\n\n $this->M_vaksin->input_data($data, 'tb_vaksin');\n redirect('vaksinasi');\n }",
"function tambahAmpuhan($data){\n\t\t$data = $this->security->xss_clean($data);\n\t\t$data = $this->db->escape_str($data);\n\t\t$this->db->flush_cache();\n\t\tif(!$this->db->insert('ampuhan',$data)){\n\t\t\t$query=$this->db->error();\n\t\t\treturn $query['code'];\n\t\t}else {\n\t\t\t$query='0';\n\t\t\treturn $query;\n\t\t}\n\t}",
"public function tambahDataKC()\n {\n $data = array(\n 'kode_cabang' => htmlspecialchars($this->input->post('kode_cabang', true)),\n 'nama_kantorcabang' => htmlspecialchars($this->input->post('nama_kantorcabang', true))\n );\n\n //QUERY INSERT DATA\n $this->db->insert('tb_kantorcabang', $data);\n // Produces: INSERT INTO mytable (title, name, date) VALUES ('My title', 'My name', 'My date')\n }",
"public function barang_tambah_proses()\n\t{\n\t\t// define array data for insert\n\t\t$indata = array(\n\t\t'nama_barang' => $_POST['nama_barang'],\n\t\t'harga_barang' => $_POST['harga'],\n\t\t'stok' => $_POST['stok'],\n\t\t'deskripsi' => $_POST['isi'],\n\t\t'kode_kategori' => $_POST['kategori']\n\t\t);\n\t\t\n\t\t// define configuration for upload image\n\t\t$config['upload_path'] = './uploads/';\n\t\t$config['allowed_types'] = 'gif|jpg|png';\n\t\t$config['max_size'] = 2000;\n\t\t$config['max_width'] = 2048;\n\t\t$config['max_height'] = 1024;\n\t\t\n\t\t// set configuration\n\t\t$this->load->library('upload', $config);\n\t\t\n\t\t// if image is can't to uploaded\n\t\tif ( ! $this->upload->do_upload('gambar'))\n\t\t{\n\t\t\techo $this->upload->display_errors();\n\t\t}\n\t\telse // can to upload\n\t\t{\n\t\t\t// define array name for gambar from data uploaded\n\t\t\t$indata['gambar'] = $this->upload->data('file_name');\n\t\t}\n\t\t\n\t\t// insert execution\n\t\t$this->ModelsKedai->insert(\"barang\",$indata);\n\t\t\n\t\t// goto barang page\n\t\tredirect('administrator/barang/1');\n\t}",
"public function addPesan()\n\t{\n\t\t$ambil_akun1 = $this->Wali_Kelas_model->ambil_user($this->session->userdata('uname'));\n\t\t$ambil_status = $this->Wali_Kelas_model->ambil_status($this->session->userdata('kode'));\n\t\t$data = array(\n\t\t\t'user1' => $ambil_akun1,\n\t\t\t'status' => $ambil_status\n\t\t);\n\t\t$data['jumlah']=$this->Wali_Kelas_model->ambil_jumlah($this->session->userdata('uname'));\n\t\t$data['listMahasiswa_W'] = $this->Wali_Kelas_model->getAllMahasiswa_W();\n\t\t$data['notifInformasi']=$this->Wali_Kelas_model->notifInformasi_Wali();\n\t\t$data['ListNotifInformasi']=$this->Wali_Kelas_model->ListNotifInformasi_Wali();\n\t\t$data['notif'] = $this->Wali_Kelas_model->notifikasiPesan();\n\t\t$data['LihatNotifRespon']=$this->Wali_Kelas_model->LihatNotifRespon_Wali();\n\t\t$data['notifPesan'] = $this->Wali_Kelas_model->notifPesan_Wali();\n\t\t$data['ListnotifPesan'] = $this->Wali_Kelas_model->ListNotifPesan_Wali();\n\t\t$this->load->view('W_Buat_Pesan',$data);\n\t}",
"public function tambah($id_blok = null)\n\t{\n\t\t$data = [ 'aktif'\t=> 'prospektus',\n\t\t\t\t 'unit'\t=> $this->M_prospektus->get_unit_blok($id_blok),\n 'id_blok' => $id_blok\n\t\t\t\t];\n\n\t\t$this->template->load('template','prospektus/V_tambah_data', $data);\n\t}",
"public function tambah_resources()\n {\n $id_pros = $this->uri->segment(3);\n\n $data = ['id_pros' => $id_pros,\n 'aktif' => 'prospektus',\n 'data_gambar' => $this->M_prospektus->get_file_foto()\n ];\n\n $this->template->load('template', 'prospektus/V_tambah_res', $data);\n\n }",
"public function tambah_data($no_meja)\n {\n $waktu_penjualan=Date(\"Y-m-d H:i:s\");\n $sql= \"INSERT INTO `penjualan` (no_meja,waktu_penjualan) VALUES ('$no_meja','$waktu_penjualan')\";\n $insert=$this->konek->query($sql);\n $id_penjualan=$this->konek->insert_id;\n if($insert){\n $status= \"Berhasil Menambahkan Data\";\n }else{\n $status=\"Gagal Menambahkan Data\".$sql;\n }\n return $id_penjualan;\n }",
"function insert()\n\t{\n\t\t$nama = $_POST ['nama'];\n\t\t$tipe = $_POST ['tipe'];\n\t\t$harga = $_POST ['harga'];\n\t\t$bintang = $_POST ['bintang'];\n\t\t$fasilitas = $_POST ['fasilitas'];\n\t\t$strategis = $_POST ['strategis'];\n\n\t\t//save ke db (nama_lengkap dan alamat sesuai nama tabel di DB)\n\t\t$data = array('nama_hotel'=> $nama, 'tipe_kamar'=> $tipe, 'harga'=> $harga, 'bintang'=> $bintang, 'fasilitas'=> $fasilitas, 'strategis'=> $strategis);\n\t\t$tambah = $this->model_alternatif->tambahData('alternatif', $data);\n\t\tif($tambah >0)\n\t\t{\n\t\t\tredirect ('Alternatif/index');\n\t\t}\n\n\t\telse\n\t\t{\n\t\t\techo 'Gagal Disimpan';\n\t\t}\n\n\t}",
"public function tambah($object)\n\t{\n\t\t$this->db->insert('data_b', $object);\n\t}",
"function tambah(){\n if($this->session->userdata('akses')=='1' || $this->session->userdata('akses')=='3'){\n $barang = array();\n if ($this->input->method() == \"post\") {\n $barang = array(array(\n 'barang_nama' => $this->input->post(\"barang_nama\"),\n 'harga' => $this->input->post(\"harga\"),\n 'insentif' => $this->input->post(\"insentif\"),\n 'detail' => $this->input->post(\"detail\"),\n 'created_at' => date(\"Y-m-d H:i:s\")\n ));\n\n if ($this->form_validation->run('form_barang') == TRUE) { \n \n $insert = $this->Barang_model->tambah($barang);\n\n if ($insert) {\n sa_alert('success', 'Mantul..', 'Data baru berhasil di simpan', base_url('barangs'));\n top_right_toastr('success', 'Data barang baru berhasil di tambahkan', 'masuk pak eko!');\n } else {\n sa_alert('error', 'Oops..', 'Gagal menyimpan data baru!!!', base_url('barangs/tambah'));\n top_right_toastr('danger', 'Gagal menambahkan Data barang baru..', 'Oops!!!');\n } \n } \n }\n\n $data['title'] = 'index | Barangs | tambah';\n $data['breadcrumb'] = array(\n base_url('') => \"Home\",\n base_url('barangs') => \"Barang\"\n );\n $data['breadcrumb_active']= 'Barang Baru'; \n $data['barang'] = $barang;\n\n $page = 'barangs/barang_form';\n\n echo modules::run('new_template/loadview', $data, $page);\n }else{\n sa_alert('error', 'Oops..!', 'Anda tidak memiliki hak akses!!!', base_url('auth'));\n }\n }",
"public function actionCreate() {\n $model = new Barang();\n\n if ($model->load(Yii::$app->request->post())) {\n\n $model->stok = 0;\n\n if ($model->save()) {\n if (Url::previous('b-create')) {\n $var = Url::previous('b-create');\n Yii::$app->session->remove('b-create');\n Yii::$app->getSession()->setFlash(\n 'success', 'Berhasil menambahkan barang : <b>' . $model->nama\n );\n return $this->redirect($var);\n } else {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n }\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function tambah($data)\n {\n $this->db->insert('page', $data);\n }",
"function prosestambahpesanan(){\n\n $idpesanan = $this->input->post('idpesanan');\n $i = 0;\n $barang = $this->input->post('namabarang');\n $bahan = $this->input->post('bahan');\n $layanan = $this->input->post('layanan');\n $harga = $this->input->post('harga');\n\n $pesanan = array(\n 'idpesanan' => $idpesanan,\n 'tanggal' => $this->input->post('tanggal'),\n 'namapemesan' => $this->input->post('namapemesan')\n );\n $this->pesananmodel->tambahpesanan($pesanan);\n\n\n if ($barang[0] !== null) {\n foreach ($barang as $a) {\n $data = [\n 'idpesanan' => $idpesanan,\n 'namabarang' =>$a,\n 'idbahan'=> $bahan[$i],\n 'idlayanan' => $layanan[$i],\n 'harga' => $harga[$i],\n 'status' => 'Belum Selesai',\n ];\n\n $insert = $this->db->insert('detailpesanan', $data);\n\n if ($insert) {\n $i++;\n }\n }\n }\n\n\n redirect('backend/pesanan');\n }",
"public function insert() \n {\n if ($this->input->post('submit')) {\n\n $data = array(\n 'id_menimbang' => $this->input->post(''), \n 'isi_menimbang' => $this->input->post('isi_menimbang') \n );\n\n\n $this->Model_menimbang->insert($data);\n $id_menimbang = $this->db->insert_id();\n\n // cek jika query berhasil\n if ($this->db->trans_status() === true) {\n $this->db->trans_commit();\n $message = array('status' => true, 'message' => 'Data menimbang telah di tambahkan');\n }\n else {\n $this->db->trans_rollback();\n $message = array('status' => true, 'message' => 'Data menimbang gagal ditambahkan');\n }\n\n // simpan message sebagai session\n $this->session->set_flashdata('message', $message);\n\n // refresh page\n redirect('menimbang', 'refresh');\n }\n\n }",
"public function TambahSiswa()\n {\n\n $data['title'] = 'Tambah Data Siswa';\n $this->load->view('templates/header', $data);\n $this->load->view('templates/sidenav');\n $this->load->view('templates/navbar', $data);\n $this->load->view('siswa/TambahSiswa');\n $this->load->view('templates/footer');\n }",
"public function add_peserta_borang($data) {\r\n $objektif = $this-> input -> post('objektif');\r\n $sebab = $this-> input -> post('sebab');\r\n $penyampaian =$this -> input ->post('penyampaian');\r\n $komunikasi = $this-> input -> post('komunikasi');\r\n $interaksi =$this -> input ->post('interaksi');\r\n $respon = $this-> input -> post('respon');\r\n $difahami =$this -> input ->post('difahami');\r\n $kesan = $this-> input -> post('kesan');\r\n $aktiviti =$this -> input ->post('aktiviti');\r\n $bahan = $this-> input -> post('bahan');\r\n $tahap =$this -> input ->post('tahap');\r\n $kemahiran = $this-> input -> post('kemahiran');\r\n $tempoh =$this -> input ->post('tempoh');\r\n $lokasi = $this-> input -> post('lokasi');\r\n $penginapan =$this -> input ->post('penginapan');\r\n $makanan = $this-> input -> post('makanan');\r\n $dewan =$this -> input ->post('dewan');\r\n $urusetia = $this-> input -> post('urusetia');\r\n $faedah = $this-> input -> post('faedah');\r\n $cadangan = $this-> input -> post('cadangan');\r\n\r\n \r\n\r\n $data = array(\r\n 'ID_LATIHAN' => $data['id_latihan'],\r\n 'ID_USER' => $data['user'],\r\n 'ID_PENYELIA' =>$data['penyelia'],\r\n 'Objektif' => $objektif,\r\n 'Sebab' => $sebab,\r\n 'Penyampaian' => $penyampaian,\r\n 'Komunikasi' => $komunikasi,\r\n 'Interaksi' => $interaksi,\r\n 'Respon' => $respon,\r\n 'Difahami' => $difahami,\r\n 'Kesan' => $kesan,\r\n 'Aktiviti' => $aktiviti,\r\n 'BahanKursus' => $bahan,\r\n 'TahapPengetahuan' => $tahap,\r\n 'Kemahiran' => $kemahiran,\r\n 'TempohLatihan' => $tempoh,\r\n 'Lokasi' => $lokasi,\r\n 'Makanan' => $makanan,\r\n 'DewanKuliah' => $dewan,\r\n 'Urusetia' => $urusetia,\r\n 'Faedah' => $faedah,\r\n 'Cadangan' => $cadangan\r\n );\r\n\r\n $this-> db -> insert('penilaianpeserta',$data);\r\n \r\n}",
"function tambah($kode){\n\n\t\t$kode = $this->security->xss_clean($this->uri->segment(5));\n\t\t$data['kode'] = $kode;\n\t\t# set parameters \n\t\t$kd_dosen = $this->session->userdata(\"kd_dosen\");\n\t\t$thn = $this->session->userdata(\"ta\");\n\t\t$smt = $this->session->userdata(\"smt\");\n\t\t$status = $this->session->userdata(\"jenis_dosen\");\n\t\t\n\t\tif($data['kode'] == 'D' && ($status == 'PR' || $status == 'DS')){\n\t\t\t# load view\n\t\t\t$this->output99=$this->s00_lib_output;\n\t\t\t$this->output99->output_display('dosen/beban_tambahan_message');\n\t\t}else{\t\n\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/data_bebankerja';\n\t\t\t$parameter = array('api_search' => array($data['kode'],$kd_dosen, $thn, $smt));\n\t\t\t$data['data_beban'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\tforeach ($data['data_beban'] as $key) {\n\t\t\t\t$kd_kat = $key->KD_KAT;\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/get_jenis_nilai_kat_bebankerja';\n\t\t\t\t$parameter = array('api_search' => array($kd_kat));\n\t\t\t\t$data['nilai_kat'][$kd_kat] = $this->s00_lib_api->get_api_json($api_url,'POST',$parameter);\n\t\t\t}\n\t\t\t# cek jenis beban kerja \n\t\t\tif($kode == 'F'){\n\t\t\t\t$data['title'] = \"Narasumber/Pembicara Kegiatan\";\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/tingkat';\n\t\t\t\t$parameter = array('api_kode'=>1000, 'api_subkode'=>1, 'api_search' => array());\n\t\t\t\t$data['kategori'] = $this->s00_lib_api->get_api_json($api_url,'POST',$parameter);\n\t\t\t}else if($kode == 'G'){\t\t\t\t\n\t\t\t\n\t\t\t}else if($kode == 'H'){\t\t\t\t\n\t\t\t\t$data['jenis_haki'] = $this->s00_lib_api->get_api_jsob(URL_API_BKD.'bkd_beban_kerja/get_jenis_haki','POST',array());\t\n\t\t\t}else{\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/get_kategori';\n\t\t\t\t$parameter = array('api_search' => array($data['kode']));\n\t\t\t\t$data['kategori'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t}\n\t\t\t# load view\n\t\t\t$data['name_prodi'] = $this->get_prodi();\n\t\t\t$data['list_kategori'] = $this->daftar_kategori_bebankerja($data['kode']);\n\t\t\t$this->output99->output_display('dosen/form_hybrid_dosen',$data);\n\t\t}\n\t}",
"public function set_pengiriman($id){ // untuk membuat database langkah pengiriman\n\t\t$cek = $this->M_biodata->get_biodata($id)->result();\n\t\t$this->load->model('M_transaksi');\n\t\tif (count($cek)>0){\n\t\t\tforeach ($cek as $c){\n\t\t\t\t\n\t\t\t};\n\t\t\t$data = array(\n\t\t\t'nama' => $c->namaAlumni,\n\t\t\t'alamat' => $c->alamat,\n\t\t\t'noHp' => $c->noHp,\n\t\t\t'id_pemesan' => $c->id_alumni\n\t\t\t);\t\n\t\t\t$this->M_transaksi->set_pengiriman($data,'pengiriman');\n\t\t$this->set_pembayaran($id);\n\t\t}\n\t}",
"public function Add()\n\t{\n\t\t$this->load->view(\"admin/barang/tambah_barang\");\n\t}",
"public function actionTambahKoneksi() {\n $model = new TblServer();\n\n if (isset($_POST['TblServer'])) {\n $model->attributes = $_POST['TblServer'];\n $cek = TblServer::model()->findByAttributes(array('hostname' => $model->hostname));\n $hostname = $model->host;\n $username = $model->username;\n $password = $model->password;\n $link = @mysql_connect( $hostname, $username, $password );\n if ($link)\n {\n if (!$cek) {\n $model->attributes = $_POST['TblServer'];\n if ($model->save()) {\n\n $this->redirect('index.php?r=tblServer/create', array(\n 'model' => $model\n ));\n }\n } else {\n $this->redirect(array('site/alertServer'));\n }\n }else {\n ?>\n <script>\n alert('Tidak bisa simpan hostname karena gagal koneksi');\n window.location = 'index.php?r=tblServer/TambahKoneksi';\n </script>\n <?php\n }} else {\n $this->render('TambahKoneksi', array(\n 'model' => $model,\n ));\n }\n }",
"public function tambahPasienBaruWithId($id_user)\n {\n $data['user'] = $this->Pasien_model->get_user($id_user);\n $data['title'] = \"Tambah Pasien Baru | Tumbuh Sehat\";\n $data['judulHalaman'] = \"Tambah Pasien Baru\";\n $data['subJudulHalaman'] = \"Selamat datang di <b>Tumbuh Sehat</b>\";\n $data['iconHalaman'] = \"ik-home\";\n $data['breadcrumbs'] = '\n <li class=\"breadcrumb-item\"><a href=\"' . base_url('home') . '\"><i class=\"ik ik-home\"></i></a></li>\n <li class=\"breadcrumb-item active\">Buat Profil Pasien Baru</li>';\n $this->form_validation->set_rules(\n 'nama_depan',\n 'Nama Depan',\n 'trim|required|alpha',\n array(\n 'required' => '%s masih kosong!',\n 'alpha' => '%s inputan harus berisi huruf'\n )\n );\n $this->form_validation->set_rules(\n 'tanggal_lahir',\n 'Tanggal Lahir',\n 'required',\n array(\n 'required' => '%s masih kosong!',\n )\n );\n $this->form_validation->set_rules(\n 'nama_belakang',\n 'Nama Belakang',\n 'trim|required|alpha',\n array(\n 'required' => '%s masih kosong!',\n 'alpha' => '%s inputan harus berisi huruf'\n )\n );\n $this->form_validation->set_rules(\n 'jenis_kelamin',\n 'Jenis Kelamin',\n 'required',\n array(\n 'required' => '%s masih kosong!',\n )\n );\n $this->form_validation->set_rules(\n 'hubungan',\n 'Hubungan',\n 'required',\n array(\n 'required' => '%s masih kosong!',\n )\n );\n $this->form_validation->set_rules(\n 'no_hp',\n 'No Hp',\n 'trim|required|min_length[8]|max_length[12]',\n array(\n 'required' => '%s masih kosong!'\n )\n );\n $this->form_validation->set_rules(\n 'email',\n 'Email',\n 'required|valid_email',\n array(\n 'required' => '%s masih kosong!',\n 'valid_email' => '%s format emailnya salah!',\n )\n );\n if ($this->form_validation->run() == FALSE) {\n $this->load->view('components/header', $data);\n $this->load->view('components/sidebar_resepsionis');\n $this->load->view('components/breadcrumbs', $data);\n $this->load->view('pages/home/resepsionis/tambahPasien', $data);\n $this->load->view('components/footer');\n } else {\n $insert = $this->add_profil_pasien();\n if ($insert) {\n $this->session->set_flashdata('gagal', 'Data Gagal Ditambah!');\n } else {\n $this->session->set_flashdata('berhasil', 'Data Berhasil Ditambah!');\n }\n redirect('pasien/tambahPasienBaruWithId/' . $id_user);\n }\n }",
"function tambah_user($data){\n$this->db->insert('tb_user', $data);\n}",
"function TambahDataPegawai()\n\t{\n\t\tinclude '../../koneksi/koneksi.php';\n\n\t\t//inisialisasi\n\t\t$id_pegawai = $_POST['id_pegawai'];\n\t\t$nama = $_POST['nama'];\n\t\t$jabatan = $_POST['jabatan'];\n\t\t$username = $_POST['username'];\n\t\t$password = $_POST['password'];\n\t\t$password = md5($password);\n\n\t\t//insert ke tabel user\n\t\t$sql = \"INSERT INTO user (username, password) VALUES(?, ?)\";\n\t\t$stmt = $db->prepare($sql);\n\t\t$stmt->bind_param('ss', $username, $password);\n\t\tif($stmt->execute()){\n\t\t\t$stmt->insert_id;\n\t\t}else{\n\t\t\tdie('Error : ('. $db->errno .')'. $db->error);\n\t\t}\n\t\t$stmt->close();\n\n\t\t//get id user \n\t\t$sql = \"SELECT id_user FROM user WHERE username='$username'\";\n\t\t$stmt = $db->prepare($sql);\n\t\t$stmt->execute();\n\n\t\t$stmt->bind_result($id_user);\n\t\twhile($stmt->fetch()){\n\t\t\t$id_user;\n\t\t}\n\n\t\t//insert ke tabel pegawai\n\t\t$sql = \"INSERT INTO pegawai (id_pegawai, nama, jabatan, id_user) VALUES(?, ?, ?, ?)\";\n\t\t$stmt = $db->prepare($sql);\n\t\t$stmt->bind_param('sssi', $id_pegawai, $nama, $jabatan, $id_user);\n\t\tif($stmt->execute()){\n\t\t\techo \"Data berhasil disimpan\";\n\t\t}else{\n\t\t\tdie('Error : ('. $db->errno .')'. $db->error);\n\t\t}\n\t\t$stmt->close();\n\t}",
"public function add()\n\t{\n\t\t$username = $this->input->post('username');\n\t\t$password = $this->input->post('password');\n\t\t$password = md5($password);\n\t\t$level = $this->input->post('level');\n\t\t$mangdl = array('username' => $username, 'password' => $password, 'level' => $level);\n\n\t\tif($this->crud_model->insert($mangdl)) {\n\t\t\t$this->load->view('thanhcong');\n\t\t}\n\t}",
"public function add()\n\t{\n\t\t$nama = html_escape($this->input->post('nama', true));\n\t\t$username = html_escape(str_replace(' ', '', strtolower($this->input->post('username', true))));\n\t\t$password = html_escape(sha1($this->input->post('password', true)));\n\t\t$level = html_escape($this->input->post('level', true));\n\n\t\t$data = [\n\t\t\t'username' => $username,\n\t\t\t'password' => $password,\n\t\t\t'nama_user' => $nama,\n\t\t\t'level' => $level\n\t\t];\n\n\t\t$this->User_m->insert('users', $data);\n\t\t$this->session->set_flashdata('pesan', '<div class=\"alert alert-success\">Data User Berhasil Ditambahkan.</div>');\n\t\tredirect('admin/user');\n\t}",
"function tambah_user_level($data) {\n global $conn;\n\n $id_akses = htmlspecialchars($_POST['id_akses']);\n $deskripsi = htmlspecialchars($_POST['deskripsi']);\n $created_at = htmlspecialchars($_POST['created_at']);\n\n\n\n $result = mysqli_query($conn, \"SELECT * FROM hak_akses WHERE id_akses = $id_akses AND deskripsi = '$deskripsi' \");\n \n if (mysqli_fetch_assoc($result)) {\n return false;\n }\n\n $query = \"INSERT INTO hak_akses( \n deskripsi,\n id_akses,\n created_at\n ) VALUES(\n '$deskripsi',\n $id_akses,\n '$created_at' \n )\";\n $tambah = mysqli_query($conn, $query);\n\n return mysqli_affected_rows($conn);\n }",
"function tambah($koneksi){\n\t\n\tif (isset($_POST['btn_simpan'])){\n\t\t$kode_desa = $_POST['kode_desa'];\n\t\t$nama_desa = $_POST['nama_desa'];\n\t\t$kecamatan = $_POST['id_kecamatan'];\n\t\t$kabupaten = $_POST['kabupaten'];\n\t\t$reje_kampung = $_POST['reje_kampung'];\n\t\t$nama_camat = $_POST['nama_camat'];\n\t\t$nip = $_POST['nip'];\n\t\t$alamat = $_POST['alamat'];\n\t\t$kode_pos = $_POST['kode_pos'];\n\t\t\n\t\tif(!empty($kode_desa) && !empty($nama_desa) && !empty($kecamatan) && !empty($kabupaten) && !empty($reje_kampung)){\n\n\t\t\t$sql =\"INSERT INTO desa\n (kode_desa,id_kecamatan,nama_desa,kabupaten,reje_kampung,nama_camat,nip,alamat,kode_pos)\n VALUES('$kode_desa','$kecamatan','$nama_desa','$kabupaten','$reje_kampung','$nama_camat','$nip','$alamat','$kode_pos')\";\n\n\t\t\t$simpan = mysqli_query($koneksi, $sql);\n\t\t\tif($simpan && isset($_GET['aksi'])){\n\t\t\t\tif($_GET['aksi'] == 'create'){\n\t\t\t\t\theader('location: index.php');\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$pesan = \"Tidak dapat menyimpan, data belum lengkap!\";\n\t\t}\n\t}\n\n\t?> \n\t\t<form action=\"\" method=\"POST\">\n\t\t\t<fieldset>\n\t\t\t\t<div class=\"table-responsive\">\n\t\t\t\t\t<table class=\"table table-responsive-sm table-hover\" border=\"0\">\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Nomor Berkas </td>\n\t\t\t\t\t\t\t<td> : <input type=\"number\" name=\"no_berkas\" required /></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Tahun </td> \n\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"tahun\" required /></label></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Nama Proyek</td> \n\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t <select name=\"id_proyek\" required>\n\t\t\t\t\t\t \t<?php \n\t\t\t\t\t\t\t\t\t\t$dataproyek = array();\n\t\t\t\t\t\t\t\t\t\t$sql = mysqli_query($koneksi, \"SELECT * FROM proyek\");\n\t\t\t\t\t\t\t\t\t\twhile ($proyek = mysqli_fetch_assoc($sql)) {\n\t\t\t\t\t\t\t\t\t\t $dataproyek[] = $proyek;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t <option disabled selected value=\"\">-Pilih Proyek-</option>\n\t\t\t\t\t\t <?php foreach ($dataproyek as $key => $value):?>\n\t\t\t\t\t\t <option value=\"<?= $value[\"id_proyek\"] ?>\"><?= $value[\"nama_proyek\"] ?></option>\n\t\t\t\t\t\t <?php endforeach ?>\n\t\t\t\t\t\t </select>\n\t\t\t\t\t </td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Desa</td> \n\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t <select name=\"id_desa\" required>\n\t\t\t\t\t\t \t<?php \n\t\t\t\t\t\t\t\t\t\t$datadesa = array();\n\t\t\t\t\t\t\t\t\t\t$sql = mysqli_query($koneksi, \"SELECT * FROM desa\");\n\t\t\t\t\t\t\t\t\t\twhile ($desa = mysqli_fetch_assoc($sql)) {\n\t\t\t\t\t\t\t\t\t\t $datadesa[] = $desa;\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t <option disabled selected value=\"\">-Pilih Desa-</option>\n\t\t\t\t\t\t <?php foreach ($datadesa as $key => $value):?>\n\t\t\t\t\t\t <option value=\"<?= $value[\"id_desa\"] ?>\"><?= $value[\"nama_desa\"] ?></option>\n\t\t\t\t\t\t <?php endforeach ?>\n\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t </td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t<td><label class=\"ml-2\">\n\t\t\t\t\t\t\t<input type=\"submit\" name=\"btn_simpan\" value=\"Cari\" class=\"btn btn-primary\"/>\n\t\t\t\t\t\t\t<a href=\"index.php?aksi=insert\" class=\"btn btn-primary\" >Buat</a>\n\t\t\t\t\t\t\t<!-- <input type=\"reset\" name=\"reset\" value=\"Besihkan\"/> -->\n\t\t\t\t\t\t</label></td>\n\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t</table>\n\t\t\t\t\t<br>\n\t\t\t\t</div>\n\n\t\t\t\t<p><?php echo isset($pesan) ? $pesan : \"\" ?></p>\n\t\t\t</fieldset>\n\t\t</form>\n\n\t<?php\n\n}",
"public function tambah()\n {\n if ($this->session->userdata('status') == 1) {\n $this->session->set_flashdata('failed', 'Anda tidak memiliki akses ke halaman tersebut');\n redirect('pengeluaran');\n }\n global $data;\n $data['active'] = 'tambahPengeluaran';\n $data['title'] = 'Add Expense';\n $this->form_validation->set_rules('nama_pengeluaran', 'Nama Pengeluaran', 'required');\n $this->form_validation->set_rules('jenis_pengeluaran', 'Jenis Pengeluaran', 'required');\n $this->form_validation->set_rules('total', 'Total Pengeluaran', 'required');\n $this->form_validation->set_rules('tanggal', 'Tanggal Pengeluaran', 'required');\n $this->form_validation->set_error_delimiters('<span class=\"help-block\">', '</span>');\n\n if ($this->form_validation->run() == TRUE) {\n if ($this->PengeluaranModel->tambah()) {\n $this->session->set_flashdata('success', 'Berhasil menambahkan data pengeluaran baru');\n redirect('pengeluaran','refresh');\n } else {\n $this->session->set_flashdata('failed', 'Gagal menambahkan data pengeluaran baru');\n }\n } else {\n $this->load->view('Components/header', $data);\n $this->load->view('Pengeluaran/tambah', $data);\n $this->load->view('Components/footer');\n }\n }",
"public function aksi_tambah_pejabat_berwenang()\n {\n $data = array(\n 'nip' => $this->input->post('nip'),\n 'nama' => $this->input->post('nama'),\n 'jabatan' => $this->input->post('jabatan'),\n 'pangkat_gol' => $this->input->post('pangkat_gol'),\n );\n\n $this->m_admin->tambah_pejabat($data);\n $this->session->set_flashdata('success', 'ditambahkan');\n redirect('admin/list_data_pejabat_berwenang');\n }",
"public function pendadaran_add()\n\t{\n\t\t$data = array( 'isi' \t=> 'pendadaran/pendadaran_add',\n\t\t\t\t\t\t'nav'\t=>\t'admin/v_nav_admin',\n\t\t\t\t\t\t'title' => 'Tampil Dashboard Admin');\n\t\t$this->load->view('layout/wrapper',$data);\n\t}",
"public function act_add_penjualan()\n {\n\n $produk = $this->input->post('produk');\n $presentase = $this->input->post('presentase');\n $no_hp = $this->input->post('no_hp');\n\n $action = $this->general->create('m_customer_penjualan',\n array('produk' => $produk,\n 'presentase' => $presentase,\n 'no_hp' => $no_hp,\n ));\n if ($action) {\n echo (\"<script LANGUAGE='JavaScript'>window.location.href='\".base_url('sales/customer/data_verifikasi1/').\"';</script>\");\n }\n\n }",
"public function tambah_data()\n {\n $roleId = session()->get('roleId');\n $nama = session()->get('nama');\n $noKK = session()->get('noKK');\n if ($noKK) {\n $segment = $this->request->uri->getSegment(1);\n $menu = $this->MenuModel->userMenu($segment);\n $menuId = $menu[0]['id'];\n $akses = $this->MenuModel->getAkses($roleId, $menuId);\n if (!$akses) {\n if ($roleId == 2) {\n return redirect()->to('/User/index');\n } else {\n return redirect()->to('/Admin/dashboard');\n }\n }\n } else {\n return redirect()->to('/');\n }\n $data = [\n 'judul' => 'JGK - Bansos',\n 'validation' => \\Config\\Services::validation(),\n 'menu' => $this->MenuModel->getMenu($roleId),\n 'submenu' => $this->MenuModel->getSubMenu($roleId),\n 'nama' => $nama\n ];\n return view('/Admin/tambah_data', $data);\n }",
"function tambah($data) {\n $conn = koneksi_db();\n\n // Upload Gambar\n $gambar = upload();\n if (!$gambar) {\n return false;\n }\n\n $judul_buku = htmlspecialchars($data['judul_buku']);\n $deskripsi = htmlspecialchars($data['deskripsi']);\n $penulis = htmlspecialchars($data['penulis']);\n $tahun_terbit = htmlspecialchars($data['tahun_terbit']);\n $penerbit = htmlspecialchars($data['penerbit']);\n $stok = htmlspecialchars($data['stok']);\n $harga = htmlspecialchars($data['harga']);\n\n $query = \"INSERT INTO daftar_buku VALUES\n ('', '$gambar', '$judul_buku', '$deskripsi', '$penulis', '$tahun_terbit', '$penerbit', '$stok', '$harga')\";\n\n mysqli_query($conn, $query);\n\n return mysqli_affected_rows($conn);\n }",
"function tambah($data){\r\n\t\tglobal $conn;\r\n\r\n\t\t$nim = htmlspecialchars($data[\"nim\"]);\r\n\t\t$namalengkap = htmlspecialchars($data[\"namalengkap\"]);\r\n\t\t$kotaasal = htmlspecialchars($data[\"kotaasal\"]);\r\n\t\t$tanggallahir = htmlspecialchars($data[\"tanggallahir\"]); \r\n\t\t$namaorangtua = htmlspecialchars($data[\"namaorangtua\"]);\r\n\t\t$alamatorangtua = htmlspecialchars($data[\"alamatorangtua\"]);\r\n\t\t$kodepos = htmlspecialchars($data[\"kodepos\"]);\r\n\t\t$nomortelepon = htmlspecialchars($data[\"nomortelepon\"]);\r\n\t\t$status = htmlspecialchars($data[\"status\"]);\r\n\r\n\t\t//query insert data\r\n\t\t$query = \"INSERT INTO datamahasiswa\r\n\t\t\t\t\t\tVALUES \r\n\t\t\t\t\t('', '$nim', '$namalengkap', '$kotaasal', '$tanggallahir', '$namaorangtua', '$alamatorangtua', '$kodepos', '$nomortelepon', '$status')\r\n\t\t\t\t\t\";\r\n\t\tmysqli_query($conn, $query);\r\n\r\n\t\treturn mysqli_affected_rows($conn);\r\n\r\n\t\t}",
"public function aksi_tambah_pengikut_suket014()\n\t{\n\t\t$id_permohonan = $this->input->post('id_permohonan_surat');\n\n\t\t$data_pengikut = array(\n\t\t\t'id_permohonan_surat' => $id_permohonan,\n\t\t\t'nama' => $this->input->post('nama'),\n\t\t\t'jenis_kelamin' => $this->input->post('jenis_kelamin'),\n\t\t\t'tempat_lahir' => $this->input->post('tempat_lahir'),\n\t\t\t'tanggal_lahir' => $this->input->post('tanggal_lahir'),\n\t\t\t'umur' => $this->input->post('umur'),\n\t\t\t'status_perkawinan' => $this->input->post('status_perkawinan'),\n\t\t\t'pendidikan_terakhir' => $this->input->post('pendidikan_terakhir'),\n\t\t\t'nama_ortu' => $this->input->post('nama_ortu'),\n\t\t\t'status_hub_kk' => $this->input->post('status_hub_kk'),\n\t\t);\n\n\t\t$this->m_warga->aksi_tambah_pengikut($data_pengikut);\n\n\t\t$this->session->set_flashdata('success', 'ditambahkan');\n\t\tredirect('warga/list_pengikut_suket014/' . $id_permohonan);\n\t}",
"public function tambah()\n\t{\n\t\t$previllage = 1;\n\t\tcheck_super_user($this->fungsi->user_login()->tipe_user,$previllage);\n\n\t\t//Load librarynya dulu\n\t\t$this->load->library('form_validation');\n\t\t//Atur validasinya\n\t\t$this->form_validation->set_rules('judul', 'judul', 'min_length[3]|is_unique[tb_tugas.judul]|max_length[50]');\n\n\t\t//Pesan yang ditampilkan\n\t\t$this->form_validation->set_message('min_length', '{field} Setidaknya minimal {param} karakter.');\n\t\t$this->form_validation->set_message('max_length', '{field} Seharusnya maksimal {param} karakter.');\n\t\t$this->form_validation->set_message('is_unique', 'Data sudah ada');\n\t\t//Tampilan pesan error\n\t\t$this->form_validation->set_error_delimiters('<span class=\"badge badge-danger\">', '</span>');\n\n\t\tif ($this->form_validation->run() == FALSE) {\n\t\t\t$data['menu'] = \"Tambah Data tugas\";\n\t\t\t$this->templateadmin->load('template/dashboard','tugas/tambah',$data);\n\t } else {\n $post = $this->input->post(null, TRUE);\t \n\n \n\n\t\t\t\t//CEK GAMBAR\n $config2['upload_path'] = 'assets/dist/files/tugas/';\n $config2['allowed_types'] = 'doc|docx|pdf|ppt|pptx';\n $config2['max_size'] = 6000;\n $config2['file_name'] = 'tugas-'.date(\"Ymdhis\");\n\n\t\t\t\t$upload_2 = $this->load->library('upload', $config2);\n\t\t\t\tif (@$_FILES['file']['name'] != null) {\n\t\t\t\t\t\t$this->upload->initialize($config2);\n\t\t\t\t \tif ($this->upload->do_upload('file')) {\n\t\t\t\t \t \t$post['file'] = $this->upload->data('file_name');\n\t \t} else {\n\t\t\t\t\t\t\t$pesan = $this->upload->display_errors();\n\t\t\t\t\t\t\t$this->session->set_flashdata('danger',$pesan);\n\t\t\t\t\t\t\tredirect('tugas/tambah');\n\t\t }\n\t\t }\t\t\t\t\n\t\t\t \n\t\t\t\t$this->tugas_m->simpan($post);\n\t \tif ($this->db->affected_rows() > 0) {\n\t \t\t$this->session->set_flashdata('success','Berhasil Di Publish');\n\t \t}\t \t \t\n\t redirect('tugas');\t \t\n\t }\n\t}",
"public function proses_ubah($id)\n\t{\n\t\t$data = array(\n\t\t\t'page_title' \t=> \"Tambah Soal\", \n\t\t\t'form_action' => current_url() . \"?id=$id\"\n\t\t\t);\n\n\t\t//fetch input (make sure that the variable name is the same as column name in database!) \n\t\t$params = $this->input->post(null, true);\n\t\t$kategori \t\t \t\t\t= $params['kategori_materi'];\n\t\t$mapel_id \t\t\t\t\t= $params['nama_mapel'];\n\t\t$materi_pokok_id\t\t= $params['materi_pokok'];\n\t\t$nama_sub_materi \t\t= $params['judul_materi'];\n\t\t$isi_materi \t \t\t\t= $params['konten_materi'];\n\t\t$gambar_materi\t \t\t= $params['gambar_materi']; \n\t\t$tanggal\t \t\t\t\t\t= $params['tanggal_post']; \n\t\t$waktu\t \t\t\t\t\t\t= $params['waktu_post']; \n\n\t\t//run the validation\n\t\tif ($this->form_validation->run() == FALSE) \n\t\t{\n\t\t\talert_error(\"Error\", \"Data gagal ditambahkan\");\n\t\t\t$this->load->view('pg_admin/materi_form', $data);\n\t\t}\n\t\telse \n\t\t{\n\t\t\t//passing input value to Model\n\t\t\t$result = $this->model_adm->add_materi($kategori, $mapel_id, $materi_pokok_id, $nama_sub_materi, $isi_materi, $gambar_materi, $tanggal, $waktu);\n\t\t\talert_success(\"Sukses\", \"Data berhasil ditambahkan\");\n\t\t\tredirect('pg_admin/materi');\n\t\t\t// echo \"Status Insert: \" . $result;\n\t\t}\t\n\t}",
"public function viewTambahLelang()\n {\n //kalo belum login\n if(!Session::get('login')){\n //masuk sini\n return redirect('petugas/login')->with('alert','Kamu harus login dulu');\n //kalo id levelnya 1 masuk petugas \n }elseif(Session::get('id_level') == 1){\n //ini untuk mengambil data barang dari tabel barang\n $data['barang'] = \\App\\Barang::get();\n //ini untuk menampilkan tampilan lelang pada folder petugas\n return view('petugas.tambahEditLelang',$data); \n }else{\n return redirect('admin/home');\n }\n \n }",
"function prosess_tambah(){\n\t\t$this->form_validation->set_rules('txt_nama', 'Nama user', 'trim|required|xss_clean');\n\t\t$this->form_validation->set_rules('txt_username', 'Username', 'trim|required|xss_clean');\n\t\t$this->form_validation->set_rules('txt_password', 'Passowrd', 'trim|required|xss_clean');\n\t\t$this->form_validation->set_rules('txt_roleid', 'Role', 'trim|required|xss_clean');\n\t\t$this->form_validation->set_error_delimiters('<span class=\"error\">', '</span>');\n\n\t\tif($this->form_validation->run() == FALSE) {\n\t\t\t/* data dropdown */\n\t\t\t$data['role'] = role_dropdown();\n\t\t\t$this->template->write_view('tambah', $data);\n\t\t} else {\n\t\t\t/* membuat variable post data */\n\t\t\t$nama = $this->input->post('txt_nama');\n\t\t\t$username = $this->input->post('txt_username');\n\t\t\t$password = $this->input->post('txt_password');\n\t\t\t$roleid = $this->input->post('txt_roleid');\n\n\t\t\t$this->db->trans_start();\n\t\t\t/* membuat value */\n\t\t\t$this->user->setNama($nama);\n\t\t\t$this->user->setUsername($username);\n\t\t\t$this->user->setPassword($password);\n\t\t\t$this->user->setRoleID($roleid);\n\n\t\t\t/* fungsi insert data ke database */\n\t\t\t$this->user->insert_data();\n\t\t\t$this->db->trans_complete();\n\n\t\t\t/* flashdata info error/sukses */\n\t\t\t$this->session->set_flashdata('pesan', 'sukses');\n\t\t\tredirect($this->uri->segment(1). '/index');\n\t\t}\n\t}",
"function default_add(){\n\tglobal $assign_list, $_CONFIG, $_SITE_ROOT, $mod,$log,$C;\n\tglobal $core, $clsModule, $clsButtonNav;\n\t$tableName = \"huy_setting_lipe\";\n\t$classTable = \"Setting_Lipe\";\n\t$pkeyTable = \"id\";\n\t$clsUser=new User();\n\trequire_once DIR_COMMON.\"/clsForm.php\";\n\t//get _GET, _POST\n\t$pvalTable = isset($_REQUEST[$pkeyTable])? $_REQUEST[$pkeyTable] : \"\";\n\t$btnSave = isset($_REQUEST[\"btnSave\"])? $_REQUEST[\"btnSave\"] : \"\";\n\t$c_id = isset($_REQUEST[\"c_id\"])? $_REQUEST[\"c_id\"] : \"\";\n\t// check permission\n\t$username= $_COOKIE['username'];\n\tif ($clsUser->CheckRole($username,$c_id)=='0')\n\t {\n\t $redirect_url='?'.$_SITE_ROOT.'&mod=settinglipe&c_id='.$c_id;\n\t echo \"<script>window.location='\".$redirect_url.\"'</script>\";\n die();\n\t }\n\t//get Mode\n\t$mode = ($pvalTable!=\"\")? \"Edit\" : \"New\";\n\t//init Button\n\t$clsButtonNav->set(\"Save\", \"/icon/disks.png\", \"Save\", 1, \"save\");\n\tif ($mode==\"Edit\"){\n\t\t$clsButtonNav->set(\"New\", \"/icon/add2.png\", \"?topica&mod=$mod&act=add\",1);\n\t\t$clsButtonNav->set(\"Delete\", \"/icon/delete2.png\", \"?topica&mod=$mod&act=delete&$pkeyTable=$pvalTable\");\n\t}\n\t$clsButtonNav->set(\"Cancel\", \"/icon/undo.png\", \"?topica&mod=$mod&c_id=$c_id\");\n\t//################### CHANGE BELOW CODE ###################\n\t$arrLipeTipe = array (\"I\"=>\"Số bài viết\",\"P\"=>\"Bài luyện\",\"E\"=>\"Bài Kiểm tra\",\"V\"=>\"Diễn đàn VBB\");\n\t\n\t$clsForumDiscussions = new ForumDiscussions();\n\t$clsQuizGrades = new QuizGrades();\n\t$clsQuiz = new Quiz();\n\t\n\t//$arrQuizGrades = $clsQuizGrades->getAll();\n\t$arrForumDiscussions = $clsForumDiscussions->getAll(\"course='$c_id'\");\n\t//$arrQuiz = $clsQuiz->getAll(\"course=$c_id and name not like '%luyen tap%'\");\n\t$arrQuiz = $clsQuiz->getAll(\"course=$c_id\");\n\t//print_r($arrQuiz);die();\n\t\n\t//print_r($arrForumDiscussions);die();\n\t$arrOptionForumDiscussions = array();\n\tif (is_array($arrForumDiscussions))\n\tforeach ($arrForumDiscussions as $key => $val){\n\t\t$arrOptionForumDiscussions[$val[\"id\"]] = $val[\"name\"];\n\t}\n\t\n\t$clsSetting_Calendar = new Setting_Calendar();\n\t$arrWeeknumber = $clsSetting_Calendar->getAll(\"c_id='$c_id'\");\n\t//print_r($arrForumDiscussions);die();\n\t$arrOptionWeeknumber = array();\n\tif (is_array($arrWeeknumber))\n\tforeach ($arrWeeknumber as $key => $val){\n\t\t$arrOptionWeeknumber[$val[\"id\"]] = $val[\"week_name\"];\n\t}\n\t\n\t\n\t$arrStyle = array(\"forum\"=>\"Forum\",\"exam\"=>\"Exam\",\"assignment\"=>\"Assignment\"); \n\t//print_r($arrOptionForumDiscussions);die();\n\t//init Form\n\t$clsForm = new Form();\n\t$clsForm->setDbTable($tableName, $pkeyTable, $pvalTable);\n\t$clsForm->setTitle($core->getLang(\"Edit Setting Lipe\"));\n\t\n\t$clsForm->addInputSelect(\"style\", \"\", \"Style\",$arrStyle, 0, \"style='width:200px'\");\n\t$clsForm->addInputText(\"active_id\", \"\", \"active_id\",255, 1, \"style='width:200px'\");\n\t$clsForm->addInputSelect(\"lipe_type\", \"\", \"lipe_type\",$arrLipeTipe,0, \"style='font-size:12px'\");\n\t$clsForm->addInputSelect(\"calendar_id\", \"\", \"Tuần\", $arrOptionWeeknumber, 0, \"style='width:200px'\");\n\t$clsForm->addInputTextArea(\"comment\", \"\", \"Ghi chú\", 255, 10, 5, 1, \"style='width:50%'\");\n\tif ($mode==\"New\"){\n\t$clsForm->addInputHidden(\"c_id\",\"$c_id\");\n\t}\n\t//####################### ENG CHANGE ######################\n\t//do Action\n\tif ($btnSave!=\"\"){\n\t\tif ($clsForm->validate()){\n\t\t\tif ($clsForm->saveData($mode)){\n \t$username=$_COOKIE['username'];\n\t\t\t\t\t$actionlog=new ActionLog();\n\t\t\t\t\t$actionlog->insertValue($username,'Setting lipe / Add new lipe','Course id: '.$c_id);\n\t\t\t\t\theader(\"location: ?$_SITE_ROOT&mod=$mod&c_id=$c_id\");\n\t\t\t}\n\t\t}\n\t}\n\t\n\t$assign_list[\"clsModule\"] = $clsModule;\n\t$assign_list[\"clsForm\"] = $clsForm;\n\t$assign_list[$pkeyTable] = $pvalTable;\n\t$assign_list[\"c_id\"] = $c_id;\n\t$assign_list[\"arrForumDiscussions\"] = $arrForumDiscussions;\n\t$assign_list[\"arrQuiz\"] = $arrQuiz;\n\t\n\n}",
"public function proses_add()\n {\n // $directory = './lib/blog/'; //direktori\n // $allowed_file = 'jpg|jpeg|gif|png'; //file yang diizinkan dibatasi dengan tanga |\n // $upload = $this->m_crud->uploadfile($variable,$directory,$allowed_file); //proses dengan modul insertfile\n // /* to upload file */\n // $filename = $upload['file_name'];\n\n $data = array(\n 'nama' => $this->input->post('nama'),\n 'alamat' => $this->input->post('alamat'),\n 'username' => $this->input->post('nama'),\n 'password' => md5($this->input->post('password')),\n );\n $result = $this->m_crud->insert('user', $data);\n redirect('user/');\n }",
"function TambahDataPromosi()\n\t{\n\t\tinclude '../../koneksi/koneksi.php';\n\n\t\t//inisialisasi\n\t\t$gambar_promosi = $_FILES[\"gambar_promosi\"][\"name\"]; \n\t\t$file_basename = substr($gambar_promosi, 0, strripos($gambar_promosi, '.')); // get ekstensi \n\t\t$file_ext = substr($gambar_promosi, strripos($gambar_promosi, '.')); // get nama file \n\n\t\t$folder = \"../gambar/promosi/\";\n\n\t\tif ($gambar_promosi==null) {\n\t\t\t$gambar_promosi = \"default.jpg\";\n\t\t}\n\n\t\tif ($_FILES[\"gambar_promosi\"][\"error\"] > 0){\n\t\t \t// jika file gambar tidak diupload\n\t\t \t//insert ke tabel produk\n \t\t\t$url = $gambar_promosi;\n\t\t\t$sql = \"INSERT INTO promosi (url, id_pegawai) VALUES(?, ?)\";\n\t\t\t$stmt = $db->prepare($sql);\n\t\t\t$stmt->bind_param('si', $url, $id_pegawai);\n\t\t\tif($stmt->execute()){\n\t\t\t\t$stmt->insert_id;\n\t\t\t\t$_SESSION['status_operasi_promosi'] = \"berhasil_menyimpan\";\n\t\t\t}else{\n\t\t\t\t$_SESSION['status_operasi_promosi'] = \"gagal_menyimpan\";\n\t\t\t}\n\t\t\t$stmt->close();\n\t\t}else{\n\t\t\t// Rename file\n\t\t \t$newfilename = md5($file_basename) . $file_ext;\n\n\t\t \t// cek apakah file sudah ada \n\t\t \tif (file_exists(\"$folder\".$newfilename)){\n\t\t \t\t$_SESSION['status_operasi_promosi'] = \"gagal_memperbaharui\";\n\t\t \t}else{ \n\t\t \t\t//simpan gambar ke folder lalu save path/url ke database\n\t\t \t\tif(move_uploaded_file($_FILES[\"gambar_promosi\"][\"tmp_name\"],\"$folder\".$gambar_promosi)){\n\t\t \t\t\t$url = $gambar_promosi;\n\t\t \t\t\t//insert ke tabel produk\n\t\t\t\t\t$sql = \"INSERT INTO promosi (url, id_pegawai) VALUES(?, ?)\";\n\t\t\t\t\t$stmt = $db->prepare($sql);\n\t\t\t\t\t$stmt->bind_param('si', $url, $id_pegawai);\n\t\t\t\t\tif($stmt->execute()){\n\t\t\t\t\t\t$stmt->insert_id;\n\t\t\t\t\t\t$_SESSION['status_operasi_promosi'] = \"berhasil_menyimpan\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$_SESSION['status_operasi_promosi'] = \"gagal_menyimpan\";\n\t\t\t\t\t}\n\t\t\t\t\t$stmt->close();\n\t\t \t\t}\n\t\t \t}\n\t\t}\n\t}",
"public function tambah(Request $request)\n {\n SatuanModel::create([\n 'satuan' => $request->satuan,\n ]);\n return redirect('/admin/satuan-produk')->with('message', 'Data Telah Di tambahkan');\n }",
"public function tambahKeKeranjang($id_barang)\n\t{\n\t\tif($this->session->userdata('username') == null){\n\t\t\t//KIRIM FLASHDATA\n $this->session->set_flashdata('pesan', '<div class=\"alert alert-danger alert-dismissible fade show\" role=\"alert\">\n <strong>Anda belum login! Silahkan login dulu!</strong> \n <button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\">\n <span aria-hidden=\"true\">×</span>\n </button>\n </div>');\n\t\t\tredirect('auth/login');\n\t\t}\n\t\t//jika sudah login\n\t\t$barang = $this->Barang_model->getBarangById($id_barang);\n\t\t$data = array(\n\t\t\t'id' => $barang[\"id_barang\"],\n\t\t\t'qty' => 1,\n\t\t\t'price' => $barang[\"harga\"],\n\t\t\t'name' => $barang[\"nama_barang\"]\n\t\t);\n\t\t\n\t\t$this->cart->insert($data);\n\t\t//KIRIM FLASHDATA\n\t\t$this->session->set_flashdata('pesan', '<div class=\"alert alert-success alert-dismissible fade show\" role=\"alert\">\n\t\t<strong>Berhasil masuk ke keranjang belanja anda!</strong> \n\t\t<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\">\n\t\t<span aria-hidden=\"true\">×</span>\n\t\t</button>\n\t\t</div>');\n\t\tredirect(\"dashboard\");\n\t}",
"function tambah_mk($SKSMK){\r\n\t\t\t// Format seperti di bawah ini secara otomatis akan\r\n\t\t\t// menambahkan data atau nilai baru ke dalam array\r\n\t\t\t// pada indeks paling belakang.\r\n\t\t\t// Jadi apabila sudah ada 5 data pada array tsb,\r\n\t\t\t// maka data baru akan disimpan pada posisi ke-6.\r\n\t\t\t$this->NamaMataKuliah[] = $SKSMK;\r\n\t\t}",
"public function addDataJU(){\n\n $jenisusaha = $this->ModelPengaturan;\n $validation = $this->form_validation;\n $validation->set_rules($jenisusaha->rulesJU());\n\n if ($validation->run()) {\n $jenisusaha->addDataJU();\n $this->session->set_flashdata('msg','Jenis Usaha Berhasil Di Tambah!');\n redirect('admin/Pengaturan');\n }\n redirect('admin/Pengaturan');\n }",
"public function actionCreate()\n {\n $sysMenu = PdmSysMenu::findOne(['kd_berkas' => GlobalConstMenuComponent::BA14 ]);\n $model = new PdmBa14();\n $id_perkara = Yii::$app->session->get('id_perkara');\n\n $modeljaksi = $model->jaksaPelaksana($id_perkara);\n\n $modelRp9 = PdmRp9::findOne(['id_perkara' => $id_perkara]);\n \n\n \n $modelTersangka = $this->findModelTersangka($id_perkara);\n $modelSpdp = $this->findModelSpdp($id_perkara); \n $modelt8 = Pdmt8::findOne(['id_perkara' => $id_perkara]);\n \n\n if ($model->load(Yii::$app->request->post())) {\n $Input = Yii::$app->request->post();\n $id_tersangka = $Input['PdmBa14']['id_tersangka'];\n $modelRt3 = PdmRt3::findOne(['id_perkara' => $id_perkara, 'id_tersangka' => $id_tersangka]); \n $seq = Yii::$app->db->createCommand(\"select public.generate_pk('pidum.pdm_ba14', 'id_ba14', '\".\\Yii::$app->globalfunc->getSatker()->inst_satkerkd.\"', '\".date('Y').\"')\")->queryOne();\n $model->id_ba14 = $seq['generate_pk'];\n $model->id_perkara = $id_perkara;\n $model->no_reg_tahanan= (string)$modelRt3['no_urut'];\n $model->save();\n \n $jaksa_pelaksana = explode(\"#\", $_POST['jaksa_pelaksana']); // [0] => nip, [1] => nama, [2] => jabatan, [3] => pangkat\n PdmJaksaSaksi::deleteAll(['id_perkara' => $model->id_perkara, 'code_table' => GlobalConstMenuComponent::BA14, 'id_table' => $model->id_ba14]);\n $modeljaksi2 = new PdmJaksaSaksi();\n $seqJpu = Yii::$app->db->createCommand(\"select public.generate_pk('pidum.pdm_jaksa_saksi', 'id_jpp', '\".\\Yii::$app->globalfunc->getSatker()->inst_satkerkd.\"', '\".date('Y').\"')\")->queryOne();\n $modeljaksi2->id_perkara = $model->id_perkara;\n $modeljaksi2->id_jpp = $seqJpu['generate_pk'];\n $modeljaksi2->code_table = GlobalConstMenuComponent::BA14;\n $modeljaksi2->id_table = $model->id_ba14;\n $modeljaksi2->nip = $jaksa_pelaksana[0];\n $modeljaksi2->nama = $jaksa_pelaksana[1];\n $modeljaksi2->jabatan = $jaksa_pelaksana[2];\n $modeljaksi2->pangkat = $jaksa_pelaksana[3];\n $modeljaksi2->save();\n \n Yii::$app->getSession()->setFlash('success', [\n 'type' => 'success',\n 'duration' => 3000,\n 'icon' => 'fa fa-users',\n 'message' => 'Data Berhasil di Simpan',\n 'title' => 'Simpan Data',\n 'positonY' => 'top',\n 'positonX' => 'center',\n 'showProgressbar' => true,\n ]); \n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'modelTersangka' => $modelTersangka,\n 'modelSpdp' => $modelSpdp,\n 'modeljaksi' => $modeljaksi, \n 'sysMenu' => $sysMenu,\n 'modelRp9' =>$modelRp9,\n ]);\n }\n }",
"function tambah_data($perusahaan, $kategori, $nama_file, $masa_berlaku){\r\n\t\t\t$perusahaan \t= escape($perusahaan);\r\n\t\t\t$kategori \t\t= escape($kategori);\r\n\t\t\t$nama_file\t\t= escape($nama_file);\r\n\t\t\t$masa_berlaku\t= escape($masa_berlaku);\r\n\t\t\t\r\n\t\t\t$query \t= \"INSERT INTO data (pt, kategori, nama_file, masa_berlaku) VALUES ('$perusahaan', '$kategori', '$nama_file', '$masa_berlaku')\";\r\n\t\t\treturn run($query);\r\n\t\t}"
] | [
"0.77380943",
"0.7581943",
"0.74541795",
"0.73790556",
"0.7374834",
"0.73163694",
"0.7299199",
"0.72609967",
"0.7187518",
"0.7181537",
"0.71769106",
"0.7127629",
"0.71091723",
"0.70687544",
"0.70630574",
"0.70385265",
"0.7018722",
"0.69738483",
"0.6963935",
"0.6963748",
"0.6957947",
"0.6931857",
"0.68677264",
"0.68570554",
"0.68448377",
"0.68331647",
"0.6817239",
"0.67835313",
"0.67609864",
"0.6743403",
"0.6729838",
"0.672294",
"0.67001987",
"0.6658388",
"0.6656892",
"0.66555405",
"0.6649978",
"0.66374016",
"0.66322535",
"0.66302425",
"0.6627962",
"0.6614352",
"0.6600039",
"0.65966773",
"0.65950304",
"0.6591791",
"0.65854335",
"0.657967",
"0.6574775",
"0.6569262",
"0.6568369",
"0.6567403",
"0.6559344",
"0.65560526",
"0.6556022",
"0.65535337",
"0.6550802",
"0.6547276",
"0.65380406",
"0.65277284",
"0.65242565",
"0.65221584",
"0.65187967",
"0.65181404",
"0.65154845",
"0.65013015",
"0.65006864",
"0.649892",
"0.6494038",
"0.64924204",
"0.6486105",
"0.6471411",
"0.6470523",
"0.6461856",
"0.6455993",
"0.6449636",
"0.644284",
"0.6441461",
"0.6435218",
"0.6434099",
"0.64239067",
"0.64149374",
"0.64035344",
"0.6402772",
"0.63958883",
"0.63954115",
"0.6391542",
"0.6383564",
"0.63717693",
"0.636951",
"0.6366145",
"0.63592684",
"0.6357569",
"0.63541824",
"0.6353309",
"0.63510704",
"0.6349654",
"0.6346245",
"0.63443226",
"0.6342972",
"0.6338295"
] | 0.0 | -1 |
Project: Growing Logic Web platform to aid the teaching of computational thinking for public and private institutions | function str_replace_first($search, $replace, $subject) {
$pos = strpos($subject, $search);
if ($pos !== false) {
return substr_replace($subject, $replace, $pos, strlen($search));
}
return $subject;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function run()\n {\n $policies = array(\n '1' => '1.\tImprove access & equity in higher education',\n '2' => '2.\tImprove internal efficiency in higher education',\n '3' => '3.\tImprove quality & relevance of higher education',\n '4' => '4.\tImprove gender diversity in higher education',\n '5' => '5.\tImprove internationalization',\n '6' => '6.\tImprove capacity and resources mobilization',\n );\n\n $descriptions = array(\n '1.1' => '1.1\tIncrease capacity to enroll new students',\n '1.2' => '1.2\tIncrease enrollment in STEM study fields',\n '1.3' => '1.3\tIncrease participation of female students',\n '1.4' => '1.4\tIncrease participation of female students in STEM subjects',\n '1.5' => '1.5\tIncrease participation of persons with disabilities',\n '1.6' => '1.6\tIncrease participation of students from emerging regions',\n '1.7' => '1.7\tIncrease participation of students from economically poor households',\n\n '2.1' => '2.1\tReduce dropout rate of male and female students',\n '2.2' => '2.2\tReduce dropout rate of female students',\n '2.3' => '2.3\tReduce academic dismissal rate of male and female students',\n '2.4' => '2.4\tReduce academic dismissal rate of female students',\n '2.5' => '2.5\tIncrease graduation rate of male and female students',\n '2.6' => '2.6\tIncrease graduation rate of female students',\n '2.7' => '2.7\tIncrease graduation rate of students with disabilities',\n '2.8' => '2.8\tIncrease graduation rate of students from emerging regions',\n '2.9' => '2.9\tIncrease graduation rate of students from economically poor households',\n\n '3.1' => '3.1\tImprove quality of instruction in HEIs',\n '3.2' => '3.2\tImprove performance of students in exit examinations',\n '3.3' => '3.3\tImprove employability of students in HEIs',\n '3.4' => '3.4\tImprove quality, relevance and accessibility of higher education research and research outputs',\n\n '4.1' => '4.1\t Improve gender diversity of academic staff',\n '4.2' => '4.2\t Improve gender diversity of technical support staff',\n '4.3' => '4.3\t Improve gender diversity of professional staff in teaching hospitals',\n '4.4' => '4.4\t Improve gender diversity of administrative support staff',\n '4.5' => '4.5\t Improve gender diversity of staff appointed at senior management positions',\n '4.6' => '4.6\t Improve gender diversity of staff appointed at middle management positions',\n '4.7' => '4.7\t Improve gender diversity of staff appointed at lower management positions',\n\n '5.1' => '5.1\tIncrease the contribution of Ethiopian diaspora in academic activities',\n '5.2' => '5.2\tIncrease student exchange between Ethiopian and foreign universities',\n\n '6.1' => '6.1\tIncrease funds for research and development',\n '6.2' => '6.2\tIncrease resources mobilized from sources other than the government subsidy budget',\n '6.3' => '6.3\tIncrease efficiency in utilizing funds',\n '6.4' => '6.4\tDecrease dependency on expatriate academic staff',\n '6.5' => '6.5\tReduce staff attrition rate',\n );\n\n $kpis = InstitutionReportCard::getEnum('kpi');\n\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.1', '1.1.1');\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.1', '1.1.2');\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.1', '1.1.3');\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.1', '1.1.4');\n\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.2', '1.2.1');\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.2', '1.2.2');\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.2', '1.2.3');\n\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.3', '1.3.1');\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.3', '1.3.2');\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.3', '1.3.3');\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.3', '1.3.4');\n\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.4', '1.4.1');\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.4', '1.4.2');\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.4', '1.4.3');\n\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.5', '1.5.1');\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.5', '1.5.2');\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.5', '1.5.3');\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.5', '1.5.4');\n\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.6', '1.6.1');\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.6', '1.6.2');\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.6', '1.6.3');\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.6', '1.6.4');\n\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.7', '1.7.1');\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.7', '1.7.2');\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.7', '1.7.3');\n $this->saveKpi($policies, $descriptions, $kpis, '1', '1.7', '1.7.4');\n\n // break\n\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.1', '2.1.1', true);\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.1', '2.1.2', true);\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.1', '2.1.3', true);\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.1', '2.1.4', true);\n\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.2', '2.2.1', true);\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.2', '2.2.2', true);\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.2', '2.2.3', true);\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.2', '2.2.4', true);\n\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.3', '2.3.1', true);\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.3', '2.3.2', true);\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.3', '2.3.3', true);\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.3', '2.3.4', true);\n\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.4', '2.4.1', true);\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.4', '2.4.2', true);\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.4', '2.4.3', true);\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.4', '2.4.4', true);\n\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.5', '2.5.1');\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.5', '2.5.2');\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.5', '2.5.3');\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.5', '2.5.4');\n\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.6', '2.6.1');\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.6', '2.6.2');\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.6', '2.6.3');\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.6', '2.6.4');\n\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.7', '2.7.1');\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.7', '2.7.2');\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.7', '2.7.3');\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.7', '2.7.4');\n\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.8', '2.8.1');\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.8', '2.8.2');\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.8', '2.8.3');\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.8', '2.8.4');\n\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.9', '2.9.1');\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.9', '2.9.2');\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.9', '2.9.3');\n $this->saveKpi($policies, $descriptions, $kpis, '2', '2.9', '2.9.4');\n\n // break\n\n $this->saveKpi($policies, $descriptions, $kpis, '3', '3.1', '3.1.1');\n $this->saveKpi($policies, $descriptions, $kpis, '3', '3.1', '3.1.2', true);\n $this->saveKpi($policies, $descriptions, $kpis, '3', '3.1', '3.1.3');\n $this->saveKpi($policies, $descriptions, $kpis, '3', '3.1', '3.1.4');\n\n $this->saveKpi($policies, $descriptions, $kpis, '3', '3.2', '3.2.1');\n $this->saveKpi($policies, $descriptions, $kpis, '3', '3.3', '3.3.1');\n\n $this->saveKpi($policies, $descriptions, $kpis, '3', '3.4', '3.4.1');\n $this->saveKpi($policies, $descriptions, $kpis, '3', '3.4', '3.4.2');\n $this->saveKpi($policies, $descriptions, $kpis, '3', '3.4', '3.4.3');\n\n // break\n\n $this->saveKpi($policies, $descriptions, $kpis, '4', '4.1', '4.1.1');\n $this->saveKpi($policies, $descriptions, $kpis, '4', '4.2', '4.2.1');\n $this->saveKpi($policies, $descriptions, $kpis, '4', '4.3', '4.3.1');\n $this->saveKpi($policies, $descriptions, $kpis, '4', '4.4', '4.4.1');\n $this->saveKpi($policies, $descriptions, $kpis, '4', '4.5', '4.5.1');\n $this->saveKpi($policies, $descriptions, $kpis, '4', '4.6', '4.6.1');\n $this->saveKpi($policies, $descriptions, $kpis, '4', '4.7', '4.7.1');\n\n // break\n\n $this->saveKpi($policies, $descriptions, $kpis, '5', '5.1', '5.1.1');\n\n $this->saveKpi($policies, $descriptions, $kpis, '5', '5.2', '5.2.1');\n $this->saveKpi($policies, $descriptions, $kpis, '5', '5.2', '5.2.2');\n\n // break\n\n $this->saveKpi($policies, $descriptions, $kpis, '6', '6.1', '6.1.1');\n $this->saveKpi($policies, $descriptions, $kpis, '6', '6.2', '6.2.1');\n $this->saveKpi($policies, $descriptions, $kpis, '6', '6.3', '6.3.1', true);\n $this->saveKpi($policies, $descriptions, $kpis, '6', '6.4', '6.4.1', true);\n\n $this->saveKpi($policies, $descriptions, $kpis, '6', '6.5', '6.5.1', true);\n $this->saveKpi($policies, $descriptions, $kpis, '6', '6.5', '6.5.2', true);\n $this->saveKpi($policies, $descriptions, $kpis, '6', '6.5', '6.5.3', true);\n $this->saveKpi($policies, $descriptions, $kpis, '6', '6.5', '6.5.4', true);\n $this->saveKpi($policies, $descriptions, $kpis, '6', '6.5', '6.5.5', true);\n $this->saveKpi($policies, $descriptions, $kpis, '6', '6.5', '6.5.6', true);\n }",
"function performPageFunctionality() {\n\t\t$GLOBALS['alphabet'] = array(\"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\", \"I\", \"J\", \"K\", \n\t\t\"L\", \"M\", \"N\", \"O\", \"P\", \"Q\", \"R\", \"S\", \"T\", \"U\", \"V\", \"W\", \"X\", \"Y\", \"Z\");\n\t\t$difficulty = $_POST['difficulty'];\n\t\t$url = $this->createURL($difficulty, \"https://wordsapiv1.p.mashape.com/words?random=true&\");\n\t\t$randomWord = $this->retrieveRandomWord($url);\n\t\t$this->setSessionVariables($randomWord);\n\t}",
"public function run()\n {\n $reasons = [ \n \"Annual Physical\",\n \"General Consultation\",\n \"Illness\",\n \"Infection Consultation\",\n \"New Patient Visit\",\n \"Acid Reflux / Heartburn\",\n \"Anemia\",\n \"Back Problems\",\n \"Bleeding Disorder\",\n \"Blood Pressure Testing\",\n \"Blood Work\",\n \"Bronchitis\",\n \"COVID-19 Antibody Test\",\n \"Chlamydia\",\n \"Cholesterol / Lipids Checkup\",\n \"Cholesterol Management\",\n \"Chronic Cough\",\n \"Chronic Illness\",\n \"Cold\",\n \"Cold Sores / Herpes Labialis\",\n \"Constipation\",\n \"Cough\",\n \"Diabetes Consultation\",\n \"ECG / EKG\",\n \"Ear Infection\",\n \"Electrocardiogram\",\n \"Elevated PSA\",\n \"Enlarged Lymph Nodes\",\n \"Erectile Dysfunction / Impotence / Male Sexual Dysfunction\",\n \"Eye Infection\",\n \"Fainting / Syncope\",\n \"Fatty Liver Disease\",\n \"Flu\",\n \"Frequent Urination\",\n \"General Follow Up\",\n \"Headache\",\n \"High Blood Pressure / Hypertension\",\n \"High Blood Sugar / Hyperglycemia\",\n \"High Cholesterol / Lipid Problem\",\n \"Hospital Discharge/Follow Up\",\n \"Hyperlipidemia\",\n \"Hyperthyroidism / Overactive Thyroid\",\n \"Hypogonadism\",\n \"Hypothyroidism / Underactive Thyroid\",\n \"Immigration Medical Examination\",\n \"Immunization\",\n \"Immunodeficiency\",\n \"Infection Follow Up\",\n \"Insomnia\",\n \"Iron Deficiency\",\n \"Kidney Stones\",\n \"Medication Review\",\n \"Migraine\",\n \"Nasal Congestion\",\n \"Pre-Surgery Checkup / Pre-Surgical Clearance\",\n \"Prescription / Refill\",\n \"Preventive Medicine Consultation\",\n \"Sexually Transmitted Disease (STD)\",\n \"Sleep Disorder\",\n \"Sore Throat\",\n \"Swelling in Neck\",\n \"Thyroid Evaluation\",\n \"Tiredness / Fatigue\",\n \"Type 2 Diabetes\",\n \"Urinary Urgency / Urge Incontinence\",\n ];\n \n \n foreach ($reasons as $reason) {\n DB::table('reasons')->insert([\n 'name' => $reason,\n 'created_at'=>date('Y-m-d H:i:s'),\n 'updated_at'=>date('Y-m-d H:i:s'), \n ]); \n }\n }",
"public function run()\n {\n $modules = [\n 'Computer Science',\n 'Information Systems',\n 'Computer Engineering',\n 'Business Analytics',\n 'Information Security',\n 'Algorithms & Theory',\n 'Artificial Intelligence',\n 'Computer Graphics and Games',\n 'Computer Security',\n 'Database Systems',\n 'Multimedia Information Retrieval',\n 'Networking and Distributed Systems',\n 'Parallel Computing',\n 'Programming Languages',\n 'Software Engineering',\n 'Interactive Media',\n 'Visual Computing',\n 'CS1010 Programming Methodology',\n 'CS1020 Data Structures and Algorithms I',\n 'CS2010 Data Structures and Algorithms II',\n 'CS1231 Discrete Structures',\n 'CS2100 Computer Organisation',\n 'CS2103T Software Engineering',\n 'CS2105 Introduction to Computer Networks',\n 'CS2106 Introduction to Operating Systems',\n 'CS3230 Design and Analysis of Algorithms',\n 'CS3201 Software Engineering Project',\n 'CS3202 Software Engineering Project II',\n 'CS3216 Software Product Engineering for Digital Markets',\n 'CS3217 Software Engineering on Modern Application Platforms',\n 'CS3281 Thematic Systems Project I',\n 'CS3282 Thematic Systems Project II',\n 'CS3283 Media Technology Project I',\n 'CS3284 Media Technology Project II',\n 'IS1103/FC/X Computing and Society',\n 'CS2101 Effective Communication for Computing Professionals',\n 'ES2660 Communicating in the Information Age',\n 'MA1301/FC/X Introductory Mathematics',\n 'MA1521 Calculus for Computing',\n 'MA1101R Linear Algebra I',\n 'ST2334 Probability and Statistics',\n 'ST2131 Probability',\n 'ST2132 Mathematical Statistics',\n 'PC1221/FC/X Fundamental of Physics I',\n 'PC1222/X Fundamentals of Physics II',\n 'CS1101S Programming Methodology',\n 'CS2020 Data Structures and Algorithms Accelerated',\n 'CM1121 ORGANIC CHEMISTRY 1',\n 'CM1131 PHYSICAL CHEMISTRY 1',\n 'CM1417 FUNDAMENTALS OF CHEMISTRY',\n 'LSM1301 GENERAL BIOLOGY',\n 'LSM1302 GENES AND SOCIETY',\n 'PC1141 PHYSICS I',\n 'PC1142 PHYSICS II',\n 'PC1143 PHYSICS III',\n 'PC1144 PHYSICS IV',\n 'PC1221 FUNDAMENTALS OF PHYSICS I ',\n 'PC1222 FUNDAMENTALS OF PHYSICS II PC1432 PHYSICS IIE',\n 'MA2213 NUMERICAL ANALYSIS I',\n 'MA2214 COMBINATORICS AND GRAPHS I',\n 'CM1101 PRINCIPLES OF MODERN CHEMISTRY ',\n 'CM1111 INORGANIC CHEMISTRY 1',\n 'CM1161 PRINCIPLESOF CHEMICAL PROCESS I ',\n 'CM1191 EXPERIMENTS IN CHEMISTRY 1 ',\n 'CM1401 CHEMISTRY FOR LIFE SCIENCES',\n 'CM1402 GENERAL CHEMISTRY',\n 'CM1501 ORGANIC CHEMISTRY FOR ENGINEERS',\n 'CM1502 GENERAL AND PHYSICAL CHEMISTRY FOR ENGINEERS ',\n 'LSM1303 ANIMAL BEHAVIOUR',\n 'PC1421 PHYSICS FOR LIFE SCIENCES',\n 'PC1431 PHYSICS IE',\n 'PC1433 MECHANICS AND WAVES',\n 'MA1104 MULTIVARIABLE CALCULUS',\n 'MA2101 LINEAR ALGEBRA II',\n 'MA2108 MATHEMATICAL ANALYSIS I',\n 'MA2501 DIFFERENTIAL EQUATIONS AND SYSTEMS',\n 'ST2132 MATHEMATICAL STATISTICS',\n 'ST2137 COMPUTER AIDED DATA ANALYSIS',\n 'CS3230 Design and Analysis of Algorithms (CFM)',\n 'CS3236 Introduction to Information Theory',\n 'CS4231 Parallel and Distributed Algorithms',\n 'CS4232 Theory of Computation',\n 'CS4234 Optimisation Algorithms',\n 'CS3233 Competitive Programming',\n 'CS5230 Computational Complexity',\n 'CS5234 Combinatorial and Graph Algorithms',\n 'CS5237 Computational Geometry and Applications',\n 'CS5238 Advanced Combinatorial Methods in Bioinformatics',\n 'CS3243 Introduction to Artificial Intelligence',\n 'CS3244 Machine Learning',\n 'CS4244 Knowledge-Based Systems',\n 'CS4246 AI Planning and Decision Making',\n 'CS4216 Constraint Logic Programming',\n 'CS4220 Knowledge Discovery Methods in Bioinformatics',\n 'CS4248 Natural Language Processing',\n 'CS5209 Foundation in Logic & AI',\n 'CS5215 Constrained Programming',\n 'CS5228 Knowledge Discovery and Data Mining',\n 'CS5247 Motion Planning and Applications',\n 'CS5340 Uncertainty Modelling in AI',\n 'CS3241 Computer Graphics',\n 'CS3242 3D Modelling and Animation',\n 'CS3247 Game Development',\n 'CS4247 Graphics Rendering Techniques',\n 'CS4350 Game Development Project',\n 'CS3218 Multimodal Processing in Mobile Platforms',\n 'CS3240 Interaction Design',\n 'CS3249 User Interface Development',\n 'CS3343 Digital Media Production',\n 'CS4243 Computer Vision and Pattern Recognition',\n 'CS4249 Phenomena and Theories of HCI',\n 'CS4340 Digital Special Effects',\n 'CS4344 Network and Mobile Gaming',\n 'CS4345 General-Purpose Computation on GPU',\n 'CS5240 Theoretical Foundation of Multimedia',\n 'CS2107 Introduction to Information Security',\n 'CS3235 Computer Security',\n 'CS4236 Cryptography Theory and Practice',\n 'CS4238 Computer Security Practices',\n 'CS3221 Operating Systems Design and Pragmatics',\n 'CS4239 Software Security',\n 'CS5231 Systems Security',\n 'CS5321 Network Security',\n 'CS5322 Database Security',\n 'CS5331 Web Security',\n 'IFS4101 Legal Aspects of Information Security',\n 'IS3230 Principles of Information Security',\n 'IS4231 Information Security Management',\n 'IS4232 Topics in Information Security',\n 'CS2102 Database Systems',\n 'CS3223 Database Systems Implementation',\n 'CS4221 Database Applications Design and Tuning',\n 'CS4224 Distributed Databases',\n 'CS4225 Massive Data Processing Techniques in Data Science',\n 'CS5226 Database Tuning',\n 'CS2108 Introduction to Media Computing&',\n 'CS3245 Information Retrieval',\n 'CS4242 Social Media Computing',\n 'CS4347 Sound and Music Computing',\n 'CS5246 Text Processing on the Web',\n 'CS5241 Speech Processing',\n 'CS6242 Digital Libraries',\n 'CS5342 Multimedia Computing and Applications',\n 'CS3103 Computer Networks Practice',\n 'CS4222 Wireless Computing',\n 'CS4226 Internet Architecture',\n 'CS4274 Mobile and Multimedia Networking',\n 'CS4344 Networked and Mobile Gaming',\n 'CS5223 Distributed Systems',\n 'CS5229 Advanced Computer Networks',\n 'CS5248 Systems Support for Continuous Media',\n 'CS3210 Parallel Computing',\n 'CS3211 Parallel and Concurrent Programming',\n 'CS4223 Multi-core Architecture',\n 'CS4237 Systems Modelling and Simulation',\n 'CS4271 Critical Systems and Their Verification',\n 'CS5207 Foundation in Operating Systems',\n 'CS5222 Advanced Computer Architectures',\n 'CS5239 Computer System Performance Analysis',\n 'CS2104 Programming Language Concepts',\n 'CS4215 Programming Language Implementation',\n 'CS4212 Compiler Design',\n 'CS3234 Logic and Formal Systems',\n 'CS5205 Foundation in Programming Languages',\n 'CS5232 Formal Specification & Design Techniques',\n 'CS5214 Design of Optimising Compilers',\n 'CS5218 Principles of Program Analysis',\n 'CS2103 Software Engineering',\n 'CS3213 Software Systems Design',\n 'CS3219 Software Engineering Principles and Patterns',\n 'CS4211 Formal Methods for Software Engineering',\n 'CS4218 Software Testing',\n 'CS3216 Software Development on Evolving Platforms',\n 'CS3226 Web Programming and Applications',\n 'CS3882 Breakthrough Ideas for Digital Markets',\n 'CS4217 Software Development Technologies',\n 'CS5219 Automatic Software Validation',\n 'CS5272 Embedded Software Design',\n 'IS2102 Requirements Analysis and Design',\n 'IS2104 Software Team Dynamics',\n 'CS3242 3D Modeling and Animation',\n 'CS6243 Computational Photography',\n 'CS1010J Programming Methodology',\n 'IS1103/FC Computing and Society',\n 'IS1105 Strategic IT Applications',\n 'IS2101 Business and Technical Communication',\n 'IS2103 Enterprise Systems Development Concepts',\n 'IS3101 Management of Information Systems',\n 'IS3102 Enterprise Systems Development Project',\n 'IS4100 IT Project Management',\n 'ACC1002X Financial Accounting',\n 'MA1301 Introductory Mathematics',\n 'MA1312 Calculus with Applications',\n 'CP4101 B.Comp. Dissertation',\n 'CS2106 Introduction to Operating Systems ',\n 'CS3235 Introduction to Computer Security',\n 'IS3220 Service Science ',\n 'IS3221 Enterprise Resource Planning Systems',\n 'IS3222 IT and Customer Relationship Management ',\n 'IS3223 IT and Supply Chain Management ',\n 'IS3240 Economics of E-Business',\n 'IS3241 Enterprise Social Systems',\n 'IS3242 Software Quality Management',\n 'IS3243 Technology Strategy and Management',\n 'IS3250 Health Informatics',\n 'IS3251 Principles of Technology Entrepreneurship',\n 'IS3260 Gamification for Organisations and Individuals',\n 'IS3261 Mobile Apps Development',\n 'CS4880 Digital Entrepreneurship',\n 'IS4202 Global Virtual Project',\n 'IS4203 IT Adoption and Change Management',\n 'IS4204 IT Governance',\n 'IS4224 Service Systems ',\n 'IS4225 Strategic IS Planning ',\n 'IS4226 IT Outsourcing and Offshoring Management ',\n 'IS4227 Enterprise Service-Oriented Architecture ',\n 'IS4228 Information Technologies in Financial Services',\n 'IS4232 Topics in Information Security Management',\n 'IS4233 Legal Aspects of Information Technology',\n 'IS4234 Control and Audit of Information Systems',\n 'IS4240 Business Intelligence Systems',\n 'IS4241 Social Media Network Analysis',\n 'IS4243 Information Systems Consulting',\n 'IS4250 Healthcare Analytics',\n 'IS3150 Digital and New Media Marketing',\n 'IS4150 Mobile and Ubiquitous Commerce',\n 'IS4260 E-Commerce Business Models',\n 'IS3222 IT and Customer Relationship Management',\n 'IS3261 Mobile Apps Development for Enterprise',\n 'IS4225 Strategic IS Planning',\n 'IS4010 Industry Internship Programme',\n 'BT1101 Introduction to Business Analytics',\n 'CS1010S Programming Methodology',\n 'EC1301 Principles of Economics',\n 'IS1103 Computing and Society',\n 'MA1311 Matrix Algebra and Applications',\n 'MA1101R Linear Algebra I2',\n 'MA1102R Calculus2',\n 'MKT1003X Marketing',\n 'BT2101 IT and Decision Making',\n 'BT2102 Data Management and Visualisation',\n 'IE2110 Operations Research I3',\n 'DSC3214 Introduction To Optimisation',\n 'IS2101 Business and Technical Communication4',\n 'BT3101 Business Analytics Capstone Project',\n 'BT3102 Computational Methods for Business Analytics',\n 'BT3103 Application Systems Development for Business Analytics',\n 'ST3131 Regression Analysis',\n 'BT4101 B.Sc. Dissertation',\n 'DSC3224 Dynamic Pricing and Revenue Management',\n 'IE3120 Manufacturing Logistics',\n 'BT4211 Data-Driven Marketing',\n 'BT4212 Search Engine Optimization and Analytics',\n 'DSC4213 Analytical Tools for Consulting',\n 'MKT4415C Seminars in Marketing: Applied Market Research',\n 'DSC3216 Forecasting for Managerial Decisions',\n 'BSP4513 Econometrics: Theory & Practical Business Application',\n 'BT4221 Big Data Techniques and Technologies',\n 'BT4222 Mining Web Data for Business Insights',\n 'IE4210 Operations Research II',\n 'ST4240 Data Mining',\n 'ST4245 Statistical Methods for Finance',\n\n ];\n\n foreach ($modules as $module) {\n \\App\\Topic::create([\n 'name' => $module,\n ], 1);\n }\n }",
"protected function makePage() {\n // \n // get the user's constituency\n // \n // get the candidates for this election in this constituency\n // \n // make the page output\n }",
"public function run()\n {\n $nomes_jogos =['Diablo 3', 'Dishonored', 'Far Cry 3', 'Mortal Kombat', 'Resident Evil 6', 'Skyrim', 'Tomb Raider'];\n\n $desenvolvedor=['Blizzard', 'Arkane Studios', 'Ubisoft Montreal', 'Netherrealm Studios e ANDYN', 'Capcom', 'Bethesda Game Studios', 'Core Design e Crystal Dynamics'];\n\n $plataformas=['PC', 'PC, Xbox 360 e Playstation 3', 'PC, Xbox 360 e Playstation 3', 'Xbox 360, PlayStation 3, PlayStation Vita ,Microsoft Windows', 'PlayStation 3, Xbox 360, Microsoft Windows', 'PC, Xbox 360 e Playstation 3', 'PlayStation 3, Xbox 360, Microsoft Windows'];\n\n $lancamento=['15 de maio de 2012', '12 de outubro de 2012', '30 de novembro de 2012', '28 de Abril de 2011', '2 de outubro de 2012', '11 de novembro de 2011', ' Lançamento do primeiro Tomb Raider foi em 1996'];\n\n $genero=['RPG', 'Stealth, ação-aventura, tiro em primeira pessoa', 'Tiro em primeira pessoa, \"mundo aberto\"', 'Luta', 'Horror dramático, survival horror, tiro na terceira pessoa', 'RPG', 'Terror Ação, Aventura, tiro na terceira pessoa'];\n\n $modo_de_jogo=['Single player/Multiplayer', 'Single player', 'Single player/Multiplayer', 'Single player/Multiplayer', 'Single player/Multiplayer', 'Single player', 'Single player'];\n\n $classificacao=['+16', '+18', '+18', '+18', '+18', '+18', '+18'];\n\n $descricao=[\n \t'Diablo III segue a história de seu predecessor, Diablo II: Lord of Destruction, que superou expectativas. A história do novo jogo passa-se depois de vinte anos dos acontecimentos que marcaram o fim de Diablo II. Os demônios Diablo, Mephisto e Baal foram derrotados, mas quando um cometa cai na Terra exatamente no lugar onde Diablo foi confinado, os guerreiros são novamente convocados para defender a humanidade contra as chamas do Inferno. O estilo do jogo continua o mesmo, mas desta vez utilizando os recursos das novas tecnologias reproduzindo um mundo totalmente em 3D e interativo, podendo até destruir cenários. Os jogadores poderão escolher entre cinco classes disponíveis e se aventurar num mundo mágico e ameaçador que Diablo III proporciona, porém desta vez, com novas habilidades e equipamentos e com um nível de personalização de personagem mais apurado.',\n \t 'És o antigo guarda-costas de confiança da Imperatriz. Injustamente culpado pelo seu assassinato, e movido pela vingança, terás de te tornar um infame assassino, conhecido apenas pela perturbadora máscara que se tornou o teu cartão-de-visita. À medida que vagueias por um mundo destroçado pela peste e oprimido por um governo armado com estranhas tecnologias, a verdade por detrás da tua traição é tão obscura como as águas que rodeiam a cidade. As tuas escolhas determinarão o destino do mundo, mas, o que quer que aconteça, a tua antiga vida desapareceu para sempre.',\n \t '\"Para além dos limites da civilização encontra-se uma ilha, um lugar sem lei governado por pirataria e miséria humana, onde os escapes são apenas as drogas ou o cano de uma arma. Este é o lugar onde você se encontra, preso num lugar que esqueceu o certo do errado, um lugar que vive pelos princípios da violência. Descubra os segredos sangrentos da ilha e leva a luta ao inimigo; improvise e use o ambiente para sobreviver. Cuidado com a beleza e o mistério deste paraíso inexplorado e vive para superar os seus personagens cruéis e desesperados. Irá precisar de mais do que sorte para sobreviver\". ',\n \t 'O jogo retorna as suas raízes, com lutas com movimentação completamente 2D, mas gráficos em 3D, onde não há mais possibilidade de se esquivar dos golpes andando para os lados e é o jogo mais rápido da série. Ao invés do clássico controle com Soco e Chute, Alto e Baixo, terá um botão pra cada membro sendo Braço e Perna, Esquerda e Direita.\n\n\t\t\t\tO jogo conta com vários modos de jogo. O principal é o Kombate, onde permite lutas um contra um ou em duplas, permitindo até 4 jogadores lutarem na mesma partida. Outro modo de jogo é a Torre dos Desafios, que consiste em uma grande torre dividida em 300 partes, onde cada parte contém um desafio a ser completado com um personagem especifico. Alguns dos desafios que compões a torre são os Minigames Teste sua Força, em que o jogador deve apertar freneticamente os botões do controle com o objetivo de acumular força para quebrar certos objetos; o Teste seu Golpe, onde o jogador deve acumular uma quantidade muito precisa de força para quebrar somente o objeto que está em uma pilha; o Teste sua Sorte, onde uma roleta sorteia várias condições especiais para a luta; e o Teste sua Percepção, onde um objeto é escondido em um dos vários copos/crânios e são embaralhados e cabe ao jogador descobrir onde estão.\n\n\t\t\t\tDurante as lutas foram adicionados vários novos sistemas e alguns reformulados, como os combos, onde pode-se ligar quase todos os golpes tendo poucos golpes que não tem ligação ou combos já programados e alguns personagens podem usar armas durante eles. Além disso os combos podem ser ligados com o parceiro no modo Tag-Team, assim criando sequencias únicas com dois personagens. Ao jogo também foi adicionada uma barra, que é usada para fazer movimentos especiais. Ela dividida em 3 níveis que podem respectivamente tornar os golpes especiais mais fortes, revidar um golpe e o Movimento de Raio-X, um combo mostrando os danos causados pelos golpes diretamente nos ossos e órgãos dos adversários, podendo retirar até 50% da vida do oponente dependendo do personagem. E por fim também há os Golpes Finais, um movimento em que se faz uma sequência de botões para finalizar o oponente de uma forma violenta, além dos movimentos finais de cada personagem, há o Fatality de Arena ou Stage Fatality, agora inovado, ao invés de simplesmente desferir um uppercut no oponente, o jogador executa um movimento que o leva a uma morte consequente (Ex: Na floresta viva, ao invés de dar um gancho no oponente, o personagem o agarra pelo ombro e o braço e o arremessa na boca de uma árvore que mastiga até que as pernas quebrem e se desprendam do corpo). Há também a inclusão do famoso Babality, em que o oponente volta a ser um bebê chorão. (Ex: Reptile, quando é pego por um, torna-se um ovo de réptil e eclode, tornando-se um \"bebê-réptil\", começando a chorar e cuspir ácido).',\n \t\t\t\t'Resident Evil 6 (バイオハザード 6, título japonês: Biohazard 6), é um jogo de vídeo do género horror dramático/de sobrevivência jogado na terceira pessoa desenvolvido e publicado pela Capcom. Foi apresentado durante uma campanha de divulgação viral na página NoHopeLeft.com. Apesar do nome é o nono jogo da série principal Resident Evil e foi lançado em 2 de outubro de 2012 para PlayStation 3 e Xbox 360. A versão para Microsoft Windows foi lançada no dia 22 de março de 2013.\n\n\t\t\t\tA história é contada a partir das perspectivas de Chris Redfield, membro e fundador da BSAA traumatizado por ter falhado uma missão; Leon S. Kennedy, um sobrevivente de Raccoon City e agente especial do governo; Jake Muller, filho ilegítimo de Albert Wesker e associado de Sherry Birkin; e Ada Wong, uma agente solitária com ligações aos ataques bio-terroristas pela Neo-Umbrella.\n\n\t\t\t\tO conceito do jogo começou em 2009, mas começou a ser produzido no ano seguinte sobre a supervisão de Hiroyuki Kobayashi, que já tinha produzido Resident Evil 4. A equipa de produção acabou por crescer e tornou-se na maior de sempre a trabalhar num jogo da série Resident Evil.\n\n\t\t\t\tResident Evil 6 recebeu reacções negativas aquando do lançamento da demo devido aos problemas nos controlos e criticas muito diversas devido à mudança drástica da jogabilidade encontrada na versão final do jogo, sendo um ponto de elogio e também de critica nas diferentes análises.\n\n\t\t\t\tApesar de não ter sido bem recebido tanto pela imprensa especializada como pelos jogadores, a Capcom editou mais de 4,5 milhões de cópias e Resident Evil 6 tornou-se o jogo da série que mais vendeu inicialmente.',\n\n\t\t\t\t'Os acontecimentos deste jogo passam-se duzentos anos depois da, já quase esquecida, crise de Oblivion, no ano 201 da quarta era (4E 201) na província de Skyrim, no norte de Tamriel, e 30 anos após a mais recente Grande Guerra, onde Thalmors e Humanos lutaram arduamente, mas que quase extinguiu os humanos de Tamriel, e para evitar tal derrota, acordaram com os Thalmors, rendendo duas forças e sujeitando-se as suas exigências.\n\t\t\t\tSkyrim é a terra natal de um povo bravo chamados de Nords (nórdicos), onde além da Grande Guerra, irrompeu uma guerra civil após o assassinato do Alto Rei de Skyrim, Torygg. E diante de todas estas guerras e problemas, a província se encontra dividida: de um lado se quer a separação do Império que agora está em ruínas, e do outro lado se quer permanecer leal.', \n\t\t\t\t'Tomb Raider é uma série de jogos, histórias em quadrinhos e filmes tendo como protagonista a personagem Lara Croft. Desde o lançamento do primeiro Tomb Raider, em 1996, as séries tiveram um grande lucro e Lara transformou-se num dos principal ícone da indústria de video-jogos/vídeo games. O Guiness Book reconheceu Lara Croft como \"a heroína de video-jogo/vídeo game mais bem sucedida\" em 2006.\n\n\t\t\t\tSeis jogos da série foram desenvolvidos pela Core Design, e os três últimos pela Crystal Dynamics. Todos os jogos foram publicados pela Eidos Interactive, que mantém os direitos dos personagens e a marca registrada de Tomb Raider. Para o cinema, Lara Croft: Tomb Raider e Lara Croft Tomb Raider: The Cradle of Life foram produzidos, estrelando a atriz americana Angelina Jolie como Lara Croft. Todos os jogos Tomb Raider venderam mais de 30 milhões de unidades, fazendo uma das séries de video jogos mais vendidas de todos os tempos.'];\n\n\t\t\t\tfor ($i=0; $i < count($nomes_jogos); $i++) { \n\n\t\t\t\t\t$dados = [\n\t\t\t\t\t\t'nome_jogo' => $nomes_jogos[$i],\n\t\t\t\t\t\t'desenvolvedor' => $desenvolvedor[$i],\n\t\t\t\t\t\t'plataformas' => $plataformas[$i],\n\t\t\t\t\t\t'lancamento' => $lancamento[$i],\n\t\t\t\t\t\t'genero' => $genero[$i],\n\t\t\t\t\t\t'modo_de_jogo' => $modo_de_jogo[$i],\n\t\t\t\t\t\t'classificacao' => $classificacao[$i],\n\t\t\t\t\t\t'descricao' => $descricao[$i]\n\t\t\t\t\t];\n\n\t\t\t\t\tDB::table('ficha_tecnica')->insert($dados);\n\n\t\t\t\t}\n\n }",
"public function run()\n {\n $courses = [\n ['Math', '11', 'Magni Lindsey', '/img/Math11.jpg', 'Welcome to Math 11. This course will equip you with fundemental knowledage of basic mathematic operation and quadratic function. They are very important for all future science course.', '40$/hour', 'http://www.bcmath.ca/PC11/PC11main.htm'],\n ['Physics', '11', 'Virgee Harris', '/img/Physics11.jpg', 'Welcome to Physics 11. This course will teach you the basic concepts of motion, force and energy so that you will be clear about how the fundemental law of physiscs works around us.', '40$/hour', 'https://yungmingliu.wikispaces.com/BC+Physics+11'],\n ['Chemistry', '11', 'Virgil\tBarrett', '/img/Chemistry11.jpg','Welcome to Chemsitry 11. This course covers basic calculations in chemistry including mole concept, concentration, stoichiometry, classification of matter and periodic table.', '45$/hour', 'https://noteshelp.wordpress.com/chemistry-11/'],\n ['Math', '12', 'Eloise Page', '/img/Math12.jpg', 'Welcome to Math 12. This course is a good preparation course for future calculus. In this course, you will learn exponential and logarithmic functions, and various trigonometric identities.', '45$/hour', 'https://noteshelp.wordpress.com/math-12/'],\n ['Physics', '12', 'Adrienne\tBarber', '/img/Physics12.jpg', 'Welcome to Physics 12. This course will introduce you to more complex natural physical behaviors, such as momentum and impulse, circular motion and gravitation and electrical forces.', '50$/hour', 'https://noteshelp.wordpress.com/physics-12/'],\n ['Chemistry', '12', 'Peggy Olson', '/img/Chemistry12.jpg', 'Welcome to Chemsitry 12. Chemistry 12 will advance your knowledage of chemistry to multiple new areas. You will start to understand reaction kinetics, solubility equilibrium.', '45$/hour', 'https://noteshelp.wordpress.com/chemistry-12/'],\n ['Biology', '11', 'Ellary Anderson', '/img/Biology11.jpg', 'Welcome to Biology 11. This course will greatly expand your knowledage of living creature around us. You will learn protists, mycology, plant biology and animal biology.', '45$/hour', 'https://noteshelp.wordpress.com/biology-11/'],\n ['Biology', '12', 'Katey Sampertin', '/img/Biology12.jpg', 'Welcome to Biology 12. This course provide you much profound knowledage about DNA and RNA stucture and function. You will also start to understand how gene express themselves.', '50$/hour', 'https://noteshelp.wordpress.com/biology-12/']\n\n ];\n\n \n foreach ($courses as $key => $course) {\n Course::insert([\n 'created_at' => Carbon\\Carbon::now(),\n 'updated_at' => Carbon\\Carbon::now(),\n 'name' => $course[0],\n 'level' => $course[1],\n 'instructor' => $course[2],\n 'image' => $course[3],\n 'description' => $course[4],\n 'price' => $course[5],\n 'link'=>$course[6]\n ]);\n }\n }",
"public function run()\n {\n $i = 1;\n $question = Question::create(\n [\n 'title' => '前端工程师的技术进阶点在哪里?',\n 'description' => <<<'EOT'\n这个问题是一个比较全能的Java工程师提出来的,总结一下大家的回答:\n\n需求变化快,需要良好的复用、可拓展能力,否则动不动重写。\n兼容性问题,需要兼容各种移动设备的各种浏览器。\nCSS非正交,对于绝大多数人来说属于『玄学』。\n\n\n那么问题来了,普通前端工程师的技术进阶突破点在什么地方?\n\n有哪些方向可以突破,以后端为例\n\n全局方向: 做业务整体架构\n深度方向: 做性能调优、高并发、分布式等专业要求很高的领域\n延伸方向: 以Java 为例很多大神转移到大数据、分布式计算这个方面,算是传统Java Web的延伸方向\nEOT\n,\n 'user_id' => $i,\n ]);\n $question->answers()->create([\n 'user_id' => ++$i,\n 'content' => <<<'EOT'\n基于上面这个我个人认为的前提,我觉得前端的技术进阶并不像 Java 那样,对技术本身有很深度的研究,我个人规划更倾向于选择偏业务性的突破点:快速学习技术的能力前端时不时出来很多新东西,然后总是先于当前实现写未来代码,快速学习新事物的能力是最基础的。出来的新东西,能不能快速了解用法、特性、适用场景和底层实现?这是后面的基础。突破方法:对新事物保持好奇而非恐惧和抵触,跳出舒适区掌握学习的方法论,比如先看文档、再跑 Demo、提出问题、源码验证学习一些学习技巧业务抽象能力和技术选型、设计能力一个产品不是一夜建设出来的,但前端可以加速这个过程。使用 Node.js 可以写一个 index.js 文件执行下就跑起来一个各种功能的 Web 服务器,这个时间放在 Java 可能刚用 Spring Boot 创建好项目目录?\nEOT\n ]);\n\n }",
"function homework_individual()\n {\n \tglobal $db, $PLACEWEB_CONFIG, $problems_array, $equations_array;\n \t\n\t\t$sql = \"SELECT * FROM smartroom_hw\";\n\t\t\t//$result = mysql_query($query, $db) or die('Error count query:'.mysql_error());\n\t\t\t//$homework = mysql_fetch_array($result, MYSQL_ASSOC);\n\t\t\n\t\t$homework = mysql_query($sql, $db) or die('An error happened');\n\n\t\t$hwIndividualCollection = array();\n\t\t\n\t\t//while ($hw = mysql_fetch_array($result, MYSQL_ASSOC))\n\t\twhile(($hw=mysql_fetch_assoc($homework)) != null) \n\t\t{\n\t\t\t//print_r($hw);\n\t\t\t\n\t\t\t// clean up space after comma\n\t\t\t$cleaned_db_principles = trim($hw['principles']);\n\t\t\t$cleaned_db_principles = str_replace(', ', ',', $cleaned_db_principles);\n\t\t\t\n\t\t\t$probPrinciplesNames = explode(\",\", $cleaned_db_principles);\n\t\t\t$probEquationsIs = explode(\",\", $hw['equations']);\n\n\t\t\t$probPrinciplesInTargetFormat = array();\n\t\t\t$probEquationsInTargetFormat = array();\n\n\t\t\tforeach($probPrinciplesNames as $pn)\n\t\t\t{\n\t\t\t\t// some clean up\n\t\t\t\t$pn = stripcslashes($pn);\n\t\t\t\t$pn=trim($pn);\n\t\t\t\n\t\t\t\t// formatting to expected format\n\t\t\t\t$probPrinciplesNames = array(\n\t\t\t\t\t'name'=>$pn\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t// add ony if not empty\n\t\t\t\tif($pn){\n\t\t\t\t\t$probPrinciplesInTargetFormat[]=$probPrinciplesNames;\n\t\t\t\t}\n\t\t\t} // end loop principles\n\t\t\t\n\t\t\t// build equations array\n\t\t\tfor ($i=0;$i<count($probEquationsIs);$i++) \n\t\t\t{\n\t\t\t\t// index = EQ_ID - 1\n\t\t\t\t$index = $probEquationsIs[$i]-1;\n\t\t\t\t// get equation expression\n\t\t\t\t$probEquationsNames= array(\n\t\t\t\t\t'name'=>$equations_array[$i]['name']\n\t\t\t\t);\n\t\t\t\t//echo \"<br/>\".$probEquationsIs[$i].'. ---'.addslashes($equations_array[$index]['name']);\n\t\t\t\t$probEquationsInTargetFormat[]=$probEquationsNames;\n\t\t\t}\n\t\t\t\n\t\t\t$hwIndividual = array(\n\t\t\t\t'studentId'=>$hw['username'],\n\t\t\t\t'problemName'=>$hw['problem_name'],\n\t\t\t\t'principles'=>$probPrinciplesInTargetFormat,\n\t\t\t\t'equations'=>$probEquationsInTargetFormat,\n\t\t\t);\n\t\t\t\n\t\t\t$hwIndividualCollection[]=$hwIndividual;\n\t\t}\n\t\t\n\t\techo json_encode($hwIndividualCollection);\n }",
"public function web();",
"public function run()\n {\n \n $dataArr= [\n [1, 3, 'Newspaper', 'Inform from Newspaper'],\n [2, 3, 'Online Marketing', 'Inform From Online Marketing'],\n [3, 3, 'Facebook', 'Inform From Facebook'],\n [4, 1, 'Admission', 'Admission Test'],\n [5, 1, 'Transfer Certificate', 'Transfer Certificate'],\n [6, 1, 'Re-Admission', 'Re-Admission'],\n [7, 1, 'Confirmation Inquiry', 'You give students a question, its answer and the method of reaching this answer. Their goal is to build investigation and critical-thinking skills, learning how the specific method works.'],\n [8, 1, 'Structured Inquiry', 'You give students an open question and an investigation method. They must use the method to craft an evidence-backed conclusion.'],\n [9, 1, 'Guided Inquiry', 'You give students an open question. Typically in groups, they design investigation methods to reach a conclusion.'],\n [10, 1, 'Open Inquiry', 'You give students time and support. They pose original questions that they investigate through their own methods, and eventually present their results to discuss and expand.'],\n [11, 2, 'General complaint', 'A student may submit a complaint regarding staff, faculty, or other student. Complainant must submit their concern via the preliminary complaint form.'],\n [12, 2, 'ADA grievance/accommodation', 'ADA grievance/accommodation'],\n [13, 2, 'Academic Misconduct allegation', 'A student should be informed of any academic misconduct allegation by their instructor.'],\n [14, 2, 'Sexual Assault', 'Sexual harassment is a serious problem for students at all educational levels.'],\n [15, 2, 'Domestic and Interpersonal Violence', 'Domestic and Interpersonal Violence'],\n [16, 2, 'Sexual Harassment, and Other Discrimination', 'Sexual Harassment, and Other Discrimination'],\n [17, 2, 'Appeals regarding grades and student conduct', 'A student may only appeal a capricious grade, or student conduct expulsion or suspension.'],\n [18, 4, 'Teacher', 'Reference by teacher'],\n [19, 4, 'Student', 'Student'],\n [20, 4, 'Institution Committee', 'Institution Committee']\n ];\n foreach ($dataArr as $data) { \n $store = new SmSetupAdmin();\n $store->id = $data[0];\n $store->type = $data[1];\n $store->name = $data[2];\n $store->description = $data[3]; \n $store->save();\n }\n\n\n\n }",
"public function run()\n {\n //\n $artisan = [\n \"A.C Repairer\",\n \"Artists\",\n \"Barber\",\n \"Basket Weaver\",\n \"Borehole Expert\",\n \"Bricklayer\",\n \"Cameraman/Videographer\",\n \"Car hire Service\",\n \"Car wash\",\n \"Carpenter\",\n \"Caterer/Chef\",\n \"Cleaning Services\",\n \"Dish Installer\",\n \"DJ/Sound Experts\",\n \"Dry Cleaner\",\n \"Electricians\",\n \"Fumigators\",\n \"Gardeners\",\n \"Gas Refills\",\n \"Generator Repairers\",\n \"Hair Dresser\",\n \"Makeup Artist\",\n \"Mechanics\",\n \"Painters\",\n \"Panel Beaters\",\n \"Phone Repairers\",\n \"Printer\",\n \"Plumber\",\n \"Rental Service\",\n \"Spare part Dealers\",\n \"Shoemaker (Cobbler)\",\n \"Tailor\",\n \"Technician\",\n \"Vulcanizer\",\n \"Watch Repairer\",\n \"Welder\",\n \"Battery Charger\",\n \"Bicycle Repairer\",\n \"CCTV Installer\",\n \"Fitness Instructor\",\n \"Key Cutters\",\n \"Sign Writer\",\n \"Towing Truck\"\n ];\n\n $professional = [\n \"Accountants\",\n \"Financial analyst\",\n \"Auditors\",\n \"Financial and Investment Advisers\",\n \"Optometrist\",\n \"Dentist\",\n \"Lawyer\",\n \"Dermatologist\",\n \"Radiologist\",\n \"Pharmacists\",\n \"Physiotherapists\",\n \"Nutritionists\",\n \"Veterinarians\",\n \"Systems administrators\",\n \"Database designers\",\n \"Applications programmers\",\n \"Software developers\",\n \"Digital marketers\",\n \"Systems analysts\",\n \"Web and multimedia developers\",\n \"Authors\",\n \"Journalists\",\n \"Engineers\",\n \"Mathematicians\",\n \"Actuaries\",\n \"Statisticians\",\n \"Architects\",\n ];\n\n\n foreach ($artisan as $item) {\n $work = new \\App\\Work();\n $work->name = $item;\n $work->category = \"Artisan\";\n $work->image = \"/img/artisan.png\";\n $work->amount = 180;\n $work->save();\n }\n\n foreach ($professional as $item) {\n $work = new \\App\\Work();\n $work->name = $item;\n $work->category = \"Profesional\";\n $work->image = \"/img/professional.png\";\n $work->amount = 1000;\n $work->save();\n }\n }",
"public function run()\n {\n PageContent::factory()->aboutUs()->state([\n 'content' => 'D\\'more Event Planner is an Event Planning Software is cutting-edge tool which will allow the client all the resources and visual aids for their event planning. They will be able to play with decoration themes, listen to theme music, design invitations, thank-you cards, and RSVP cards, use the interactive planning calendar, and much more. This software will bring your event into the millennium with cutting edge technology that is designed to save time and money.'\n ])->create();\n PageContent::factory()->aboutUs()->state([\n 'content' => 'We also provide a Step-by-Step Guide in preparation to your event which include a calendar to map out the event, a step-by-step guide on what is needed for and how to put together a successful, worry-free event, resource information, popular refreshments with recipes, games, and tips to put their event in the record books. The events available include birthdays for all ages, meetings, retreats, parties, vacations, and special occasion celebrations such as graduations, holidays, showers, weddings, and receptions.'\n ])->create();\n }",
"public function run()\n {\n // define base categories\n $categories = [\n \"agency\" => \"Agency\",\n \"agency-law\" => \"Agency Law\",\n \"ce-core\" => \"CE Core\",\n \"ce-credit\" => \"CE Credit\",\n ];\n\n $regulations = [\n 'name' => 'Texas',\n 'abbreviation' => 'TX',\n 'commission_name' => 'Texas Real Estate Commission',\n 'commission_abbreviation' => 'TREC',\n 'contact_first_name' => 'Texas',\n 'contact_last_name' => 'Texas',\n 'contact_email_address' => 'Texas',\n 'contact_phone' => 'Texas',\n 'contact_street_address' => 'Texas',\n 'contact_state' => 'Texas',\n 'contact_city' => 'Texas',\n 'contact_zip_code' => 'Texas',\n 'regulations' => 'Texas',\n 'regulations_doc' => 'Texas',\n 'ce_requirements_statement' => '<h3>Active sales agent license renewal requirements:</h3><ul><li>Complete 18 hours of approved Continuing Education (CE) courses<ul><li>8 hours of TREC Legal Update I and II; and</li><li>10 hours of elective CE</li></ul></li><li>If you have been made a supervisor by your broker, you may also need to take the 6-hour Broker Responsibility course as part of your 18 hours of CE.</li></ul><h4>If applying for the first time, you must take:</h4><p>180 classroom hours of the following qualifying real estate courses</p><ul><li>Principles of Real Estate I (30 classroom hours)</li><li>Principles of Real Estate II (30 classroom hours)</li><li>Law of Agency (30 classroom hours)</li><li>Law of Contracts (30 classroom hours)</li><li>Promulgated Contracts Forms (30 classroom hours)</li><li>Real Estate Finance (30 classroom hours)</li></ul>',\n 'must_specify_courses' => true\n ];\n\n $regulation = new Regulation($regulations);\n $regulation->save();\n\n $courses = [\n [\n 'title' => 'Strategic Financing - What Agents Should Know',\n 'regulation_id' => $regulation->id,\n 'number' => 'C2558',\n 'code' => 'AZSTF3',\n 'hours' => 3,\n 'description' => 'We will explore some of the vital “niche” loan products available in the mortgage industry today. You will learn the practical application of these loans and therefore will leave with the knowledge necessary to create more transactions and protect your clients.',\n 'expiration_date' => Carbon::now(),\n 'class_flyer_template' => 'http://school.educate2earn.com/uploads/courses/25/flyer/AZSTF%20Flyer%207.18.docx',\n 'class_docs_template' => 'http://school.educate2earn.com/uploads/courses/25/docs/AZSTF%20Roster%20Cert%20Fillable%2011.18.pdf',\n 'material' => 'http://school.educate2earn.com/uploads/courses/25/materials/STF3%20Materials%201.19.zip',\n 'commercial_link' => 'http://school.educate2earn.com',\n 'is_deleted' => false\n ]\n ];\n\n // assign courses to categories\n foreach ($categories as $key => $value) {\n $category = new Category([\n 'name' => $key,\n 'label' => $value\n ]);\n if ($category->save()) {\n foreach ($courses as $course) {\n $dbCourse = new Course($course);\n $dbCourse->save();\n $dbCourse->assign($category);\n }\n }\n }\n }",
"public function run()\n {\n \t$titles = [\"Top Ten Percent - Membership Registeration Activation\", \n \"Top Ten Percent - Less than 3 Star Review\", \n \"Top Ten Percent - Business Membership Agreement\",\n\t\t\t\"Top Ten Percent - Password Reset\", \n \"Top Ten Percent New Business Nominations\", \n \"Top Ten Percent Franchise Opportunities Info Request\",\n\t\t\t\"Top Ten Percent - Membership Registration\", \n \"Top Ten Percent - 14 Day Holding Period Expired\", \n \"Top Ten Percent - New Review After 14 Days Has Posted\"];\n \t$variables = [\"FIRSTNAME,ACTIVATIONLINK\", \n \"BUSINESSNAME,FIRSTNAME,LASTNAME,EMAIL,RATING,COMMENT\", \n \"CONTRACTLINK,FIRSTNAME\", \n \"NEWPASSWORD,FIRSTNAME\", \n \"CURRENTTIME,FIRSTNAME\", \n \"FIRSTNAME,LASTNAME,EMAIL,PHONE,CITY,STATE,ZIPCODE\", \n \"USERNAME,FIRSTNAME\", //\"USERNAME,PASSWORD\", \n \"FIRSTNAME,LASTNAME,LINK1,LINK2,BUSINESSNAME\", \n \"FIRSTNAME,LASTNAME,BUSINESSNAME\"];\n $contents = [\n \"<p> Dear {FIRSTNAME},</p>\n <span style='font-family:Verdana; font-size:10pt;'>\n<p>Congratulations! By clicking the link below you will become a LIFETIME CHARTER MEMBER of the Top Ten Percent™. This means that our normal $24.95 Annual Membership fee will be waived and your membership will be <strong>FREE FOR LIFE!</strong></p>\n\n<p>{ACTIVATIONLINK}</p>\n\n<p>We will email you just prior to our Official Launch date so you can start taking advantage of all the discounts offered by the world’s first Virtual On-Command Coupons™ that are generated directly on your iPhone or Smartphone and accepted by all Top Ten Percent™ Business Members. Thank you for not only being a valued member, but now a LIFETIME CHARTER MEMBER! Please click the link above to authorize your membership.</p>\n\nThank You,<br/>\n<strong>Top Ten Percent™</strong><br/>\n<i>Buy From The Best For Less™</i></span>\",\n\n\"<p>The following complaint has been filed for <strong>{BUSINESSNAME}</strong></p>\n<p>Member: {FIRSTNAME} {LASTNAME}</p>\n<p>{EMAIL}</p>\n<p>Rating: {RATING}</p>\n<p>Comment: {COMMENT}</p>\",\n\n\"<p>Thank you for signing up with Top Ten Percent. You can find the complete business membership agreement via the following link</p>\n<p>{CONTRACTLINK}</p>\nThank You,<br/>\n<strong>Top Ten Percent™</strong><br/>\n<i>Buy From The Best For Less™</i></span>\",\n\n\"<p>Please find below your user credentials for Top Ten Percent:</p>\n<p><b>Your new password is: {NEWPASSWORD}<br/><br/></b></p>\nThank You,<br/>\n<strong>Top Ten Percent™</strong><br/>\n<i>Buy From The Best For Less™</i></span>\",\n\n\"<span style='font-family:Verdana; font-size:10pt;'>\n<p>A new business nomination has been submitted at {CURRENTTIME}</p>\n<br/>\n<strong>Top Ten Percent™</strong><br/>\n<i>Buy From The Best For Less™</i></span>\",\n\n\"<span style='font-family:Verdana; font-size:10pt;'>\n<h2>Franchise Info Request:</h2>\n<table cellpadding='0' cellspacing='0' style='line-height:1.8;'>\n<tr>\n<td style='width:150px;'>First Name: </td>\n<td>{FIRSTNAME}</td>\n</tr>\n<tr>\n<td>Last Name: </td>\n<td>{LASTNAME}</td>\n</tr>\n<tr>\n<td>Email: </td>\n<td>{EMAIL}</td>\n</tr>\n<tr>\n<td>Phone Number: </td>\n<td>{PHONE}</td>\n</tr>\n</table>\n<h2>The market you are interested in:</h2>\n<table cellpadding='0' cellspacing='0' style='line-height:1.8;'>\n<tr>\n<td style='width:150px;'>City: </td>\n<td>{CITY}</td>\n</tr>\n<tr>\n<td>State: </td>\n<td>{STATE}</td>\n</tr>\n<tr>\n<td>Zip Code: </td>\n<td>{ZIPCODE}</td>\n</tr>\n</table>\n<p></p>\n<br/>\n<strong>Top Ten Percent™</strong><br/>\n<i>Buy From The Best For Less™</i></span>\",\n\n\"<p>Congratulations and thank you for signing up for your <b>FREE LIFETIME CHARTER MEMBERSHIP</b> for the Top Ten Percent™.</p>\n\n<p><b>Your Login name is: {USERNAME}<br/>;\nYour password is what you set it as<br/><br/>\nYou will be prompted to change your password the first time you log in.</b></p>\n\n<p>The Top Ten Percent™ is the world's first Virtual On-command Coupon Service™ that generates coupons for hundreds of products and services from local merchants to your iPhone or smartphone in an instant. Never go out to dinner or buy another product or service without saving money.</p>\n\n<p>Even better, you will be able to BUY FROM THE BEST FOR LESS™. All of our Business Members are recognized as being in the top 10% of their respective fields.</p>\n\n<p>Start saving now by going to <a href='http://www.TopTenPercent.com'>www.TopTenPercent.com</a></p>\n\nThank You,<br/>\n<strong>Top Ten Percent™</strong><br/>\n<i>Buy From The Best For Less™</i></span>\",\n\"<p> </p>\n<p>14 days ago, {FIRSTNAME} {LASTNAME} left a less than 3 Star Review. It is our hope that {BUSINESSNAME} was able to satisfactorily resolve the concerns. </p>\n<p>{FIRSTNAME} {LASTNAME} has three options available.</p>\n<p>1. Do nothing and the original review will be deleted.</p>\n<p>2. Click {LINK1} and leave a new review that is 3 Stars or better if you feel that {BUSINESSNAME} made an honest attempt of addressing your concerns.</p>\n<p>3. Click {LINK2} and leave a new review with the same number of stars you gave them originally.</p>\n<p> </p>\n<p>(TTP LINK WOULD GO HERE AND WHEN THEY CLICK IT, IT AUTOMATICALLY TAKES THEM TO PAGE FOR THAT BUSINESS WHERE THEY CAN LEAVE A REVIEW THAT WILL POST LIVE REGARDLESS IF THE REVIEW IS LESS THAN 3 STARS)</p>\n<p> </p>\",\n\n\"<p>{FIRSTNAME} {LASTNAME} who previously left a less than 3 Star Review for {BUSINESSNAME} 14 days ago, has posted a final review that is now live on the site. We cannot delete or modify this review this review in any way as the Business Member was given the opportunity to resolve the concern(s.)</p>\n<p> </p>\n<p>Thank you,</p>\n<p>TTP Franchising, Inc.</p>\n<p> </p>\"\n\n ];\n \tfor ($i = 0; $i < count($titles); $i++){\n\t DB::table('emails')->insert([\n\t\t 'title' => $titles[$i],\n\t\t 'variables' => $variables[$i],\n 'content' => $contents[$i],\n\t\t ]);\n \t}\n DB::table('emails')->insert([\n 'title' => \"Email Header\",\n ]);\n DB::table('emails')->insert([\n 'title' => \"Email Footer\",\n ]);\n }",
"public function run()\n {\n // http://www.telegraph.co.uk/history/britain-at-war/9813502/The-20-greatest-battles-in-British-history.html\n $exercises = [\n '14 June 1645' => 'Naseby (First English Civil War)',\n '13 August 1704' => 'Blenheim (War of the Spanish Succession)',\n '16 April 1746' => 'Culloden (Jacobite Rebellion of 1745)',\n '23 June 1757' => 'Plassey (Seven Years War)',\n '13 September 1759' => 'Quebec (Seven Years War)',\n '19 April 1775' => 'Lexington (American War of Independence)',\n '22 July 1812' => 'Salamanca (Peninsular War)',\n '18 June 1815' => 'Waterloo (Napoleonic Wars)',\n '28 January 1846' => 'Aliwal (First Sikh War)',\n '25 October 1854' => 'Balaklava (Crimean War)',\n '22-23 January 1879' => 'Rorke’s Drift (Zulu War)',\n '25 April 1915 – 9 January 1916' => 'Gallipoli (World War One)',\n '1 July – 18 November 1916' => 'Somme (World War One)',\n '19 September – 31 October 1918' => 'Megiddo (World War One)',\n '23 October – 4 November 1942' => 'El Alamein (World War Two)',\n '6 June – 25 August 1944' => 'D-Day and the Battle for Normandy (World War Two)',\n '8 March – 3 July 1944' => 'Imphal/Kohima (World War Two)',\n '22-25 April 1951' => 'Imjin River (Korean War)',\n '28-29 May 1982' => 'Goose Green (Falklands War)',\n '17 July -12 September 2006' => 'Musa Qala (War in Afghanistan)',\n ];\n $this->lesson('History: The greatest battles in British history', $exercises, $bidirectional = true);\n\n // http://speakspeak.com/resources/vocabulary-elementary-pre-intermediate/70-common-irregular-verbs\n $exercises = [\n 'become' => 'became, become',\n 'begin' => 'began, begun',\n 'break' => 'broke, broken',\n 'bring' => 'brought, brought',\n 'build' => 'built, built',\n 'buy' => 'bought, bought',\n 'catch' => 'caught, caught',\n 'choose' => 'chose, chosen',\n 'come' => 'came, come',\n 'cost' => 'cost, cost',\n 'cut' => 'cut, cut',\n 'do' => 'did, done',\n 'draw' => 'drew, drawn',\n 'drink' => 'drank, drunk',\n 'drive' => 'drove, driven',\n 'eat' => 'ate, eaten',\n 'fall' => 'fell, fallen',\n 'feed' => 'fed, fed',\n 'feel' => 'felt, felt',\n 'fight' => 'fought, fought',\n 'find' => 'found, found',\n 'fly' => 'flew, flown',\n 'forget' => 'forgot, forgotten',\n 'forgive' => 'forgave, forgiven',\n 'get' => 'got, got',\n 'give' => 'gave, given',\n 'go' => 'went, gone',\n 'grow' => 'grew, grown',\n ];\n $this->lesson('English: Common irregular verbs 1 (a-g)', $exercises, $bidirectional = true);\n\n // http://speakspeak.com/resources/vocabulary-elementary-pre-intermediate/70-common-irregular-verbs\n $exercises = [\n 'have' => 'had, had',\n 'hear' => 'heard, heard',\n 'hide' => 'hid, hidden',\n 'hit' => 'hit, hit',\n 'hold' => 'held, held',\n 'know' => 'knew, known',\n 'learn' => 'learned, learnt/learned',\n 'leave' => 'left, left',\n 'lend' => 'lent, lent',\n 'lose' => 'lost, lost',\n 'make' => 'made, made',\n 'mean' => 'meant, meant',\n 'meet' => 'met, met',\n 'pay' => 'paid, paid',\n 'put' => 'put, put',\n 'read' => 'read, read',\n 'ride' => 'rode, ridden',\n 'rise' => 'rose, risen',\n 'run' => 'ran, run',\n 'say' => 'said, said',\n 'see' => 'saw, seen',\n 'sell' => 'sold, sold',\n 'send' => 'sent, sent',\n 'set' => 'set, set',\n 'show' => 'showed, shown',\n 'sing' => 'sang, sung',\n 'sit' => 'sat, sat',\n 'sleep' => 'slept, slept',\n 'speak' => 'spoke, spoken',\n 'spend' => 'spent, spent',\n 'stand' => 'stood, stood',\n 'steal' => 'stole, stolen',\n 'swim' => 'swam, swum',\n 'take' => 'took, taken',\n 'teach' => 'taught, taught',\n 'tell' => 'told, told',\n 'think' => 'thought, thought',\n 'throw' => 'threw, thrown',\n 'understand' => 'understood, understood',\n 'wear' => 'wore, worn',\n 'win' => 'won, won',\n 'write' => 'wrote, written',\n ];\n $this->lesson('English: Common irregular verbs 2 (h-z)', $exercises, $bidirectional = true);\n\n $user = User::factory()->create(\n [\n 'email' => '[email protected]',\n 'password' => '$2y$12$/WfobkrcnlmQRIAAWcyw5OU6c9cj13SxGJNYtLSiTVhn8c0jQr1Au',\n // password: [email protected]\n 'api_token' => 'admin-example-com-api-token',\n ]\n );\n\n // private lessons\n $lesson = Lesson::factory()->create(\n [\n 'name' => 'Private lesson with no exercises',\n 'visibility' => 'private',\n 'owner_id' => $user->id,\n ]\n );\n $lesson->subscribe($user);\n\n $lesson = Lesson::factory()->create(\n [\n 'name' => 'Private lesson with one exercise',\n 'visibility' => 'private',\n 'owner_id' => $user->id,\n ]\n );\n $lesson->subscribe($user);\n Exercise::factory()->create(\n [\n 'lesson_id' => $lesson->id,\n ]\n );\n event(new ExerciseCreated($lesson, $lesson->owner));\n\n $lesson = Lesson::factory()->create(\n [\n 'name' => 'Private lesson with two exercises',\n 'visibility' => 'private',\n 'owner_id' => $user->id,\n ]\n );\n $lesson->subscribe($user);\n Exercise::factory()\n ->count(2)\n ->create(\n [\n 'lesson_id' => $lesson->id,\n ]\n );\n event(new ExerciseCreated($lesson, $lesson->owner));\n\n $lesson = Lesson::factory()->create(\n [\n 'name' => 'Private lesson with three exercises',\n 'visibility' => 'private',\n 'owner_id' => $user->id,\n ]\n );\n $lesson->subscribe($user);\n Exercise::factory()\n ->count(3)\n ->create(\n [\n 'lesson_id' => $lesson->id,\n ]\n );\n event(new ExerciseCreated($lesson, $lesson->owner));\n\n // owned lessons\n $ownedMathLesson1 = Lesson::factory()->create(\n [\n 'name' => 'Math: multiplication table 1-100',\n 'owner_id' => $user->id,\n ]\n );\n $ownedMathLesson1->subscribe($user);\n for ($i = 1; $i <= 10; $i++) {\n for ($j = 1; $j <= 10; $j++) {\n Exercise::factory()->create(\n [\n 'lesson_id' => $ownedMathLesson1->id,\n 'question' => $i . ' x ' . $j,\n 'answer' => $i * $j,\n ]\n );\n }\n }\n event(new ExerciseCreated($ownedMathLesson1, $lesson->owner));\n\n $ownedMathLesson2 = Lesson::factory()->create(\n [\n 'name' => 'Math: multiplication table 100-400',\n 'owner_id' => $user->id,\n ]\n );\n $ownedMathLesson2->subscribe($user);\n for ($i = 10; $i <= 20; $i++) {\n for ($j = 10; $j <= 20; $j++) {\n Exercise::factory()->create(\n [\n 'lesson_id' => $ownedMathLesson2->id,\n 'question' => $i . ' x ' . $j,\n 'answer' => $i * $j,\n ]\n );\n }\n }\n event(new ExerciseCreated($ownedMathLesson2, $ownedMathLesson2->owner));\n\n // owned aggregate lesson\n /** @var Lesson $lesson */\n $lesson = Lesson::factory()->create(\n [\n 'name' => 'All my math lessons aggregated',\n 'owner_id' => $user->id,\n ]\n );\n $lesson->subscribe($user);\n $lesson->childLessons()->attach($ownedMathLesson1);\n $lesson->childLessons()->attach($ownedMathLesson2);\n event(new LessonAggregatesUpdated($lesson, $ownedMathLesson2->owner));\n\n // subscribed lesson\n $lesson = Lesson::factory()->create(\n [\n 'name' => 'Math: multiplication table 400-900',\n ]\n );\n $lesson->subscribe($lesson->owner);\n for ($i = 20; $i <= 30; $i++) {\n for ($j = 20; $j <= 30; $j++) {\n Exercise::factory()->create(\n [\n 'lesson_id' => $lesson->id,\n 'question' => $i . ' x ' . $j,\n 'answer' => $i * $j,\n ]\n );\n event(new ExerciseCreated($lesson, $lesson->owner));\n }\n }\n $lesson->subscribe($user);\n\n // other lessons\n $lesson = Lesson::factory()->create(\n [\n 'name' => 'Math: adding integer numbers',\n ]\n );\n for ($i = 1; $i <= 100; $i++) {\n $a = rand(100, 10000);\n $b = rand(100, 10000);\n Exercise::factory()->create(\n [\n 'lesson_id' => $lesson->id,\n 'question' => $a . ' + ' . $b,\n 'answer' => $a + $b,\n ]\n );\n event(new ExerciseCreated($lesson, $lesson->owner));\n }\n $lesson->subscribe($lesson->owner);\n\n $lesson = Lesson::factory()->create(\n [\n 'name' => 'Math: subtracting integer numbers',\n ]\n );\n for ($i = 1; $i <= 100; $i++) {\n $a = rand(100, 10000);\n $b = rand(100, 10000);\n Exercise::factory()->create(\n [\n 'lesson_id' => $lesson->id,\n 'question' => $a . ' - ' . $b,\n 'answer' => $a - $b,\n ]\n );\n }\n event(new ExerciseCreated($lesson, $lesson->owner));\n $lesson->subscribe($lesson->owner);\n\n $lesson = Lesson::factory()->create(\n [\n 'name' => 'Private lesson of another user',\n 'visibility' => 'private',\n ]\n );\n for ($i = 1; $i <= 5; $i++) {\n $a = rand(10, 100);\n $b = rand(10, 100);\n Exercise::factory()->create(\n [\n 'lesson_id' => $lesson->id,\n 'question' => $a . ' - ' . $b,\n 'answer' => $a - $b,\n ]\n );\n }\n event(new ExerciseCreated($lesson, $lesson->owner));\n $lesson->subscribe($lesson->owner);\n\n $lesson = Lesson::factory()->create(\n [\n 'name' => 'Just one exercise lesson',\n 'visibility' => 'public',\n ]\n );\n Exercise::factory()->create(\n [\n 'lesson_id' => $lesson->id,\n 'question' => $a . ' - ' . $b,\n 'answer' => $a - $b,\n ]\n );\n event(new ExerciseCreated($lesson, $lesson->owner));\n $lesson->subscribe($lesson->owner);\n }",
"public function submissions();",
"function getSolution() {\n \techo \"getSolution was not implemented, this is a severe error!\";\n }",
"public function run()\n {\n $this->updateOrCreate('/(uber)(.*)(help)(?=.*)/gi', 'UBER', 'transportation', true);\n\n $this->updateOrCreate('/(SHOPIFY.COM|SHOPIFYCOM)/g', 'SHOPIFY', 'business/hosting', true);\n\n $this->updateOrCreate('/(FACEBK \\*)([A-Z0-9]+)/g', 'Facebook Ads', 'business/advertising', true);\n\n $this->updateOrCreate('/(Albert Heijn|AH TO GO)\\s+([0-9]+)/g', 'Albert Heijn', 'basic', true, [\n \"supermarket\",\n \"grocery_or_supermarket\",\n \"store\",\n \"food\",\n \"point_of_interest\",\n \"establishment\"\n ]);\n\n $this->updateOrCreate('/(Gall & Gall)\\s+([0-9]+)/g', 'Gall & Gall', 'healthnbeauty', true, [\n \"liquor_store\",\n \"store\",\n \"point_of_interest\",\n \"establishment\"\n ]);\n\n $this->updateOrCreate('/(Wizz Air Hu)\\s+([A-Z_0-9]+)/g', 'Wizz Air', 'travel', true);\n\n $this->updateOrCreate('/(DIRK VAN DEN BROEK)/g', 'DIRK VAN DEN BROEK', 'basic', true, [\n \"supermarket\",\n \"grocery_or_supermarket\",\n \"store\",\n \"food\",\n \"point_of_interest\",\n \"establishment\"\n ]);\n\n $this->updateOrCreate('/(PULL & BEAR)/g', 'PULL & BEAR', 'clothing', true, [\n \"clothing_store\",\n \"store\",\n \"point_of_interest\",\n \"establishment\"\n ]);\n\n $this->updateOrCreate('/(ETOS)\\s+([0-9]+)/g', 'Etos', 'healthnbeauty', true, [\n \"store\",\n \"health\",\n \"point_of_interest\",\n \"establishment\"\n ]);\n\n $this->updateOrCreate('/(Pearle Opticiens)\\s+([0-9]+)/g', 'Pearle Opticiens', 'healthnbeauty', true, [\n \"store\",\n \"health\",\n \"point_of_interest\",\n \"establishment\"\n ]);\n }",
"public function run()\n {\n $dev_skills = [ \n ['description' => 'Laravel'],\n ['description' => 'PHP'],\n ['description' => 'Phyton'],\n ['description' => 'SQL'],\n ['description' => 'SQLite'],\n ['description' => 'Scrum'],\n ['description' => 'Java'],\n ['description' => 'Android'],\n ['description' => 'Flex'],\n ['description' => 'Postgre'],\n ['description' => 'SQL Server'],\n ['description' => 'AndroidX'],\n ['description' => 'Javascript'],\n ['description' => 'HTML'],\n ['description' => 'HTML5'],\n ['description' => 'JQuery'],\n ['description' => 'Composer'],\n ['description' => 'CSS'],\n ['description' => 'Bootstrap'],\n ['description' => 'Sublime'],\n ['description' => 'Visual Studio Code (VScode)'],\n ['description' => 'Joomla'],\n ['description' => 'NPM'],\n ['description' => 'ES6'],\n ['description' => 'ES7'],\n ['description' => 'GITLAB'],\n ['description' => 'Git'],\n ['description' => 'Github'],\n ['description' => 'Bitbucket'],\n ['description' => 'API'],\n ['description' => 'REST'],\n ['description' => 'SOAP'],\n ['description' => 'Android Studio'],\n ];\n $contab_skills = [ \n ['description' => 'Domínio sistemas'],\n ['description' => 'Lucro Real'],\n ['description' => 'Lucro presumido'],\n ['description' => 'Simples Nacional'],\n ['description' => 'Demonstrações coontábeis'],\n ['description' => 'IRPF'],\n ['description' => 'Declarações Anuais'],\n ['description' => 'ECF'],\n ['description' => 'ECD'],\n ['description' => 'Protheus'],\n ['description' => 'Totvs'],\n ['description' => 'Defis'],\n ['description' => 'Coordenação'],\n ['description' => 'Perdcomp'],\n ['description' => 'Conciliação'],\n ['description' => 'Lançamentos'],\n ['description' => 'Lalur'],\n ];\n $dep_pessoal_skills = [\n ['description' => 'Prolabore'],\n ['description' => 'Férias'],\n ['description' => 'Recisões'],\n ['description' => 'DCTF WEB'],\n ['description' => 'INSS'],\n ['description' => 'FGTS'],\n ['description' => 'E-Social'],\n ['description' => 'IRRF'],\n ];\n foreach ($dev_skills as $skill) {\n Skill::create($skill);\n }\n foreach ($contab_skills as $skill) {\n Skill::create($skill);\n }\n foreach ($dep_pessoal_skills as $skill) {\n Skill::create($skill);\n }\n }",
"function main()\n{\n\t$research = ResearchService::getAll();\n\tif (!is_null($research)) {\n\t\thttp_response_code(201);\n\t\tJsonDataObject::createResponse($research);\n\t} else {\n\t\thttp_response_code(200);\n\t\tJsonDataObject::createResponse(['error' => 'That user does not exist']);\n\t}\n}",
"function main()\n{\n global $app, $globalSettings;\n\n $filter = getFilter();\n $books1 = $app->calibre->last30Books($globalSettings['lang'], $globalSettings[PAGE_SIZE], $filter);\n $books = array_map('checkThumbnail', $books1);\n $stats = $app->calibre->libraryStats($filter);\n $app->render('index_last30.html', [\n 'page' => mkPage(getMessageString('dl30'), 1, 1),\n 'books' => $books,\n 'stats' => $stats]);\n}",
"public function buildIndexPage()\n {\n // that there is only one user accessing the application. In the future I could do a registration method and then\n // I would need to pass the state around.\n $vehicleList = $this->vehicleRepository->retrieveVehicleList();\n\n // Each vehicle has additional information that is not stored in the datasource. Loop through each\n // vehicle and attach the information.\n foreach($vehicleList as $vehicle) {\n // Attach the calculations for the vehicle.\n $mileage = $this->mileEntryRepository->retrieveMileageForVehicle($vehicle->id);\n $vehicle['costData'] = $this->calculationService->buildCostInformation($vehicle, $mileage);\n }\n\n return view('pages/vehicle/index', ['vehicles' => $vehicleList]);\n }",
"public function explore(){\n //includes scripts to get experiences\n \t$this->set('jsIncludes',array('get_experiences','logo_fly','jvector','jquery-jvectormap.min','jquery-jvectormap-world-mill-en','jquery.dropdown','cookies'));\n //includes styles for map and filters\n $this->set('cssIncludes',array('jvectormap','map'));\n \n //sets motives, schools and departments by alphbetical order\n $this->__set_motives_schools_and_departments();\n }",
"public function run()\n {\n $surgery_names = array(\n 'Genital',\n 'Female',\n\n 'Cervicectomy',\n 'Clitoridectomy ',\n 'Hysterectomy',\n 'Myomectomy',\n 'Oophorectomy',\n 'Salpingectomy',\n 'Salpingoophorectomy',\n 'Vaginectomy ',\n 'Vulvectomy',\n\n 'Male',\n\n 'Gonadectomy',\n 'Orchiectomy ',\n 'Penectomy',\n 'Posthectomy ',\n 'Prostatectomy',\n 'Varicocelectomy ',\n 'Vasectomy',\n\n 'Musculoskeletal ',\n\n 'Bursectomy',\n\n 'Amputation ',\n\n 'Hemicorporectomy',\n 'Hemipelvectomy ',\n\n 'Nervous system',\n 'CNS ',\n\n 'Decompressive craniectomy',\n 'Hemispherectomy ',\n 'Anterior temporal lobectomy',\n 'Hypophysectomy ',\n 'Amygdalohippocampectomy',\n 'Laminectomy ',\n 'Corpectomy',\n 'Facetectomy ',\n\n 'PNS',\n\n 'Ganglionectomy ',\n 'Sympathectomy / Endoscopic thoracic sympathectomy',\n 'Neurectomy ',\n 'Nerve transfer',\n\n 'Ear ',\n\n 'Stapedectomy',\n 'Mastoidectomy ',\n\n 'Eye',\n\n 'Photorefractive keratectomy ',\n 'Trabeculectomy',\n 'Iridectomy ',\n 'Vitrectomy',\n\n 'Gastrointestinal ',\n\n 'Glossectomy',\n 'Esophagectomy ',\n 'Gastrectomy',\n 'Appendectomy ',\n 'Proctocolectomy',\n 'Colectomy ',\n 'Hepatectomy',\n 'Cholecystectomy ',\n 'Pancreatectomy / Pancreaticoduodenectomy',\n\n 'Respiratory ',\n\n 'Rhinectomy',\n 'Laryngectomy ',\n 'Pneumonectomy',\n\n 'Endocrine ',\n\n 'Hypophysectomy',\n 'Thyroidectomy ',\n 'Parathyroidectomy',\n 'Adrenalectomy ',\n 'Pinealectomy',\n\n 'Renal ',\n\n 'Nephrectomy',\n 'Cystectomy ',\n\n 'Lymphatic',\n\n 'Tonsillectomy ',\n 'Adenoidectomy',\n 'Thymectomy',\n 'Splenectomy',\n 'Lymphadenectomy ',\n 'Adenectomy',\n\n 'Breast ',\n\n 'Lumpectomy',\n 'Mastectomy ',\n\n 'Bone / joint',\n\n 'Coccygectomy ',\n 'Ostectomy',\n 'Femoral head ostectomy ',\n 'Astragalectomy',\n 'Discectomy ',\n 'Synovectomy',\n\n 'Ungrouped ',\n\n 'Embolectomy',\n 'Endarterectomy ',\n 'Frenectomy',\n 'Ganglionectomy ',\n 'Gingivectomy',\n 'Lobectomy ',\n 'Myomectomy',\n 'Panniculectomy ',\n 'Pericardiectomy',\n\n 'Ostomy ',\n 'Gastrointestinal',\n\n 'Gastrostomy ',\n 'Percutaneous endoscopic gastrostomy',\n 'Gastroduodenostomy ',\n 'Gastroenterostomy',\n 'Ileostomy ',\n 'Jejunostomy',\n 'Colostomy ',\n 'Cholecystostomy',\n 'Hepatoportoenterostomy ',\n\n 'Urogenital',\n\n 'Nephrostomy ',\n 'Ureterostomy',\n 'Cystostomy ',\n 'Suprapubic cystostomy',\n 'Urostomy ',\n\n 'Nervous system',\n\n 'Ventriculostomy ',\n\n 'Eye',\n\n 'Dacryocystorhinostomy ',\n\n 'Otomy',\n 'Urogenital ',\n\n 'Amniotomy',\n 'Clitoridotomy ',\n 'Hysterotomy',\n 'Hymenotomy',\n 'Episiotomy',\n 'Meatotomy',\n 'Nephrotomy',\n\n 'Nervous system',\n 'CNS',\n\n 'Craniotomy',\n 'Pallidotomy',\n 'Thalamotomy',\n 'Lobotomy',\n 'Bilateral cingulotomy',\n 'Cordotomy',\n 'Rhizotomy',\n 'Laminotomy',\n 'Foraminotomy',\n\n 'PNS',\n\n 'Axotomy',\n 'Vagotomy',\n\n 'Ear',\n\n 'Myringotomy',\n\n 'Eye',\n\n 'Radial keratotomy',\n\n 'Musculoskeletal',\n\n 'Myotomy',\n 'Tenotomy',\n 'Fasciotomy',\n 'Escharotomy',\n 'Osteotomy',\n 'Arthrotomy',\n 'Tendon transfer',\n\n 'Gastrointestinal',\n\n 'Myotomy',\n 'Heller myotomy',\n 'Pyloromyotomy',\n 'Anal sphincterotomy',\n 'Lateral internal sphincterotomy',\n\n 'Respiratory',\n\n 'Sinusotomy',\n 'Cricothyrotomy',\n 'Bronchotomy',\n 'Thoracotomy',\n 'Thyrotomy',\n 'Tracheotomy',\n\n 'Cardiovascular',\n\n 'Cardiotomy',\n 'Phlebotomy',\n 'Arteriotomy',\n 'Venotomy',\n\n 'Ungrouped',\n\n 'Laparotomy',\n );\n\n foreach ($surgery_names as $key => $value) {\n if (App\\SurgeryName::where('surgery_name', trim($value))->count() == 0) {\n DB::table('surgery_names')->insert([\n 'surgery_name' => trim($value),\n 'created_at' => now(),\n ]);\n }\n }\n }",
"public function run()\n {\n $about = [\n \"Housing Support Inc. was incorporated in 1990 as a vehicle to purchase a shelter for women and their children located in Amesbury Ma. In 1994, the bylaws were changed to broaden the scope of the agency and to add community leaders to the board.\",\n\n \"Since then the corporation has developed an additional eight properties in the communities of Haverhill, Lawrence, and Amesbury, which offer sober housing, supportive housing to homeless and/or disabled individuals and veterans. The projects were successfully completed despite challenges presented by difficult areas for the development and complex methods of competitive financing and public grant awards.\",\n\n \"These projects testify to a strong record by HSI in its ability to acquire property and develop it into affordable housing through public grants, public equity financing, market financing, and private donations. HSI has worked with The MA Land Bank, Community Economic Development and Assistance Corporation, Federal HOME Loan Bank, DHCD, DPH, DMH, DSS, MA Housing Finance Agency, Municipal Community Development Offices, MA Housing, North Shore HOME Consortium, Department of Housing and Urban Development and numerous local and regional housing authorities.\",\n\n \"HSI has received national recognition for its work when the “Elms” was selected by the Fannie Mae Foundation to receive one of only eighteen awards given nationwide for Excellence.\",\n\n \"Financial Partners include the Department of Housing and Urban Development, DHCD, Newburyport Bank, Pentucket Bank, CEDAC, Mass Housing, Mass Development North Shore HOME Consortium, and the Federal HOME Loan Bank.\"\n ];\n\n $a = New About();\n $a->firstp = $about[0];\n $a->secondp = $about[1];\n $a->thirdp = $about[2];\n $a->fourthp = $about[3];\n $a->fifthp = $about[4];\n $a->save();\n }",
"function renderServer($input, $argv) {\n // connect to the database\n $idDBLink = odbc_connect('NAME', 'user', 'password');\n if (!$idDBLink) { exit(\"Connection to database failed! Please contact your DataBase Administrator.\"); }\n\n $html = \"\";\n if ($argv['what'] == 'person') {\n $id = split(\",\", trim($argv[\"id\"]));\n if ($id != '') {\n // information about someone:\n // 1. personal contacts and summary\n // 2. publications by person\n // 3. advisory work by person\n //\n $html .= personById($idDBLink, $id[0]);\n\n $internalIds = authorIdByNumber($idDBLink, $id); // use all Ids\n $html .= pubsById($idDBLink, $internalIds);\n $html .= advisingById($idDBLink, $internalIds);\n }\n \n }\n else if ($argv['what'] == 'advising') {\n $id = split(\",\", trim($argv[\"id\"]));\n if ($id != '') {\n $internalIds = authorIdByNumber($idDBLink, $id); // use all Ids\n $html .= iconv('latin1', 'UTF-8', advisingById($idDBLink, $internalIds));\n }\n\n }\n else if ($argv['what'] == 'publications') {\n // information about some \"centro de custo\":\n // 1. currently, only a list of publications\n //\n $cc = trim($argv[\"cc\"]);\n $id = trim($argv[\"id\"]);\n if ($cc != '') {\n $html .= iconv('latin1', 'UTF-8', pubsByCC($idDBLink, $cc));\n }\n else if ($id != '') {\n $html .= iconv('latin1', 'UTF-8', pubsById($idDBLink, authorIdByNumber($idDBLink, array($id))));\n }\n }\n /*else if ($argv['what'] == 'publications') {\n // information about some \"centro de custo\":\n // 1. currently, only a list of publications\n //\n $cc = trim($argv[\"cc\"]);\n if ($cc != '') {\n $html .= pubsByCC($idDBLink, $cc);\n }\n }*/\n else if ($argv['what'] == 'calls') {\n // information about some \"centro de custo\":\n // 1. currently, only a list of publications\n //\n $cc = trim($argv[\"cc\"]);\n $showClosed = isset($argv['showclosed']) ? trim($argv['showclosed']) : \"\";\n if ($cc != '') {\n $html .= iconv('latin1', 'UTF-8', callsByCC($idDBLink, $cc, $showClosed == \"yes\"));\n }\n }\n else {\n // oops! no text...\n }\n\n odbc_close($idDBLink);\n return $html;\n}",
"function include_explore_text()\n{\n $objSrcUser = &$GLOBALS[\"objSrcUser\"];\n\n $objSrcRace = $objSrcUser->get_race();\n $arrUnitNames = $objSrcRace->getUnitNames();\n\n include_once('inc/functions/explore.php');\n $iMaxAcres = getMaxExplore($objSrcUser);\n $arrExploreCost = getExploreCosts($objSrcUser);\n\n //==========================================================================\n // Stop people from avoiding the tribe page so they dont get updated\n //==========================================================================\n include_once('inc/functions/update_ranking.php');\n doUpdateRankings($objSrcUser);\n\n echo $topLinks =\n '<div class=\"center\">' .\n '<a href=\"main.php?cat=game&page=build\">Construction</a> | ' .\n '<a href=\"main.php?cat=game&page=army\">Military Training</a> | ' .\n \"<strong>Exploration</strong>\" .\n '</div>';\n\n $advisorText =\n '<div id=\"textBig\">' .\n '<p>' .\n '<img src=\"'.HOST_PICS.'explorers.gif\" style=\"float: left; margin-right: 10px;\" alt=\"Explorers\" />' .\n \"<strong>The tribe architect</strong> greets you: <br />\" .\n \"Attacking other tribes is not the only way to settle new \" .\n \"acres and expand your tribe. Exploring is another, more friendly, \" .\n \"way to grow. However, exploring isn't free and will require crowns, \" .\n strtolower($arrUnitNames[2]) . \"s and \" . strtolower($arrUnitNames[1]) . \"s. \" .\n \"To lower the costs you may consider ordering additional markets to be constructed.\" .\n '</p>' .\n '<p>' .\n \"Sending out a team to settle <strong>1 acre</strong> costs <strong>\" .\n number_format($arrExploreCost['crowns']) . \" crowns</strong>, <strong>\" .\n $arrExploreCost['basics'] . \" \" . strtolower($arrUnitNames[2]) . \"s</strong> and \" .\n \"<strong>\" . $arrExploreCost['citizens'] . \" \" . strtolower($arrUnitNames[1]) . \"s.\" .\n \"</strong>\" .\n '</p>';\n\n if ($objSrcRace->getRaceName() == 'Nazgul')\n {\n $advisorText =\n '<div id=\"textMedium\">' .\n '<p>' .\n 'Your proud Nazgul army will not lower itself to explore for acres.' .\n '</p>';\n }\n\n $advisorText .= '</div>';\n echo $advisorText;\n\n // Classic Exception\n $strTip = 'Tip: You may be able to afford more, but you can only explore a ' .\n 'total of no more than 25% of your current land.';\n if ($_SERVER['SERVER_NAME'] == DINAH_SERVER_NAME && $objSrcUser->get_user_info(HOURS) < PROTECTION_HOURS)\n $strTip = 'Tip: You may explore at most 1000 acres while in protection.';\n\n if ($objSrcRace->getRaceName() != 'Nazgul')\n {\n // Advisor Link\n echo $advisorLink =\n '<br /><div class=\"tableLinkMedium\">' .\n '<a href=\"main.php?cat=game&page=advisors&show=build\">Tribe Architect</a> ' .\n ':: <a href=\"main.php?cat=game&page=market\">Market</a>' .\n '</div>';\n\n echo $strAdvisorText =\n '<div id=\"textMedium\" style=\"margin-top: 0;\">' .\n '<h3>Prepare Expedition</h3>' .\n '<p>' .\n 'Currently you can explore <strong><span class=\"indicator\">' . number_format($iMaxAcres) . '</span> acres</strong>.' .\n '</p>' .\n '<form id=\"center\" action=\"main.php?cat=game&page=explore2\" method=\"post\" style=\"margin-top: 0pt\";>' .\n '<label>Explore Acres: ' .\n '<input name=\"explored_acres\" value=\"' . $iMaxAcres . '\" size=\"5\" maxlength=\"4\" />' .\n '</label> ' .\n '<input type=\"submit\" value=\"Send Expedition\" />' .\n '</form>' .\n '<p>' .\n $strTip .\n '</p>' .\n '</div>';\n }\n}",
"public function run()\n {\n $user = User::firstOrFail();\n $sampleJobDesc = \"This is a sample job description for a fictional company. Example Co is looking for an experienced software developer to join our team.\n\n The right applicant's day to day would include meeting with stakeholders, turning ideas into code, and engineering solutions. You will be a part of a pool of talented individuals who will bolster your growth.\n \n You should have:\n A passion for coding\n A BS in computer science or 3 years of experience developing software\n Exposure to Agile development\n Exposure to source control (Git, SVN)\n Expertise in Object Oriented Programming/OOP\n Expertise in back-end architecture such as MVC\n \n Nice to haves:\n Experience with PHP, Java, JavaScript, or C / C++ / C#\n Mobile application development\n \n What we offer:\n Salary: $50,000 to $80,000\n Medical, Life, Dental insurance\n 14 PTO Days, 21 days after 18 months\n Opportunity for advancement\";\n\n $sampleResume = 'Joe Doe\n Software Engineer\n Team player. Problem solver. Quick learner. Ego-free. Deeply interested in back-end services, database design, cloud computing, and programming paradigms.\n Education\n B.S. in Computer Science\n University of Somewhere\n May 2019, cum laude. GPA 3.6/4.0\n Developed iOS application using AWS for the backend as a senior project.\n Technical Lead\n SomeCompany\n May 2016 - June 2018\n Co-founded a digital consulting agency focused on developing marketing and technical solutions.\n Collaboratively implemented web applications and content management system plug-ins to meet client requirements.\n Web Developer\n Freelance\n September 2014 - May 2016\n Requirement elicitation via communication with clients.\n Full-stack development of web applications for small businesses and nonprofits.\n Technology\n Languages: Java, C++, C, Python, JavaScript/ECMAScript, PHP, SQL, C#, HTML/XML, CSS\n Frameworks: Laravel, Express, .NET Core\n Database Management Systems: MySQL, Microsoft SQL Server, PostgreSQL, MongoDB\n Cloud Services: Heroku, AWS, Azure\n Methodology: OOP, MVC, Functional Programming, RESTful, Agile Development, TDD\n Source Control: Git, SVN\n Continuous Integration/Delivery: Travis CI, Jenkins, Maven\n Testing Suites: JUnit, PHPUnit, XCode';\n \n Application::create([\n 'position' => 'Software Developer',\n 'company_id' => 1,\n 'location_id' => 1,\n 'status_id' => 4,\n 'posted_salary_min' => 50000,\n 'posted_salary_max' => 80000,\n 'requested_salary' => 90000,\n 'job_description' => $sampleJobDesc,\n 'resume_text' => $sampleResume,\n 'coverletter_text' => 'Cover letter text should go here. Again, hopefully we can retain some formatting. Eventually implement file support for PDFs as well.',\n 'post_age' => 3,\n 'applied_at'=> date(\"Y-m-d\", strtotime(\"-14 days\")),\n 'created_at' => date(\"Y-m-d\", strtotime(\"-14 days\")),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\n 'user_id' => $user->getKey(),\n 'workspace' => 'Remote',\n 'employment_classification' => 'Full-time',\n 'pay_rate_type' => 'Salary'\n ]);\n\n Application::create([\n 'position' => 'Software Engineer',\n 'company_id' => 2,\n 'location_id' => 2,\n 'status_id' => 3,\n 'posted_salary_min' => 40000,\n 'posted_salary_max' => 90000,\n 'requested_salary' => 80000,\n 'job_description' => $sampleJobDesc,\n 'resume_text' => $sampleResume,\n 'coverletter_text' => 'Cover letter text should go here. Again, hopefully we can retain some formatting. Eventually implement file support for PDFs as well.',\n 'post_age' => 5,\n 'applied_at'=> date(\"Y-m-d\", strtotime(\"-13 days\")),\n 'created_at' => date(\"Y-m-d\", strtotime(\"-13 days\")),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\n 'user_id' => $user->getKey(),\n 'workspace' => 'In-office',\n 'employment_classification' => 'Full-time',\n 'pay_rate_type' => 'Salary'\n ]);\n\n Application::create([\n 'position' => 'Web Developer',\n 'company_id' => 3,\n 'location_id' => 2,\n 'status_id' => 5,\n 'posted_salary_min' => 69000,\n 'posted_salary_max' => 70000,\n 'requested_salary' => 70000,\n 'job_description' => $sampleJobDesc,\n 'resume_text' => $sampleResume,\n 'coverletter_text' => 'Cover letter text should go here. Again, hopefully we can retain some formatting. Eventually implement file support for PDFs as well.',\n 'post_age' => 21,\n 'applied_at'=> date(\"Y-m-d\", strtotime(\"-12 days\")),\n 'created_at' => date(\"Y-m-d\", strtotime(\"-12 days\")),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\n 'user_id' => $user->getKey(),\n 'workspace' => 'Hybrid',\n 'employment_classification' => 'Full-time',\n 'pay_rate_type' => 'Salary'\n ]);\n\n Application::create([\n 'position' => 'Software Developer',\n 'company_id' => 4,\n 'location_id' => 3,\n 'status_id' => 2,\n 'posted_salary_min' => 80000,\n 'posted_salary_max' => 100000,\n 'requested_salary' => 80000,\n 'job_description' => $sampleJobDesc,\n 'resume_text' => $sampleResume,\n 'coverletter_text' => 'Cover letter text should go here. Again, hopefully we can retain some formatting. Eventually implement file support for PDFs as well.',\n 'post_age' => 2,\n 'applied_at'=> date(\"Y-m-d\", strtotime(\"-11 days\")),\n 'created_at' => date(\"Y-m-d\", strtotime(\"-11 days\")),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\n 'user_id' => $user->getKey(),\n 'workspace' => 'Hybrid',\n 'employment_classification' => 'Contract',\n 'pay_rate_type' => 'Salary'\n ]);\n\n Application::create([\n 'position' => 'Technical Support',\n 'company_id' => 5,\n 'location_id' => 5,\n 'status_id' => 4,\n 'posted_salary_min' => 30,\n 'posted_salary_max' => 35,\n 'requested_salary' => 35,\n 'job_description' => $sampleJobDesc,\n 'resume_text' => $sampleResume,\n 'coverletter_text' => 'Cover letter text should go here. Again, hopefully we can retain some formatting. Eventually implement file support for PDFs as well.',\n 'post_age' => 4,\n 'applied_at'=> date(\"Y-m-d\", strtotime(\"-10 days\")),\n 'created_at' => date(\"Y-m-d\", strtotime(\"-10 days\")),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\n 'user_id' => $user->getKey(),\n 'workspace' => 'In-office',\n 'employment_classification' => 'Part-time',\n 'pay_rate_type' => 'Hourly'\n ]);\n\n Application::create([\n 'position' => 'PHP Developer (no min salary)',\n 'company_id' => 6,\n 'location_id' => 6,\n 'status_id' => 1,\n 'posted_salary_max' => 75000,\n 'requested_salary' => 70000,\n 'job_description' => $sampleJobDesc,\n 'resume_text' => $sampleResume,\n 'coverletter_text' => 'Cover letter text should go here. Again, hopefully we can retain some formatting. Eventually implement file support for PDFs as well.',\n 'post_age' => 31,\n 'created_at' => date(\"Y-m-d\", strtotime(\"-9 days\")),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\n 'user_id' => $user->getKey(),\n 'workspace' => 'Remote',\n 'employment_classification' => 'Full-time',\n 'pay_rate_type' => 'Salary'\n ]);\n\n Application::create([\n 'position' => 'JavaScript Developer (no max salary)',\n 'company_id' => 7,\n 'location_id' => 4,\n 'status_id' => 2,\n 'posted_salary_min' => 65000,\n 'requested_salary' => 70000,\n 'job_description' => $sampleJobDesc,\n 'resume_text' => $sampleResume,\n 'coverletter_text' => 'Cover letter text should go here. Again, hopefully we can retain some formatting. Eventually implement file support for PDFs as well.',\n 'post_age' => 6,\n 'applied_at'=> date(\"Y-m-d\", strtotime(\"-8 days\")),\n 'created_at' => date(\"Y-m-d\", strtotime(\"-8 days\")),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\n 'user_id' => $user->getKey(),\n 'workspace' => 'Hybrid',\n 'employment_classification' => 'Full-time',\n 'pay_rate_type' => 'Salary'\n ]);\n\n Application::create([\n 'position' => 'Software Engineer',\n 'company_id' => 8,\n 'location_id' => 2,\n 'status_id' => 7,\n 'posted_salary_min' => 80000,\n 'posted_salary_max' => 100000,\n 'requested_salary' => 82000,\n 'job_description' => $sampleJobDesc,\n 'resume_text' => $sampleResume,\n 'coverletter_text' => 'Cover letter text should go here. Again, hopefully we can retain some formatting. Eventually implement file support for PDFs as well.',\n 'post_age' => 9,\n 'applied_at'=> date(\"Y-m-d\", strtotime(\"-7 days\")),\n 'created_at' => date(\"Y-m-d\", strtotime(\"-7 days\")),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\n 'user_id' => $user->getKey(),\n 'workspace' => 'Hybrid',\n 'employment_classification' => 'Full-time',\n 'pay_rate_type' => 'Salary'\n ]);\n\n Application::create([\n 'position' => 'Senior Software Engineer (no requested salary)',\n 'company_id' => 9,\n 'location_id' => 2,\n 'status_id' => 8,\n 'posted_salary_min' => 100000,\n 'posted_salary_max' => 140000,\n 'job_description' => $sampleJobDesc,\n 'resume_text' => $sampleResume,\n 'coverletter_text' => 'Cover letter text should go here. Again, hopefully we can retain some formatting. Eventually implement file support for PDFs as well.',\n 'post_age' => 9,\n 'applied_at'=> date(\"Y-m-d\", strtotime(\"-6 days\")),\n 'created_at' => date(\"Y-m-d\", strtotime(\"-6 days\")),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\n 'user_id' => $user->getKey(),\n 'workspace' => 'In-office',\n 'employment_classification' => 'Full-time',\n 'pay_rate_type' => 'Salary'\n ]);\n\n Application::create([\n 'position' => 'DevOps Engineer (requested less than min)',\n 'company_id' => 10,\n 'location_id' => 2,\n 'status_id' => 3,\n 'posted_salary_min' => 100000,\n 'posted_salary_max' => 140000,\n 'requested_salary' => 85000,\n 'job_description' => $sampleJobDesc,\n 'resume_text' => $sampleResume,\n 'coverletter_text' => 'Cover letter text should go here. Again, hopefully we can retain some formatting. Eventually implement file support for PDFs as well.',\n 'post_age' => 9,\n 'applied_at'=> date(\"Y-m-d\", strtotime(\"-5 days\")),\n 'created_at' => date(\"Y-m-d\", strtotime(\"-5 days\")),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\n 'user_id' => $user->getKey(),\n 'workspace' => 'Remote',\n 'employment_classification' => 'Full-time',\n 'pay_rate_type' => 'Salary'\n ]);\n\n Application::create([\n 'position' => 'QA Engineer (requested more than max)',\n 'company_id' => 11,\n 'location_id' => 2,\n 'status_id' => 3,\n 'posted_salary_min' => 45000,\n 'posted_salary_max' => 60000,\n 'requested_salary' => 75000,\n 'job_description' => $sampleJobDesc,\n 'resume_text' => $sampleResume,\n 'coverletter_text' => 'Cover letter text should go here. Again, hopefully we can retain some formatting. Eventually implement file support for PDFs as well.',\n 'post_age' => 9,\n 'applied_at'=> date(\"Y-m-d\", strtotime(\"-4 days\")),\n 'created_at' => date(\"Y-m-d\", strtotime(\"-4 days\")),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\n 'user_id' => $user->getKey(),\n 'workspace' => 'In-office',\n 'employment_classification' => 'Full-time',\n 'pay_rate_type' => 'Salary'\n ]);\n\n Application::create([\n 'position' => 'Power Coder (only requested salary)',\n 'company_id' => 12,\n 'location_id' => 2,\n 'status_id' => 3,\n 'requested_salary' => 75000,\n 'job_description' => $sampleJobDesc,\n 'resume_text' => $sampleResume,\n 'coverletter_text' => 'Cover letter text should go here. Again, hopefully we can retain some formatting. Eventually implement file support for PDFs as well.',\n 'post_age' => 9,\n 'applied_at'=> date(\"Y-m-d\", strtotime(\"-3 days\")),\n 'created_at' => date(\"Y-m-d\", strtotime(\"-3 days\")),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\n 'user_id' => $user->getKey(),\n 'workspace' => 'Remote',\n 'employment_classification' => 'Full-time',\n 'pay_rate_type' => 'Salary'\n ]);\n\n Application::create([\n 'position' => 'ERP Dev (only maximum salary)',\n 'company_id' => 13,\n 'location_id' => 2,\n 'status_id' => 3,\n 'posted_salary_max' => 70000,\n 'job_description' => $sampleJobDesc,\n 'resume_text' => $sampleResume,\n 'coverletter_text' => 'Cover letter text should go here. Again, hopefully we can retain some formatting. Eventually implement file support for PDFs as well.',\n 'post_age' => 9,\n 'applied_at'=> date(\"Y-m-d\", strtotime(\"-2 days\")),\n 'created_at' => date(\"Y-m-d\", strtotime(\"-2 days\")),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\n 'user_id' => $user->getKey(),\n 'workspace' => 'In-office',\n 'workspace' => 'Remote',\n 'employment_classification' => 'Full-time',\n 'pay_rate_type' => 'Salary'\n ]);\n\n Application::create([\n 'position' => 'Mid Level Full Stack Developer (only minimum salary)',\n 'company_id' => 14,\n 'location_id' => 2,\n 'status_id' => 3,\n 'posted_salary_min' => 80000,\n 'job_description' => $sampleJobDesc,\n 'resume_text' => $sampleResume,\n 'coverletter_text' => 'Cover letter text should go here. Again, hopefully we can retain some formatting. Eventually implement file support for PDFs as well.',\n 'post_age' => 9,\n 'applied_at'=> date(\"Y-m-d\", strtotime(\"-1 days\")),\n 'created_at' => date(\"Y-m-d\", strtotime(\"-1 days\")),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\n 'user_id' => $user->getKey(),\n 'workspace' => 'Hybrid',\n 'employment_classification' => 'Full-time',\n 'pay_rate_type' => 'Salary'\n ]);\n }",
"abstract public function index();",
"abstract public function index();",
"abstract public function index();",
"function index() {\n \n }",
"abstract function index();",
"abstract function index();",
"abstract function index();",
"public function run()\n {\n $phase1 = new Phase();\n $phase1->name = 'Research the Problem';\n $phase1->duedate = '2 weeks';\n $phase1->description = 'Pick your problem space. Know everything about it.';\n $phase1->save();\n\n $phase2 = new Phase();\n $phase2->name = 'Establish a Vision';\n $phase2->duedate = '2 weeks';\n $phase2->description = 'What would the world look like with your problem solved?';\n $phase2->save();\n\n $phase3 = new Phase();\n $phase3->name = 'Determine a Solution';\n $phase3->duedate = '2 weeks';\n $phase3->description = 'How might you help solve this problem? ';\n $phase3->save();\n\n $phase4 = new Phase();\n $phase4->name = 'Define a Business Model';\n $phase4->duedate = '2 weeks';\n $phase4->description = 'Prove you can do it.';\n $phase4->save();\n\n $phase5 = new Phase();\n $phase5->name = 'Reflect';\n $phase5->duedate = '1 week';\n $phase5->description = 'What are you learning?';\n $phase5->save();\n\n $phase6 = new Phase();\n $phase6->name = 'Prototype';\n $phase6->duedate = '4 weeks';\n $phase6->description = 'MVPs have MVPs. ';\n $phase6->save();\n\n $phase7 = new Phase();\n $phase7->name = 'Iterate';\n $phase7->duedate = '1 week';\n $phase7->description = 'How can you improve your product/program? ';\n $phase7->save();\n\n $phase8 = new Phase();\n $phase8->name = 'Create Your Pitch Deck';\n $phase8->duedate = '4 weeks';\n $phase8->description = 'Convince us its worth our time.';\n $phase8->save();\n\n $phase9 = new Phase();\n $phase9->name = 'Looking Forward';\n $phase9->duedate = '1 week';\n $phase9->description = \"Given the investor's advice, your own reflections, and your mentor's feedback, what's your next step?\";\n $phase9->save();\n\n }",
"function makeWeb()\n {\n\n $web = \"</div>No calendar information available.</div>\";\n if (isset($this->calendar->events)) {\n $web = \"\";\n foreach ($this->calendar->events as $event) {\n $timestamp = $this->textCalendar($event, [\"timestamp\"]);\n\n $web .=\n \"<div>\" .\n \"<div>\" .\n $this->thing->time_handler->textTime($timestamp) .\n \" \" .\n $event->summary .\n \" [\" .\n $event->runtime .\n \"] \" .\n \"</div><div>\" .\n $event->description .\n \"</div><div>\" .\n $event->location .\n \"</div></div>\";\n }\n }\n\n $this->thing_report[\"info\"] =\n \"Times are \" . $this->time_zone . \". Click refresh to update.\";\n\n $this->web = $web;\n $this->thing_report[\"web\"] = $this->web;\n }",
"public function run()\n {\n /** 2018 Curriculum **/\n\n $course = new Course;\n $course->course_code = 'IntroComp';\n $course->description = 'Introduction to Computing';\n $course->units = 3;\n $course->lab_units = 1;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'ComPro1';\n $course->description = 'Computer Programming 1';\n $course->units = 3;\n $course->lab_units = 1;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'Fil1';\n $course->description = 'Sining ng Komunikasyon';\n $course->units = 3;\n $course->lab_units = null;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'Math1';\n $course->description = 'Mathematics in the Modern World';\n $course->units = 3;\n $course->lab_units = null;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'Art1';\n $course->description = 'Art Appreciation';\n $course->units = 3;\n $course->lab_units = null;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'Philit';\n $course->description = 'Literatures of the Philippines';\n $course->units = 3;\n $course->lab_units = null;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'Eng1';\n $course->description = 'Purposive Communication';\n $course->units = 3;\n $course->lab_units = null;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'HumCom';\n $course->description = 'Introduction to Human Computer Interaction';\n $course->units = 3;\n $course->lab_units = 1;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'Fil2';\n $course->description = 'Filipino Panitikan';\n $course->units = 3;\n $course->lab_units = null;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'ComPro2';\n $course->description = 'Computer Programming 2';\n $course->units = 3;\n $course->lab_units = null;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'SciTech';\n $course->description = 'Science Technology and Society';\n $course->units = 3;\n $course->lab_units = null;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'USelf';\n $course->description = 'Understanding the Self';\n $course->units = 3;\n $course->lab_units = null;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'OS';\n $course->description = 'Operating Systems';\n $course->units = 3;\n $course->lab_units = 1;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'Datstruc';\n $course->description = 'Data Structures and Algorithms';\n $course->units = 3;\n $course->lab_units = 1;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'OOP';\n $course->description = 'Object Oriented Programming';\n $course->units = 3;\n $course->lab_units = 1;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'PlatTech';\n $course->description = 'Platform Technologies';\n $course->units = 3;\n $course->lab_units = 1;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'DiscMath';\n $course->description = 'Discrete Mathematics';\n $course->units = 3;\n $course->lab_units = null;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'Anmod';\n $course->description = 'Analytics Modeling';\n $course->units = 3;\n $course->lab_units = null;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'QuanMet';\n $course->description = 'Quantitative Methods';\n $course->units = 3;\n $course->lab_units = null;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'Rizal';\n $course->description = 'Rizal\\'s Life and Works';\n $course->units = 3;\n $course->lab_units = null;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'InfoMan';\n $course->description = 'Information Management';\n $course->units = 3;\n $course->lab_units = null;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'Net1';\n $course->description = 'Networking 1 (Fundamentals)';\n $course->units = 3;\n $course->lab_units = 1;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'InTech1';\n $course->description = 'Integrative Programming and Technologies 1';\n $course->units = 3;\n $course->lab_units = 1;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'WebApps';\n $course->description = 'Web Applications Development';\n $course->units = 3;\n $course->lab_units = 1;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'Technop';\n $course->description = 'Technopreneur';\n $course->units = 3;\n $course->lab_units = null;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'FunDBS';\n $course->description = 'Fundamentals of Database Systems';\n $course->units = 3;\n $course->lab_units = 1;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'AnTech';\n $course->description = 'Analytics Techniques and Tools';\n $course->units = 3;\n $course->lab_units = null;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'Net2';\n $course->description = 'Networking 2 (Routing Protocols)';\n $course->units = 3;\n $course->lab_units = 1;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'SIA1';\n $course->description = 'Systems Integration and Architecture 1';\n $course->units = 3;\n $course->lab_units = 1;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'Intech2';\n $course->description = 'Integrative Programming and Technologies 2';\n $course->units = 3;\n $course->lab_units = 1;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'FDWDM';\n $course->description = 'Fundamentals of Data Warehousing and Data Mining';\n $course->units = 3;\n $course->lab_units = 1;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'SAD';\n $course->description = 'Systems Analysis and Design';\n $course->units = 3;\n $course->lab_units = null;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'FunBus';\n $course->description = 'Fundamentals of Business Analytics';\n $course->units = 3;\n $course->lab_units = null;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'IAS1';\n $course->description = 'Information Assurance and Security';\n $course->units = 3;\n $course->lab_units = null;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'Ethics';\n $course->description = 'Ethics';\n $course->units = 3;\n $course->lab_units = null;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'ADET';\n $course->description = 'Application Development and Emerging Technologies';\n $course->units = 3;\n $course->lab_units = 1;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'EnDaMa';\n $course->description = 'Enterprise Data Management';\n $course->units = 3;\n $course->lab_units = null;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'PhilHis';\n $course->description = 'Readings in Philippine History';\n $course->units = 3;\n $course->lab_units = null;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'ConWorld';\n $course->description = 'The Contemporary World';\n $course->units = 3;\n $course->lab_units = null;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'IAS2';\n $course->description = 'Information Assurance and Security 2';\n $course->units = 3;\n $course->lab_units = null;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'ITProj1';\n $course->description = 'Capstone Project and Research 1';\n $course->units = 3;\n $course->lab_units = null;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'SAM';\n $course->description = 'System Administration and Maintenace 1';\n $course->units = 3;\n $course->lab_units = 1;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'SocPro';\n $course->description = 'Social and Professional Issues';\n $course->units = 3;\n $course->lab_units = null;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'ITProj2';\n $course->description = 'Capstone Project and Research 2';\n $course->units = 3;\n $course->lab_units = 1;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'Prac1';\n $course->description = 'Practicum';\n $course->units = 3;\n $course->lab_units = null;\n $course->save();\n\n $course = new Course;\n $course->course_code = 'SIA2';\n $course->description = 'Systems Integration and Architecture 2';\n $course->units = 3;\n $course->lab_units = 1;\n $course->save();\n }",
"public function run()\n {\n $setting = new \\App\\Setting();\n $setting->how_it_works =\"<p class=\\\"column one column\\\">\n\t\t\t\t\t</p><p style=\\\"text-align: left;\\\">\n\t\t\t\t\t</p><h3>YESKEINTERCONNECT\n\t\t\t\t\t\t<small>Linking People Together</small>\n\t\t\t\t\t</h3>\n\t\t\t\t\t<p>Imagine investing your money into a risk free business with no regrets or being paranoid of\n\t\t\t\t\t\tlosing your money. Now, Yeske interconnect operates a very simple platform. It is important to\n\t\t\t\t\t\tnote that our commitment to be leaders in business stems from our purpose in society, which is\n\t\t\t\t\t\tto help our customers thrive by enabling them to achieve their lifetime financial goals, while\n\t\t\t\t\t\tinvesting their funds in ways that will create a positive future for them, their families,\n\t\t\t\t\t\tcommunities and the world at large.</p>\n\t\t\t\t\t\n\t\t\t\t\t<p>There are benefits attached to being a member. You stand a chance of getting a minimum of six\n\t\t\t\t\t\tthousand and a maximum of 100 hundred thousand. There are laid down rules that are expected of\n\t\t\t\t\t\tthe clients in becoming a partaker of this offer.</p>\n\t\t\t\t\t\n\t\t\t\t\t<p>There are seven phases or stages altogether. Imagine getting a whopping 33.4% on every member\n\t\t\t\t\t\tthat registers under you or you introduce. It’s mandatory to note that each level you decide to\n\t\t\t\t\t\tenter, you are expected to bring two persons which will serve as your downline. Now, each of\n\t\t\t\t\t\tthese stages requires a two by two matrix. That is, you are required to bring two persons which\n\t\t\t\t\t\twill serve as your downline and the two persons are to bring another two persons also and\n\t\t\t\t\t\tcontinuously. But note this; each person you bring puts money into your account. Once your\n\t\t\t\t\t\tdownline is completed by six persons, you automatically complete that stage and either continue\n\t\t\t\t\t\tto unlock more stages or withdraw your money.</p>\n\t\t\t\t\t\n\t\t\t\t\t<p>Having explained all that, the amount for each stage or level is 3000, 6000, 8000, 10,000,\n\t\t\t\t\t\t20,000, 30,000, 50,000. The most interesting part is, for each phase chosen, you get double of\n\t\t\t\t\t\tthat plan, i.e. </p>\n\t\t\t\t\t\n\t\t\t\t\t3000 = 6000<br>\n\t\t\t\t\t6000 = 12,000<br>\n\t\t\t\t\t8000 = 16,000<br>\n\t\t\t\t\t10,000 = 20,000<br>\n\t\t\t\t\t20,000 = 40,000<br>\n\t\t\t\t\t30,000 = 60,000<br>\n\t\t\t\t\t50,000 = 100,000<br>\n\t\t\t\t\t\n\t\t\t\t\t<p>\n\t\t\t\t\t\tThese can happen with the power of six. In other words, you need to introduce two people and\n\t\t\t\t\t\tthey\n\t\t\t\t\t\talso bring two and your stage is completed. It is expected that the two active stages have\n\t\t\t\t\t\tbeen\n\t\t\t\t\t\tunlocked are 3000 and 6000 therefore, its either you start with 3000 or 6000 and grow until\n\t\t\t\t\t\tit gets\n\t\t\t\t\t\tto 100,000.</p>\n\t\t\t\t\t<h3>Bonus per entry</h3>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t3000 = 200<br>\n\t\t\t\t\t\t6000 = 400<br>\n\t\t\t\t\t\t8000 = 700<br>\n\t\t\t\t\t\t10,000 = 1,000<br>\n\t\t\t\t\t\t20,000 = 3,000<br>\n\t\t\t\t\t\t30,000 = 5,000<br>\n\t\t\t\t\t\t50,000 = 8,000.<br>\n\t\t\t\t\t</p>\n\t\t\t\t\t\n\t\t\t\t\t<p>Referral bonus goes to agents only. (Send us an email if interested- [email protected])\n\t\t\t\t\t\tfor only registered members. </p>\n\t\t\t\t\t\n\t\t\t\t\t<p>\n\t\t\t\t\t\t<strong style=\\\"color: #942a25\\\">N.B – YOUR ACCOUNT WILL BE BLOCKED AFTER 48HRS OF REGISTRATION IF\n\t\t\t\t\t\t\tNO PAYMENT HAS BEEN MADE – This is to ensure the smooth running of the system.</strong>\n\t\t\t\t\t</p>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t<strong>NB – You have 2weeks to undergo your first stage and also for the system to queue you up\n\t\t\t\t\t\t\twith an upliner else you will be deleted and your money returned back to you. </strong>\n\t\t\t\t\t</p>\n\t\t\t\t\t\n\t\t\t\t\t<h4 style=\\\"padding-top: 35px;\\\">WHY YESKE is 100% safe - No loss of money</h4>\n\t\t\t\t\t<ol>\n\t\t\t\t\t\t<li>Upload of fake POP/Teller, Receipts are at the clients risk which results to immediate\n\t\t\t\t\t\t\tremoval\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>Get approved immediately your payment is received</li>\n\t\t\t\t\t\t<li>Banks with Diamond Bank Plc – operates a central account.</li>\n\t\t\t\t\t\t<li>Mobile transfer available/ bank teller</li>\n\t\t\t\t\t\t<li>Swift service delivery</li>\n\t\t\t\t\t\t<li>Customers issues are resolved immediately upon received</li>\n\t\t\t\t\t\t<li>No GH or PH – uses a flexible matrix for quick payment</li>\n\t\t\t\t\t\t<li>Your account will be blocked after 48hrs of registration if no payment has been made. So\n\t\t\t\t\t\t\tdon’t register if you are not ready to make payment.\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\n\t\t\t\t\t</ol>\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t<h4 style=\\\"padding-top: 35px;\\\">REQUIREMENTS</h4>\n\t\t\t\t\t<p>To be a beneficiary or partaker, one must be ready with the following;</p>\n\t\t\t\t\t<ol>\n\t\t\t\t\t\t<li>An active bank account</li>\n\t\t\t\t\t\t<li>A minimum start-up capital of Three Thousand Naira (3000) only.</li>\n\t\t\t\t\t</ol>\n\t\t\t\t\t<p>\n\t\t\t\t\t\tAfter registration and payment, you automatically get queued up and paid on or before 2 weeks.\n\t\t\t\t\t\tYour startup capital is 3000 naira which is refundable automatically after 2 weeks days of\n\t\t\t\t\t\tregistration if not paid.\n\t\t\t\t\t</p>\n\t\t\t\t\t\n\t\t\t\t\t<h4 style=\\\"padding-top: 35px;\\\">The second phase/stage</h4>\n\t\t\t\t\t<p>\n\t\t\t\t\t\tYou pay a step out fee of 6000 to get 12,000 after which you automatically get queued up and\n\t\t\t\t\t\tpaid on or before 20 days. Your step out capital is 6000 naira which is refundable automatically\n\t\t\t\t\t\tafter twenty days of registration if not paid.\n\t\t\t\t\t</p>\n\t\t\t\t\t<h4 style=\\\"padding-top: 35px;\\\">The third phase/stage</h4>\n\t\t\t\t\t<p>\n\t\t\t\t\t\tYou pay a step out fee of 8000 to get 16,000 after which you automatically get queued up and\n\t\t\t\t\t\tpaid on or before 20 days. Your step out capital is 8000 naira which is refundable automatically\n\t\t\t\t\t\tafter twenty days of registration if not paid.\n\t\t\t\t\t</p>\n\t\t\t\t\t\n\t\t\t\t\t<h4 style=\\\"padding-top: 35px;\\\">The fourth phase/stage</h4>\n\t\t\t\t\t<p>\n\t\t\t\t\t\tYou pay a step out fee of 10,000 to get 20,000 after which you automatically get queued up and\n\t\t\t\t\t\tpaid on or before 20 days. Your step out capital is10,000 naira which is refundable\n\t\t\t\t\t\tautomatically after twenty days of registration if not paid.\n\t\t\t\t\t</p>\n\t\t\t\t\t<h4 style=\\\"padding-top: 35px;\\\">The fifth phase/stage</h4>\n\t\t\t\t\t<p>\n\t\t\t\t\t\tYou pay a step out fee of 20,000 to get 40,000 after which you automatically get queued up and\n\t\t\t\t\t\tpaid on or before 20 days. Your step out capital is 20,000 naira which is refundable\n\t\t\t\t\t\tautomatically after twenty days of registration if not paid.\n\t\t\t\t\t</p>\n\t\t\t\t\t<h4 style=\\\"padding-top: 35px;\\\">The sixth phase/stage</h4>\n\t\t\t\t\t<p>\n\t\t\t\t\t\tYou pay a step out fee of 30,000 to get 60,000 after which you automatically get queued up and\n\t\t\t\t\t\tpaid on or before 20 days. Your step out capital is 30,000 naira which is refundable\n\t\t\t\t\t\tautomatically after twenty days of registration if not paid.\n\t\t\t\t\t</p>\n\t\t\t\t\t\n\t\t\t\t\t<h4 style=\\\"padding-top: 35px;\\\">The seventh phase/stage</h4>\n\t\t\t\t\t<p>\n\t\t\t\t\t\tYou pay a step out fee of 50,000 to get 100,000 after which you automatically get queued up and\n\t\t\t\t\t\tpaid on or before 20 days. Your step out capital is 50,000 naira which is refundable\n\t\t\t\t\t\tautomatically after twenty days of registration if not paid.\n\t\t\t\t\t</p>\n\t\t\t\t\t\n\t\t\t\t\t<h4 style=\\\"padding-top: 35px;\\\">Summary of the registration process</h4>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t1. Chose the level or stage you want to apply for<br>\n\t\t\t\t\t\t2. Pay for the level or stage<br>\n\t\t\t\t\t\t3. Either bank transfer or teller uploads are accepted<br>\n\t\t\t\t\t\t4. You get approved once payment is received<br>\n\t\t\t\t\t\t5. You automatically get your money back after 20 days of registration if not paid.<br>\n\t\t\t\t\t\t6. After your first payout, you upgrade to the second stage which same principle applies till\n\t\t\t\t\t\tyou get to the last stage which is 100,000 thousand naira.<br>\n\t\t\t\t\t</p>\n\t\t\t\t\t\n\t\t\t\t\t<h4>Benefits of registering with us</h4>\n\t\t\t\t\t<p>\n\t\t\t\t\t\tQualify for a yearly draw of 100,000 naira cash price<br>\n\t\t\t\t\t\tApply for the next face of Yeske<br>\n\t\t\t\t\t\tBecome an agent<br>\n\t\t\t\t\t\tWin lots of recharge cards monthly<br>\n\t\t\t\t\t</p>\n\t\t\t\t\t<h4 class=\\\"text-center\\\"><strong>Think Yeske, live Yeske, love Yeske</strong></h4>\";\n\t $setting->about_us =\"<div style=\\\"text-align: center;\\\">\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<p style=\\\"font-size: 15px; line-height: 24px; text-align: left; line-height: 35px;\\\">\n\t\t\t\t\t\t\t\tYeske Interconnect Enterprise was established in the year 2013 and gained online\n\t\t\t\t\t\t\t\tpresence in\n\t\t\t\t\t\t\t\t2015. A networking firm that seeks to eradicate poverty at all level. We operate an\n\t\t\t\t\t\t\t\tonline\n\t\t\t\t\t\t\t\toffice with a good and well functional systems, staffs and management team.<br>\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t<p style=\\\"font-size: 15px; line-height: 24px; text-align: left; line-height: 35px;\\\">\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tThis is a platform where youths, students can venture into in order to achieve the basic\n\t\t\t\t\t\t\t\tthings needed for their\n\t\t\t\t\t\t\t\tdevelopment. Empowering students financially in higher institutions by engaging them\n\t\t\t\t\t\t\t\tacademically, to sharpen their quest for education and development. We look forward to\n\t\t\t\t\t\t\t\tbuilding\n\t\t\t\t\t\t\t\ta heritage of trust and accountability by meeting a broad range of our retail and\n\t\t\t\t\t\t\t\tcommercial\n\t\t\t\t\t\t\t\tcustomer financial services needs at each stage of their lives.\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t<p style=\\\"font-size: 15px; line-height: 24px; text-align: left; line-height: 35px;\\\">\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tWe take a long view, aiming ultimately to enable a positive future for all our clients.\n\t\t\t\t\t\t\t\tWe pursue value by balancing the risk assumed with the capital required and view good governance as a vital ingredient of\n\t\t\t\t\t\t\t\toperating a successful business.<br>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tLet your mind be faster than your eyes so aim high and take\tyour team with you.\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</div>\";\n $setting->save();\n }",
"public function run()\n {\n $data = [\n [\n 'subject'=>'eco',\n 'topic'=>'Concepts of Economics & Demand Supply Analysis',\n 'module'=>'A'],\n\n ['subject'=>'eco',\n 'topic'=>'Production, Cost & Market Structure',\n 'module'=>'B'],\n\n ['subject'=>'eco',\n 'topic'=>'Macroeconomics',\n 'module'=>'C'],\n\n ['subject'=>'eco',\n 'topic'=>'Bangladesh Economy',\n 'module'=>'D'],\n//Business Communication\n\n//Accounting\n ['subject'=>'acct',\n 'topic'=>'Introduction & Environment',\n 'module'=>'A'],\n\n ['subject'=>'acct',\n 'topic'=>'Analysis of Financial Statement',\n 'module'=>'B'],\n\n ['subject'=>'acct',\n 'topic'=>'Processing & Recording of Accounting Information',\n 'module'=>'C'],\n\n ['subject'=>'acct',\n 'topic'=>'Financial Statements for Different Entities',\n 'module'=>'D'],\n\n ['subject'=>'acct',\n 'topic'=>'Accounting for Asset',\n 'module'=>'E'],\n\n ['subject'=>'acct',\n 'topic'=>'Journal Rules for Journalizing',\n 'module'=>'E'],\n ];\n\n foreach ($data as $item) {\n Syllabus::create($item);\n }\n //App\\Models\\Syllabus::factory(App\\User::class)->make()->create();\n }",
"function buildOSCollection(& $collection){\r\n\r\n //Urls to the outdoor school resources for 4 different catagories: animals, plants, soil and water.\r\n $url1 = \"https://www.mesdoutdoorschool.org/animals-curriculum-outline.html\"; //animals\r\n $url2 = \"https://www.mesdoutdoorschool.org/plants-curriculum-outline.html\"; // plants\r\n $url3 = \"https://www.mesdoutdoorschool.org/soil-curriculum-outline.html\"; // soil\r\n $url4 = \"https://www.mesdoutdoorschool.org/water-curriculum-outline.html\"; //water\r\n\r\n _getSummary($url1, $collection, \"animals\");\r\n _getSummary($url2, $collection, \"plants\");\r\n _getSummary($url3, $collection, \"soil\");\r\n _getSummary($url4, $collection, \"water\");\r\n\r\n //hardcode the summaries for the ones that didn't work.\r\n\r\n for($i = 0; $i < count($collection); $i++){\r\n if($collection[$i]->summary ==null){\r\n/* print(($i + 1) . \": \". $collection[$i]->title . \"\\n\");*/\r\n $title = $collection[$i]->title;\r\n\r\n if($collection[$i]->title == \"Aquatic Life (Critter Catch)\"){\r\n $collection[$i]->summary = \" Students collect, count and identify aquatic life specimens and discuss adaptations and niche of the animals.\";\r\n $collection[$i]->docType = \"animals\";\r\n $collection[$i]->url = $url1;\r\n // echo \" Updated \" . $collection[$i]->title . \"\\n\\n\";\r\n }\r\n else if($collection[$i]->title == \"Water Cycle\"){\r\n $collection[$i]->summary = \"Students define and/or act out the water cycle and point out observable stages in the water cycle. Then students characterize water as either a renewable or non-renewable resource.\";\r\n $collection[$i]->docType = \"water\";\r\n $collection[$i]->url = $url4;\r\n // echo \" Updated \" . $collection[$i]->title . \"\\n\\n\";\r\n }\r\n else if($collection[$i]->title == \"Compost (Worm Bin)\"){\r\n $collection[$i]->summary = \"Students observe a worm bin and explore the role organic decomposition plays in soil formation as well as the role composting plays in waste reduction.\";\r\n $collection[$i]->docType = \"soil\";\r\n $collection[$i]->url = $url3;\r\n // echo \" Updated \" . $collection[$i]->title . \"\\n\\n\";\r\n }\r\n else if($collection[$i]->title == \"Soil Life Survey (Critter Catch)\"){\r\n $collection[$i]->summary = \"Students collect and examine soil organisms and discuss the role of organisms in soil health.\";\r\n $collection[$i]->docType = \"soil\";\r\n $collection[$i]->url = $url3;\r\n // echo \" Updated \" . $collection[$i]->title . \"\\n\\n\";\r\n }\r\n else if($collection[$i]->title == \"Apple Earth Intro\"){\r\n $collection[$i]->summary = \"Students examine and discuss the concept of soil as a limited resource.\";\r\n $collection[$i]->docType = \"soil\";\r\n $collection[$i]->url = $url3;\r\n // echo \" Updated \" . $collection[$i]->title . \"\\n\\n\";\r\n }\r\n else if($collection[$i]->title == \"Primitive Plants (Moss and Lichen)\"){\r\n $collection[$i]->summary = \"Students identify fungi, lichens, ferns and moss and examine their adaptations and role in the forest ecosystem.\";\r\n $collection[$i]->docType = \"plants\";\r\n $collection[$i]->url = $url2;\r\n // echo \" Updated \" . $collection[$i]->title . \"\\n\\n\";\r\n }\r\n\r\n else if($collection[$i]->title == \"Phototropism\"){\r\n $collection[$i]->summary = \"Students identify causes and mechanisms of phototropism and observe and analyze its effects in a forest ecosystem.\";\r\n $collection[$i]->docType = \"plants\";\r\n $collection[$i]->url = $url2;\r\n // echo \" Updated \" . $collection[$i]->title . \"\\n\\n\";\r\n }\r\n else if($collection[$i]->title == \"Cop\"){\r\n $collection[$i]->title = \"Microscope Study / Aquatic Food Pyramid\";\r\n $collection[$i]->summary = \"Students collect and examine microscopic aquatic life and discuss the model of an aquatic food pyramid.\";\r\n $collection[$i]->docType = \"water\";\r\n $collection[$i]->url = $url4;\r\n // echo \" Updated \" . $collection[$i]->title . \"\\n\\n\";\r\n }\r\n else if($collection[$i]->title == \"Flower Parts (Spring)\"){\r\n $collection[$i]->summary = \"Students examine and dissect flowers and discuss the structure and function of flower parts.\";\r\n $collection[$i]->docType = \"plants\";\r\n $collection[$i]->url = $url2;\r\n // echo \" Updated \" . $collection[$i]->title . \"\\n\\n\";\r\n }\r\n else if($collection[$i]->title == \"Photosynthesis (Energy & Renewable Natural Resources)\"){\r\n $collection[$i]->summary = \"Students explore the process of photosynthesis and relate the process to activities they do on field study.\";\r\n $collection[$i]->docType = \"plants\";\r\n $collection[$i]->url = $url2;\r\n // echo \" Updated \" . $collection[$i]->title . \"\\n\\n\";\r\n }\r\n else if($collection[$i]->title == \"Forestry Practices\"){\r\n $collection[$i]->summary = \"Students engage in a discussion about various methods for managing forest lands and how individuals in the past and present have managed land for fuel reduction, revenue, public use, and habitat conservation.\";\r\n $collection[$i]->docType = \"plants\";\r\n $collection[$i]->url = $url2;\r\n // echo \" Updated \" . $collection[$i]->title . \"\\n\\n\";\r\n }\r\n else if($collection[$i]->title == \"Pelts\"){\r\n $collection[$i]->summary = \"Students identify adaptations of animals and describe how those adaptations help animals survive in their habitats. They use measurement and observations to identify animals using reference materials such as field guides.\";\r\n $collection[$i]->docType = \"animals\";\r\n $collection[$i]->url = $url1;\r\n // echo \" Updated \" . $collection[$i]->title . \"\\n\\n\";\r\n }\r\n else if($collection[$i]->title == \"Skulls\"){\r\n $collection[$i]->summary = \"Students identify adaptations of animals and describe how those adaptations help animals survive in their habitats. They use measurement and observations to identify animals using reference materials such as field guides.\";\r\n $collection[$i]->docType = \"animals\";\r\n $collection[$i]->url = $url1;\r\n // echo \" Updated \" . $collection[$i]->title . \"\\n\\n\";\r\n }\r\n else if($collection[$i]->title == \"Horns, Antlers, & Hooves\"){\r\n $collection[$i]->summary = \"Students identify adaptations of animals and describe how those adaptations help animals survive in their habitats. They use measurement and observations to identify animals using reference materials such as field guides.\";\r\n $collection[$i]->docType = \"animals\";\r\n $collection[$i]->url = $url1;\r\n // echo \" Updated \" . $collection[$i]->title . \"\\n\\n\";\r\n }\r\n else if($collection[$i]->title == \"Niche\"){\r\n $collection[$i]->summary = \"The student will describe an animal's niche and compare niches of different species.\";\r\n $collection[$i]->docType = \"animals\";\r\n $collection[$i]->url = $url1;\r\n // echo \" Updated \" . $collection[$i]->title . \"\\n\\n\";\r\n }\r\n else if($collection[$i]->title == \"Predator / Prey Game\"){\r\n $collection[$i]->summary = \"Students use role-playing and simulation to explore concepts of camouflage, environmental factors, and the predator / prey relationship.\";\r\n $collection[$i]->docType = \"animals\";\r\n $collection[$i]->url = $url1;\r\n // echo \" Updated \" . $collection[$i]->title . \"\\n\\n\";\r\n }\r\n else if($collection[$i]->title == \"Animal Signs & Survey\"){\r\n $collection[$i]->summary = \"Students identify a wildlife-related question for inquiry and then survey the site for signs of wildlife and draw conclusions about presence and populations of animals.\";\r\n $collection[$i]->docType = \"animals\";\r\n $collection[$i]->url = $url1;\r\n // echo \" Updated \" . $collection[$i]->title . \"\\n\\n\";\r\n }\r\n else if($collection[$i]->title == \"Live Animal Station\"){\r\n $collection[$i]->summary = \"Students identify adaptations of animals and describe how those adaptations help animals survive in their habitats. They use measurement and observations to identify animals using reference materials such as field guides.\";\r\n $collection[$i]->docType = \"animals\";\r\n $collection[$i]->url = $url1;\r\n // echo \" Updated \" . $collection[$i]->title . \"\\n\\n\";\r\n }\r\n else if($collection[$i]->title == \"Supermarket Niche\"){\r\n $collection[$i]->summary = \"The student will explore the concept of niche as it relates to competition using a model.\";\r\n $collection[$i]->docType = \"animals\";\r\n $collection[$i]->url = $url1;\r\n // echo \" Updated \" . $collection[$i]->title . \"\\n\\n\";\r\n }\r\n else if($collection[$i]->title == \"Native Birds (Toxics)\"){\r\n $collection[$i]->summary = \"Students discuss the process of bioaccumulation of toxins in a wildlife population, and explore how human choices affect animal populations.\";\r\n $collection[$i]->docType = \"animals\";\r\n $collection[$i]->url = $url1;\r\n /* echo \" Updated \" . $collection[$i]->title . \"\\n\\n\";*/\r\n }\r\n }\r\n }\r\n}",
"public function main() {\n\t\t// Access check!\n\t\t// The page will show only if there is a valid page and if this page may be viewed by the user\n\t\t$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id, $this->perms_clause);\n\t\t$access = is_array($this->pageinfo) ? 1 : 0;\n\t\tif (($this->id && $access) || (tx_laterpay_helper_user::isAdmin() && !$this->id)) {\n\t\t\t$this->doc->backPath = $GLOBALS['BACK_PATH'];\n\n\t\t\t// load LaterPay-specific CSS\n\t\t\t$this->doc->addStyleSheet('laterpay-backend', t3lib_extMgm::extRelPath('laterpay') . 'res/css/laterpay-backend.css');\n\t\t\t$this->doc->addStyleSheet('fonts.googleapis.com', 'http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,300,400,600&subset=latin,latin-ext');\n\t\t\t// load LaterPay-specific JS\n\t\t\t$this->doc->loadJavascriptLib(t3lib_extMgm::extRelPath('laterpay') . 'res/js/vendor/jquery-1.11.2.min.js');\n\t\t\t$this->doc->loadJavascriptLib(t3lib_extMgm::extRelPath('laterpay') . 'res/js/laterpay-backend.js');\n\n\t\t\t$pageContent = $this->getModuleContent();\n\n\t\t\t// Draw the header.\n\t\t\t// JavaScript\n\t\t\t$this->doc->JScode = '\n\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\tscript_ended = 0;\n\t\t\t\t\tfunction jumpToUrl(URL)\t{\n\t\t\t\t\t\tdocument.location = URL;\n\t\t\t\t\t}\n\t\t\t\t</script>\n\t\t\t';\n\t\t\t$this->doc->postCode = '\n\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\tscript_ended = 1;\n\t\t\t\t\tif (top.fsMod) top.fsMod.recentIds[\"web\"] = 0;\n\t\t\t\t</script>\n\t\t\t';\n\n\t\t\t$headerSection = $this->doc->getHeader('pages', $this->pageinfo, $this->pageinfo['_thePath']) . '<br />' .\n\t\t\t\t$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.path') .\n\t\t\t\t': ' . t3lib_div::fixed_lgd_cs($this->pageinfo['_thePath'], -50);\n\n\t\t\t$this->content .= $this->doc->startPage(tx_laterpay_helper_string::tr('title'));\n\t\t\t$this->content .= $this->doc->header(tx_laterpay_helper_string::tr('title'));\n\t\t\t$this->content .= $this->doc->spacer(5);\n\t\t\t$this->content .= $this->doc->section(\n\t\t\t\t\t'', $this->doc->funcMenu($headerSection, t3lib_BEfunc::getFuncMenu($this->id, 'SET[function]',\n\t\t\t\t\t$this->MOD_SETTINGS['function'], $this->MOD_MENU['function']))\n\t\t\t);\n\t\t\t$this->content .= $this->doc->divider(5);\n\t\t\t\t// Render content:\n\t\t\t$this->content .= $pageContent;\n\t\t\t\t// Shortcut\n\t\t\tif ($GLOBALS['BE_USER']->mayMakeShortcut()) {\n\t\t\t\t$this->content .= $this->doc->spacer(20) . $this->doc->section('', $this->doc->makeShortcutIcon('id', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']));\n\t\t\t}\n\n\t\t\t$this->content .= $this->doc->spacer(10);\n\t\t} else {\n\t\t\t\t// If no access or if ID == zero\n\n\t\t\t$this->doc->backPath = $GLOBALS['BACK_PATH'];\n\n\t\t\t$this->content .= $this->doc->startPage(tx_laterpay_helper_string::tr('title'));\n\t\t\t$this->content .= $this->doc->header(tx_laterpay_helper_string::tr('title'));\n\t\t\t$this->content .= $this->doc->spacer(5);\n\t\t\t$this->content .= $this->doc->spacer(10);\n\t\t}\n\t}",
"public function execute() {\n\t\twfSuppressWarnings();\n\t\t\n\t\t$this->html('headelement'); ?>\n\t\t\n\t\t<header class=\"header\">\n\t\t\t<div class=\"container\">\n\t\t\t\t<nav class=\"navbar navbar-default hidden-print\" role=\"navigation\">\n\t\t\t\t\t<div class=\"navbar-header\"><?php\n\t\t\t\t\t\t// Create index link for wiki header\n\t\t\t\t\t\techo '\n\t\t\t\t\t\t<a href=\"'. $this->data['nav_urls']['mainpage']['href'] .'\" class=\"navbar-brand\">\n\t\t\t\t\t\t\t'. $this->data['sitename'] .'\n\t\t\t\t\t\t</a>'; ?>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"navbar-form navbar-right form-inline\"><?php\n\t\t\t\t\t\t// Create a search form for wiki header\n\t\t\t\t\t\t$this->searchBox(); ?>\n\t\t\t\t\t</div>\n\t\t\t\t</nav>\n\t\t\t</div>\n\t\t</header>\n\t\t<main class=\"wiki\">\n\t\t\t<nav class=\"navbar-wiki\">\n\t\t\t\t<div class=\"container\"><?php\n\t\t\t\t\t// Print content actions nav items\n\t\t\t\t\t$this->contentActions(); ?>\n\t\t\t\t</div>\n\t\t\t</nav>\n\t\t\t<div class=\"container\">\n\t\t\t\t<div class=\"row\">\n\t\t\t\t\t<section class=\"col-md-10 col-sm-12 page\">\n\t\t\t\t\t\t<?php if($this->data['sitenotice']) { ?><div id=\"alert alert-info\"><?php $this->html('sitenotice'); ?></div><?php }; ?>\n\t\t\t\t\t\t<div class=\"page-header\">\n\t\t\t\t\t\t\t<h1><?php $this->html('title'); ?> <small class=\"visible-print\"><?php $this->msg('tagline'); ?></small></h1>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"page\">\n\t\t\t\t\t\t\t<div class=\"subtitle\"><?php $this->html('subtitle'); ?></div>\n\t\t\t\t\t\t\t<?php if($this->data['undelete']) { ?><div class=\"undelete\"><?php $this->html('undelete'); ?></div><?php } ?>\n\t\t\t\t\t\t\t<?php if($this->data['newtalk'] ) { ?><div class=\"newtalk\"><?php $this->html('newtalk'); ?></div><?php } ?>\n\t\t\t\t\t\t\t<?php if($this->data['showjumplinks']) {\n\t\t\t\t\t\t\t\t// Todo: showing these for mobiles to easily navigate ?>\n\t\t\t\t\t\t\t\t<div class=\"jumplinks\">\n\t\t\t\t\t\t\t\t\t<?php $this->msg('jumpto'); ?><a href=\"#column-one\"><?php $this->msg('jumptonavigation'); ?></a>\n\t\t\t\t\t\t\t\t\t<?php $this->msg('comma-separator'); ?><a href=\"#searchInput\"><?php $this->msg('jumptosearch'); ?></a>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<?php };\n\t\t\t\t\t\t\t// Now print the acutal page content\n\t\t\t\t\t\t\t$this->html('bodytext');\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Print the catagory links for this content\n\t\t\t\t\t\t\tif($this->data['catlinks']) { $this->html('catlinks'); }\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Print any remaining data after the content\n\t\t\t\t\t\t\tif($this->data['dataAfterContent']) { $this->html ('dataAfterContent'); }?>\n\t\t\t\t\t\t\t<div class=\"clearfix\"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</section>\n\t\t\t\t\t<aside class=\"col-md-2 hidden-sm hidden-xs sidebar hidden-print\"><?php\n\t\t\t\t\t\t// Print the personal tools\n\t\t\t\t\t\t$this->personalTools();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Print all the other navigation blocks\n\t\t\t\t\t\t$this->renderPortals($this->data['sidebar']); ?>\n\t\t\t\t\t</aside>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<footer class=\"footer\">\n\t\t\t\t<div class=\"container\"><?php\n\t\t\t\t\t$validFooterIcons = $this->getFooterIcons('icononly');\n\t\t\t\t\t$validFooterLinks = $this->getFooterLinks('flat'); // Additional footer links\n\t\t\t\t\n\t\t\t\t\tif ( count( $validFooterLinks ) > 0 ) { ?>\n\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t<div class=\"col-md-12\">\n\t\t\t\t\t\t\t\t<ul class=\"list\"><?php\n\t\t\t\t\t\t\t\t\tforeach( $validFooterLinks as $aLink ) { ?>\n\t\t\t\t\t\t\t\t\t\t<li class=\"footer-<?php echo $aLink ?>\"><?php $this->html($aLink) ?></li>\n\t\t\t\t\t\t\t\t\t<?php } ?>\n\t\t\t\t\t\t\t\t\t<li><a href=\"https://github.com/South-Paw/Bootstrap-MW\">Bootstrap MW Skin</a> v1.0</li>\n\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t<?php }; ?>\n\t\t\t\t\t<div class=\"row\"><?php\n\t\t\t\t\t\tforeach ( $validFooterIcons as $blockName => $footerIcons ) { ?>\n\t\t\t\t\t\t\t\t<div class=\"col-md-6 icons footer-<?php echo htmlspecialchars($blockName); ?>\"><?php\n\t\t\t\t\t\t\t\t\tforeach ( $footerIcons as $icon ) {\n\t\t\t\t\t\t\t\t\t\techo $this->getSkin()->makeFooterIcon( $icon );\n\t\t\t\t\t\t\t\t\t}; ?>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<?php }; ?>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</footer>\n\t\t</main>\n\t\t\n\t\t<script src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js\"></script>\n\t\t<script src=\"skins/Bootstrap-MW/js/bootstrap.min.js\"></script>\n\t\t<?php $this->printTrail(); ?>\n\t</body>\n</html><?php\n\t\twfRestoreWarnings();\n\t}",
"public function run()\r\n {\r\n // RECENTLY_MET\r\n Script::create([\r\n 'id' => 1,\r\n 'template' => 'Hi {CONTACT_FIRST_NAME}, I\\'m {USER_FIRST_NAME}, we recently met and talked about {CONTACT_INTEREST}. May I forward you some educational videos?'\r\n ]);\r\n\r\n // RECENTLY_MET\r\n Script::create([\r\n 'id' => 2,\r\n 'template' => 'Hi {CONTACT_FIRST_NAME}, I\\'m {USER_FIRST_NAME}, we recently talked over the phone about {CONTACT_INTEREST}. May I forward you some educational videos?'\r\n ]);\r\n\r\n // RECENTLY_MET\r\n Script::create([\r\n 'id' => 3,\r\n 'template' => 'Hi {CONTACT_FIRST_NAME}, I\\'m {USER_FIRST_NAME}, and I know we have been talking about {CONTACT_INTEREST}. May I forward you some educational videos?'\r\n ]);\r\n\r\n // REFERRAL\r\n Script::create([\r\n 'id' => 4,\r\n 'template' => 'Hi {CONTACT_FIRST_NAME}, I\\'m {USER_FIRST_NAME}, you were referred to me by {REFERRAL_NAME} because of your interest in learning more about {CONTACT_INTEREST}. May I forward you some educational videos?'\r\n ]);\r\n\r\n // REFERRAL\r\n Script::create([\r\n 'id' => 5,\r\n 'template' => 'Hi {CONTACT_FIRST_NAME}, I\\'m {USER_FIRST_NAME}, {REFERRAL_NAME} connected us because of your interest in learning more about {CONTACT_INTEREST}. May I forward you some educational videos?'\r\n ]);\r\n\r\n // PERMISSION_NO\r\n Script::create([\r\n 'id' => 6,\r\n 'template' => 'Hi, I was wondering if you were able to read my previous text.'\r\n ]);\r\n\r\n // PERMISSION_NO\r\n Script::create([\r\n 'id' => 7,\r\n 'template' => 'Hi, were you still interested in learning about the water?'\r\n ]);\r\n\r\n // EDUCATIONAL_VIDEO + 1\r\n Script::create([\r\n 'id' => 8,\r\n 'template' => '{LINK} Above is the link to the software-demand.com water videos.'\r\n ]);\r\n\r\n // EDUCATIONAL_VIDEO + 1\r\n Script::create([\r\n 'id' => 9,\r\n 'template' => '{LINK} Above is the link to the info on the water.'\r\n ]);\r\n\r\n // EDUCATIONAL_VIDEO\r\n Script::create([\r\n 'id' => 10,\r\n 'template' => '{LINK} Above is the link to the videos.'\r\n ]);\r\n\r\n // EDUCATIONAL_VIDEO\r\n Script::create([\r\n 'id' => 11,\r\n 'template' => '{LINK} Check out the videos.'\r\n ]);\r\n\r\n // EDUCATIONAL_VIDEO\r\n Script::create([\r\n 'id' => 12,\r\n 'template' => '{LINK} Above is the link.'\r\n ]);\r\n\r\n // EDUCATIONAL_VIDEO\r\n Script::create([\r\n 'id' => 13,\r\n 'template' => '{LINK} Above is the link to the videos.'\r\n ]);\r\n\r\n // EDUCATIONAL_VIDEO\r\n Script::create([\r\n 'id' => 14,\r\n 'template' => '{LINK} Above is the link to the software-demand.com water videos.'\r\n ]);\r\n\r\n // EDUCATIONAL_VIDEO\r\n Script::create([\r\n 'id' => 15,\r\n 'template' => '{LINK} Above is the link to the software-demand.com water videos. They are very educational.'\r\n ]);\r\n\r\n // ARTICLE\r\n Script::create([\r\n 'id' => 16,\r\n 'template' => '{LINK} Above is an article link on the benefits of hydrogen water. It’s an emerging trend that is getting a lot of attention these days. software-demand.com water company makes a really great product in that industry, something definitely worth looking into.'\r\n ]);\r\n\r\n // ARTICLE\r\n Script::create([\r\n 'id' => 17,\r\n 'template' => '{LINK} Read this article on hydrogen water. There is a solid company that manufactures a very good hydrogen water product and personally know them well.'\r\n ]);\r\n\r\n // ARTICLE\r\n Script::create([\r\n 'id' => 18,\r\n 'template' => '{LINK} Above is the link to the articles.'\r\n ]);\r\n\r\n // ARTICLE\r\n Script::create([\r\n 'id' => 19,\r\n 'template' => '{LINK} Check out the articles.'\r\n ]);\r\n\r\n // ARTICLE\r\n Script::create([\r\n 'id' => 20,\r\n 'template' => '{LINK} Here is the link.'\r\n ]);\r\n\r\n // BOOKLET\r\n Script::create([\r\n 'id' => 21,\r\n 'template' => '{LINK} Above is the link to the software-demand.com booklet which is full of great information!'\r\n ]);\r\n\r\n // BOOKLET\r\n Script::create([\r\n 'id' => 22,\r\n 'template' => '{LINK} Read the software-demand.com booklet, it has really good information.'\r\n ]);\r\n\r\n // BOOKLET\r\n Script::create([\r\n 'id' => 23,\r\n 'template' => '{LINK} Above is the link to the software-demand.com booklet.'\r\n ]);\r\n\r\n // BOOKLET\r\n Script::create([\r\n 'id' => 24,\r\n 'template' => '{LINK} Check out the software-demand.com booklet.'\r\n ]);\r\n\r\n // BOOKLET\r\n Script::create([\r\n 'id' => 25,\r\n 'template' => '{LINK} Above is the link.'\r\n ]);\r\n\r\n // PURCHASE VIDEO\r\n Script::create([\r\n 'id' => 26,\r\n 'template' => '{LINK} Above is the purchase link. There are additional videos at the bottom of the page and a great FAQ section.'\r\n ]);\r\n\r\n // GROUP_CHAT/READY_TO_BUY_YES\r\n Script::create([\r\n 'id' => 27,\r\n 'template' => 'Hi {CONTACT_FIRST_NAME}, I would like to introduce {SALES_SUPPORT_FIRST_NAME} who is helping me connect people that are interested in software-demand.com water. {SALES_SUPPORT_FIRST_NAME}, {CONTACT_FIRST_NAME} is interested in getting a water system. I will let you both connect and work out the details.'\r\n ]);\r\n\r\n // GROUP_CHAT/READY_TO_BUY_NO\r\n Script::create([\r\n 'id' => 28,\r\n 'template' => 'Hi {CONTACT_FIRST_NAME}, I would like to introduce {SALES_SUPPORT_FIRST_NAME} who is helping me educate people that are interested in software-demand.com water. {SALES_SUPPORT_FIRST_NAME}, {CONTACT_FIRST_NAME} is interested in learning more. I will let you both connect and work out the details.'\r\n ]);\r\n\r\n // Video Touch Category\r\n Script::create([\r\n 'id' => 29,\r\n 'template' => '{LINK} Above is the video link to {VIDEO_TITLE}'\r\n ]);\r\n\r\n // Article Touch Category\r\n Script::create([\r\n 'id' => 30,\r\n 'template' => '{LINK} Above is an article on {ARTICLE_TITLE}.'\r\n ]);\r\n\r\n // Booklet Touch Category\r\n Script::create([\r\n 'id' => 31,\r\n 'template' => '{LINK} Above is a link to software-demand.com Booklet'\r\n ]);\r\n\r\n // Testimonial Video Touch Category\r\n Script::create([\r\n 'id' => 32,\r\n 'template' => '{LINK} Above is the link to all the testimonial videos'\r\n ]);\r\n\r\n // HANDED_OFF/GROUP_CHAT/READY_TO_BUY_YES\r\n // HANDED_OFF/APPOINTMENT/READY_TO_BUY_YES\r\n Script::create([\r\n 'id' => 33,\r\n 'template' => 'Great! Thank you {REFERRAL_BY_FIRST_NAME} for connecting us. {CONTACT_FIRST_NAME}, please let me know when you are available to schedule a time to chat.'\r\n ]);\r\n\r\n // HANDED_OFF/GROUP_CHAT/READY_TO_BUY_NO\r\n // HANDED_OFF/APPOINTMENT/READY_TO_BUY_NO\r\n Script::create([\r\n 'id' => 34,\r\n 'template' => 'Great! Thank you {REFERRAL_BY_FIRST_NAME} for connecting us. {CONTACT_FIRST_NAME}, I have some great educational videos to start with, let me know if I may send them your way.'\r\n ]);\r\n\r\n // HANDED_OFF/DIRECT_HANDOFF/READY_TO_BUY_YES\r\n // HANDED_OFF/TEAM_SUPPORT/DIRECT_HANDOFF/READY_TO_BUY_YES\r\n Script::create([\r\n 'id' => 35,\r\n 'template' => 'Hi {CONTACT_FIRST_NAME}, I am {USER_FIRST_NAME}, {REFERRAL_BY_FIRST_NAME} reached out to me to contact you because of your interest in getting a software-demand.com water system. Please let me know your availability and we can set a time to chat.'\r\n ]);\r\n\r\n // HANDED_OFF/DIRECT_HANDOFF/READY_TO_BUY_NO/COMPANY_NAME\r\n // HANDED_OFF/TEAM_SUPPORT/DIRECT_HANDOFF/READY_TO_BUY_NO/COMPANY_NAME\r\n // HANDED_OFF/DIRECT_HANDOFF/READY_TO_BUY_NO/AGENT_NAME\r\n // HANDED_OFF/TEAM_SUPPORT/DIRECT_HANDOFF/READY_TO_BUY_NO/AGENT_NAME\r\n Script::create([\r\n 'id' => 36,\r\n 'template' => 'Hi {CONTACT_FIRST_NAME}, I am {USER_FIRST_NAME}, {REFERRAL_BY_FIRST_NAME} reached out to me to contact you due to your interest in learning more about software-demand.com water. May I send you some educational videos?'\r\n ]);\r\n\r\n // HANDED_OFF/DIRECT_HANDOFF/READY_TO_BUY_NO/COMPANY_NAME\r\n // HANDED_OFF/COLD_MARKET/DIRECT_HANDOFF/READY_TO_BUY_NO/COMPANY_NAME\r\n // HANDED_OFF/TEAM_SUPPORT/DIRECT_HANDOFF/READY_TO_BUY_NO/COMPANY_NAME\r\n Script::create([\r\n 'id' => 37,\r\n 'template' => 'Hi {CONTACT_FIRST_NAME}, I\\'m {USER_FIRST_NAME}, a support member of software-demand.com. {REFERRAL_BY_COMPANY_NAME} notified me that you were reviewing our information. Let me know if you have any questions and I will reconnect with you later.'\r\n ]);\r\n\r\n // HANDED_OFF/DIRECT_HANDOFF/READY_TO_BUY_NO/AGENT_NAME\r\n // HANDED_OFF/COLD_MARKET/DIRECT_HANDOFF/READY_TO_BUY_NO/AGENT_NAME\r\n // HANDED_OFF/TEAM_SUPPORT/DIRECT_HANDOFF/READY_TO_BUY_NO/AGENT_NAME\r\n Script::create([\r\n 'id' => 38,\r\n 'template' => 'Hi {CONTACT_FIRST_NAME}, I\\'m {USER_FIRST_NAME}, a support member of software-demand.com. {REFERRAL_BY_FIRST_NAME} notified me that you were reviewing our information. Let me know if you have any questions and I will reconnect with you later.'\r\n ]);\r\n\r\n // OPTIN_LEAD\r\n // HANDED_OFF/COLD_MARKET/DIRECT_HANDOFF/READY_TO_BUY_NO/COMPANY_NAME\r\n // HANDED_OFF/COLD_MARKET/DIRECT_HANDOFF/READY_TO_BUY_NO/AGENT_NAME\r\n Script::create([\r\n 'id' => 39,\r\n 'template' => 'Hi {CONTACT_FIRST_NAME}, I am {USER_FIRST_NAME} a software-demand.com water agent. Thanks for checking us out, let me know if you have any further questions and I will be happy to assist. Otherwise I will connect back with you later.'\r\n ]);\r\n\r\n // HANDED_OFF/TEAM_SUPPORT/GROUP_CHAT/READY_TO_BUY_YES\r\n // HANDED_OFF/TEAM_SUPPORT/APPOINTMENT/READY_TO_BUY_YES\r\n Script::create([\r\n 'id' => 40,\r\n 'template' => 'Great! Thank you {REFERRAL_BY_FIRST_NAME} for connecting us. {CONTACT_FIRST_NAME}, please let me know your available schedule so we can set a time to chat.'\r\n ]);\r\n\r\n // HANDED_OFF/TEAM_SUPPORT/GROUP_CHAT/READY_TO_BUY_NO\r\n // HANDED_OFF/TEAM_SUPPORT/APPOINTMENT/READY_TO_BUY_NO\r\n Script::create([\r\n 'id' => 41,\r\n 'template' => 'Great! Thank you {REFERRAL_BY_FIRST_NAME} for connecting us. {CONTACT_FIRST_NAME}, please let me know your availability and we can set a time to chat.'\r\n ]);\r\n\r\n // PURCHASE_LINK\r\n Script::create([\r\n 'id' => 42,\r\n 'template' => '{LINK} Here is the link to purchase options.'\r\n ]);\r\n\r\n // AFFILIATE_LINK\r\n Script::create([\r\n 'id' => 43,\r\n 'template' => '{LINK} Here is the link to affiliate sign up page'\r\n ]);\r\n\r\n // SET_APPOINTMENT\r\n Script::create([\r\n 'id' => 44,\r\n 'template' => 'I have scheduled an appointment with {SALES_SUPPORT_FIRST_NAME} on {APT_DATETIME}'\r\n ]);\r\n\r\n // THIRD_BASE/GROUP_CHAT/READY_TO_BUY_YES\r\n Script::create([\r\n 'id' => 45,\r\n 'template' => 'Hi {CONTACT_FIRST_NAME}, I have connected you to {SALES_SUPPORT_FIRST_NAME}, who very experienced with the water. {SALES_SUPPORT_FIRST_NAME}, {CONTACT_FIRST_NAME} is interested in getting a water system and may have a few more questions. Please connect and follow up.'\r\n ]);\r\n\r\n // THIRD_BASE/GROUP_CHAT/READY_TO_BUY_NO\r\n Script::create([\r\n 'id' => 46,\r\n 'template' => 'Hi {CONTACT_FIRST_NAME}, I have connected you to {SALES_SUPPORT_FIRST_NAME}, who is very experienced with the water. {SALES_SUPPORT_FIRST_NAME}, {CONTACT_FIRST_NAME} may have a few more questions regarding the water, so I will let you follow up. '\r\n ]);\r\n\r\n // INITIAL_BLOCK_COMPLETED/ARTICLE\r\n Script::create([\r\n 'id' => 47,\r\n 'template' => '{LINK} Check this article out on {CONTACT_INTEREST}!'\r\n ]);\r\n\r\n // INITIAL_BLOCK_COMPLETED/ARTICLE\r\n Script::create([\r\n 'id' => 48,\r\n 'template' => '{LINK} This article is on {CONTACT_INTEREST}, I think you will really like it!'\r\n ]);\r\n\r\n // INITIAL_BLOCK_COMPLETED/EDUCATIONAL_VIDEO\r\n Script::create([\r\n 'id' => 49,\r\n 'template' => '{LINK} Above is the link to all the videos, there is a lot of good content.'\r\n ]);\r\n\r\n // INITIAL_BLOCK_COMPLETED/EDUCATIONAL_VIDEO\r\n Script::create([\r\n 'id' => 50,\r\n 'template' => '{LINK} This link has all the videos and is very informative.'\r\n ]);\r\n\r\n // INITIAL_BLOCK_COMPLETED/TESTIMONIAL_VIDEO\r\n Script::create([\r\n 'id' => 51,\r\n 'template' => '{LINK} Watch this testimonial video. There are a lot of good reviews.'\r\n ]);\r\n\r\n // INITIAL_BLOCK_COMPLETED/TESTIMONIAL_VIDEO\r\n Script::create([\r\n 'id' => 52,\r\n 'template' => '{LINK} Check this page out with all the reviews and testimonials!'\r\n ]);\r\n\r\n /*\r\n * Library of resources\r\n */\r\n\r\n // Articles\r\n Script::create([\r\n 'id' => 53,\r\n 'template' => '{LINK} Above is the link on {ARTICLE_TITLE}.'\r\n ]);\r\n\r\n Script::create([\r\n 'id' => 54,\r\n 'template' => '{LINK} Above is an article link on {ARTICLE_TITLE}.'\r\n ]);\r\n\r\n Script::create([\r\n 'id' => 55,\r\n 'template' => '{LINK} Above is a link to all the frequently asked questions.'\r\n ]);\r\n\r\n // WEBSITE_LINK\r\n Script::create([\r\n 'id' => 56,\r\n 'template' => '{LINK} Here is the link to website.'\r\n ]);\r\n\r\n // INITIAL_BLOCK_COMPLETED/BOOKLET\r\n Script::create([\r\n 'id' => 57,\r\n 'template' => '{LINK} Above is the software-demand.com detailed booklet.'\r\n ]);\r\n\r\n // INITIAL_BLOCK_COMPLETED/BOOKLET\r\n Script::create([\r\n 'id' => 58,\r\n 'template' => '{LINK} This is a great brochure to read.'\r\n ]);\r\n }",
"public function run(){\n\t\t$professional = Professional::find(8);\n\n\t\t$platformsArr = array(1, 2, 3, 4);\n\t\t$creativeFieldsArr = array(3);\n\t\t$clientFocusesArr = array(1, 2, 3);\n\t\t$specializationsArr = array(1, 2, 6, 8, 12, 14);\n\n\t\t$professional -> platforms() -> attach($platformsArr);\n\t\t$professional -> creativeFields() -> attach($creativeFieldsArr);\n\t\t$professional -> clientFocuses() -> attach($clientFocusesArr);\n\t\t$professional -> specializations() -> attach($specializationsArr);\n\t}",
"public function run()\n {\n // $site_us = new Locale_site();\n // $site_us->id = 1;\n\n // $site_us->locale = 'en';\n\n // $site_us->guid_title = 'Rock climbing In Georgia';\n // $site_us->guid_description = 'Rock climbing in Georgia is a developing sport, but the country has a great prospect in rock climbing and in mountaineering. We constantly collect information about promising rocks, we am happy to accept your messages about new and unknown places. \n // There are many ready-made regions for all kinds of climbing. Also there are many places to implement and establish new climbing routes and regions, so it is very attractive for those who are searching for new unique places and opportunities.\n // If you need any additional information feel free to contact us. We will provide you with all essential details, suggest a concrete way how to get to the site of climbing or offer his services for equipment and take you to the rock climbing areas.\n // Alse if you need a climbing guide you can contact us. We can accompany you to any mountaineering and rock climbing regions throughout Georgia. Tour prices depend on the complexity of the route and the size of the group. Write to us for more details. Celk here for write message.\n // We are constantly updating information about all regions so that you get full information. \n // Information partners. climbingingeorgia.wordpress.com\n // See information about climbing areas in neighboring countries.\n // Climbing in Armenia - uptherock.com\n // Climbing in Turkey - climbing-europe.com/RockClimbingTurkey';\n // $site_us->guid_short_description = 'Rock climbing and mountaineering in Georgia';\n // $site_us->films_title = 'Rock climbing films';\n // $site_us->films_description = 'Climbing movies';\n // $site_us->films_short_description = 'Climbing movies';\n // $site_us->forum_title = 'Georgian Climbing forum';\n // $site_us->forum_description = 'Georgian climbing forum';\n // $site_us->forum_short_description = 'Georgian climbing forum';\n // $site_us->shop_title = 'Climbing.ge products and services';\n // $site_us->shop_description = 'Climbing.ge products';\n // $site_us->shop_short_description = 'Climbing.ge products';\n // $site_us->other_activity_description = 'Other activity for active rest in Georgia';\n // $site_us->mount_description = 'Mountaineering in Georgia';\n // $site_us->outdoor_description = 'Outdoor rock climbing area in Georgia';\n // $site_us->event_description = 'event_description';\n // $site_us->tech_tips_description = 'Climbing tech tips';\n // $site_us->news_description = 'Georgian climbing news';\n // $site_us->index_gallery_description = 'Gallery';\n // $site_us->indoor_description = 'Indoor climbing gyms in Georgia';\n // $site_us->ice_description = 'Ice climbing in Georgia';\n // $site_us->topo_description = 'Climbing topo';\n // $site_us->what_we_do_description = 'Georgia rock climbing and mountaineering description';\n // $site_us->products_description = 'Climbing.ge products';\n // $site_us->services_description = 'Climbing.ge services';\n // // $site_us->save();\n\n\n // $site_ka = new Locale_site();\n // $site_ka->id = 2;\n\n // $site_ka->locale = 'ka';\n\n // $site_ka->guid_title_ka = 'მეკლდეურობა საქართველოში';\n // $site_ka->guid_description_ka = 'სერვისი climbing.ge, არის საინფორმაციო საიტი, რომელიც მიზნად ისახავს საქართველოს საცოცი და ალპინისტური მარშრუტების დეტალურ აღწერას და ამ იმფორმაციის მეტად პოპულარიზაციას, რათა ეს იმფორმაცია იყოს მეტად ხელმისაწვდომი, როგორც საქართველოს მოსახლეობისთვის, ასევე სხვა ქვეყნიდან ჩამოსული სპორცმენებისთვის. ჩვენი გუნდი მუდმივად მუსაობს ოიმისთვის, რომ იმფორმაცია ხშირად განახლდეს, დაემატოს მეტი სიახლე და ყველა საცოცი რეგიონი თუ ალპინისტური მარშრუტი იყოს რაც შეიძლება დეტალურად აღწერილი. \n // საქართველოში მეკლდეურობა და სპორტული ცოცვა ჯერჯერობით არ არის განვითარებული სათანადო დონეზე, მაგრამ ჩვენ მუდამ ვცდილობთ ვიპოვოთ და შევქმნათ თქვენთვის საინტერესო საცოცი რეგიონები. აღმოვაჩინოთ ახალი, საცოცად გამოსადეგი კლდეები და ამ ადგილებში რაც შეიძლება მეტი საცოცი მარშრუტი გავაკეთოთ . სამწუხაროდ ჯერჯერობით ყვეკაფერი ეს ჩვენი პირადი ხარჯებით ხორციელდება, ამიტომაც ეს ყველაფერი საკმაოდ ნელი ტემპებით მიმდინარეობს. ჩვენ მუდმივად მზად ვართ პარტნიორობისთის, რათა სპორტის ეს სახეობა უფრო მეტად განვითარდეს. ჩვენ მოხარულები ვიქნებით ყველა ტიპის დახმარებისთვის, იქნება ეს ფინანსური, ტექნიკური თუ გამოცდილების გაზიარება.\n // ასევე ჩვენს საიტზე თქვენ შეგიძლიათ იხილოთ ალპინისტური მარშრუტების არწერაც. საქართველოს უდიდესი ნაწილი მტებითაა დაფარული. აქ არის ბევრი ულამაზესი და ტექნიკურად რთული მწვერვალი. როგორიცაა: უშბა, ტეთნულდი, შხარა, მყინვარი, ჭაუხის მასივი და ბევრი სხვა. ამ მთებზე არის ბევრი მარშრუტი . სამწუხაროდ ეს მარშრუტები არ არის აღწერილი. ჩვენ ვცდილობთ შევაგროვოთ და ავღწეროთ ჩვენი თუ სხვის მიერ გავლილი მარშრუტები. თუ თქვენ გაქვთ იმფორმაცია და რომელიმე მარშრუტის აღწერა, თქვენ შეგიძლიათ გამოგვიგზავნოთ ის. ეს ჩვენ ძალიან დაგვეხმარება.\n // თუ თქვენ დაგწირდათ დამატებითი იმფორმაცია ან თქვენ გინდათ გიდის აყვანა საქართველოს ნებისმიერ რეგიონში, მოგვწერეთ ქვემოთ მოყვანილი ფორმის მეშვეობით. ჩვენ მალე გიპასუხებთ\n // Climbing.ge - ის გუნდი ყველას კარ ცოცვას და ვარჯიშს გისურვებთ.';\n\n // $site_ka->guid_short_description_ka = 'საქართველოს საცოცი სეკტორების და ალპინისტური მარშრუტების აღწერა';\n // $site_ka->films_title_ka = 'ცოცვის ფილმები';\n // $site_ka->films_description_ka = 'ცოცვის ფილმები';\n // $site_ka->films_short_description_ka = 'ცოცვის ფილმები';\n // $site_ka->forum_title_ka = 'ქართული ცოცვის ფორუმი';\n // $site_ka->forum_description_ka = 'ქართული ცოცვის ფორუმი';\n // $site_ka->forum_short_description_ka = 'ქართული ცოცვის ფორუმი';\n // $site_ka->shop_title_ka = 'Climbing.ge-ს საქონელი და მომსახურება';\n // $site_ka->shop_description_ka = 'საცოცი პროდუკტები წარმოებული ჩვენი კომპანიის მიერ';\n // $site_ka->shop_short_description_ka = 'საცოცი პროდუკტები წარმოებული ჩვენი კომპანიის მიერ';\n // $site_ka->other_activity_description_ka = 'სხვა აკტიობები';\n // $site_ka->mount_description_ka = 'ალპინისტური მარშრუტები საქართველოში(კავკასიონის ქედი)';\n // $site_ka->outdoor_description_ka = 'ცოცვა ბუნებრივ კლდეზე';\n // $site_ka->event_description_ka = 'ცოცვა ბუნებრივ კლდეზე';\n // $site_ka->tech_tips_description_ka = 'ცოცვის ტექნიკური რჩევები';\n // $site_ka->news_description_ka = 'ცოცვის სიახლეები საქართველოშე';\n // $site_ka->index_gallery_description_ka = 'გალერეა';\n // $site_ka->indoor_description_ka = 'საცოცი დარბაზები';\n // $site_ka->ice_description_ka = 'ყინულზე ცოცვა';\n // $site_ka->topo_description_ka = 'საქართველოს საცოცი მარშრუტები რუკაზე';\n // $site_ka->what_we_do_description_ka = 'საქართველოს საცოცი სეკტორების და ალპინისტური მარშრუტების აღწერა';\n // $site_ka->products_description_ka = 'Climbing.ge-ს პროდუქცია';\n // $site_ka->services_description_ka = 'Climbing.ge-ს მომსახურება';\n // // $site_ka->save();\n\n\n // $site_ru = new Locale_site();\n // $site_ru->id = 3;\n\n // $site_ru->locale = 'ru';\n\n // $site_ru->guid_title_ru = 'Скалолазание в Грузии';\n // $site_ru->guid_description_ru = 'Сервис Climbing.ge – это информационный сайт цель которого детальное описание альпинистких и скалолазных маршрутов в Грузии, и эту информацию сделать более доступной как для населения Грузии так и для спортсменов приезжающих из других стран.\n // Наша команда постоянно работает над обновлением информации и добавляет детальное описание во все скалолазные регионы и альпинсткие маршруты. Старается описать всё как можно подробнее.\n // В Грузии спортивное лазание и скалолазание в настоящее время не развито на должном уровне и недостаточно развито по регионам. Мы постоянно стараемся найти и создать для вас интересные маршруты для лазания и разрабатываем новые регионы, стараемся обнаружить новые, пригодные для лазания, скалы и в этом месте создать как можно больше маршрутов для скалолазания.\n // К сожалению, пока что, это всё происходит на наши личные средства и поэтому процесс разработки новых трасс и регионов продвигается в медленном темпе .Мы готовы к партнёрству и сотрудничеству для развития данного вида спорта. Мы будем рады помощи любого типа, будь то финансовая, техническая помощь или если вы поделитесь с нами вашим опытом.\n // Также на нашем сайте вы можете найти описание альпинистких маршрутов. Большая часть Грузии покрыта горами .Здесь есть красивейшие и технически сложные вершины , такие как: Ушба, Шхара, Казбег, Чаухский массив и многое другое. На склонах этих гор множество маршрутов. К сожалению эти маршруты не описаны. Мы старались собрать и описать пройденные нами или другими альпинистами маршруты. Если у вас есть информация и описание какого-либо маршрута, вы можете прислать эту информацию нам. Нам поможет эта информация в работе.\n // Если вам понадобится дополнительная информация или вам необходимо взять гида для любого региона Грузии, напишите нам ,внизу дана форма и мы ответим вам очень быстро,\n // CLIMBING.GE- желает вам хороших восхождений и тренировок.';\n // $site_ru->guid_short_description_ru = 'Скалолазание и альпинизм в Грузии';\n // $site_ru->films_title_ru = 'Фильмы о скалолазании';\n // $site_ru->films_description_ru = 'Фильмы о скалолазании';\n // $site_ru->films_short_description_ru = 'Фильмы о скалолазании';\n // $site_ru->forum_title_ru = 'Форум скалолазание Грузии';\n // $site_ru->forum_description_ru = 'Форум скалолазание Грузии';\n // $site_ru->forum_short_description_ru = 'Форум скалолазание Грузии';\n // $site_ru->shop_title_ru = 'Товары и услуги Climbing.ge';\n // $site_ru->shop_description_ru = 'Climbing.ge продукты';\n // $site_ru->shop_short_description_ru = 'Climbing.ge продукты';\n // $site_ru->other_activity_description_ru = 'Другая деятельность для активного отдыха в Грузии';\n // $site_ru->mount_description_ru = 'Альпинизм в Грузии';\n // $site_ru->outdoor_description_ru = 'Скалолазание на открытом воздухе в Грузии';\n // $site_ru->event_description_ru = 'Скалолазание на открытом воздухе в Грузии';\n // $site_ru->tech_tips_description_ru = 'Советы по альпинизму';\n // $site_ru->news_description_ru = 'Новости скалолазания в Грузинского ';\n // $site_ru->index_gallery_description_ru = 'Галерея';\n // $site_ru->indoor_description_ru = 'Скалолазные залы в грузии';\n // $site_ru->ice_description_ru = 'Ледолазание в Грузии';\n // $site_ru->topo_description_ru = 'Восхождение на вершину';\n // $site_ru->what_we_do_description_ru = 'Описание скалолазания и альпинизма в Грузии';\n // $site_ru->products_description_ru = 'Продукция Climbing.ge';\n // $site_ru->services_description_ru = 'Услуги Climbing.ge';\n // $site_ru->save();\n\n\n\n DB::table('locale_sites')->insert([\n [\n 'id' => 1,\n\n 'locale' => 'us',\n \n 'guid_title' => 'Rock climbing In Georgia',\n 'guid_description' => 'Rock climbing in Georgia is a developing sport, but the country has a great prospect in rock climbing and in mountaineering. We constantly collect information about promising rocks, we am happy to accept your messages about new and unknown places. \n There are many ready-made regions for all kinds of climbing. Also there are many places to implement and establish new climbing routes and regions, so it is very attractive for those who are searching for new unique places and opportunities.\n If you need any additional information feel free to contact us. We will provide you with all essential details, suggest a concrete way how to get to the site of climbing or offer his services for equipment and take you to the rock climbing areas.\n Alse if you need a climbing guide you can contact us. We can accompany you to any mountaineering and rock climbing regions throughout Georgia. Tour prices depend on the complexity of the route and the size of the group. Write to us for more details. Celk here for write message.\n We are constantly updating information about all regions so that you get full information. \n Information partners. climbingingeorgia.wordpress.com\n See information about climbing areas in neighboring countries.\n Climbing in Armenia - uptherock.com\n Climbing in Turkey - climbing-europe.com/RockClimbingTurkey',\n 'guid_short_description' => 'Rock climbing and mountaineering in Georgia',\n 'films_title' => 'Rock climbing films',\n 'films_description' => 'Climbing movies',\n 'films_short_description' => 'Climbing movies',\n 'forum_title' => 'Georgian Climbing forum',\n 'forum_description' => 'Georgian climbing forum',\n 'forum_short_description' => 'Georgian climbing forum',\n 'shop_title' => 'Climbing.ge products and services',\n 'shop_description' => 'Climbing.ge products',\n 'shop_short_description' => 'Climbing.ge products',\n 'other_activity_description' => 'Other activity for active rest in Georgia',\n 'mount_description' => 'Mountaineering in Georgia',\n 'outdoor_description' => 'Outdoor rock climbing area in Georgia',\n 'event_description' => 'event_description',\n 'tech_tips_description' => 'Climbing tech tips',\n 'news_description' => 'Georgian climbing news',\n 'index_gallery_description' => 'Gallery',\n 'indoor_description' => 'Indoor climbing gyms in Georgia',\n 'ice_description' => 'Ice climbing in Georgia',\n 'topo_description' => 'Climbing topo',\n 'what_we_do_description' => 'Georgia rock climbing and mountaineering description',\n 'products_description' => 'Climbing.ge products',\n 'services_description' => 'Climbing.ge services',\n ],\n [\n 'id' => 2,\n\n 'locale' => 'ka',\n \n 'guid_title_ka' => 'მეკლდეურობა საქართველოში',\n 'guid_description_ka' => 'სერვისი climbing.ge, არის საინფორმაციო საიტი, რომელიც მიზნად ისახავს საქართველოს საცოცი და ალპინისტური მარშრუტების დეტალურ აღწერას და ამ იმფორმაციის მეტად პოპულარიზაციას, რათა ეს იმფორმაცია იყოს მეტად ხელმისაწვდომი, როგორც საქართველოს მოსახლეობისთვის, ასევე სხვა ქვეყნიდან ჩამოსული სპორცმენებისთვის. ჩვენი გუნდი მუდმივად მუსაობს ოიმისთვის, რომ იმფორმაცია ხშირად განახლდეს, დაემატოს მეტი სიახლე და ყველა საცოცი რეგიონი თუ ალპინისტური მარშრუტი იყოს რაც შეიძლება დეტალურად აღწერილი.,\n საქართველოში მეკლდეურობა და სპორტული ცოცვა ჯერჯერობით არ არის განვითარებული სათანადო დონეზე, მაგრამ ჩვენ მუდამ ვცდილობთ ვიპოვოთ და შევქმნათ თქვენთვის საინტერესო საცოცი რეგიონები. აღმოვაჩინოთ ახალი, საცოცად გამოსადეგი კლდეები და ამ ადგილებში რაც შეიძლება მეტი საცოცი მარშრუტი გავაკეთოთ . სამწუხაროდ ჯერჯერობით ყვეკაფერი ეს ჩვენი პირადი ხარჯებით ხორციელდება, ამიტომაც ეს ყველაფერი საკმაოდ ნელი ტემპებით მიმდინარეობს. ჩვენ მუდმივად მზად ვართ პარტნიორობისთის, რათა სპორტის ეს სახეობა უფრო მეტად განვითარდეს. ჩვენ მოხარულები ვიქნებით ყველა ტიპის დახმარებისთვის, იქნება ეს ფინანსური, ტექნიკური თუ გამოცდილების გაზიარება.\n ასევე ჩვენს საიტზე თქვენ შეგიძლიათ იხილოთ ალპინისტური მარშრუტების არწერაც. საქართველოს უდიდესი ნაწილი მტებითაა დაფარული. აქ არის ბევრი ულამაზესი და ტექნიკურად რთული მწვერვალი. როგორიცაა: უშბა, ტეთნულდი, შხარა, მყინვარი, ჭაუხის მასივი და ბევრი სხვა. ამ მთებზე არის ბევრი მარშრუტი . სამწუხაროდ ეს მარშრუტები არ არის აღწერილი. ჩვენ ვცდილობთ შევაგროვოთ და ავღწეროთ ჩვენი თუ სხვის მიერ გავლილი მარშრუტები. თუ თქვენ გაქვთ იმფორმაცია და რომელიმე მარშრუტის აღწერა, თქვენ შეგიძლიათ გამოგვიგზავნოთ ის. ეს ჩვენ ძალიან დაგვეხმარება.\n თუ თქვენ დაგწირდათ დამატებითი იმფორმაცია ან თქვენ გინდათ გიდის აყვანა საქართველოს ნებისმიერ რეგიონში, მოგვწერეთ ქვემოთ მოყვანილი ფორმის მეშვეობით. ჩვენ მალე გიპასუხებთ\n Climbing.ge - ის გუნდი ყველას კარ ცოცვას და ვარჯიშს გისურვებთ.',\n \n 'guid_short_description_ka' => 'საქართველოს საცოცი სეკტორების და ალპინისტური მარშრუტების აღწერა',\n 'films_title_ka' => 'ცოცვის ფილმები',\n 'films_description_ka' => 'ცოცვის ფილმები',\n 'films_short_description_ka' => 'ცოცვის ფილმები',\n 'forum_title_ka' => 'ქართული ცოცვის ფორუმი',\n 'forum_description_ka' => 'ქართული ცოცვის ფორუმი',\n 'forum_short_description_ka' => 'ქართული ცოცვის ფორუმი',\n 'shop_title_ka' => 'Climbing.ge-ს საქონელი და მომსახურება',\n 'shop_description_ka' => 'საცოცი პროდუკტები წარმოებული ჩვენი კომპანიის მიერ',\n 'shop_short_description_ka' => 'საცოცი პროდუკტები წარმოებული ჩვენი კომპანიის მიერ',\n 'other_activity_description_ka' => 'სხვა აკტიობები',\n 'mount_description_ka' => 'ალპინისტური მარშრუტები საქართველოში(კავკასიონის ქედი)',\n 'outdoor_description_ka' => 'ცოცვა ბუნებრივ კლდეზე',\n 'event_description_ka' => 'ცოცვა ბუნებრივ კლდეზე',\n 'tech_tips_description_ka' => 'ცოცვის ტექნიკური რჩევები',\n 'news_description_ka' => 'ცოცვის სიახლეები საქართველოშე',\n 'index_gallery_description_ka' => 'გალერეა',\n 'indoor_description_ka' => 'საცოცი დარბაზები',\n 'ice_description_ka' => 'ყინულზე ცოცვა',\n 'topo_description_ka' => 'საქართველოს საცოცი მარშრუტები რუკაზე',\n 'what_we_do_description_ka' => 'საქართველოს საცოცი სეკტორების და ალპინისტური მარშრუტების აღწერა',\n 'products_description_ka' => 'Climbing.ge-ს პროდუქცია',\n 'services_description_ka' => 'Climbing.ge-ს მომსახურება',\n ],\n [\n 'id' => 3,\n\n 'locale' => 'ru',\n \n 'guid_title_ru' => 'Скалолазание в Грузии',\n 'guid_description_ru' => 'Сервис Climbing.ge – это информационный сайт цель которого детальное описание альпинистких и скалолазных маршрутов в Грузии, и эту информацию сделать более доступной как для населения Грузии так и для спортсменов приезжающих из других стран,\n Наша команда постоянно работает над обновлением информации и добавляет детальное описание во все скалолазные регионы и альпинсткие маршруты. Старается описать всё как можно подробнее.\n В Грузии спортивное лазание и скалолазание в настоящее время не развито на должном уровне и недостаточно развито по регионам. Мы постоянно стараемся найти и создать для вас интересные маршруты для лазания и разрабатываем новые регионы, стараемся обнаружить новые, пригодные для лазания, скалы и в этом месте создать как можно больше маршрутов для скалолазания.\n К сожалению, пока что, это всё происходит на наши личные средства и поэтому процесс разработки новых трасс и регионов продвигается в медленном темпе .Мы готовы к партнёрству и сотрудничеству для развития данного вида спорта. Мы будем рады помощи любого типа, будь то финансовая, техническая помощь или если вы поделитесь с нами вашим опытом.\n Также на нашем сайте вы можете найти описание альпинистких маршрутов. Большая часть Грузии покрыта горами .Здесь есть красивейшие и технически сложные вершины , такие как: Ушба, Шхара, Казбег, Чаухский массив и многое другое. На склонах этих гор множество маршрутов. К сожалению эти маршруты не описаны. Мы старались собрать и описать пройденные нами или другими альпинистами маршруты. Если у вас есть информация и описание какого-либо маршрута, вы можете прислать эту информацию нам. Нам поможет эта информация в работе.\n Если вам понадобится дополнительная информация или вам необходимо взять гида для любого региона Грузии, напишите нам ,внизу дана форма и мы ответим вам очень быстро,\n CLIMBING.GE- желает вам хороших восхождений и тренировок.',\n 'guid_short_description_ru' => 'Скалолазание и альпинизм в Грузии',\n 'films_title_ru' => 'Фильмы о скалолазании',\n 'films_description_ru' => 'Фильмы о скалолазании',\n 'films_short_description_ru' => 'Фильмы о скалолазании',\n 'forum_title_ru' => 'Форум скалолазание Грузии',\n 'forum_description_ru' => 'Форум скалолазание Грузии',\n 'forum_short_description_ru' => 'Форум скалолазание Грузии',\n 'shop_title_ru' => 'Товары и услуги Climbing.ge',\n 'shop_description_ru' => 'Climbing.ge продукты',\n 'shop_short_description_ru' => 'Climbing.ge продукты',\n 'other_activity_description_ru' => 'Другая деятельность для активного отдыха в Грузии',\n 'mount_description_ru' => 'Альпинизм в Грузии',\n 'outdoor_description_ru' => 'Скалолазание на открытом воздухе в Грузии',\n 'event_description_ru' => 'Скалолазание на открытом воздухе в Грузии',\n 'tech_tips_description_ru' => 'Советы по альпинизму',\n 'news_description_ru' => 'Новости скалолазания в Грузинского ',\n 'index_gallery_description_ru' => 'Галерея',\n 'indoor_description_ru' => 'Скалолазные залы в грузии',\n 'ice_description_ru' => 'Ледолазание в Грузии',\n 'topo_description_ru' => 'Восхождение на вершину',\n 'what_we_do_description_ru' => 'Описание скалолазания и альпинизма в Грузии',\n 'products_description_ru' => 'Продукция Climbing.ge',\n 'services_description_ru' => 'Услуги Climbing.ge',\n ],\n ]);\n\n }",
"public function run()\n {\n $data=array(\n array(\n 'heading'=>'About Classes in php',\n 'content'=>'PHP 5 is very very flexible in accessing member variables and member functions. These access methods maybe look unusual and unnecessary at first glance; but they are very useful sometimes; specially when you work \n with SimpleXML classes and objects. I have posted a similar comment in SimpleXML function reference section, but this one is more comprehensive. ',\n 'user_id'=>2,\n 'category_id'=>1,\n ),\n array(\n 'heading'=>'About Programming',\n 'content'=>'We all have heard about Computer Programming gaining a lot of popularity in the past 3 decades. So many students these days want to opt for a Computer Science stream in order to get a job at their dream tech company - \n Google, Facebook, Microsoft, Apple, and whatnot. It is widely used for developing Java applications in laptops, data centers, game consoles, scientific supercomputers, cell phones, etc.\n Java Platform is a collection of programs that help programmers to develop and run Java programming applications efficiently. It includes an execution engine, a compiler, and a set of libraries in it. \n It is a set of computer software and specifications. James Gosling developed the Java platform at Sun Microsystems, and the Oracle Corporation later acquired it.',\n 'user_id'=>2,\n 'category_id'=>2,\n ),\n array(\n 'heading'=>'About Java',\n 'content'=>'Java is a general-purpose, class-based, object-oriented programming language designed for having lesser implementation dependencies. It is a computing platform for application development. \n Java is fast, secure, and reliable, therefore. It is widely used for developing Java applications in laptops, data centers, game consoles, scientific supercomputers, cell phones, etc.\n Java Platform is a collection of programs that help programmers to develop and run Java programming applications efficiently. It includes an execution engine, a compiler, and a set of libraries in it. \n It is a set of computer software and specifications. James Gosling developed the Java platform at Sun Microsystems, and the Oracle Corporation later acquired it.',\n 'user_id'=>2,\n 'category_id'=>3,\n ),\n array(\n 'heading'=>'About Python',\n 'content'=>'One of the amazing features of Python is the fact that it is actually one person’s work. Usually, new programming languages are developed and published by large companies employing lots of professionals, \n and due to copyright rules, it is very hard to name any of the people involved in the project. Python is an exception.',\n 'user_id'=>2,\n 'category_id'=>4,\n ),\n array(\n 'heading'=>'About PHP',\n 'content'=>'What distinguishes PHP from something like client-side JavaScript is that the code is executed on the server, generating HTML which is then sent to the client. The client would receive the results of running that script,\n but would not know what the underlying code was. You can even configure your web server to process all your HTML files with PHP, and then theres really no way that users can tell what you have up your sleeve. ',\n 'user_id'=>2,\n 'category_id'=>5,\n ),\n );\n\n DB::table('articles')->insert($data);\n }",
"public function run() {\n $this->base_data();\n $this->minimal_data();\n $project = Project::first();\n\n // Create a bunch more stuff, just for testin'.\n for ($i = 0; $i < 5; $i++) Factory::project($project->id);\n for ($i = 0; $i < 15; $i++) Factory::bid();\n for ($i = 0; $i < 15; $i++) Factory::question();\n for ($i = 0; $i < 10; $i++) Factory::vendor();\n for ($i = 0; $i < 40; $i++) Factory::section();\n\n for ($i = 0; $i < 20; $i++) Factory::project($project->id);\n for ($i = 0; $i < 40; $i++) Factory::bid(array(), $project->id);\n\n }",
"public function index() {\n\t\treturn \"<a href='http://docs.ourworldindataorg.apiary.io/' target='_blank'>Please see documentation on how to use API</a>\";\n\t}",
"public function main()\n {\n // check if user logged if not redirect to login page.\n if(Session::logged() == NULL){\n header(\"location: /\" . ROOT . 'login');\n }\n // if logged only administrator with role owner or manager have access to administration page.\n else if(Session::logged()['role'] == 'manager' || Session::logged()['role'] == 'owner'){\n // creating administration page.\n\n $data = NULL;\n $p = new Page(\"Administration Page\");\n $p->setComponent(\"htmlAdministrator.php\", $data);\n $p->addCss(\"administrator.css\");\n $p->addJs('administrator.js');\n $p->dumpView();\n }\n // not owner or manager trying access to administrator page, redirect to school page.\n else{\n header(\"location: /\" . ROOT . 'school');\n }\n }",
"function page_sites() {\n global $user;\n global $xtpl;\n \n if ($user == NULL) {\n user_login_form('my/sites');\n return;\n }\n \n user_header();\n page_nav();\n \n if (isset($user['rp'])) {\n $user_rps =& $user['rp'];\n } else {\n $user_rps = array();\n }\n \n if (isset($_POST['tk'])) {\n if (!validate_form_token($_POST['tk'], 'autorelease')) {\n set_message('SimpleID detected a potential security attack. Please try again.');\n } else {\n if (isset($_POST['autorelease'])) {\n foreach ($_POST['autorelease'] as $realm => $autorelease) {\n if (isset($user_rps[$realm])) {\n $user_rps[$realm]['auto_release'] = ($autorelease) ? 1 : 0;\n }\n }\n }\n \n if (isset($_POST['remove'])) {\n foreach ($_POST['remove'] as $realm => $autorelease) {\n if (isset($user_rps[$realm])) {\n unset($user_rps[$realm]);\n }\n }\n }\n \n if (isset($_POST['update-all'])) {\n foreach ($user_rps as $realm => $values) {\n $user_rps[$realm]['auto_release'] = (isset($_POST['autorelease'][$realm]) && $_POST['autorelease'][$realm]) ? 1 : 0;\n }\n }\n \n user_save($user);\n \n set_message('Your preferences have been saved.');\n }\n }\n \n if ($user_rps) {\n foreach ($user_rps as $realm => $rp) {\n $xtpl->assign('realm', htmlspecialchars($rp['realm'], ENT_QUOTES, 'UTF-8'));\n $xtpl->assign('last_time', htmlspecialchars($rp['last_time'], ENT_QUOTES, 'UTF-8'));\n $xtpl->assign('last_time_formatted', htmlspecialchars(strftime(SIMPLEID_DATE_TIME_FORMAT, $rp['last_time']), ENT_QUOTES, 'UTF-8'));\n $xtpl->assign('auto_release', (isset($rp['auto_release']) && $rp['auto_release']) ? 'checked=\"checked\"' : '');\n \n if (SIMPLEID_VERIFY_RETURN_URL_USING_REALM) {\n // $rp_info would usually expire by now, so we allow for stale results to be retrieved to improve performance\n $rp_info = simpleid_get_rp_info($realm, TRUE);\n if (!isset($rp_info['return_to_verified']) || !$rp_info['return_to_verified']) $xtpl->assign('realm_class', 'return-to-suspect');\n }\n \n $xtpl->parse('main.sites.realm');\n }\n }\n \n if (!$user_rps || (count($user_rps) == 0)) {\n $xtpl->assign('disabled', 'disabled=\"disabled\"');\n }\n \n $xtpl->assign('token', get_form_token('autorelease'));\n \n $xtpl->parse('main.sites');\n \n $xtpl->assign('title', 'My Sites');\n $xtpl->assign('javascript', '<script src=\"' . get_base_path() . 'html/openid-consent.js\" type=\"text/javascript\"></script>');\n $xtpl->parse('main');\n $xtpl->out('main');\n}",
"public function index()\n {\n \t$this->validate_input();\n \t\n \t//something is busted, so bounce\n \tif($this->response['status'] == 'Error')\n \t{ \t\t\n \t\t$this->send_response($this->response,$this->resp);\n \t\treturn;\n \t}\n\n \t//find the incident id that corresponds to the IVR code we have\n \t$incident_id = $this->get_incident_id();\n\n\t\t//update the well status\n\t\t$ivr_data = ORM::factory(\"ivrapi_data\");\n\t\t\n\t\t$ivr_data->incident_id = $incident_id;\n\t\t$ivr_data->ivr_code = $this->form_answers['ivrcode'];\n\t\tif(isset($this->form_answers['filename']))\n\t\t{\n\t\t\t$ivr_data->file_name = $this->form_answers['filename'];\n\t\t}\n\t\t$ivr_data->phone_number = $this->form_answers['phonenumber'];\n\t\tif(isset($this->form_answers['mechanicknow']))\n\t\t{\n\t\t\t$ivr_data->mechanic_aware = $this->form_answers['mechanicknow'] == 'yes' ? 1 : 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$ivr_data->mechanic_aware = 2;\n\t\t}\n\t\tif(isset($this->form_answers['mechanicfix']))\n\t\t{\n\t\t\t$ivr_data->can_fix = $this->form_answers['mechanicfix'] == 'yes' ? 1 : 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$ivr_data->can_fix = 2;\n\t\t}\n\t\t$ivr_data->well_working = $this->form_answers['wellwork'] == 'yes' ? 1 : 0;\n\t\t//$ivr_data->time_received = date(\"Y-m-d H:i:s\"); //this never stores the right date in the DB, don't know why\n\t\t$ivr_data->save();\n\t\t\n\t\t\n\t\t//update the category this well falls under\n\t\t$this->update_categories($incident_id, $ivr_data);\n\t\t\n\t\t//update the incident modifed date\n\t\t$this->update_incident_date($incident_id);\n\t\t\n\t\t$this->send_response($this->response,$this->resp);\n \t}",
"function stateMachine() {\n\t\tif ($_SESSION['order_condition'] == 'RW') {\n\t\t\tswitch($_SESSION['state']) {\n\t\t\t\tcase \"START\":\t\n\t\t\t\t\t$_SESSION['section_order'] = 1;\n\t\t\t\t\t$_SESSION['section_total'] = 27;\n\t\t\t\t\tstateTransition('pages/ethics.html', 'DEMOGRAPHICS');\n\t\t\t\t\t//stateTransition('pages/ethics.html', 'END');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"DEMOGRAPHICS\":\n\t\t\t\t\tstateTransition('pages/demographics.html', 'INSTR_EXPOSURE1');\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase \"INSTR_EXPOSURE1\":\n\t\t\t\t\tstateTransition('pages/before_exposure.html', 'EXPOSURE1');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"EXPOSURE1\":\n\t\t\t\t\tstateTransition('pages/learn_words.html', 'INSTR_SCRIPT');\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase \"INSTR_SCRIPT\":\n\t\t\t\t\tstateTransition('pages/before_learn_letters.html', 'SCRIPT');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"SCRIPT\":\n\t\t\t\t\tstateTransition('pages/learn_letters.html', 'INSTR_R_TR1');\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\tcase \"INSTR_R_TR1\":\n\t\t\t\t\tstateTransition('pages/before_reading_practice.html', 'R_TR1');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"R_TR1\":\n\t\t\t\t\tstateTransition('pages/reading.html', 'INSTR_W_TR1');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"INSTR_W_TR1\":\n\t\t\t\t\tstateTransition('pages/before_writing_practice.html', 'W_TR1');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"W_TR1\":\n\t\t\t\t\tstateTransition('pages/writing.html', 'INSTR_EXPOSURE2');\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase \"INSTR_EXPOSURE2\":\n\t\t\t\t\tstateTransition('pages/before_exposure.html', 'EXPOSURE2');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"EXPOSURE2\":\n\t\t\t\t\tstateTransition('pages/learn_words.html', 'INSTR_R_TR2');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"INSTR_R_TR2\":\n\t\t\t\t\tstateTransition('pages/before_reading_practice.html', 'R_TR2');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"R_TR2\":\n\t\t\t\t\tstateTransition('pages/reading.html', 'INSTR_W_TR2');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"INSTR_W_TR2\":\n\t\t\t\t\tstateTransition('pages/before_writing_practice.html', 'W_TR2');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"W_TR2\":\n\t\t\t\t\tstateTransition('pages/writing.html', 'INSTR_EXPOSURE3');\n\t\t\t\t\tbreak;\t\n\t\t\t\t\t\n\t\t\t\tcase \"INSTR_EXPOSURE3\":\n\t\t\t\t\tstateTransition('pages/before_exposure.html', 'EXPOSURE3');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"EXPOSURE3\":\n\t\t\t\t\tstateTransition('pages/learn_words.html', 'INSTR_R_TR3');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"INSTR_R_TR3\":\n\t\t\t\t\tstateTransition('pages/before_reading_practice.html', 'R_TR3');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"R_TR3\":\n\t\t\t\t\tstateTransition('pages/reading.html', 'INSTR_W_TR3');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"INSTR_W_TR3\":\n\t\t\t\t\tstateTransition('pages/before_writing_practice.html', 'W_TR3');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"W_TR3\":\n\t\t\t\t\tstateTransition('pages/writing.html', 'INSTR_R_TEST');\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase \"INSTR_R_TEST\":\n\t\t\t\t\tstateTransition('pages/before_reading_test.html', 'R_TEST');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"R_TEST\":\n\t\t\t\t\tstateTransition('pages/reading.html', 'INSTR_W_TEST');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"INSTR_W_TEST\":\n\t\t\t\t\tstateTransition('pages/before_writing_test.html', 'W_TEST');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"W_TEST\":\n\t\t\t\t\tstateTransition('pages/writing.html', 'QUESTIONNAIRE');\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase \"QUESTIONNAIRE\":\n\t\t\t\t\tstateTransition('pages/questionnaire.html', 'END');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"END\":\n\t\t\t\t\tstateTransition('pages/end.html', 'END');\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t} else {\n\t\t\tswitch($_SESSION['state']) {\n\t\t\t\tcase \"START\":\t\n\t\t\t\t\t$_SESSION['section_order'] = 1;\n\t\t\t\t\t$_SESSION['section_total'] = 27;\n\t\t\t\t\tstateTransition('pages/ethics.html', 'DEMOGRAPHICS');\n\t\t\t\t\t//stateTransition('pages/ethics.html', 'END');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"DEMOGRAPHICS\":\n\t\t\t\t\tstateTransition('pages/demographics.html', 'INSTR_EXPOSURE1');\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase \"INSTR_EXPOSURE1\":\n\t\t\t\t\tstateTransition('pages/before_exposure.html', 'EXPOSURE1');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"EXPOSURE1\":\n\t\t\t\t\tstateTransition('pages/learn_words.html', 'INSTR_SCRIPT');\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase \"INSTR_SCRIPT\":\n\t\t\t\t\tstateTransition('pages/before_learn_letters.html', 'SCRIPT');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"SCRIPT\":\n\t\t\t\t\tstateTransition('pages/learn_letters.html', 'INSTR_W_TR1');\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase \"INSTR_W_TR1\":\n\t\t\t\t\tstateTransition('pages/before_writing_practice.html', 'W_TR1');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"W_TR1\":\n\t\t\t\t\tstateTransition('pages/writing.html', 'INSTR_R_TR1');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"INSTR_R_TR1\":\n\t\t\t\t\tstateTransition('pages/before_reading_practice.html', 'R_TR1');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"R_TR1\":\n\t\t\t\t\tstateTransition('pages/reading.html', 'INSTR_EXPOSURE2');\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase \"INSTR_EXPOSURE2\":\n\t\t\t\t\tstateTransition('pages/before_exposure.html', 'EXPOSURE2');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"EXPOSURE2\":\n\t\t\t\t\tstateTransition('pages/learn_words.html', 'INSTR_W_TR2');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"INSTR_W_TR2\":\n\t\t\t\t\tstateTransition('pages/before_writing_practice.html', 'W_TR2');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"W_TR2\":\n\t\t\t\t\tstateTransition('pages/writing.html', 'INSTR_R_TR2');\n\t\t\t\t\tbreak;\t\n\t\t\t\tcase \"INSTR_R_TR2\":\n\t\t\t\t\tstateTransition('pages/before_reading_practice.html', 'R_TR2');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"R_TR2\":\n\t\t\t\t\tstateTransition('pages/reading.html', 'INSTR_EXPOSURE3');\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase \"INSTR_EXPOSURE3\":\n\t\t\t\t\tstateTransition('pages/before_exposure.html', 'EXPOSURE3');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"EXPOSURE3\":\n\t\t\t\t\tstateTransition('pages/learn_words.html', 'INSTR_W_TR3');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"INSTR_W_TR3\":\n\t\t\t\t\tstateTransition('pages/before_writing_practice.html', 'W_TR3');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"W_TR3\":\n\t\t\t\t\tstateTransition('pages/writing.html', 'INSTR_R_TR3');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"INSTR_R_TR3\":\n\t\t\t\t\tstateTransition('pages/before_reading_practice.html', 'R_TR3');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"R_TR3\":\n\t\t\t\t\tstateTransition('pages/reading.html', 'INSTR_W_TEST');\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\tcase \"INSTR_W_TEST\":\n\t\t\t\t\tstateTransition('pages/before_writing_test.html', 'W_TEST');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"W_TEST\":\n\t\t\t\t\tstateTransition('pages/writing.html', 'INSTR_R_TEST');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"INSTR_R_TEST\":\n\t\t\t\t\tstateTransition('pages/before_reading_test.html', 'R_TEST');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"R_TEST\":\n\t\t\t\t\tstateTransition('pages/reading.html', 'QUESTIONNAIRE');\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tcase \"QUESTIONNAIRE\":\n\t\t\t\t\tstateTransition('pages/questionnaire.html', 'END');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"END\":\n\t\t\t\t\tstateTransition('pages/end.html', 'END');\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\t// switch end\n\t\t}\t// condition end\n\t}",
"public function wordEngine(){\n $getSomeWords = $this->getSomeWords();\n if(!$getSomeWords['status']){\n return $getSomeWords;\n }\n $words = $getSomeWords['body'];\n $result = $this->matrixMaker($words);\n $matrix = $result['matrix'];\n $info = $result['info'];\n return ['status'=>1, 'words'=>$words, 'matrix'=>$matrix, 'info'=>$info];\n }",
"public function run()\n {\n $this->createPlanWithIntervalAlternatives([\n 'name' => 'Basic',\n 'amount' => 10,\n 'currency' => 'USD',\n 'uuid' => str_random(36),\n 'features' => [\"Drag & Drop Builder\", \"500MB Storage\", \"Code Editors\", \"No Ads\", \"Free Subdomain\"],\n 'permissions' => ['editors.enable' => 1],\n 'position' => 1,\n ]);\n\n $this->createPlanWithIntervalAlternatives([\n 'name' => 'Standard',\n 'amount' => 15,\n 'currency' => 'USD',\n 'uuid' => str_random(36),\n 'features' => [\"Drag & Drop Builder\", \"500MB Storage\", \"Code Editors\", \"No Ads\", \"Free Subdomain\", \"Download Projects\"],\n 'permissions' => ['editors.enable' => 1, \"projects.download\" => 1],\n 'recommended' => 1,\n 'position' => 2,\n ]);\n\n $this->createPlanWithIntervalAlternatives([\n 'name' => 'Pro',\n 'amount' => 25,\n 'currency' => 'USD',\n 'uuid' => str_random(36),\n 'features' => [\"Drag & Drop Builder\", \"2GB Storage\", \"Code Editors\", \"No Ads\", \"Free Subdomain\", \"Export Projects to FTP\", \"Priority Support\"],\n 'permissions' => ['editors.enable' => 1, \"projects.download\" => 1, 'projects.export' => 1],\n 'position' => 3,\n ]);\n }",
"public function run()\n {\n $growthPlan = [\n [\n 'plan_id' => 2,\n 'paid_permission_id' => 1, // Read Content\n ],\n [\n 'plan_id' => 2,\n 'paid_permission_id' => 2, // TrustSpot Review\n ],\n [\n 'plan_id' => 2,\n 'paid_permission_id' => 3, //Email Customization\n ],\n [\n 'plan_id' => 2,\n 'paid_permission_id' => 4, //Referral Program\n ],\n [\n 'plan_id' => 2,\n 'paid_permission_id' => 5, //Import Existing Customers\n ],\n [\n 'plan_id' => 2,\n 'paid_permission_id' => 6, //Integrations\n ],\n [\n 'plan_id' => 2,\n 'paid_permission_id' => 7, //Rewards Link\n ],\n [\n 'plan_id' => 2,\n 'paid_permission_id' => 8, //Customer Segmentation\n ],\n [\n 'plan_id' => 2,\n 'paid_permission_id' => 9, //Earning Limits\n ],\n [\n 'plan_id' => 2,\n 'paid_permission_id' => 10, //Remove Lootly Branding\n ],\n [\n 'plan_id' => 2,\n 'paid_permission_id' => 11, //Remove Lootly Branding for Email\n ],\n [\n 'plan_id' => 2,\n 'paid_permission_id' => 12, //Email Earning Customization\n ],\n [\n 'plan_id' => 2,\n 'paid_permission_id' => 13, //Email Spending Customization\n ],\n [\n 'plan_id' => 2,\n 'paid_permission_id' => 27, //Earning Limits\n ],\n ];\n\n $unlimatePlan = [\n [\n 'plan_id' => 3,\n 'paid_permission_id' => 14, //Employee Access\n ],\n [\n 'plan_id' => 3,\n 'paid_permission_id' => 15, //Advanced Customization\n ],\n [\n 'plan_id' => 3,\n 'paid_permission_id' => 16, //Advanced Earning Customization\n ],\n [\n 'plan_id' => 3,\n 'paid_permission_id' => 17, //Advanced Spending Customization\n ],\n [\n 'plan_id' => 3,\n 'paid_permission_id' => 18, //Advanced Referral Customization\n ],\n [\n 'plan_id' => 3,\n 'paid_permission_id' => 19, //Advanced Tab Customization\n ],\n [\n 'plan_id' => 3,\n 'paid_permission_id' => 20, //VIP Program\n ],\n [\n 'plan_id' => 3,\n 'paid_permission_id' => 21, //Rewards Page\n ],\n [\n 'plan_id' => 3,\n 'paid_permission_id' => 22, //Variable Discount Coupons\n ],\n [\n 'plan_id' => 3,\n 'paid_permission_id' => 23, //Insights & Reports\n ],\n [\n 'plan_id' => 3,\n 'paid_permission_id' => 24, //HTML Editor\n ],\n [\n 'plan_id' => 3,\n 'paid_permission_id' => 25, //Points Expiration\n ],\n ];\n $unlimatePlan = array_merge($unlimatePlan, $this->changePlanId($growthPlan, 3));\n\n $enteprisePlan = [\n [\n 'plan_id' => 4,\n 'paid_permission_id' => 26, //Custom Domain\n ],\n ];\n $enteprisePlan = array_merge($enteprisePlan, $this->changePlanId($unlimatePlan, 4));\n\n \\DB::table('plans_permissions')->delete();\n \\DB::table('plans_permissions')->insert(array_merge($growthPlan, $unlimatePlan, $enteprisePlan));\n }",
"public function index()\n {\n // $url = \"https://www.wikidata.org/w/api.php?action=wbgetentities&format=json&props=sitelinks&ids=Q7813925\";\n \n\t\t// $result = $this->conn($url);\n\t\t// $result = json_decode($result, true);\n\t\t// $title = $result['entities']['Q7813925']['sitelinks']['jawiki']['title'];\n\t\t// $title = urlencode($title);\n\n\t\t// // get wiki description from title\n\t\t// $url = 'https://ja.wikipedia.org/w/api.php?action=query&prop=extracts|info|pageimages&exintro&titles=' . $title . '&format=json&explaintext&redirects&inprop=url&indexpageids&pithumbsize=100';\n\t\t// $result = $this->conn($url);\n\t\t// $result = json_decode($result, true);\n\t\t// $page_id = $result['query']['pageids'][0];\n\t\t// $description = trim($result['query']['pages'][$page_id]['extract']);\n\t\t// $image = $result['query']['pages'][$page_id]['thumbnail']['source'];\n\n\t\t// $url = \"https://www.wikidata.org/w/api.php?action=wbgetentities&format=json&props=sitelinks&ids=Q11495784\";\n\t\t// $url = 'http://ja.wikipedia.org/w/api.php?action=query&titles=%E6%88%90%E8%A6%9A%E5%AF%BA&prop=pageimages&format=json&pithumbsize=100';\n // $url = 'https://ja.wikipedia.org/w/api.php?action=query&prop=extracts|info&exintro&titles=%E6%88%90%E8%A6%9A%E5%AF%BA&format=json&explaintext&redirects&inprop=url&indexpageids';\n\n // $url = \"https://newsapi.org/v2/top-headlines?country=jp&apiKey=928c652396c14f0294eefcb7b07c23ce\";\n // $result = $this->conn($url);\n // $result = json_decode($result, true);\n // $articles = $result['articles'];\n\n // // $this->debug($articles);\n // $this->page_data['articles'] = $articles;\n\n echo view('main/main', $this->pageData);\n }",
"public function run()\n {\n //1 IT\n DB::table('objectives')->insert([\n 'body'=> \"We Identify and Meet Community Needs\",\n 'goal_id' => 1\n ]);\n\n //2 IT\n DB::table('objectives')->insert([\n 'body'=>\"We Reduce barriers to accessing library services\",\n 'goal_id' => 1\n ]);\n\n //3 IT\n DB::table('objectives')->insert([\n 'body'=>\"Expedite our booking process\",\n 'goal_id' => 2\n ]);\n\n //4 IT\n DB::table('objectives')->insert([\n 'body'=>\"EPL has defined and created a digital public space in collaboration with community and partners\",\n 'goal_id' => 3\n ]);\n\n //5 IT\n DB::table('objectives')->insert([\n 'body'=>\"Act as a catalyst for learning, discovery and creating\",\n 'goal_id' => 3\n ]);\n\n //6 IT\n DB::table('objectives')->insert([\n 'body'=>\"EPL is a staff of learners confident in their abilities to assist customers\",\n 'goal_id' => 3\n ]);\n\n //7 IT\n DB::table('objectives')->insert([\n 'body'=>\"We have transformed our approach to service delivery and use of physical space\",\n 'goal_id' => 4\n ]);\n\n //8 Events team\n DB::table('objectives')->insert([\n 'body'=> \"Together with our community we provide successful, meaningful services that are highly rated and heavily used.\",\n 'goal_id' => 1\n ]);\n\n //9 Events team\n DB::table('objectives')->insert([\n 'body'=>\"Online services are highly used and valued\",\n 'goal_id' => 2\n ]);\n\n //10 Events team\n DB::table('objectives')->insert([\n 'body'=>\"Edmontonians view EPL as integral to their lifelong formal and informal learning\",\n 'goal_id' => 3\n ]);\n\n //11 Events team\n DB::table('objectives')->insert([\n 'body'=>\"There are established partnerships to support programs and services\",\n 'goal_id' => 4\n ]);\n\n //12 Events team\n DB::table('objectives')->insert([\n 'body'=>\"We have a vibrant fund development with increase donor diversity, and increased value of donations and sponsorships.\",\n 'goal_id' => 4\n ]);\n\n //13 Events team\n DB::table('objectives')->insert([\n 'body'=>\"Create a framework to intice high end speakers to come to EPL at no or reduced cost.\",\n 'goal_id' => 5\n ]);\n }",
"function build() {\n\t\t$localIndex = index();\n\t\tarsort($localIndex);\n\t\tob_start();\n?>\n\t\t\t<div style=\"width:600px;\">\n\t\t\t\t<h1>hypha builder</h1>\n\t\t\t\tHere you can compose your own hypha system.\n\t\t\t\t<ol>\n\t\t\t\t\t<li>First you have to enter a name and password for the so called 'superuser' account.</li>\n\t\t\t\t\t<li>Then you can select a number of modules for different data types you want to incorporate in your hypha system.</li>\n\t\t\t\t\t<li>When you click 'build' your superuser account and selection of modules will be packed into one php file ('hypha.php') which is offered for download.</li>\n\t\t\t\t\t<li>Upload the downloaded file into a webdirectory on your server and make shure php has write access to the folder. Open the file in a browser. You will be asked to login as superuser and after setting up some variables hypha will be installed.</li>\n\t\t\t\t</ol>\n\t\t\t</div>\n\t\t\t<table class=\"section\">\n\t\t\t\t<tr><th style=\"text-align:right; white-space:nowrap;\">superuser name:</th><td><input id=\"username\" name=\"username\" type=\"text\" /></td></tr>\n\t\t\t\t<tr><th style=\"text-align:right; white-space:nowrap;\">superuser password:</th><td><input name=\"password\" type=\"password\" /></td></tr>\n\t\t\t\t<tr name=\"datatype\">\n\t\t\t\t\t<th style=\"text-align:right; white-space:nowrap;\">modules to include:</th><td>\n<?php\n\t\tforeach ($localIndex as $file => $timestamp) {\n\t\t\tif (substr($file, 0, 17) == 'system/datatypes/') {\n\t\t\t\t$name = substr($file, 17, -4);\n\t\t\t\tif ($name!='settings') echo '<input type=\"checkbox\" name=\"build_'.substr($file,0,-4).'\"'.($name == 'text' ? ' checked=\"checked\"' : '').' /> '.$name.'<br/>'.\"\\n\";\n\t\t\t}\n\t\t}\n?>\n\t\t\t\t</td></tr>\n\t\t\t\t<tr name=\"language\">\n\t\t\t\t\t<th style=\"text-align:right; white-space:nowrap;\">languages to include:</th><td>\n<?php\n\t\tforeach ($localIndex as $file => $timestamp) {\n\t\t\tif (substr($file, 0, 17) == 'system/languages/' && substr($file, -4) == '.php') {\n\t\t\t\t$name = substr($file, 17, -4);\n\t\t\t\techo '<input type=\"checkbox\" name=\"build_'.substr($file,0,-4).'\"'.($name == 'en' ? ' checked=\"checked\"' : '').' /> '.$name.'<br/>'.\"\\n\";\n\t\t\t}\n\t\t}\n?>\n\t\t\t\t</td></tr>\n\t\t\t\t<tr><td colspan=\"2\" style=\"text-align:right;\"><input type=\"submit\" id=\"gobutton\" name=\"command\" value=\"build\"></td></tr>\n\t\t\t</table>\n<?php\n\t\treturn ob_get_clean();\n\t}",
"public function run()\n {\n\n $data = [\n [\n 'title' \t\t=> 'Node JS: Advanced Concepts',\n 'slug' \t\t\t=> str_slug('Node JS: Advanced Concepts'),\n 'description' \t=> 'Get advanced with Node.Js! Learn caching with Redis, speed up through clustering, and add image upload with S3 and Node!',\n 'category_id' \t=> '1',\n 'author_id' \t=> '1',\n \n ],\n [\n 'title' \t\t=> 'Learn and Understand AngularJS',\n 'slug' \t\t\t=> str_slug('Learn and Understand AngularJS'),\n 'description' \t=> 'Master AngularJS and the Javascript concepts behind it, design custom directives, and build a single page application.',\n 'category_id' \t=> '1',\n 'author_id' \t=> '1',\n \n ],\n [\n 'title' \t\t=> 'I want to connect my Xamarin Forms app to REST API',\n 'slug' \t\t\t=> str_slug('I want to connect my Xamarin Forms app to REST API'),\n 'description' \t=> 'In less than 3hours, learn how to create a REST API with ASP.NET Core and call it from Xamarin Forms app (iOS & Android)',\n 'category_id' \t=> '2',\n 'author_id' \t=> '1',\n \n ],\n [\n 'title' \t\t=> 'Mastering Ansible',\n 'slug' \t\t\t=> str_slug('Mastering Ansible'),\n 'description' \t=> 'Exploit the power of Ansible to expedite scalable orchestration, DevOps, and automation',\n 'category_id' \t=> '3',\n 'author_id' \t=> '1',\n \n ],\n [\n 'title' \t\t=> 'The Ultimate Guide to Cinematography with Unity',\n 'slug' \t\t\t=> str_slug('The Ultimate Guide to Cinematography with Unity'),\n 'description' \t=> 'Created in partnership with Unity Technologies: Master Timeline, Cinemachine, & C#. Develop a stealth adventure game!',\n 'category_id' \t=> '4',\n 'author_id' \t=> '1',\n \n ],\n ];\n\n foreach ($data as $key => $value) {\n DB::table(\"courses\")->insert($value);\n }\n\n }",
"public function indexAction() {\n\t$vocab = array(\n\t\t'activities', 'periods', 'cultures',\n\t\t'denominations', 'rulers', 'surfaces',\n\t\t'mints', 'objects', 'manufactures',\n\t\t'workflows', 'notes', 'methods',\n\t\t'preservations');\n\t$base = $this->view->serverUrl() . '/database/terminology/';\n\t$vocab3 = sort($vocab);\n\t$vocab2 = NULL;\n\tforeach($vocab as $v){\n\t\t$vocab2[] = array(\n\t\t'type' => $v,\n\t\t'html' => $base . $v,\n\t\t'xml' => $base . $v . '/format/xml',\n\t\t'json' => $base . $v . '/format/json');\n\t}\n\t$this->view->vocabularies = $vocab2;\n\t}",
"public function main() {\r\n // Access check!\r\n // The page will show only if there is a valid page and if this page may be viewed by the user\r\n $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id, $this->perms_clause);\r\n $access = is_array($this->pageinfo) ? 1 : 0;\r\n\r\n if (($this->id && $access) || ($GLOBALS['BE_USER']->user['admin'] && !$this->id)) {\r\n\r\n // Draw the header.\r\n $this->doc = t3lib_div::makeInstance('bigDoc');\r\n $this->doc->getPageRenderer()->addCssFile(t3lib_extMgm::extRelPath('medbootstraptools').'res/css/bemodul.css'); \r\n $this->doc->getPageRenderer()->addCssFile(t3lib_extMgm::extRelPath('medbootstraptools').'res/bootstrap/css/bootstrap.min.css'); \r\n $this->doc->backPath = $GLOBALS['BACK_PATH'];\r\n $this->doc->form = '<form action=\"\" method=\"post\" enctype=\"multipart/form-data\">';\r\n\r\n // JavaScript\r\n $this->doc->JScode = '\r\n <script src=\"../typo3conf/ext/medbootstraptools/res/js/jquery-1.8.3.min.js\"></script>\r\n <script src=\"../typo3conf/ext/medbootstraptools/res/js/functions.js\"></script>\r\n <script language=\"javascript\" type=\"text/javascript\">\r\n script_ended = 0;\r\n function jumpToUrl(URL) {\r\n document.location = URL;\r\n }\r\n </script>\r\n ';\r\n $this->doc->postCode = '\r\n <script language=\"javascript\" type=\"text/javascript\">\r\n script_ended = 1;\r\n if (top.fsMod) top.fsMod.recentIds[\"web\"] = 0;\r\n </script>\r\n ';\r\n\r\n $headerSection = $this->doc->getHeader('pages', $this->pageinfo, $this->pageinfo['_thePath']) . '<br />'\r\n . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.path') . ': ' . t3lib_div::fixed_lgd_cs($this->pageinfo['_thePath'], -50);\r\n\r\n $this->content .= $this->doc->startPage($GLOBALS['LANG']->getLL('title'));\r\n //$this->content .= $this->doc->header($GLOBALS['LANG']->getLL('title'));\r\n //$this->content .= $this->doc->spacer(5);\r\n //$this->content .= $this->doc->section('', $this->doc->funcMenu($headerSection, t3lib_BEfunc::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function'])));\r\n //$this->content .= $this->doc->divider(5);\r\n // Render content:\r\n $this->moduleContent();\r\n\r\n // Shortcut\r\n if ($GLOBALS['BE_USER']->mayMakeShortcut()) {\r\n $this->content .= $this->doc->spacer(20) . $this->doc->section('', $this->doc->makeShortcutIcon('id', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']));\r\n }\r\n\r\n $this->content .= $this->doc->spacer(10);\r\n } else {\r\n // If no access or if ID == zero\r\n\r\n $this->doc = t3lib_div::makeInstance('bigDoc');\r\n $this->doc->backPath = $GLOBALS['BACK_PATH'];\r\n\r\n $this->content .= $this->doc->startPage($GLOBALS['LANG']->getLL('title'));\r\n $this->content .= $this->doc->header($GLOBALS['LANG']->getLL('title'));\r\n $this->content .= $this->doc->spacer(5);\r\n $this->content .= $this->doc->spacer(10);\r\n }\r\n }",
"public static function main()\n {\n self::initConfig(); \n \n /* Configuracion de manejo de error y Locale */\n self::initEnvironmet();\n \n /* Inicializa Layout */\n self::initLayout();\n \n /* Base de Datos*/\n self::initDataBase();\n \n /*Lenjuaje*/\n self::initLanguaje();\n \n /* Front Controller y Dispatch */\n /*Agregar cualquier otra función antes de esta*/\n self::initFrontController();\n \n \n }",
"function go(){\n\t\tglobal $kind;\n\t\n\t\tif($kind>=0&&$kind<=2){\n\t\t\t\tdiagram_role($kind);\t\t\n\t\t}else if($kind>2&&$kind<6){\n\t\t\t\tdiagram_program($kind);\t\t\t\t\n\t\t}else if($kind>=6&&$kind<8){\n\t\t\t\tdiagram_commits($kind);\n\t\t}else if($kind>=8&&$kind<9){\n\t\t\t\tdiagram_git($kind);\n\t\t}else if($kind>=9&&$kind<11){\n\t\t\t\tdiagram_itemized($kind);\n\t\t}else if($kind>=11&&$kind<12){\n\t\t\t\tdiagram_loc($kind);\n\t\t}else if($kind>=12&&$kind<14){\n\t\t\t\tdiagram_locY($kind);\n\t\t}\n}",
"public function run()\n {\n $curriculos = 30;\n \n $disciplinasLicenciaturas = 150;\n $disciplinasLicenciaturasEquivalentes = 300;\n \n $disciplinasObrigatorias = 300;\n $disciplinasObrigatoriasEquivalentes = 600;\n \n $disciplinasOptativasEletivas = 150;\n\n echo \"Creating $curriculos Currículos...\\n\";\n factory(App\\Curriculo::class, $curriculos)->create();\n\n echo \"Creating $disciplinasLicenciaturas Disciplinas Licenciaturas...\\n\";\n factory(App\\DisciplinasLicenciatura::class, $disciplinasLicenciaturas)->create();\n\n echo \"Creating $disciplinasLicenciaturasEquivalentes Disciplinas Licenciaturas Equivalentes...\\n\";\n factory(App\\DisciplinasLicenciaturasEquivalente::class, $disciplinasLicenciaturasEquivalentes)->create();\n\n echo \"Creating $disciplinasObrigatorias Disciplinas Obrigatórias...\\n\";\n factory(App\\DisciplinasObrigatoria::class, $disciplinasObrigatorias)->create();\n\n echo \"Creating $disciplinasObrigatoriasEquivalentes Disciplinas Obrigatórias Equivalentes...\\n\";\n factory(App\\DisciplinasObrigatoriasEquivalente::class, $disciplinasObrigatoriasEquivalentes)->create();\n\n echo \"Creating $disciplinasOptativasEletivas Disciplinas Optativas Eletivas...\\n\";\n factory(App\\DisciplinasOptativasEletiva::class, $disciplinasOptativasEletivas)->create();\n }",
"function aurora_borealis() {\n\t$chosen = steamed_hams_get_lyric();\n\techo \"<p id='seymour'>$chosen</p>\";\n}",
"public function run()\n {\n //\n $super_admin = [\n 'super-delete' => true,\n 'super-add' => true,\n 'super-update' => true,\n 'super-view' => true,\n ];\n\n $agent_perms = [\n 'agent-delete' => true,\n 'agent-add' => true,\n 'agent-update' => true,\n 'agent-view' => true,\n ];\n\n $office_clerk = [\n 'data-capture-delete' => true,\n 'data-capture-add' => true,\n 'data-capture-update' => true,\n 'data-capture-view' => true,\n ];\n\n $claims_perms = [\n 'claims-clerk-delete' => true,\n 'claims-clerk-add' => true,\n 'claims-clerk-update' => true,\n 'claims-clerk-view' => true,\n ];\n\n $client_services = [\n 'client-services-delete' => true,\n 'client-services-add' => true,\n 'client-services-update' => true,\n 'client-services-view' => true,\n ];\n\n $it_manager_perms = [\n 'it-manager-delete' => true,\n 'it-manager-add' => true,\n 'it-manager-update' => true,\n 'it-manager-view' => true,\n ];\n\n $funeral_services_manager_perms = [\n 'funeral-services-manager-delete' => true,\n 'funeral-services-manager-add' => true,\n 'funeral-services-manager-update' => true,\n 'funeral-services-manager-view' => true,\n ];\n\n $supervisor_perms =[\n 'supervisor-delete' => true,\n 'supervisor-add' => true,\n 'supervisor-update' => true,\n 'supervisor-view' => true,\n ];\n\n $undertaker_perms =[\n 'undertaker-delete' => true,\n 'undertaker-add' => true,\n 'undertaker-update' => true,\n 'undertaker-view' => true,\n ];\n\n $premiums_accounting_perms =[\n 'premiums_accounting-delete' => true,\n 'premiums_accounting-add' => true,\n 'premiums_accounting-update' => true,\n 'premiums_accounting-view' => true,\n ];\n\n $super_user = Role::create([\n 'name' => 'app-admin',\n 'display_name'=>'Operations Manager',\n 'permissions' =>$super_admin,\n 'guard_name'=>'web'\n ]);\n\n $data_capturer = Role::create([\n 'name' => 'data-capturer',\n 'display_name'=>'Data Capturer',\n 'permissions' =>$office_clerk,\n 'guard_name'=>'web'\n ]);\n\n $premiums_accounting = Role::create([\n 'name' => 'premium-accounting-clerk',\n 'display_name'=>'FuneralPlan Accounting',\n 'permissions' =>$premiums_accounting_perms,\n 'guard_name'=>'web'\n ]);\n\n $claims_clerk = Role::create([\n 'name' => 'claims-clerk',\n 'display_name'=>'Claims Clerk',\n 'permissions' =>$claims_perms,\n 'guard_name'=>'web'\n ]);\n\n $client_servs = Role::create([\n 'name' => 'client-services',\n 'display_name'=>'Client Services',\n 'permissions' =>$client_services,\n 'guard_name'=>'web'\n ]);\n\n $agent = Role::create([\n 'name' => 'agent',\n 'display_name'=>'Agent',\n 'permissions' =>$agent_perms,\n 'guard_name'=>'web'\n ]);\n\n $it_manager = Role::create([\n 'name' => 'it-manager',\n 'display_name'=>'IT Manager',\n 'permissions' =>$it_manager_perms,\n 'guard_name'=>'web'\n ]);\n\n $supervisor = Role::create([\n 'name' => 'supervisor',\n 'display_name'=>'Supervisor',\n 'permissions' =>$supervisor_perms,\n 'guard_name'=>'web'\n ]);\n\n $undertaker = Role::create([\n 'name' => 'undertaker',\n 'display_name'=>'Undertaker',\n 'permissions' =>$undertaker_perms,\n 'guard_name'=>'web'\n ]);\n\n $funeral_services_manager = Role::create([\n 'name' => 'funaral-services-manager',\n 'display_name'=>'Funeral Services Manager',\n 'permissions' =>$funeral_services_manager_perms,\n 'guard_name'=>'web'\n ]);\n\n }",
"function radiology() {\n //\n // do not forget to update version\n //\n $this->author = 'Herman Tolentino MD';\n $this->version = \"0.2-\".date(\"Y-m-d\");\n $this->module = \"radiology\";\n $this->description = \"CHITS Module - Radiology\";\n\n }",
"public function concentrationWorkshop() {\n\t\t$pageTitle = 'Improving Concentration/Memory Workshop';\n\t\t// $stylesheet = '';\n\n\t\tinclude_once SYSTEM_PATH.'/view/header.php';\n\t\tinclude_once SYSTEM_PATH.'/view/academic-help/owsub-concentration.php';\n\t\tinclude_once SYSTEM_PATH.'/view/footer.php';\n\t}",
"public function run()\n {\n $general = new \\App\\General();\n $general->id = 1;\n $general->title = 'Program & Service Delivery';\n $general->body = 'Indonesia will include post-partum family planning services as part of its national childbirth insurance scheme. The country will broaden access and choice, especially in poorer regions, by strengthening public and private clinic services and provision of long-acting and permanent methods of family planning. Indonesia will improve 23,500 FP clinics between 2006 and 2014, and increase mobile family services in remote areas. '; \n $general->save();\n\n $general = new \\App\\General();\n $general->id = 2;\n $general->title = 'Financial';\n $general->body = 'The government commits to maintaining its investment in finances for family planning programs, which has increased from US $65.9 million in 2006 to US $263.7 million in 2012. The government has reallocated resources to the most densely populated provinces and districts where the TFR is high. They are also concentrating on the harder to reach populations in rural areas and smaller islands.'; \n $general->save();\n\n $general = new \\App\\General();\n $general->id = 3;\n $general->title = 'Policy & Political';\n $general->body = 'Indonesia is currently developing a national family planning and population strategy to improve quality of human resources and increase demand for family planning services. Indonesia will include family planning services and supplies free of charge throughout the country as part of its universal health coverage program, starting January 1st, 2014. The country is investing in South-South exchange to share experiences.'; \n $general->save();\n\n $general = new \\App\\General();\n $general->id = 4;\n $general->title = 'Objective';\n $general->body = 'Over half of Indonesia\\'s women of reproductive age are using contraception to plan their families, with strong political leadership and a national movement for reproductive health and family planning. This has helped improve economic growth and reduce poverty through the resulting demographic dividend.\n\n Key factors have been support from religious leaders, participation of the private sector and quality of care, and communications campaigns. The government right now provides free services to 7 of 33 provinces since 2010. \n\n Indonesia\\'s objective is to reduce TFR (note: the government-cited TFR at the time the commitment was 2.3 births per woman).'; \n $general->save();\n\n }",
"public function sq3rWorkshop() {\n\t\t$pageTitle = 'SQ3R Improving Reading Comprehension Workshop';\n\t\t// $stylesheet = '';\n\n\t\tinclude_once SYSTEM_PATH.'/view/header.php';\n\t\tinclude_once SYSTEM_PATH.'/view/academic-help/owsub-sq3r.php';\n\t\tinclude_once SYSTEM_PATH.'/view/footer.php';\n\t}",
"function main($content,$conf)\t{\r\n $this->conf=$conf;\r\n $this->pi_setPiVarDefaults();\r\n $this->pi_loadLL();\r\n $language = $GLOBALS['TSFE']->sys_language_uid;\r\n $GLOBALS[\"TSFE\"]->set_no_cache();\r\n $this->pi_USER_INT_obj=1;\t// Configuring so caching is not expected. This value means that no cHash params are ever set. We do this, because it's a USER_INT object!\r\n\r\n $mylanguage = language_iso_from_lang_id($this->cObj->data['sys_language_uid']);\r\n // Kuba ->\r\n\r\n // jQuery. \r\n $content .= file_get_contents('typo3conf/ext/iherbarium_observations/pi4/scripts.html');\r\n\r\n // <- Kuba\r\n\t\t\r\n traite_action();\r\n \r\n $numero_observation = desamorcer($_GET['numero_observation']);\r\n \r\n if($this->piVars['detail']) {\r\n $observation = explode('-', $this->piVars['detail']);\r\n $numero_observation = $observation[count($observation) - 1];\r\n if(intval($numero_observation)&&(!isUUID($this->piVars['detail']))) { // verify the parameter is not a uuid with last part as a good integer (but would not be a valid id)\r\n $rewriting = getRewriting($numero_observation, $language);\r\n if($rewriting) {\r\n $rewriting .= \"-\" . $numero_observation;\r\n if($rewriting != $this->piVars['detail']) {\r\n $redirect = explode($this->piVars['detail'], $_SERVER['REQUEST_URI']);\r\n header('Location: ' . t3lib_div::locationHeaderUrl($redirect[0] . $rewriting));\r\n }\r\n } else if(empty($rewriting)) {\r\n $rewriting .= $numero_observation;\r\n if($rewriting != $this->piVars['detail']) {\r\n $redirect = explode($this->piVars['detail'], $_SERVER['REQUEST_URI']);\r\n header('Location: ' . t3lib_div::locationHeaderUrl($redirect[0] . $rewriting));\r\n }\r\n }\r\n else {\r\n header('Location: ' . t3lib_div::locationHeaderUrl($this->pi_getPageLink(1)));\r\n }\r\n }\r\n // Numéro observation n'est pas un int\r\n else {\r\n\t$numero_ref = desamorcer($this->piVars['detail']);\r\n\t$sql_uuid=\"select idobs from iherba_observations where uuid_observation='$numero_ref' or uuid_specimen='$numero_ref'\";\r\n\t$result_uuid = mysql_query($sql_uuid) or die ('pb uuid');\r\n\t\r\n\tif(mysql_num_rows($result_uuid)>0)\r\n\t { // the uuid exist in the database\r\n\t $rowuid = mysql_fetch_assoc($result_uuid) ;\r\n\t $numero_observation = $rowuid[idobs];\r\n\t }\r\n\t else\r\n\t { //pas un int et pas un uuid existant\r\n\t header('Location: ' . t3lib_div::locationHeaderUrl($this->pi_getPageLink(1)));\r\n\t }\r\n\t \r\n }\r\n }\r\n\r\n if(!(ctype_digit($numero_observation)))\r\n { die();\r\n }\r\n \r\n\r\n $content.='<div id=\"bloc_contenu\"><h1>';\r\n $content.='<a href=\"https://twitter.com/share\" class=\"twitter-share-button \" data-lang=\"en\" data-count=\"none\" data-related=\"iHerbarium : Un botaniste dans votre smartphone\">Tweet</a>\r\n<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=\"//platform.twitter.com/widgets.js\";fjs.parentNode.insertBefore(js,fjs);}}(document,\"script\",\"twitter-wjs\");</script>';\r\n\r\n /* on récupère la visibilité de l'observation dont on souhaite avoir le détail,\r\n * si le propriétaire de cette observation la déclarée comme partiellement public (champ public\r\n * de la table iherba_observations à 'semi') alors la carte ne s'affichera pas dans le détail pour les autres membres du site */\r\n $sql_visibilite=\"select public,id_user from iherba_observations where idobs=$numero_observation\";\r\n $result_visibilite= mysql_query($sql_visibilite)or die ();\r\n $row_visibilite = mysql_fetch_assoc($result_visibilite);\r\n $visibilite=$row_visibilite[\"public\"];\r\n $iduser=$row_visibilite[\"id_user\"];//utilisateur qui a déposé cette observation\r\n\t \r\n $content.= get_string_language_sql(\"ws_observation_before_number\",$mylanguage).$numero_observation.\"\";\r\n\t\t\r\n $content.='</h1><div id=\"bloc_contenu_texte\">';\r\n\t\t \r\n /* Liste des dernières expertises faites sur la plante */\r\n $content.= affiche_expertise($numero_observation,$this,\"detail\",$demandenom);\r\n $montitre = affiche_expertise($numero_observation,$this,\"detail\",$demandenom,2);\r\n $libelle_roi_morphoexplication = desamorcer($montitre );\r\n \r\n //title header of the generated html\r\n $GLOBALS['TSFE']->content = preg_replace(\r\n '@<title>(.+):(.*)</title>@i',\r\n '<title> '.$montitre.' $1 $2</title>',\r\n\t$GLOBALS['TSFE']->content);\r\n\r\n\r\n /*Affichage des informations concernant l'observation */\r\n bd_connect();\r\n $sql=\"select date_depot,idobs,commentaires,address,longitude,latitude,uuid_observation,uuid_specimen,computed_date_seen_exif_or_smartphone from iherba_observations where idobs=$numero_observation\";\r\n $result = mysql_query($sql) or die ();\r\n \r\n if(! ($lobervation = mysql_fetch_assoc($result)))\r\n\treturn ; // no observation with this observation number\r\n\r\n if($demandenom>0)/// && ($GLOBALS['TSFE']->fe_user->user['uid']!=0)) everybody can give a name\r\n {\r\n\t\r\n\t$paramlien = array(numero_observation => $numero_observation,check=>456789);\r\n\t$link_text = get_string_language_sql(\"ws_give_a_plant_name\",$mylanguage);\r\n\t$content.= $this->pi_linkToPage($link_text,31,'',$paramlien);\r\n\t$content.=\" <br/><br/>\";\r\n }\r\n\t\t\r\n //$content.= codehtml_demande_morpho(\"0\",$this).\" <br/><br/>\";\r\n if(niveau_testeur($this)>0)\r\n {\r\n\t$content.=\"<br/>\";\r\n\t$content.=$this->pi_linkToPage(get_string_language_sql(\"ws_edit_roi_image\",$mylanguage),29,'',$paramlien);\r\n\t$content.=\"<br/><br/>\";\r\n\t\r\n\t// allow to \"moderate\" this observation\r\n\t$content.=codehtml_moderation($this,$numero_observation).\"<br/><br/>\";\t\r\n }\r\n\t\t\t\t\r\n if($lobervation[\"commentaires\"] !=\"\"){\r\n $content.= get_string_language_sql(\"ws_observation_comment\",$mylanguage) .\" \".$lobervation[\"commentaires\"].\"<br/><br/>\\n\";\r\n }\r\n if($lobervation[\"address\"] !=\"\"){\r\n $content.= get_string_language_sql(\"ws_observation_address\",$mylanguage) .\" \".$lobervation[\"address\"].\"<br/><br/>\\n\";\r\n }\r\n $nom_photo_final = array();\r\n $sql_photos=\"select id_obs,date_user,nom_photo_final from iherba_photos where id_obs=$numero_observation\";\r\n $result_photos = mysql_query($sql_photos) or die ();\r\n while ($row2 = mysql_fetch_assoc($result_photos)) {\r\n $date_user=$row2[\"date_user\"]; //date de la prise de l'observation\r\n $nom_photo_final[]=$row2[\"nom_photo_final\"];\r\n }\r\n \r\n //eventually, some medias video or sound\r\n $nom_media_final=array();\r\n $sql_media=\"select id_observation, date_depot, nom_media_final from iherba_medias where id_observation=$numero_observation \";\r\n $result_media = mysql_query($sql_media) or die ($sql_media);\r\n while ($row_media = mysql_fetch_assoc($result_media)) {\r\n $nom_media_final[]=$row_media[\"nom_media_final\"];\r\n }\r\n \r\n $date_uploaded = str_replace(\"-\",\"/\",$lobervation[\"date_depot\"]) ;\r\n $date_seen = $lobervation[\"computed_date_seen_exif_or_smartphone\"];\r\n\r\n if(($date_seen !=\"0000-00-00 00:00:00\")&&($date_seen !=\"\")&&($date_seen !=\"0\")){\r\n $content.= \"<br>\".get_string_language_sql(\"ws_seen_date_observation\",$mylanguage).\" \".str_replace(\"-\",\"/\",$date_seen).\"\\n\";\r\n }\r\n \r\n $content.= \"<br>\".get_string_language_sql(\"ws_upload_date_observation\",$mylanguage).\" \".$date_uploaded.\"<br/>\\n\";\r\n // Kuba ->\r\n\r\n if($GLOBALS['TSFE']->fe_user->user['uid'] == $iduser) { \r\n\t\t\r\n // Text\r\n $editButtonText = $this->pi_getLL('editButton', 'editButton', True);\r\n $deleteButtonText = $this->pi_getLL('deleteButton', 'deleteButton', True);\r\n $areYouSureText = $this->pi_getLL('deleteAreYouSure', 'deleteAreYouSure', True);\r\n\t\t \r\n // Edit Button\r\n $editLink = $this->pi_getPageLink('obsedit', '', array('obsId' => $numero_observation, 'obsAction' => 'edit'));\r\n $content .= '<form id=\"editForm\" method=\"post\" action=\"' . $editLink . '\">';\r\n $content .= '<input id=\"editLink\" type=\"submit\" value=\"' . $editButtonText . '\" />';\r\n //$content.= '<script>$(\"#editLink\").button({label : \"' . $editButtonText . '\"});</script>';\r\n $content .= '</form>';\r\n\t\t \r\n // Delete Button\r\n $deleteLink = $this->pi_getPageLink('obssave', '', array('obsId' => $numero_observation, 'obsAction' => 'delete', 'nextAction' => 'show'));\r\n $content .= '<form id=\"deleteForm\" method=\"post\" action=\"' . $deleteLink . '\">';\r\n $content .= '<input id=\"deleteLink\" type=\"submit\" value=\"' . $deleteButtonText . '\" />';\r\n $content .= '<script>$(\"#deleteForm\").submit(function(e) { var answer = confirm(\"' . $areYouSureText . '\"); return answer; })</script>';\r\n $content .= '</form>';\r\n\t\t\r\n }\r\n \r\n // <- Kuba\r\n\r\n\r\n // Kuba ->\r\n\r\n if( niveau_testeur()>0 ) {\r\n $actions = array(\"GenerateQuestions\", \"GenerateComparisons\", \"CleanAnswers\");\r\n\r\n $links =\r\n\tarray_map(\r\n\t\t function($action) use ($numero_observation) {\r\n\t\t return\r\n\t\t '<a ' . \r\n\t\t 'href=\"collaborative/question.php?action=' . $action .\r\n\t\t '&obsId=' . $numero_observation .\r\n\t\t '\">' . $action . '</a>';\r\n\t\t },\r\n\t\t $actions\r\n\t\t );\r\n\r\n $content .= iHerbarium\\mkString($links, \"<div style='margin: 10px;'>\", \"<br/>\", \"</div>\");\r\n }\r\n\r\n // <- Kuba\r\n\r\n $content.= get_string_language_sql(\"ws_observation_list_of_pictures\",$mylanguage).\"<br/>\\n\";\r\n foreach($nom_photo_final as $value){\r\n //Permet d'afficher l'image en taille réelle lorsque l'on clique dessus\r\n // si on est le propriétaire, on a l'image en qualité max et sans licence\r\n if($GLOBALS['TSFE']->fe_user->user['uid']==$iduser)\r\n\t$content.='<a href=\"'.repertoire_sources.\"/\".$value.'\" ><img src=\"'.repertoire_vignettes.\"/\".$value.'\" border=2 width=\"200\" /></blank></a>';\r\n else\r\n\t$content.='<a href=\"/scripts/large.php?name='.$value.'\" ><img src=\"'.repertoire_vignettes.\"/\".$value.'\" border=2 width=\"200\" /></blank></a>';\r\n }\r\n \r\n if(!empty($nom_media_final)){\r\n $content.= \"<br>\".get_string_language_sql(\"ws_observation_list_of_media\",$mylanguage).\"<br/>\\n\";\r\n foreach($nom_media_final as $value){\r\n\t$content.='<a href='.repertoire_sources.\"/\".$value.' >Video </a>';\r\n }\r\n $content.= \"<br>\";\r\n }\r\n \r\n // localisation is shown if public or for the owner \r\n if(($GLOBALS['TSFE']->fe_user->user['uid']==$iduser)|| ($visibilite==\"oui\")){\r\n if($lobervation[\"latitude\"]!=0 && $lobervation[\"longitude\"]!=0){\r\n\t$content.=\"<br/><br/>\".get_string_language_sql(\"ws_observation_was_localized\",$mylanguage);\r\n\t$localstring = get_string_language_sql(\"ws_observation_localized_lat_long\",$mylanguage);\r\n\t\r\n\t$localstring = str_replace('%1',round($lobervation[\"latitude\"],4),$localstring) ;\r\n\t$localstring = str_replace('%2',round($lobervation[\"longitude\"],4),$localstring) ;\r\n\t$content.= $localstring.\"<br/><br/>\\n\";\r\n\t$content.=fairecarte($lobervation[\"latitude\"],$lobervation[\"longitude\"]);\r\n\t\r\n\t$current_url = 'http://www'.substr(t3lib_div::getIndpEnv('HTTP_HOST'),strpos(t3lib_div::getIndpEnv('HTTP_HOST'),\".\",0));\r\n\tif(strpos($current_url,'?')===false)$current_url .= '?addzoom=1';\r\n\t$title_link = \" title='\".get_string_language_sql('ws_view_limitation_alt_add_limit',$mylanguage).\"' class=drillzoom \";\r\n\t$url=$current_url.\"&area_limitation=circle:\".$lobervation[\"latitude\"].','.$lobervation[\"longitude\"].',0.04';\r\n\t$content.=\"<br/>\". \"<a href=$url $title_link >\".get_string_language_sql(\"ws_set_limitation_circle\",$mylanguage).\"</a><br><br/>\";\r\n }\r\n else{\r\n\t$content.=\"<br/><br/>\".get_string_language_sql(\"ws_observation_was_not_localized\",$mylanguage);\r\n\tif(($GLOBALS['TSFE']->fe_user->user['uid']==$iduser) ||(niveau_testeur()>0))\r\n\t {\r\n\t $paramlien = array(numero_observation => $numero_observation,check=>456789);\r\n\t $content.= \"<br>\".$this->pi_linkToPage(get_string_language_sql(\"ws_observation_add_localization\",$mylanguage),97,'',$paramlien);//ws_observation_add_localization\r\n\t }\r\n\t\r\n\t \r\n }\r\n }\r\n \r\n //if(niveau_testeur()>0)\r\n if($GLOBALS['TSFE']->fe_user->user['uid']==1)\r\n\t{\r\n\t$show_delete_button=1;\r\n\t}\r\n\telse\r\n\t$show_delete_button=0;\r\n\t\r\n //if($GLOBALS['TSFE']->fe_user->user['uid']==1)\r\n //{\r\n \r\n $destination_morpho = $this->pi_getPageLink($GLOBALS['TSFE']->id);\r\n $content.=information_analyse($numero_observation,$GLOBALS['TSFE']->sys_language_uid,get_string_language_sql(\"ws_roi_morpho_explanation\",$mylanguage),$destination_morpho,$show_delete_button,$libelle_roi_morphoexplication);\r\n //}\r\n $content.= get_string_language_sql(\"ws_uuid_observation\",$mylanguage) .\" : \".$lobervation[\"uuid_observation\"].\"<br/><br/>\\n\";\r\n \r\n // if($GLOBALS['TSFE']->fe_user->user['uid']==$iduser){\r\n if($lobervation[\"latitude\"]!=0 && $lobervation[\"longitude\"]!=0){\r\n\t$content.= \"<br><strong>\".get_string_language_sql(\"ws_about_label_herbarium\",$mylanguage).\"</strong><br>\";\r\n \r\n \r\n\t$content.=get_string_language_sql(\"ws_go_page_with_qrcode\",$mylanguage);\r\n\t$paramlien = array(numero_observation => $numero_observation,check=>456789,template=>'compact');\r\n\t$content.= \" \".$this->pi_linkToPage(get_string_language_sql(\"ws_go_page_with_qrcode_compact\",$mylanguage),47,'',$paramlien);\r\n\t$paramlien = array(numero_observation => $numero_observation,check=>456789,template=>'classic');\r\n\t$content.= \" \".$this->pi_linkToPage(get_string_language_sql(\"ws_go_page_with_qrcode_classic\",$mylanguage),47,'',$paramlien);\r\n\t$paramlien = array(numero_observation => $numero_observation,check=>456789,template=>'complete');\r\n\t$content.= \" \".$this->pi_linkToPage(get_string_language_sql(\"ws_go_page_with_qrcode_complete\",$mylanguage),47,'',$paramlien);\r\n\t\r\n\t$paramlien = array();\r\n\t$content.= \"<br>\".$this->pi_linkToPage(get_string_language_sql(\"ws_go_page_choose_label\",$mylanguage),98,'',$paramlien);\r\n\t$content.= \"<br>\".get_string_language_sql(\"ws_uuid_specimen\",$mylanguage) .\" : \".$lobervation[\"uuid_specimen\"].\"<br/><br/>\\n\";\r\n \r\n }\r\n //if(niveau_testeur()>0)\r\n \r\n\r\n if(isset($_GET['cmpAll'])) {\r\n\r\n $local = iHerbarium\\LocalTypoherbariumDB::get();\r\n\r\n // COMPARATOR\r\n $questionsOptions = $local->loadQuestionsOptions();\r\n $palette = $local->loadColorPalette(\"Basic\");\r\n $tagsOptions = $local->loadTagsOptions();\r\n //$content .= \"<h4>QuestionsOptions</h4><pre>\" . var_export($questionsOptions, True) . \"</pre>\";\r\n //$content .= \"<h4>Palette</h4><pre>\" . var_export($palette, True) . \"</pre>\";\r\n //$content .= \"<h4>TagsOptions</h4><pre>\" . var_export($tagsOptions, True) . \"</pre>\";\r\n \r\n $comparator = new iHerbarium\\MyComparator($questionsOptions, $palette, $tagsOptions);\r\n\r\n // CURRENT MODEL\r\n $obs = $local->loadObservation($numero_observation);\r\n $model = iHerbarium\\APModel::create($obs);\r\n //$content .= \"<h4>Model</h4><pre>\" . var_export($model, True) . \"</pre>\";\r\n\r\n // OTHER MODELS\r\n $uid = $iduser;\r\n \r\n // Observations' Group\r\n $groupId = 1; // Alexandre\r\n if($_GET['cmpAll'])\r\n\t$groupId = desamorcer($_GET['cmpAll']);\r\n\r\n $group = $local->loadGroup($groupId);\r\n\t \r\n // Models\r\n $models = array_map(function($obs) { return iHerbarium\\APModel::create($obs); }, $group->getAllObservations());\r\n //$content .= \"<h4>Models</h4><pre>\" . var_export($models, True) . \"</pre>\";\r\n\r\n // Comparing results\r\n $cmpResults = \r\n\tarray_map(\r\n\t\t function($model2) use ($comparator, $model) {\r\n\t\t $cmpModels = $comparator->compareModels($model, $model2);\r\n\t\t return $cmpModels;\r\n\t\t }, $models);\r\n //$content .= \"<h4>CmpModels</h4><pre>\" . var_export($cmpResults, True) . \"</pre>\";\r\n \r\n // Sort by similarity of a given tag.\r\n /*\r\n\t$tagToSort = 7; // Tag 7 - flower.\r\n\tuasort($cmpResults, \r\n\tfunction($r1, $r2) { return - iHerbarium\\cmp(\r\n\tisset($r1[7]) ? $r1[7]['similarity'] : 0, \r\n\tisset($r2[7]) ? $r2[7]['similarity'] : 0\r\n\t); } );\r\n */\r\n\r\n // Sort by similarity of models.\r\n uasort($cmpResults, \r\n\t function($r1, $r2) { return - iHerbarium\\cmp(\r\n\t\t\t\t\t\t\t $r1['similarity'],\r\n\t\t\t\t\t\t\t $r2['similarity']\r\n\t\t\t\t\t\t\t ); } );\r\n \r\n\r\n //$content .= \"<h4>CmpModels</h4><pre>\" . var_export($cmpResults, True) . \"</pre>\";\r\n\r\n // ListView\r\n $thisPlugin = $this;\r\n\r\n $cmpToContent = \r\n\tarray_map(\r\n\t\t function($obsId, $cmp) use ($thisPlugin) {\r\n\t\t $content = \"<h2>\" . $obsId . \"</h2>\";\r\n\t\t $content .= affiche_une_observation_dans_liste($thisPlugin, $obsId, \"public\");\r\n\t\t //$content .= \"<h4>Cmp</h4><pre>\" . var_export($cmp, True) . \"</pre>\";\r\n\t\t $content .= \"<h4>Cmp</h4>\" . iHerbarium\\arrayToHTML($cmp);\r\n\t\t return $content;\r\n\t\t }, \r\n\t\t array_keys($cmpResults), $cmpResults\r\n\t\t );\r\n \r\n $content .= implode($cmpToContent, \"\\n\");\r\n\r\n }\r\n\r\n\r\n $content.=\"\r\n\t\t<!--fin bloc_contenu--> \\n\";\r\n return $this->pi_wrapInBaseClass($content);\r\n }",
"public function run()\n {\n $directors = [\n [\n 'Karen',\n 'Conard',\n 'President',\n 'City Manager, City of Portsmouth NH. Ms. Conard has many years of experience in the public and private sectors, including having served in both the executive and legislative branches of state government, and local government overseeing all planning, zoning, community development, building/inspections, and conservation functions.'\n ],\n [\n 'Robert',\n 'Jones',\n 'Treasurer',\n 'Mr. Jones has served as Treasurer of HSI for nearly 20 years, and has decades of experience in banking. He is presently a Senior Loan Officer with the Newburyport Bank with many years prior with the Massachusetts Growth Capital Corporation.'\n ],\n [\n 'Dorothy',\n 'La France',\n 'Clerk',\n 'Ms. La France was the Director of the Newburyport Public Library for many years. She is currently retired and serves in a leadership role on a number of local boards.'\n ],\n [\n 'Lisa',\n 'L. Mead',\n 'Board Member',\n 'A partner in the Firm, she is also former City Solicitor for the City of Somerville. She is a former three-term Mayor of the City of Newburyport and a former two-term City Councilor for the City of Newburyport. Lisa also served as State Director for Senator John Kerry’s Massachusetts operations.'\n ],\n [\n 'Frank G.',\n 'Cousins Jr.',\n 'Board Member',\n 'The President of the Greater Newburyport Chamber of Commerce & Industry. He is the former Essex County Sheriff and lifelong Newburyport resident. Prior to his appointment to sheriff, Cousins had served on the Newburyport, Massachusetts City Council, and then elected to the Massachusetts House of Representatives in 1993.'\n ],\n [\n 'Paula',\n 'Newcomb',\n 'Executive Director',\n 'Ms. Newcomb has been involved in the development of private and public affordable housing opportunities for forty years, including fifteen years in compliance at the US Department of HUD, and ten years with the City of Haverhill in Community Development and Affordable Housing production.'\n ]\n ];\n\n foreach ($directors as $directorData) {\n $director = new Director();\n\n $director->fname = $directorData[0];\n $director->lname = $directorData[1];\n $director->position = $directorData[2];\n $director->description = $directorData[3];\n\n $director->save();\n }\n }",
"public function run()\n {\n //\n $cons=[\n\t\t\t['cons'=>\"East batteries! On-off switch too easy to maneuver.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Eats...no, GULPS batteries\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Awkward ergonomics, no optical viewfinder, short battery life, slow, gets hot\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Battery eating beast/slow to recharge\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"power runs out before pictures do\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Slow, high battery consumption rate.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"image size and quality\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Memory too small, slow charge between shots.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Case design, included software\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"No Optical Viewfinder, No Carry Case\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"poor image quality, flash that thinks it's &quot;intelligent,&quot; awkward to handle.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"I haven't discovered any!\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"That little on/off switch sucks\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Low light photography, blinding flash\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"a little expensive, but it's worth it\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Poor picture quality\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Can only hold so many options, the software is lacking in options\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Pics can sometimes be a bit yellowish\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"It needs reliable batteries, not cheap ones.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Low battery life, Smart Media not as popular as Compact Flash\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"hard to see view screen, hard to find\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Maybe the price could be 400 dollars.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"None that I've found\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"battery life\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Short battery life\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Takes a second or two to actually take the picture after the button is pushed, eats batteries. \",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Occasionally mis-focuses some subjects in autofocus mode\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"eats batteries, carry several mem cards\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Viewing screen in bright light.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"No viewfinder, no lens cap\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"no support CompactFlash, a little slow, poor batteries\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"battery consumption, warm up time.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Sucks batteries like there's no tomorrow\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"It uses a lot of batteries.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"falls apart way too easy\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Needs batteries all the time\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Software instructions difficult to understand and implement\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"image quality is less than perfect\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Battery hog\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Memory size (needs upgrade)\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"it only works sometimes, poor picture quality\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"???\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Eats batteries. Not enough space for quality pictures.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Low battery life with standard batteries.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Green light in viewfinder, eats AA batteries\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"As listed above\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Hard on batteries\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"no Zoom!! price, heavy/bulky, \",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Poor quality pictures, High power consumption, Low memory size\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Battery life, green light in viewfinder annoying\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"No USB connection\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Missing zoom, few zippy features\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Carbon unit accessory sometimes takes bad pictures with it; 640x480 res has its limits\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Battery drain, com port only, NO ZOOM, \",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Battery Killer, A little bulky\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Instructions should be more user friendly. Manual assumes computer skills that a beginner may not have\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Doesn't have a swivel body. \",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Problems with software, lack of instructions, lack of troubleshooting help, easy to delete pics\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"uses batteries very quick\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"when the computer is down, it won't work\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"uses batteries fast\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"High battery drain, Distracting flash indicator\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Manual is on Software and not as separate item.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Only loads into computer half the time with associated software\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"No zoom!!!\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"none\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"battery eater\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Options are $$$$$$$\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"performance\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Eats batteries\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Harder to use in low light\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Durabilty, lack of zoom\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"battery hog\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"bad indoor pics.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"no zoom\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Continues to break down\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"none\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"None yet\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Malfunctioned twice, goes quickly through batteries\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"battery cost a little high\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Good, but not serious quality\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Battery eater, have to connect to computer every time you download pictures\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Eats up batteries\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Flash not too 'smart', software\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"you have to buy a battery charger and rechargeables\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Battery life stinks, flash overexposes closeups, no zoom\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Devours batteries, white out on closeups with flash\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"short battery life\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Lack of Windows2000 Drivers, No Zoom\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"LCD hard to see in the sun, LCD freezes\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Eats batteries, plan on shelling out more money, Not very high res\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Very Poor customer service.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"The camera I have can only be connected to your computer via a serial port, and as I have a serial mouse and a serial modem, I have no spare ports while online, forcing me to disconnect to upload new pictures. :-( [Update: I now have a PS/2 mouse and can p\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Potentially weak LCD screen\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Slightly dated technology\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"No Auto-Focus, Weak Flash\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Rechargeable batteries are a must!\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"none\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"low quality pictures, drains batteries\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Battery life when using LCD, no zoom\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"printing photos is hard for me\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"eats batteries quickly, viewfinder too far from lens, sporadic LCD window\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"As with all digital cam's...eats batteries.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Batteries can go fast if you dont get good ones\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Has flaws which are made worse by bad service policy.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"battery life (just buy lithium or rechargeable and it's GREAT); storage capacity (upgradeable)\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"does not have zoom\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Battery Life\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Serial cable only (No USB capabilities), Slow Uploading time.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"An absolute battery hog\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"cam broke/wont upload battery drainer NOT MAC/usb supported\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Eats batteries like crazy; frustrating problems, no USB\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"uses a lot of batteries, and doesn't take good close ups\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"ITS YOUR FIRST DIGITAL CAMERA TO PLAY WITH!!!! :)\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Camera is slow, batteries rattle and delete settings, uses batteries up VERY fast.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"8 months later I still have not received the $40. rebate that I was promised\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"almost non-existent tech support\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"It's easy to use even for children.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"The camera kept breaking.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Holding the camera steady for 5 seconds after taking picture, Not XP compatible\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Too little space to answer\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"quality and customer service\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"It ain't a $1600 Olympus!\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Tech support virtually non-existent; \",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Pictures only good for email.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"You only get what you pay for.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"VERY low resolution. Will not take good enough pics for eBay or email\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Weak flash, no memory expansion slot, customer service\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"none, just be aware of what it was made for\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"No LCD. Menus are less than clear.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"flash not great\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"No expandable memory. \",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"No memory upgrade or color LCD display.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"If you want to spend more, you can get more resolution and memory.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Flaky hardware, *extremely* sensitive to motion during picture taking, mediocre picture quality.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"None\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Photos are mediocre. Lighting can effect web camera adversely\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"7-second wait time in between pictures.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Flash-Range\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"No-LCD, so-so image quality, batteries\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Flash kills batteries, bad with low light, no macro mode.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"no zoom\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Picture quality\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"No LCD, No Video Out, Batteries\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Flash distance, poor results in room light\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Battery life, flimsy USB cover\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Short battery life, so-so indoor pic quality\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"turns off after about 15-30 seconds w/o use\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"battery life, flash too strong with artificial lights, long time between shots.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"weak flash, video-conferencing feature is kinda crummy too\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"not great resolution, IT BROKE!\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Battery life is very limited\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Battery use &amp; Mac compatability\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"batteries go dead after a short time\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Battery Consumption\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"uses a lot of batteries\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"no optical zoom, slightly bulky, odd battery gauge.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"shutter delay, slow flash charge, low battery life\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Does not meet advertised specifications.&#13;&#10;No support.&#13;&#10;\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Tiny button for people with large hands\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"eats batteries, difficulty downloading\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Not easy to operate, eats batteries\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"poor to no customer service, not for MAC despite claims\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Battery use/Design\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"short battery life, annoying glare, need to restart Mac every time you want to transfer pictures\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Little memory, excessive battery usage\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Battery drainer\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Eats batteries, have to buy optional power supply\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Somewhat flimsy, no flash memory, media more difficult to acquire.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"price\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"eats batteries!\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Battery hog, poor LCD screen\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Miserable battery life, poor battery cover lock integrity\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Latency between pics, size, construction flaws\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"No Continuous Zoom, Lens doesn't swivel, Long warm-up time, Photowise 2.1.2 lacks features of earlier versions, LCD has slow scan rate\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"USB connection to my Mac doesn't work most of the time, Usability design\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Needs computer to retain some settings; may not be Y2K compatible\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"can't think of any except eats batteries but I think all digital cameras do that. \",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Poor Quality\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"bulky for today's standards\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"doesn't always work\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"all else\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"camera breaks, Agfa does nothing except tell lies\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"A little big for small hands.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Bad quality in low light, bulky case, slow LCD\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Everything else\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"everything\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"It was free...\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Poor image quality\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"picture quality, no USB interface\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Low resolution, quirky file transfer\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"grainy images, distortion, poor quality images\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"extremely poor images\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"low quality pictures, eats up batteries\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"bad bad bad pictures\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"I kind of feel bad for the person that bought it.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"all-should be taken off market\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Lack of quality customer service.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"extremely poor image quality\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"You get what you paid for.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Horrible image quality, pathetic battery life, no focus, the list goes on...\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"poor clarity\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"adapter and battery usage\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"just about everything about it\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"feels junky\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Substandard image quality, confusing software\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"dont like it \",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"everything about it!\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"poor image resolution; high battery usage; not upgradable\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Limited capabilities, shaky software\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Just plain doesn't work.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Where shall I begin?\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"waste of money\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Quality of Pictures, and the Company's lack of service to this customer\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"ahhh....it died!\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"EVERYTHING\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"stupid stupid stupid, don't buy it, i beg you!!\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Doesn't produce decent photos without incredible effort\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"very expensive for a piece of junk\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Low quality, not for taking important pictures.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Still not a good deal\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Bad quality, doesn't work sometimes.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Needs $50 power adapter not included. Poor resolution of picture.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"bad quality, poorly made\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"picture quality, battery use, no view\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Everything from its hard instillation, too is unacceptable performance\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"image quality, battery life, usability\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"read all opinions for the cons\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"quit working, poor quality pictures\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Pixellation in photos, some software troubles, hard on batteries\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"agfa lies about product specs\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"EVERYTHING\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"EVERYTHING\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Horrible quality\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"bad picture quality/ battery drainage issue\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"fuzzy pics, connection problems, list goes on ...\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Picture quality is useless\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"not the best quality sucks battery power\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"TAKES BAD PICTURES\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"SUCKS,SUCKS, SUCKS!!!!!!!!!\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Low quality service, pictures, software, and warranty\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"problems with software and batteries, low resolution\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Picture quality is utterly awful\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"everything\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"the fact that it exists\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"poor quality\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"buy a battery for every photo you plan on taking, don't plan on the photos being very good\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Very low end\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"battery life, ease of use\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Absolutely everything. Terrible picture, battery life\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Short battery life, awful image quality, poor construction, terrible software\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"It is a battery eating machine!\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Pictures are very grainy and seem out of focus\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Smile is very low-end, not for the serious digital photo lover.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Hard to use, poor quality pictures, battery life.. ha ha.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"or you can say there's nothing good about it.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"short battery life, poor resolution, no&#13;&#10;customer service, badly constructed\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Lens distorts, resolution is low, needs lots of light, gobbles AAs, looks toylike\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Serial port, only 2mb memory ( 16 pics is not enough ), ugly pictures\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"poor image quality, no display\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Resolution ... 1.2 mp is the base for most graphic work... but ..just enough\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"no flash, annoying beep when buttons pressed, shutter button in an uncomfortable spot\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Poor low light/indoor picture quality.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Poor low light performance, drains batteries, no flash.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Cheap plastic hardware&#13;&#10;No flash\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"It likes a lot of light, but for the money I have no complaints.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Needs a lot of light.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Software does not allow conversion from bitmap to jpeg formatting. Fragile. Low light problems\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Takes getting used to because of small size., , Some trouble installing due to missing files.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"No flash, bad as a webcam, no customer support.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Short battery life, low end picture quality, no flash, beeping noise\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"design flaws and missing features, marginal image quality\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Why would a spy camera BEEP when pictures are taken?\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"low image quality, can be flimsy \",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Image quality is poor without good lighting, may break if dropped, \",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Irritating beep when camera takes a picture, no flash on camera.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"No flash, marginal lens.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"OK Image Quality, No Flash, Battery Drainer, Few Features, Spoils-the-Fun Beep when Taking Pictures\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"No flash, Not for low light situations\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"no flash & you lose all your pix if the battery goez dead . \",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"cheap plastic parts&#13;&#10;poor low-light performance&#13;&#10;marginal image quality\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"drains batteries, bad photo quality, software only works with Windows 98 and above\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Poor picture quality and no flash.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Poor picture quality\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Not the best digital camera available. No flash.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"marginal image quality; limited storage; inadequate product support\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Image quality is so-so. No flash.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"poor quality photos, battery problems, no flash, endless cons\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"clip on it does not stay hooked to what ever you clip it on\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Bad pictures, flimsy, not worth the money.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Won't take pictures in low light.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"quirky software\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"You need lots and lots of light to use this one.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Noisy, costly, grainy plain paper printouts, ease of changing cartridges\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Slow and noisy, uses a lot of ink.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Probably not for photos; loud.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Are there any?\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"need to clean print head occasionally\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"noisy, big\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"takes a few moments to change ink cartridges\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Loud, cartridges have to be cleaned for real quality color\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"can't print, lousy support, bad communications, never again\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Hard to find replacement cartridges\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"As always, expensive inks.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Expensive running costs, noisy, large, problems with non-Epson consumables.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"somewhat noisy\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Hmmm..... No cons come to mind !\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"cartridges are still expensive (shop around)\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Price, constant maintenance\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Ink cartridges are pricey\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Ink cartridge monitor system leaves something to be desired.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Not a one\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"slow for photos, expensive ink costs, loud\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"medium quality on regular paper, ink hog\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Epson does not support: has lines in output\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"haven't found any\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Minor nozzle clogging issue in some situations\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"blurred picture, price\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"none\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"if you use paper less that 24lb, the printer will misfeed the paper\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"price, cartridges are expensive\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Macintosh LocalTalk needs an optional interface card. Some information only in electronic version of the manual.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Loud\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Unacceptable black text.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Hard to find ink\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"A bit loud and shakes when printing\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Printer may shake desktop. Black text rendition poor. See opinion for work-around.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Pretty loud\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Very noisy! Design is bigger and clunkier!\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"loud, takes a long time to warm up/print a page\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Loud, high priced, and not that great on black text.&#13;&#10;\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Noisy, does not allow for stiff copy.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"none\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"lack of a LCD\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"a little pricey\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"warmup takes longer than the &quot;ready&quot; light indicates\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"None\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"That paper tray!\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Price is high for most consumers, size\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"nod LCD screen, drivers can conflict.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Lack of Flash and Focusing Ability\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Pictures not the best.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Pictures not the best.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Your best photo's will be bad.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Your best photo's will be bad.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Poor quality photo's\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Horrible picture quality; no flash. \",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Poor quality, no flash, outdoor pictures only.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"You get what you pay for\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Low pic quality. not hold many pic's on High Resoultion (20) Low resolution (80)\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Drivers not XP compatible&#13;&#10;Product Support Minimal&#13;&#10;Product Doesn't Work\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Eats batteries up so fast that they must be removed after use!\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Where should I begin? No flash, no removable memory\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Picture quality is very poor. \",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Low quality pictures, no flash\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"does not work... get what ya paid for\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"very vague instructions, pictures arent very high quality, not much memory\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"You get what you pay for\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"poor quality photos, cheap, no lcd screen\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Your best photo's will be bad.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Not cheap enough, found better stuff in Cracker Jack boxes\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"No removable memory, no flash\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Poor quality pictures\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"no flash, hard to understand directions, cheap construction\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Picture quality isn't that good, cheap design and construction, no flash makes lighting necessary\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Mine is under the Vivitar brand name ,but the same camera !\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Poor optics, puny internal memory, \",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"USB problems, Problems powering up, didn't operate properly\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Not worth the money\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Little built in memory, short range\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"about .5mb of internal memory, battery & CF doors are hard to open/close\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"grainy LCD preview; poor picture quality; flash broken\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Defective and the quality?\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"none!\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"a little difficult to fold down\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"A little bit expensive for those new mothers.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\" Can't push it while lying on the couch.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"none\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Expensive, can tip over\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Hard to travel with.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"The price, and its bulky\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Kind-of Bulky in Malls\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"baby pushing up can cause it to topple backwards\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"None found yet\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Price. Size. Does not fold up easily. \",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Expensive\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Almost too big for everyday use.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Its hard to manipulate if you take it in large crowds\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Doesn't fold, unless you disassemble it, and is still extremely bulky. Only one seat position.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"I don't know of any\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Bulky when folded, doesn't lock in the folded position\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"expensive, lacking all the cutesy gadgets others have\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"That it can sometimes get a little out of control\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Cost, takes some adjustment getting used to pushing while jogging.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Stroller doesn't turn easily, rear wheel alignment problems cause it to drift\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"doesn't fold up the best\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Too large\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Cheaply made, uncomfortable, no head support or cushioning. \",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"none\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"expensive, brake hard to set\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Hard to store and travel with, not very comfortable for toddlers\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"not made for people over 6'2&quot;\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"No more excuses for not running\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"May not fit into small car\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"none\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Expensive\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Not good on rough terrain\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Spendy, Balance and Design Issues\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"A little hard to get up curbs.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"wheels are too big\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Kind of bulky\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Like a bike, tires can go flat easily.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Baby can't recline, access to basket is small, brakes don't engage on the first try\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"lacks parking brake, sun shield is too small, somewhat awkward to fold\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"somewhat bulky in size \",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"basket on bottom is small\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Bulky to transport\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"No adjustable recline position\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"You can't use it to go shopping at the mall.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"3 wheels are better than 4\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"higher price\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"No stationary brakes. \",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"None, this is the 'perfect' sports stroller\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Hard to get., Pricey\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Takes a little while to get the hang of putting together\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"A little bulky to get into a small car\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Balance problem and it's hard to put away\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Price Can Be a Drawback\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Not reclining seat\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"more pricey than other joggers\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"seat doesn't recline - minor issue.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"One sitting position\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Folding it can take some getting used to\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"pricey, small baskets\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"just alittle pricey but worth it!\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"expensive and not for infants\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"too wide to use indoors, expensive\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"breaks easily with a little wear and tare.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"somewhat heavy\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"took awhile to get used to\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Expensive\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"less than eight wheels\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Break down is a little awkward.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"It's a bit pricey, but well worth every penny\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"price, wheels \",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"you need a large trunk, minivan, or truck\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"It has tipped over on occasion, only once with baby inside!\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Straps caused minor discomfort, but otherwise no complaints!\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"The turning is not that easy\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Needs a parking break; strap between the legs is too long (can be remedied); retracted canopy brushes against an older childs head.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Poor canopy design.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"None\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Canopy, Bottom Mesh Basket\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"See Review for product comparisons\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"NOT for babies, huge, expensive\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Won't replace the need for a small stroller.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"A little steep in price(but worth it)\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"the attachment bar then makes it hard to fit into some vehicles \",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Folding and unfolding is akward and there is no cup holder\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"too minor to mention\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Like most double strollers, it squeaks from time to time\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Squeaky, and quite flimsy after 20 months of heavy use.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"not easy to transport, takes up a lot of room in car, can't use basket with back seat reclined\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"reliability, size\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"small basket, no leg room in rear\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Missing storage, hard to collapse\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Hard to lift in the trunk.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"basket not accessible when used as travel system\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"As of yet, I've not found any!\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"High price\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"engineering\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Front rider gets kicked and seats do not sit straight up.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Basket inaccessible when back seat is fully reclined\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Gets squeaky and flimsy on the long run\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"doesn't wear well, \",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Basket is hard to reach when car seat is attached\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Bulky\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Baby Trend difficult to reach by phone\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"small storage area, no handle height adjustment\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Like pushing an Explorer through the mall. \",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Yeah, I'd like to see YOU keep MY toddler in the standing position!\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Too heavy, somewhat flimsy\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Storage basket can't hold very much, no cup holders.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"hard to push and turn\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"When using infant carrier, older child cannot sit; somewhat heavy; manuvering in stores takes practice!\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Fairly large and heavy, small basket.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"bulky, storage difficult to access\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"basket hard to reach\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"May not allow enough room for taller child in weight range\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Too big, heavy and hard to manuver\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"long distance catapulting of occupant due to lack of brakes\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"bulky for storage\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"heavy\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Outgrow fast\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Hard to maneuver\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Folding up a BIG hassle, heavy, feels cheap. \",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Small storage basket\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"strong and reliable\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Not realistic.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Too big and cumbersome\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"flimsiness\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"front pops out\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"basket location\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Front seat doesn't recline much\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"not designed for young children, expensive\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"a little pricey\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"very awkward to collapse\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"lots of repair problems, hard to steer, heavy\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"harder to fold\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"seat positions\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"infant part needs more padding\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"My children don't like to stand when the front seat is reclined\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"not as small as normal one child strollers, not a great harness system for older child\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"can't sit on back while front is reclined fully\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"can't think of any\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Storage access!\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Infant seat attachment makes stroller bulky!\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Maneuverability\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"not suitable for 2 pretoddlers\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Too heavy, hard to fold and unfold, safety concerns for standing child.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Poor design\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"toddler not restrained enough\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Not enough room on jumpseat, not a good seatbelt, very heavy\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Heavy, Basket inaccessible, Probably was not the best choice for our needs\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"not for wanderers\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"not for 2 small children\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"bulky and hard to maneuver when closed\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"seat only has 2 reclining positions\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Can be pushed by child sitting in back\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"HEAVY\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"worst stroller I have ever used\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Toddler cannot always sit\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"child in the front seat will grow out of it fast.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"hard to push and turn\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Size\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"child can fall off when standing\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"heavy - awkward to fold up and basket hard to access.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Basket is not easy to get too! Needs a cup and bag holder for parents.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Heavy,and hard to turn.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Software not XP compatible, scanner is slow and scan quality not up to par\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Too bad it doesn't do color printing. Slow on the hi-res color scanning otherwise great.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Needs linux drivers.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"none so far\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Horrible customer service\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Slow First Copy, Not Color (inkjet), Small Document Bed\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Slow scanner.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Edges of copies may bend on output tray\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Drum unit gave out after 13 months of light home use.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Driver could be better, sometimes has errors\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"No network port. No color. No cable in box\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"only 2mb (enough for normal duty)\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"None\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Needs more documentation on CD\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Short drum life, obtrusive software\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"USB, Power Consumption\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"USB setup is difficult. Very still cardstock may be a problem.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Quite large\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Crappy software\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"None that i can think of!\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Not a Postscript printer\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Memory is not upgrade able.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Could have better quality.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Limited expansion possibilities\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Limited On Board Memory, Slightly Hard To Find In Stores and On The Web\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"USB installation could be more seamless\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"No automatic envelope feeder, the paper tray fits both letter and legal which makes it stick out beyond the printer body in the rear of the machine.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Only 2MB memory, nonexpandable or networkable.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"manual feeding a touch tricky, beige\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Somewhat large\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"print quality not a crisp black color\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"inability to increase RAM\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"the name isn't HP\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"NONE\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"buggy USB driver\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"None yet\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"none\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Bare-bones Mac driver; PostScript not available\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Paper tray sticks out back\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Won't work well with older computers, support is difficult\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"The toner cartridge is difficult to find.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Fairly large, 2MB memory may not be enough for some\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Can't be networked.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"doesn't work well in network environments\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Not good for printing envelopes\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"High-Res graphics are a little fuzzy.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"None yet.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Square design, 4MB memory not enough for some image printing, supplied drivers not excellent\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Susceptible to jamming\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"It glitches on occasion, but doesn't everything. This does it less, though.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"print shade\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Annoying Quick Setup Dialog Box - Doesn't work well with Win XP\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"None so far.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Paper Handling could be better.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Just prints b&w, toners are costly\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Feeding heavy stock from paper tray, incorrect instructions for printing a test page.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Clearing paper jams can be tricky, requires significant component replacement periodically.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"No print density control: prints too light with some fonts.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Can only load one piece at a time in manual loader\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Unreliable USB interface.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Drum Unit Assembly\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Setup - possible hitch.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Relatively_long warm-up time. It_needs more memory for graphics. Replacing_the drum unit will hurt (financially).... \",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Can't print a lot of graphics; customer service isn't great.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Buggy software drivers.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Tray can be tricky to slide out\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"I tis not a color Printer (Joking)Can't think of any\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Noisy when operating\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Windows XP users may have to download additional software to use this product\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"The drum kit burns light weight glossy paper, too high of heat.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Low memory means restrictions on printing graphics\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"The tray should be bigger to hold more paper.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Approx 70 pct of time it will not print an address on an envelope. \",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Not for graphic or color prints jobs.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Nothing really\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"You must download drivers for windows xp\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Trouble with graphics.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"toner cartridge problems - gray background after 500-750 pages new machine\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"smell of cartridge ink; inconsistent manual feed\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"It continually jams when printing envelopes. \",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Too cheap to keep\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"As loud as my paper shredder, Dimmed the lights in my room, Slow to print\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"No USB or Parallel cable included.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"none so far\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"many jams, awkward to clear; streaking; sucky documentation\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Some paper jams, computer freeze-ups, software takes a while to figure out. Somewhat slow.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Annoying paper jams.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"No phone handset\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"None.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Multiple Sending at the same time has problems\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Zero customer service\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"The paper port does not have writer capabilities.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"SLOW and mine may have defective print heads\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"Address book\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t\t['cons'=>\"None so far.\",'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')],\n\t\t];\n\n\t\t\\App\\Cons::insert($cons);\n }",
"public function run() {\n\n\t\t// Add the admin page.\n\t\t$admin_page = new AdminPage();\n\t\t$admin_page->init();\n\n\t\t// Log frontend visits.\n\t\t$log = new Log();\n\t\t$log->run();\n\n\t\t$cloverly = new PaymentAPICloverly();\n\t\t$cloverly->init();\n\t}",
"public function run()\n {\n $adminSection = [\n \"user_managements\" => [\n \"reader_access\",\n \"creation_access\",\n \"modifier_access\",\n \"deletion_access\"\n ],\n \"notice_managements\" => [\n \"reader_access\",\n \"creation_access\",\n \"modifier_access\",\n \"deletion_access\"\n ],\n \"language_managements\" => [\n \"reader_access\",\n \"creation_access\",\n \"modifier_access\",\n \"deletion_access\"\n ],\n \"ticket_management\" => [\n \"reader_access\",\n \"modifier_access\",\n \"commenting_access\"\n ],\n \"kyc_management\" => [\n \"reader_access\",\n \"modifier_access\"\n ],\n \"system_bank_management\" => [\n \"reader_access\",\n \"creation_access\",\n \"modifier_access\"\n ],\n \"post_category_management\" => [\n \"reader_access\",\n \"creation_access\",\n \"modifier_access\"\n ],\n \"post_management\" => [\n \"reader_access\",\n \"creation_access\",\n \"modifier_access\",\n \"deletion_access\"\n ],\n \"page_management\" => [\n \"reader_access\",\n \"creation_access\",\n \"modifier_access\",\n \"deletion_access\"\n ],\n \"review_deposit_management\" => [\n \"reader_access\",\n \"modifier_access\",\n \"deletion_access\"\n ],\n \"review_withdrawal_management\" => [\n \"reader_access\",\n \"modifier_access\"\n ],\n \"wallet_management\" => [\n \"reader_access\"\n ]\n ];\n\n $userSection = [\n \"tickets\" => [\n \"reader_access\",\n \"creation_access\",\n \"closing_access\",\n \"commenting_access\"\n ],\n \"wallets\" => [\n \"reader_access\",\n \"deposit_access\",\n \"withdrawal_access\"\n ],\n \"back_accounts\" => [\n \"reader_access\",\n \"creation_access\",\n \"modifier_access\",\n \"deletion_access\"\n ],\n \"post_comments\" => [\n \"creation_access\"\n ],\n \"order\" => [\n \"reader_access\",\n \"creation_access\",\n \"deletion_access\"\n ],\n \"trading\" => [\n \"reader_access\"\n ],\n \"referral\" => [\n \"reader_access\",\n \"creation_access\"\n ],\n \"user_activity\" => [\n \"reader_access\"\n ],\n \"transactions\" => [\n \"reader_access\"\n ],\n \"exchange\" => [\n \"reader_access\"\n ],\n ];\n\n $adminPermissions = [\n \"admin_section\" => $adminSection,\n \"user_section\" => $userSection\n ];\n\n factory(Role::class)->create([\n 'name' => 'Admin',\n 'permissions' => $adminPermissions,\n 'accessible_routes' => build_permission($adminPermissions, 'admin'),\n 'is_active' => ACTIVE\n ]);\n\n $userPermissions = [\n \"user_section\" => $userSection\n ];\n\n factory(Role::class)->create([\n 'name' => 'User',\n 'permissions' => $userPermissions,\n 'accessible_routes' => build_permission($userPermissions, 'user'),\n 'is_active' => ACTIVE\n ]);\n }",
"public function present_body(){\n return <<<HTML\n<div class=\"box\">\n <h2>Rules</h2>\n <p>The game of Light Em Up! (sometimes called Lights Up or just Lights) is played on a rectangular grid of cells.\n Initially the game presents some squares that are shaded black and represent walls. Of those squares, some have\n numbers in them. This is an example of an initial game presentation:<p>\n <p><img src=\"initial.png\" width=\"346\" height=\"346\" alt=\"initial\"></p>\n <p>The unshaded squares are the playing area and are clickable. Each square can be <em>unset</em>, a <em>light</em>,\n or an <em>unlight</em>:</p>\n <p><img src=\"shaded.png\" width=\"478\" height=\"382\" alt=\"shaded\"></p>\n <p>When the game starts, even playable square is <em>unset</em>. Clicking a square once changes it to a <em>light</em>, which is\n indicated by a light bulb image. Clicking a cell a second time changes it to an <em>unlight</em>, which is represented by\n a black dot (HTML &bull;). Clicking the cell again returns it to <em>unset</em>. The object is to place lights so that:</p>\n <ul>\n <li>Each numbered square has exactly that many lights adjacent to it.</li>\n <li>Every playable square is lit by a light.</li>\n <li>No two lights shine on each other.</li>\n </ul>\n <p>Lights are considered to cast light horizontally and vertically only. The light is stopped by a wall. Unlights\n are not part of the solution. An unlight is a convenience for the player, since it provides a way to indicate a\n square the user knows cannot be a light at all.</p>\n <p>Light Em Up! solutions are unique. There is only one possible solution to any given game.</p>\n <h2>How to Play</h2>\n <p>Game play proceeds by clicking on cells. Each click toggles a cell value. Click on an unset cell toggles it to a\n light. Clicking on a light toggles it to an unlight. Clicking on an unlight toggles it back to unset.</p>\n <h2>Links</h2>\n <ul>\n <li><a href=\"https://en.wikipedia.org/wiki/Light_Up_(puzzle)\">Wikipedia page on Light Up</a></li>\n <li><a href=\"http://mountainvistasoft.com/docs/lightup-is-np-complete.pdf\">Computational Complexity of Light Up</a></li>\n </ul>\n</div>\nHTML;\n }",
"public function run()\n {\n\n\n $kierunki=[\n 'Ekonomiczno-prawny',\n 'Informatyka w biznesie',\n 'Finanse i rachunkowość',\n 'Zarządzanie',\n 'informatyka i ekonometria',\n 'Gospodarka nieruchomościami',\n 'Przedsiębiorczość i inwestycje'\n ];\n\n $jezyki=[\n 'Język Angielski',\n 'Język Niemiecki',\n 'Język Rosyjski',\n 'Język Hiszpański',\n 'Język Francuski'\n ];\n\n $ekonomiczno_prawny=[\n 'Język Angielski',\n 'Język Niemiecki',\n 'Język Rosyjski',\n 'Język Hiszpański',\n 'Język Francuski',\n 'ochrona własności intelektualnej','poprawna polszczyzna w praktyce','technologie informacyjne','wychowanie fizyczne',\n 'historia prawa','metody ilościowe w ekonomii','podstawy ekonomii','prawo cywilne cześć ogólna i rzeczowa','wstęp do prawoznawstwa',\n 'analiza i interpretacja informacji gospodarczych','etyka w biznesie','finanse przedsiębiorstw','inwestycje i wycena przedsiębiorstw',\n 'narzędzia informatyczne w ekonomii','nauka o przedsiębiorstwie',\n 'postępowanie administracyjne','prawo administracyjne','prawo cywilne – zobowiązania','prawo finansowe prawo','gospodarcze publiczne',\n 'prawo karne skarbowe','prawo podatkowe','prawo Unii Europejskiej','rynki finansowe','rynki towarowe','seminarium dyplomowe','szkolenie BHP',\n 'szkolenie biblioteczne','bankowość','ekonomia menadżerska','planowanie finansowe w przedsiębiorstwie','podstawy sprawozdawczości finansowej w przedsiębiorstwie',\n 'prawne aspekty gospodarki nieruchomościami',\n 'prawo bankowe','prawo obrotu instrumentami finansowymi','prawo ubezpieczeń gospodarczych','prawo uczciwej konkurencji',\n 'prawo upadłościowe i naprawcze','ubezpieczenia','finanse publiczne i samorządowe','makroekonomia','partnerstwo publiczno-prywatne','planowanie finansowe',\n 'podstawy sprawozdawczości finansowej w jednostkach samorządu terytorialnego','prawo gospodarki komunalnej','prawo ochrony konkurencji','prawo ochrony środowiska',\n 'prawo pomocy publicznej prawo samorządu terytorialnego prawo zamówień publicznych'\n ];\n $informatyka_w_biznesie=[\n 'Język Angielski',\n 'Język Niemiecki',\n 'Język Rosyjski',\n 'Język Hiszpański',\n 'Język Francuski',\n 'ochrona własności intelektualnej',\n 'socjologia',\n 'technologie informacyjne w biznesie',\n 'wychowanie fizyczne',\n 'logika',\n 'matematyka ',\n 'podstawy finansów ',\n 'podstawy makroekonomii ',\n 'podstawy marketingu ',\n 'podstawy mikroekonomii ',\n 'podstawy rachunkowości ',\n 'podstawy zarządzania ',\n 'prawo w działalności gospodarczej ',\n 'przedsiębiorczość ',\n 'statystyka ',\n 'wstęp do informatyki w biznesie ',\n 'algorytmy i struktury danych ',\n 'analiza i projektowanie systemów informatycznych ',\n 'bazy danych',\n 'e-biznes ',\n 'grafika komputerowa dla biznesu ',\n 'komputerowe wspomaganie decyzji ',\n 'modelowanie i symulacja procesów biznesowych ',\n 'programowanie komputerów ',\n 'systemy operacyjne i technologie sieciowe w biznesie',\n 'technologie webowe w biznesie ',\n 'zarządzanie bezpieczeństwem informacji',\n 'zarządzanie projektami informatycznymi',\n 'analityka internetowa ',\n 'marketing w mediach społecznościowych ',\n 'narzędzia content marketingu',\n 'planowanie przedsięwzięć internetowych ',\n 'platformy i narzędzia social media ',\n 'pozycjonowanie i optymalizacja stron internetowych ',\n 'systemy i platformy handlu elektronicznego ',\n 'systemy zarządzania treścią ',\n 'techniki neuronauki poznawczej w biznesie ',\n 'zespołowy projekt informatyczny ',\n 'programowanie aplikacji chmurowych dla biznesu ',\n 'programowanie aplikacji mobilnych ',\n 'programowanie obiektowe ',\n 'programowanie serwisów internetowych ',\n 'projektowanie interfejsów aplikacji biznesowych ',\n 'techniki twórczego rozwiązywania problemów gospodarczych ',\n 'testowanie oprogramowania ',\n 'zespołowy projekt informatyczny'\n ];\n $finanse_i_rachunkowosc=[\n 'Język Angielski',\n 'Język Niemiecki',\n 'Język Rosyjski',\n 'Język Hiszpański',\n 'Język Francuski',\n 'ekonometria','makroekonomia','matematyka','mikroekonomia',\n 'podstawy finansów','podstawy prawa','podstawy rachunkowości',\n 'statystyka','analiza finansowa','arkusz kalkulacyjny w finansach i rachunkowości',\n 'bankowość','etyka w biznesie','ewidencje podatkowe przedsiębiorstw','finanse osobiste',\n 'finanse przedsiębiorstwa','finanse publiczne','finanse samorządowe','geografia ekonomiczna',\n 'marketing usług finansowoksięgowych','matematyka w finansach i rachunkowości',\n 'międzynarodowe stosunki gospodarcze','planowanie finansowe','podatki',\n 'podstawy zarządzania','polityka społeczna','prawo gospodarcze','rachunek kosztów',\n 'rachunkowość finansowa',\n 'rynek finansowy','ryzyko w finansach i rachunkowości','seminarium dyplomowe',\n 'sprawozdawczość finansowa','systemy finansowo-księgowe','ubezpieczenia',\n 'International Accouting','kadry i płace','organizacja rachunkowości','podstawy auditingu',\n 'rachunkowość budżetowa','rachunkowość instrumentów finansowych',\n 'rachunkowość instytucji finansowych','rachunkowość NGOs',\n 'rozliczenia publicznoprawne przedsiębiorstw','systemy finansowo-księgowe II',\n 'bankowość zaawansowana','Basic Terms in Finance and Banking',\n 'bezpieczeństwo finansów osobistych','doradztwo bankowoubezpieczeniowe',\n 'doradztwo finansowe dla biznesu','doradztwo inwestycyjne i zarządzanie aktywami',\n 'planowanie ubezpieczeniowe i emerytalne','Corporate Finance and Taxation',\n 'decyzje i kalkulacje finansowe','finanse sektora MSP',\n 'obciążenia podatkowe i pozapodatkowe przedsiębiorstwa',\n 'ordynacja podatkowa i księgi podatkowe',\n 'podatki a źródła i formy finansowania przedsiębiorstwa',\n 'relacje przedsiębiorstwa z organami podatkowymi','systemy rozliczeń podatkowych'\n ];\n $zarzadzanie=[\n 'Język Angielski',\n 'Język Niemiecki',\n 'Język Rosyjski',\n 'Język Hiszpański',\n 'Język Francuski',\n 'psychologia zarządzania','socjologia','technologie informacyjne','wychowanie fizyczne','marketing','matematyka','nauka o przedsiębiorstwie','podstawy ekonomii','podstawy finansów','podstawy prawa',\n 'podstawy rachunkowości','podstawy zarządzania','statystyka','analiza ekonomiczna','badania marketingowe','przywództwo - studia przypadków zarządzanie pracą zespołową','projektowanie organizacji','komunikacja w biznesie',\n 'gry decyzyjne','analiza danych marketingowych komunikacja marketingowa','zarządzanie sprzedażą','obsługa klienta','social media','Blok: Tworzenie i rozwój kapitału ludzkiego w organizacji [moduł]','motywowanie pracowników',\n 'rozwój pracowników','zarządzanie relacjami z pracownikami','planowanie i pozyskiwanie pracowników zarządzanie różnorodnością','ocenianie pracowników','zarządzanie zasobami niematerialnymi',\n 'metody i techniki doskonalenia jakości','kreatywność i współczesne koncepcje tworzenia innowacji','nowoczesne formy przedsiębiorstw transfer technologii','kształtowanie konkurencyjności przedsiębiorstw e-marketing',\n 'ergonomia i zarządzanie bezpieczeństwem pracy w organizacji','etyka biznesu','gospodarowanie kapitałem ludzkim','informatyka w zarządzaniu','innowacje w przedsiębiorstwie','logistyka','marketing międzynarodowy','media w zarządzaniu',\n 'metody i techniki heurystyczne','negocjacje','przedsiębiorczość','rachunkowość zarządcza','seminarium dyplomowe','tworzenie i rozwój małej firmy','zachowania konsumentów','zachowania organizacyjne','zarządzanie jakością','zarządzanie kapitałem trwałym',\n 'zarządzanie produkcją','zarządzanie projektami','zarządzanie relacjami z klientem','zarządzanie usługami','zarządzanie własnym rozwojem','zarządzanie zasobami ludzkimi','zarządzanie zmianą'\n ];\n $informatyka_i_ekonometria=[\n 'Język Angielski',\n 'Język Niemiecki',\n 'Język Rosyjski',\n 'Język Hiszpański',\n 'Język Francuski',\n 'historia filozofii','ochrona własności intelektualnej','analiza ekonomiczna','dylematy społeczeństwa informacyjnego','kompleksowe zarządzanie jakością','makroekonomia','mikroekonomia','podstawy finansów','podstawy prawa','podstawy rachunkowości',\n 'podstawy zarządzania','technologie informacyjne','algebra liniowa','algorytmy i struktury danych','analiza i projektowanie systemów informatycznych','analiza matematyczna','badania operacyjne','bazy danych','ekonometria','ekonomika informacji','informatyka ekonomiczna',\n 'IT tools in marketing (narzędzia IT w marketingu)','komunikacja biznesowa i organizacje wirtualne','matematyka finansowa','planowanie finansowe','podstawy demografii','podstawy e-biznesu','podstawy programowania','programowanie stron WWW','rachunek prawdopodobieństwa i statystyka matematyczna',\n 'regionalna polityka gospodarcza','seminarium licencjackie','sieci komputerowe - podstawy','statystyka opisowa i ekonomiczna','symulacja komputerowa systemów','technologie multimedialne','zakładanie i prowadzenie działalności gospodarczej','zastosowanie pakietów statystycznych',\n 'zintegrowane systemy zarządzania przedsiębiorstwem','informacja naukowa','szkolenie BHP','szkolenie biblioteczne','hurtownie danych','inżynieria wymagań użytkownika','metody analityki biznesowej','metody eksploracji danych','metody sztucznej inteligencji w analizie biznesowej',\n 'metody uczenia maszynowego','modelowanie procesów w analizie biznesowej','systemy business intelligence','systemy IT w ewidencji gospodarczej','systemy wspomagania decyzji biznesowych','systemy zarządzania bazami danych','zaawansowane metody analizy danych','zarządzanie bezpieczeństwem IT',\n 'zasoby wiedzy w systemach IT','analiza szeregów czasowych','ilościowa analiza skłonności','konstrukcja produktów ubezpieczeniowych','matematyka w biznesie','metody analizy trwania','metody ilościowe na rynku nieruchomości','metody inwestowania na giełdzie','metody klasyfikacji',\n 'metody wyceny nieruchomości','modelowanie rynków finansowych','pomiar zasobów ludzkich','statystyczna kontrola jakości','statystyka publiczna','symulacje obliczeniowe w biznesie','systemy pozyskiwania danych','wnioskowanie statystyczne'\n ];\n $gospodarka_niercuhomosciami=[\n 'Język Angielski',\n 'Język Niemiecki',\n 'Język Rosyjski',\n 'Język Hiszpański',\n 'Język Francuski',\n 'ochrona własności intelektualnej','sztuka wystąpień publicznych','warsztaty budowania zespołów','wychowanie fizyczne','algebra liniowa','analiza matematyczna','analiza szeregów czasowych','bazy danych','demografia','ekonometria',\n 'informatyka ekonomiczna','inwestycje na rynku finansowym','makroekonomia','matematyka finansowa','mikroekonomia','podstawy finansów publicznych','podstawy organizacji i zarządzania','podstawy rachunkowości','produkty ubezpieczeniowe w gospodarce nieruchomościami',\n 'statystyka matematyczna','statystyka opisowa','technologie CRM','zastosowania pakietów obliczeniowych','ekonomika rynku nieruchomości','gospodarka mieszkaniowa','gospodarka nieruchomościami','Metody ilościowe w wycenie firm i farm [moduł]','metody ilościowe w wycenie przedsiębiorstw',\n 'wycena farm i gospodarstw rolnych','podstawy ekonomiki przedsiębiorstw ochrona danych osobowych','podstawy prawa administracji i zobowiązań',\n 'Pośrednictwo w obrocie nieruchomościami [moduł]','ekonomiczne zagadnienia pośrednictwa na rynku nieruchomości','marketing na rynku nieruchomości','wstęp do pośrednictwa w obrocie nieruchomościami projekt grupowy operat szacunkowy',\n 'seminarium','technika nieruchomości','Teoria optymalizacji w gospodarowaniu nieruchomościami [moduł]','statystyczna kontrola jakości w gospodarce nieruchomościami','metody reprezentacyjne na rynku nieruchomości',\n 'badania operacyjne w gospodarowaniu nieruchomościami wstęp do gospodarki nieruchomościami','wstęp do wyceny nieruchomości','Wycena nieruchomości','metodyka wyceny nieruchomości','wycena nieruchomości niezurbanizowanych',\n 'wycena nieruchomości zurbanizowanych wycena podmiotów gospodarczych Zarządzanie nieruchomościami [moduł]','zarządzanie nieruchomościami inwestycyjnymi','zarządzanie nieruchomościami mieszkalnymi',\n 'podstawy planowania i zarządzania nieruchomościami zastosowania informacji przestrzennej w gospodarce nieruchomościami'\n ];\n $przedsiebiorczosc_i_inwestycje=[\n 'Język Angielski',\n 'Język Niemiecki',\n 'Język Rosyjski',\n 'Język Hiszpański',\n 'Język Francuski',\n 'etyka w biznesie','innowacje w przedsiębiorstwie','ochrona własności intelektualnej','podstawy ekonomiki przedsiębiorstw','podstawy makroekonomii','podstawy prawa dla ekonomistów','przedsiębiorczość','sztuka wystąpień publicznych',\n 'tworzenie i funkcjonowanie małej firmy','funkcjonowanie klastrów','gra decyzyjna','marketing w małej firmie','metody ilościowe w zarządzaniu przedsiębiorstwem','metody twórczego rozwiązywania problemów','narzędzia informatyczne w małej firmie',\n 'negocjacje','ocena efektywności inwestycji','opodatkowanie małych firm','podstawy rachunkowości w małych firmach','problemy biznesu w praktyce','przywództwo i kierowanie zespołem','psychologia w zarządzaniu','seminarium dyplomowe',\n 'społeczna odpowiedzialność biznesu','sprawozdawczość i analiza ekonomiczno-finansowa','wyszukiwanie, ocena wiarygodności informacji i bazy danych','zarządzanie jakością w małej firmie','zarządzanie kapitałem trwałym',\n 'zarządzanie procesami w małym przedsiębiorstwie','zarządzanie strategiczne małą firmą','zarządzanie zasobami ludzkimi','informacja naukowa','finansowanie małych firm','MSP w Unii Europejskiej','risk management','strategie innowacyjne','technologie ICT w małej firmie',\n 'transfer technologii','tworzenie biznesplanu przedsięwzięcia','wycena własności intelektualnej','zarządzanie projektami innowacyjnymi','e-biznes','internacjonalizacja małej firmy','planowanie w małym przedsiębiorstwie','social media in management and marketing of SMEs',\n 'system wspierania małych firm','wycena przedsiębiorstw','zarządzanie kreatywnością','zarządzanie projektami w małym przedsiębiorstwie','zarządzanie technologią'\n ];\n\n\n\n sort($ekonomiczno_prawny);\n sort($informatyka_w_biznesie);\n sort($finanse_i_rachunkowosc);\n sort($zarzadzanie);\n sort($informatyka_i_ekonometria);\n sort($gospodarka_niercuhomosciami);\n sort($przedsiebiorczosc_i_inwestycje);\n\n\n $kierunki_przedmioty=[\n $ekonomiczno_prawny,\n $informatyka_w_biznesie,\n $finanse_i_rachunkowosc,\n $zarzadzanie,\n $informatyka_i_ekonometria,\n $gospodarka_niercuhomosciami,\n $przedsiebiorczosc_i_inwestycje\n ];\n\n\n for ($i=0; $i < count($kierunki) ; $i++) {\n App\\Dom::create([\n 'uczelnia' => \"Wydział nauk ekonomicznych i zarządzania\",\n 'kierunek' => $kierunki[$i]\n ]);\n\n for($j=0;$j<count($kierunki_przedmioty[$i]);$j++){\n\n App\\Subject::create([\n 'dom_id' => $i+1,\n 'name' => $kierunki_przedmioty[$i][$j]\n ]);\n\n }\n }\n\n }",
"public function run()\n {\n $t1 = 'How to use visual studio for unity';\n $d1 = [\n 'user_id' => 1,\n 'channel_id' => 4,\n 'title' => $t1,\n 'content' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce feugiat justo enim, ut malesuada ligula egestas sed. Sed vel maximus mi. Suspendisse dui urna, euismod in gravida in, condimentum vitae neque. Duis faucibus nulla eget fringilla tristique. Proin sit amet varius leo. Donec lectus nisl, maximus ut tincidunt sed, maximus in nisi. Sed suscipit molestie turpis, nec suscipit erat euismod sit amet. Integer vel elit eget nisl elementum iaculis.',\n 'slug' => str_slug($t1)\n ];\n\n $t2 = 'Settup a boiled-up project for laravel';\n $d2 = [\n 'user_id' => 2,\n 'channel_id' => 1,\n 'title' => $t2,\n 'content' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse pharetra, nunc et varius elementum, ligula augue sagittis tortor, nec scelerisque nisi magna sit amet turpis. Aenean eu diam in erat porttitor pulvinar. Phasellus finibus placerat ultricies. Ut ac fermentum turpis',\n 'slug' => str_slug($t2)\n ];\n\n $t3 = 'Laravel fix MySql database data-length';\n $d3 = [\n 'user_id' => 1,\n 'channel_id' => 1,\n 'title' => $t3,\n 'content' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce feugiat justo enim, ut malesuada ligula egestas sed. Sed vel maximus mi. Suspendisse dui urna, euismod in gravida in, condimentum vitae neque. Duis faucibus nulla eget fringilla tristique. Proin sit amet varius leo. Donec lectus nisl, maximus ut tincidunt sed, maximus in nisi. Sed suscipit molestie turpis, nec suscipit erat euismod sit amet. Integer vel elit eget nisl elementum iaculis.',\n 'slug' => str_slug($t3)\n ];\n\n $t4 = 'Unity configure network for multiplayer';\n $d4 = [\n 'user_id' => 1,\n 'channel_id' => 4,\n 'title' => $t4,\n 'content' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce feugiat justo enim, ut malesuada ligula egestas sed. Sed vel maximus mi. Suspendisse dui urna, euismod in gravida in, condimentum vitae neque. Duis faucibus nulla eget fringilla tristique. Proin sit amet varius leo. Donec lectus nisl, maximus ut tincidunt sed, maximus in nisi. Sed suscipit molestie turpis, nec suscipit erat euismod sit amet. Integer vel elit eget nisl elementum iaculis.',\n 'slug' => str_slug($t4)\n ];\n\n App\\Discussion::create($d1);\n App\\Discussion::create($d2);\n App\\Discussion::create($d3);\n App\\Discussion::create($d4);\n }",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}"
] | [
"0.57551736",
"0.5686251",
"0.56719196",
"0.56434065",
"0.5616837",
"0.5552319",
"0.5488141",
"0.5448314",
"0.5419554",
"0.5400083",
"0.53180385",
"0.5283215",
"0.5253244",
"0.524796",
"0.5236604",
"0.52365726",
"0.5185107",
"0.516029",
"0.5151446",
"0.5149498",
"0.51415986",
"0.5078031",
"0.5066411",
"0.5063849",
"0.50636053",
"0.50585556",
"0.5049338",
"0.50334966",
"0.50333375",
"0.5031187",
"0.5031187",
"0.5031187",
"0.5029199",
"0.50232744",
"0.50232744",
"0.50232744",
"0.50224113",
"0.5020744",
"0.5015801",
"0.5012435",
"0.5010284",
"0.500728",
"0.4998535",
"0.49972326",
"0.4990946",
"0.49862605",
"0.49592027",
"0.4951277",
"0.49490052",
"0.49430907",
"0.49416652",
"0.49395913",
"0.49395883",
"0.4936872",
"0.4928554",
"0.492771",
"0.49026322",
"0.49020648",
"0.49009487",
"0.48952267",
"0.4883183",
"0.48812032",
"0.4880633",
"0.4874806",
"0.48744822",
"0.48722026",
"0.4871176",
"0.48516813",
"0.48513046",
"0.4845071",
"0.4844776",
"0.48444",
"0.4839455",
"0.4838527",
"0.48318294",
"0.48316938",
"0.48238158",
"0.48216492",
"0.48190784",
"0.4818461",
"0.48177668",
"0.48177668",
"0.48177668",
"0.48177668",
"0.48177668",
"0.48177668",
"0.48177668",
"0.48177668",
"0.48177668",
"0.48177668",
"0.48177668",
"0.48177668",
"0.48177668",
"0.48177668",
"0.48177668",
"0.48177668",
"0.48177668",
"0.48177668",
"0.48177668",
"0.48167095",
"0.48167095"
] | 0.0 | -1 |
unset the owning side of the relation if necessary | public function setOtherParticipant(?OtherParticipant $otherParticipant): self
{
if ($otherParticipant === null && $this->otherParticipant !== null) {
$this->otherParticipant->setLegalPerson(null);
}
// set the owning side of the relation if necessary
if ($otherParticipant !== null && $otherParticipant->getLegalPerson() !== $this) {
$otherParticipant->setLegalPerson($this);
}
$this->otherParticipant = $otherParticipant;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function dissociate()\n {\n $this->farChild->setAttribute($this->firstKey, null);\n\n return $this->farChild->setRelation($this->relation, null);\n }",
"public function isRemoveFromRelationship();",
"public function clearPartnerssRelatedByPatientId()\n {\n $this->collPartnerssRelatedByPatientId = null; // important to set this to NULL since that means it is uninitialized\n }",
"public function resetRelations()\n\t{\n\t\t$this->relations = array();\n\t}",
"public function owning(){ return $this->morphTo();}",
"public function __unset($name)\n {\n if (array_key_exists($name, $this->_unsaved)) {\n // if changing property, remove relation model\n if (isset($this->_relationships[$name])) {\n unset($this->_relationships[$name]);\n }\n\n unset($this->_unsaved[$name]);\n }\n }",
"public function purge()\n {\n $this->owner()->where('current_organization_id', $this->id)\n ->update(['current_organization_id' => null]);\n\n $this->users()->where('current_organization_id', $this->id)\n ->update(['current_organization_id' => null]);\n\n $this->users()->detach();\n\n $this->delete();\n }",
"public function unSetInheritance(){\n\t\t$pdo = Env::getDbConnectionForShare();\n\t\t$this->delete($pdo);\n\t\tself::updateInheritancesCache();\n\t}",
"public function clearPartnerssRelatedByAgentId()\n {\n $this->collPartnerssRelatedByAgentId = null; // important to set this to NULL since that means it is uninitialized\n }",
"private function resetDependentRelations($attribute)\n {\n foreach ($this->_relationsDependencies[$attribute] as $relation) {\n unset($this->_related[$relation]);\n }\n unset($this->_relationsDependencies[$attribute]);\n }",
"function _delete_relation($object)\r\n\t{\r\n\t\tif ( ! empty($object->model) && ! empty($this->id) && ! empty($object->id))\r\n\t\t{\r\n\t\t\t// Determine relationship table name\r\n\t\t\t$relationship_table = $this->_get_relationship_table($object->prefix, $object->table, $object->model);\r\n\r\n\t\t\t$data = array($this->model . '_id' => $this->id, $object->model . '_id' => $object->id);\r\n\r\n\t\t\t// Delete relation\r\n\t\t\t$this->db->delete($relationship_table, $data);\r\n\r\n\t\t\t// Clear related object so it is refreshed on next access\r\n\t\t\t$this->{$object->model} = NULL;\r\n\r\n\t\t\treturn TRUE;\r\n\t\t}\r\n\r\n\t\treturn FALSE;\r\n\t}",
"public function purge(): void\n {\n $this->owner()->where('current_team_id', $this->id)\n ->update(['current_team_id' => null]);\n\n $this->users()->where('current_team_id', $this->id)\n ->update(['current_team_id' => null]);\n\n $this->users()->detach();\n\n $this->delete();\n }",
"public function clearRelations(): DataObject\n {\n foreach ($this::RELATIONS as $relationKey => $relation) {\n unset($this->{$relationKey});\n }\n\n return $this;\n }",
"public function removeRelation($name)\n\t{\n\t\tif (isset($this->relations[$name]))\n\t\t{\n\t\t\tunset ($this->relations[$name]);\n\t\t}\n\n\t\treturn $this->parentModel;\n\t}",
"public function __unset($key)\n {\n unset($this->attributes[$key], $this->relations[$key]);\n }",
"public function removeRelation(RelationInterface $relation);",
"public function clearRelationCache();",
"public function removeRelation($name)\n\t{\n\t\tunset($this->relations[$name]);\n\t}",
"public function unfriend() {\n $existed_relation_status = $this->get_relation_by_status(\"F\");\n if($existed_relation_status) {\n $this->delete_relation(\"F\");\n\n $relation = new UserRelation();\n $relation->set_property(\"from\", $this->to);\n $relation->set_property(\"to\", $this->from);\n\n $relation->delete_relation(\"F\");\n return true;\n }\n\n return false;\n }",
"function afterDelete() {\n \t\t$this->_ownerModel->deleteAll(array(\n \t\t\t\t'model' => $this->_Model->alias,\n \t\t\t\t'foreign_key' => $this->_Model->id,\n \t\t\t\t$this->settings[$this->_Model->alias]['userPrimaryKey'] => $this->_User,\n \t\t));\n\t\t}",
"private function clean_relations($colmodel) {\n foreach ($colmodel as $i => $col) {\n if (isset($col['relation'])) unset($colmodel[$i]['relation']);\n }\n return $colmodel;\n }",
"function unbindAll() {\n foreach (array(\n 'hasOne' => array_keys($this->hasOne),\n 'hasMany' => array_keys($this->hasMany),\n 'belongsTo' => array_keys($this->belongsTo),\n 'hasAndBelongsToMany' => array_keys($this->hasAndBelongsToMany)\n ) as $relation => $model) {\n $this->unbindModel(array($relation => $model));\n }\n }",
"public function afterDelete()\n {\n $this->resetPolymorphicRelation();\n if ($this->getPolymorphicRelation() !== null) {\n $this->getPolymorphicRelation()->delete();\n }\n\n parent::afterDelete();\n }",
"public function clear()\n {\n self::foreignChecks(false);\n $this->model->truncate();\n self::foreignChecks(true);\n }",
"public function clearConcepts()\n {\n foreach ($this->relationships as $relationship) {\n $relationship->clearConcepts();\n }\n }",
"public function beforeSave()\n {\n foreach ($this->relations as $rel) {\n if ($this->_settings[$rel['name']][0] === CActiveRecord::MANY_MANY ||\n $this->_settings[$rel['name']][0] === CActiveRecord::HAS_MANY\n ) {\n foreach ($this->owner->$rel['name'] as $m) {\n $m->save();\n }\n } elseif ($this->_settings[$rel['name']][0] === CActiveRecord::HAS_ONE) {\n $this->owner->{$rel['name']}->save();\n } elseif ($this->_settings[$rel['name']][0] === CActiveRecord::BELONGS_TO) {\n if ($this->owner->$rel['name'] === null) {\n // Set link ID attribute of owner model as null.\n $this->owner->setAttribute($this->_settings[$rel['name']][2], null);\n } else {\n // Save related model.\n $this->owner->{$rel['name']}->save();\n // Set link ID attribute of owner model as new relation ID.\n $this->owner->setAttribute($this->_settings[$rel['name']][2], $this->owner->{$rel['name']}->id);\n }\n }\n }\n }",
"abstract protected function removeOwner(int $ownerId, string $owner, string $ownerAttribute):bool;",
"public function adjustingMmRelationWithTablesnameAndFieldnameFieldDoNotTouchOtherRelations() {}",
"public function ensureConsistency()\n {\n\n if ($this->aActionPropertyTypeRelatedByid !== null && $this->id !== $this->aActionPropertyTypeRelatedByid->getactionTypeId()) {\n $this->aActionPropertyTypeRelatedByid = null;\n }\n }",
"public function unsetProperty()\n\t{\n\t\t$this -> tableName = '';\n\t\t$this -> databaseName = '';\n\t\t$this -> arrNewData = array();\n\t\t$this -> arrOldData = array();\n\t}",
"public function clearAssignedPrayersRelatedByPatientId()\n {\n $this->collAssignedPrayersRelatedByPatientId = null; // important to set this to NULL since that means it is uninitialized\n }",
"public function m2mDbRemove($attr)\n {\n $relName = $this->_relName($this->_relConfig($attr));\n $relation = $this->owner->getRelation($relName);\n\n $pkOwner = $this->_pkOwner();\n $df = $this->_relDefinition($relation);\n\n // deletes current junctions\n $this->_delJunctions($df[0], $df[2], $pkOwner);\n }",
"function clearAttributes()\n {\n $this->arrRelations = array();\n return true;\n }",
"public function clearShoutsRelatedByPosterId()\n\t{\n\t\t$this->collShoutsRelatedByPosterId = null; // important to set this to NULL since that means it is uninitialized\n\t}",
"public function onDeleteSetNull()\n {\n return $this->onDelete(ForeignKeyMode::SET_NULL);\n }",
"public function detachRelationship(Request $request, object $model, string $fieldName): bool;",
"public function unemploy(){\n unset($this->staffId);\n unset($this->store);\n $connection = new Connection();\n $link = $connection->connect();\n $link->exec(\"DELETE FROM staff WHERE user_id = '$this->id'\");\n $connection = null;\n }",
"public function reset()\n {\n $this->values[self::_HERO] = null;\n }",
"public function reset()\n {\n $this->values[self::_HERO] = null;\n }",
"public function clearPermissaosRelatedByCoUsuarioAlteracao()\n\t{\n\t\t$this->collPermissaosRelatedByCoUsuarioAlteracao = null; // important to set this to NULL since that means it is uninitialized\n\t}",
"public function onRelationManageRemove()\n {\n $this->beforeAjax();\n\n $recordId = post('record_id');\n $sessionKey = $this->deferredBinding ? $this->relationGetSessionKey() : null;\n $relatedModel = $this->relationModel;\n\n /*\n * Remove\n */\n if ($this->viewMode == 'multi') {\n\n $checkedIds = $recordId ? [$recordId] : post('checked');\n\n if (is_array($checkedIds)) {\n $foreignKeyName = $relatedModel->getKeyName();\n\n $models = $relatedModel->whereIn($foreignKeyName, $checkedIds)->get();\n foreach ($models as $model) {\n $this->relationObject->remove($model, $sessionKey);\n }\n }\n }\n /*\n * Unlink\n */\n elseif ($this->viewMode == 'single') {\n if ($this->relationType == 'belongsTo') {\n $this->relationObject->dissociate();\n $this->relationObject->getParent()->save();\n }\n elseif ($this->relationType == 'hasOne' || $this->relationType == 'morphOne') {\n if ($obj = $relatedModel->find($recordId)) {\n $this->relationObject->remove($obj, $sessionKey);\n }\n elseif ($this->viewModel->exists) {\n $this->relationObject->remove($this->viewModel, $sessionKey);\n }\n }\n\n $this->viewWidget->setFormValues([]);\n }\n\n return $this->relationRefresh();\n }",
"public function __unset($property) {\n\t\tif (strpos($property, 'source') === 0) {\n\t\t\t$property = lcfirst(substr($property, 6));\n\t\t\tif ($property === '') {\n\t\t\t\tunset($this->bean->source);\n\t\t\t} else {\n\t\t\t\tunset($this->source->$property);\n\t\t\t\t$this->bean->setMeta('tainted', true);\n\t\t\t}\n\t\t} elseif (strpos($property, 'remote') === 0) {\n\t\t\t$property = lcfirst(substr($property, 6));\n\t\t\tif ($property === '') {\n\t\t\t\tunset($this->bean->target);\n\t\t\t} else {\n\t\t\t\tunset($this->remote->$property);\n\t\t\t\t$this->bean->setMeta('tainted', true);\n\t\t\t}\n\t\t\t//Temporary properties are kept in the object, and not written to the database.\n\t\t} elseif (strpos($property, 'temp') === 0) {\n\t\t\t$property = lcfirst(substr($property, 4));\n\t\t\tunset($this->tempProperties[$property]);\n\t\t} else {\n\t\t\tif (isset($this->properties[$property])) {\n\t\t\t\tif ($this->loadedProperties === false) {\n\t\t\t\t\t$this->loadProperties();\n\t\t\t\t}\n\t\t\t\tunset($this->properties[$property]);\n\t\t\t\t$this->bean->setMeta('tainted', true);\n\t\t\t}\n\t\t\tif (isset($this->bean->$property)) {\n\t\t\t\tunset($this->bean->$property);\n\t\t\t}\n\t\t}\n\t}",
"public function remove()\n {\n try {\n $this->preRemove();\n $this->id = $this->data['id'];\n if ($this->owner_resource) {\n $api_owner = $this->owner_resource;\n $this->data = $this\n ->api\n ->$api_owner($this->owner_id)\n ->delete($this->data['id']);\n } else {\n $this->data = $this->api->delete($this->data['id']);\n }\n $this->postRemove();\n } catch (BadMethodCallException $e) {\n throw new BadMethodCallException(sprintf(\n \"You can't remove %s objects.\",\n get_called_class()\n ));\n }\n\n return $this;\n }",
"public function unsetProperty($name)\n {\n unset($this->owner->{$name});\n return $this->owner;\n }",
"public function resetDirty()\n {\n $this->dirty = false;\n $this->dirtyOne = false;\n $this->dirtyMany = false;\n }",
"public function unlinkRelationship(RelationshipInterface $relationship)\n\t{\n\t\t$relationship->setNode();\n\t\t$relationship->setOtherNode();\n\t}",
"public function beforeSave()\n {\n if ($this->parent_id == 0) {\n $this->parent_id = null;\n }\n }",
"public function reset()\n\t{\n\t\tparent::reset();\n\n\t\t// Reset the primary key\n\t\t$this->id = null;\n\t}",
"public function reset()\n\t{\n\t\tparent::reset();\n\n\t\t// Reset the primary key\n\t\t$this->id = null;\n\t}",
"function __destruct()\n\t{\n\t\t$query = \"set foreign_key_checks = 1\";\n\t\t$this->pdo_source->query($query);\t\t\n\t\t\n\t}",
"function revert_table() {\r\n $this->_table = $this->_table_org;\r\n $this->_table_org = NULL;\r\n }",
"public function testProjectAssignmentsUnlinkRelation()\n {\n }",
"public function clearAssignedPrayersRelatedByAgentId()\n {\n $this->collAssignedPrayersRelatedByAgentId = null; // important to set this to NULL since that means it is uninitialized\n }",
"public function truncate_legal_individual_and_client_table()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Individual::truncate();\n Legal::truncate();\n Client::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $this->assertNull(Individual::first());\n $this->assertNull(Legal::first());\n $this->assertNull(Client::first());\n }",
"public function removeAllRelatedPosts() {}",
"public function removeAssociationTarget($target)\n {\n }",
"function __destructor() {\n /**\n * Re-enable foreign key checks \n */\n if ($this->disableForeignKeyChecks === true) {\n mysqli_query($this->conn, 'SET foreign_key_checks = 1');\n }\n }",
"public function ensureConsistency()\n {\n if ($this->aSociete !== null && $this->soc_id_fk !== $this->aSociete->getID()) {\n $this->aSociete = null;\n }\n if ($this->aMTransport !== null && $this->transport_fk !== $this->aMTransport->getMTransport()) {\n $this->aMTransport = null;\n }\n }",
"public function truncate_legal_individual_and_client_table()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Legal::truncate();\n Individual::truncate();\n Client::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $this->assertNull(Legal::first());\n $this->assertNull(Individual::first());\n $this->assertNull(Client::first());\n }",
"public function clearShoutsRelatedByRecipientId()\n\t{\n\t\t$this->collShoutsRelatedByRecipientId = null; // important to set this to NULL since that means it is uninitialized\n\t}",
"private function warnForThroughRelations()\n {\n $this->warn(\"| Make sure that the \\\"{$this->parent}\\\" model has the foreign key \\\"\".Str::lower($this->farParent).\"_id\\\" and the \\\"{$this->throughChild}\\\" model has the foreign key \\\"\".Str::lower($this->parent).\"_id\\\"\\n\");\n }",
"public function deleteOwners(): void\n {\n foreach ($this->attributes as $attributeName) {\n $this->removeOwner($this->owner->primaryKey, $this->name, $attributeName);\n }\n }",
"public function __unset($key) {\n\t\tforeach (array('attributes', 'relationships') as $source) {\n\t\t\tunset($this->$source[$key]);\n\t\t}\n\t}",
"public function isReplaceRelationship();",
"public function aRemoveAllFrom ($attribute, $logical = false)\n {\n // CHEK: attribute es un atributo hasMany\n\n // Si el rol tiene el nombre de la assoc declarado, necesito ver cual es el nombre\n // completo de la key en hasOne o hasMany porque usa attribute__assocName.\n $attribute = $this->getRoleWithAssocName( $attribute );\n\n // Verifica si la relacion hasMany esta cargada, y sino la carga\n $this->lazyLoadHasMany($attribute);\n\n // Aqui llega con la coleccion cargada o inicializada, siempre!\n // =================================================================\n\n // Si la coleccion no tiene elementos no hace nada.\n if ( count($this->attributeValues[$attribute]) == 0 ) return;\n \n // Aqui llega si hay elementos en la coleccion.\n // =================================================================\n\n $pm = PersistentManager::getInstance();\n\n // Busco en atributos hasMany attr y si encuentro elimino.\n foreach ( $this->attributeValues[$attribute] as $i => $obj )\n {\n // Saca de la relacion el objeto con id=$id\n $this->attributeValues[$attribute][$i] = null;\n $this->attributeValues[$attribute] = array_filter($this->attributeValues[$attribute]); // La forma PHP de hacerlo... array sin NULLs...\n\n // TODO: Verificar si el nombre de este atributo es el correcto!\n // Dado el otro objeto y mi atributo, quiero el atributo del otro objeto que corresponda a la relacion con mi atributo.\n $attr2 = $obj->getHasOneAttributeNameByAssocAttribute( get_class($this), $attribute );\n if ($attr2 == NULL) $attr2 = $obj->getHasManyAttributeNameByAssocAttribute( get_class($this), $attribute );\n // FIXME: Problema si el atributo es hasOne! no encuentra el nombre del atributo!\n // TODO: La operacion deberia ser para los 2 lados y ser tanto para n-n como para 1-n\n \n // Por defecto la asociacion se borra fisicamente.\n $pm->remove_assoc( $this, $obj, $attribute, $attr2, $logical ); // TODO: Ok ahora falta hacer que el get considere asociaciones solo con daleted false cuando carga.\n }\n \n $this->dirtyMany = true; // Marca como editado el hasMany\n \n }",
"public function unsetEnforceUniqueness(): void\n {\n $this->enforceUniqueness = [];\n }",
"public function clear()\n {\n if (null !== $this->aCakeType) {\n $this->aCakeType->removeArticle($this);\n }\n if (null !== $this->aShape) {\n $this->aShape->removeArticle($this);\n }\n $this->article_id = null;\n $this->description = null;\n $this->price = null;\n $this->creation = null;\n $this->visible = null;\n $this->shape_id = null;\n $this->cake_type_id = null;\n $this->alreadyInSave = false;\n $this->clearAllReferences();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }",
"public function clearPermissaosRelatedByCoUsuarioCadastro()\n\t{\n\t\t$this->collPermissaosRelatedByCoUsuarioCadastro = null; // important to set this to NULL since that means it is uninitialized\n\t}",
"function remove_from_parent()\n {\n /* Cancel if there's nothing to do here */\n if (!$this->initially_was_account){\n return;\n }\n \n /* include global link_info */\n $ldap= $this->config->get_ldap_link();\n\n /* Remove and write to LDAP */\n plugin::remove_from_parent();\n\n /* Zero arrays */\n $this->attrs['scalixEmailAddress']= array();\n\n /* Unset fake boolean attributes from entry */\n foreach ($this->fakeBooleanAttributes as $val){\n $this->attrs[\"$val\"]= array();\n }\n\n /*unset scalixScalixObject*/\n $this->attrs['scalixScalixObject']=array();\n\n @DEBUG (DEBUG_LDAP, __LINE__, __FUNCTION__, __FILE__,$this->attributes, \"Save\");\n $ldap->cd($this->dn);\n $ldap->modify($this->attrs);\n if (!$ldap->success()){\n msg_dialog::display(_(\"LDAP error\"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));\n }\n\n /* Optionally execute a command after we're done */\n $this->handle_post_events(\"remove\");\n }",
"public function fetchRelatedEagerReturnsNullForEmptyRelationHasOne() {}",
"public function clearPolicy() : void\n {\n $this->model->clearPolicy();\n }",
"public function clearSolicitacaoResgatesRelatedBySolicitanteId()\n\t{\n\t\t$this->collSolicitacaoResgatesRelatedBySolicitanteId = null; // important to set this to NULL since that means it is uninitialized\n\t}",
"public static function clearRelatedInstancePool()\n {\n // Invalidate objects in \".$this->getClassNameFromBuilder($joinedTableTableMapBuilder).\" instance pool,\n // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.\n EmailManagerHistoryEmailTableMap::clearInstancePool();\n }",
"public function clearMemberReferrals()\n\t{\n\t\t$this->collMemberReferrals = null; // important to set this to NULL since that means it is uninitialized\n\t}",
"public function reset()\n {\n $this->values[self::_HERO_ID] = null;\n $this->values[self::_DYNA] = null;\n }",
"public function delete()\n {\n DB::beginTransaction();\n $res=parent::delete();\n \n if($res==true)\n {\n $relations=$this->morphMany('App\\Models\\Image', 'imageable');\n\n \n $relations->delete(); \n }\n\n DB::commit(); \n }",
"public function destroyRelationship(string $relationship, DaoModel $relation) : bool\n {\n return $this->getDaoRepository()->destroyRelation($this, $relationship, $relation);\n }",
"public function makeParent(): void\n {\n $this->parent = null;\n }",
"public function isOwnerOf( $attr )\n {\n // SOL TICKET #2\n // Dependiendo del tipo de relacion se si un objeto es duenio de otro:\n // - 1) Si la relacion es A (1)->(1) B entonces se necesita belongsTo explicito para no salvar en cascada relaciones que en realidad son blandas (p.e. modelado de *->1 donde el lado * en realidad es blando). (desde el modelo, esto es igual a (*)->(1))\n // - 2) Si la relacion es A (1)<->(1) B entonces se necesita belongsTo para saber cual es el lado fuerte.\n // - 3) Si la relacion es A (1)->(*) B entonces B belongsTo A.\n // - 4) Si la relacion es A (1)<->(*) B entonces B belongsTo A.\n // - 5) Si la relacion es A (*)->(*) B entonces B belongsTo A. (desde el modelo, es lo mismo que (1)->(*))\n // - 6) Si la relacion es A (*)<->(*) B entonces se necesita belongsTo en algun lado.\n //\n // La clase actual es A, el obj es de clase B.\n\n $_thisClass = get_class($this); //self::$thisClass; // get_class da PO, deberia usar otro valor y no la clase...\n\n // Verifico si tengo el atributo y esta en una relacion (hasMany o hasOne).\n //\n if (array_key_exists( $attr, $this->hasOne ))\n {\n $obj = new $this->hasOne[$attr]();\n\n // Si la relacion es unidireccional, se es duenio del otro solo si el otro declara belongsTo mi clase.\n if ($obj->hasOneOfThis( $_thisClass )) // 2) bidireccional 1..1\n {\n return $obj->belonsToClass( $_thisClass ); // Si el objeto que quiero saber si soy duenio pertenece a mi => si soy duenio de el.\n }\n else // 1) unidireccional 1..1\n {\n //return true;\n return $obj->belonsToClass( $_thisClass ); // Ahora se pide belongsTo obligatorio para 1..1 unidireccional (esto evita que se salven en cascada links que realmente son blandos)\n }\n }\n else if (array_key_exists( $attr, $this->hasMany ))\n {\n // Si tengo una relacion hasMany con migo mismo, tengo 1->* o *->*, para ambos casos debería devolver true.\n if ($this->hasMany[$attr] == $_thisClass) return true;\n \n $obj = new $this->hasMany[$attr]();\n\n if ($obj->hasOneOfThis( $_thisClass )) // 4) bidireccional 1..*\n {\n return true;\n }\n else\n {\n // 6) bidireccional *..*\n if ($obj->hasManyOfThis( $_thisClass ))\n {\n return $obj->belonsToClass( $_thisClass ); // problema: get_class(this) tira PO...\n }\n else // casos 3 o 5, como es unidireccional, toma el control la clase del lado que no es visto de la otra.\n {\n return true;\n }\n }\n }\n\n // Si llega aca deberia tirar un warning xq el atributo que me pasaron no es de una relacion...\n return false;\n \n }",
"public function testRelationshipsAreDeletedWithTheirUser(): void\n {\n $user = User::factory()->create([\n 'created_at' => now()->subYear(),\n ]);\n\n $booking = Booking::factory()->for($user)->create();\n $identifier = $user->identifiers()->create(['value' => 'test-value']);\n $subscription = $user->subscription()->create();\n\n $this->artisan('model:prune');\n\n $this->assertModelMissing($user);\n $this->assertModelMissing($booking);\n $this->assertModelMissing($identifier);\n $this->assertModelMissing($subscription);\n }",
"public function setRelations() {}",
"public function unset()\n {\n unset($this->value);\n }",
"public function clear()\n {\n $this->op_prime_id = null;\n $this->op_id = null;\n $this->op_prime_libelle = null;\n $this->op_prime_numero = null;\n $this->gdl_art_id = null;\n $this->operation_prime_currency_id = null;\n $this->operation_prime_r_reward_type_id = null;\n $this->operation_prime_r_reward_expedition_mode_id = null;\n $this->operation_prime_r_reward_transporter_id = null;\n $this->operation_prime_fixed_amount = null;\n $this->operation_prime_product_price_pourcentage = null;\n $this->operation_prime_maximum_amount = null;\n $this->alreadyInSave = false;\n $this->alreadyInValidation = false;\n $this->alreadyInClearAllReferencesDeep = false;\n $this->clearAllReferences();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }",
"public function clear()\n {\n $this->id = null;\n $this->name = null;\n $this->is_active = null;\n $this->is_closed = null;\n $this->from_date = null;\n $this->to_date = null;\n $this->sortable_rank = null;\n $this->alreadyInSave = false;\n $this->alreadyInValidation = false;\n $this->alreadyInClearAllReferencesDeep = false;\n $this->clearAllReferences();\n $this->applyDefaultValues();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }",
"public function has_or_relation()\n {\n }",
"public function safeDown()\n\t{\n $sql=\" ALTER TABLE `tbl_venta` DROP `punto_venta_id` ;\";\n $this->execute($sql);\n //quitando la columna pto_venta de tbl_empleado\n $sql=\" ALTER TABLE `tbl_empleado` DROP `punto_venta_id` ;\";\n $this->execute($sql);\n\t}",
"private function remove()\n {\n $this->checkPersister();\n\n $this->persister->beginTransaction();\n foreach ($this as $entity) {\n if (!empty($entity)) {\n $this->persister->remove($entity);\n }\n }\n\n $this->persister->commitTransaction();\n }",
"public function dropForeignKeys()\n\t{\n\t\t$table = $this->getTableName();\n\n\t\t// Does the table exist?\n\t\tif (blx()->db->getSchema()->getTable('{{'.$table.'}}'))\n\t\t{\n\t\t\tforeach ($this->getBelongsToRelations() as $name => $config)\n\t\t\t{\n\t\t\t\t$otherModel = new $config[1];\n\t\t\t\t$otherTable = $otherModel->getTableName();\n\n\t\t\t\t// Does the other table exist?\n\t\t\t\tif (blx()->db->getSchema()->getTable('{{'.$otherTable.'}}'))\n\t\t\t\t{\n\t\t\t\t\t$fkName = \"{$table}_{$name}_fk\";\n\t\t\t\t\tblx()->db->createCommand()->dropForeignKey($fkName, $table);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public function cancelled_by()\n {\n return $this->belongsTo(User::class);\n }",
"public function getForeignKey()\n {\n return 'owner_id';\n }",
"public function unsetReferenceId(): void\n {\n $this->referenceId = [];\n }",
"public function owner()\n {\n return $this->morphTo('owner');\n }",
"public function owner()\n {\n return $this->morphTo('owner');\n }",
"public function owner(){\n return $this->belongsTo('App\\Models\\User', 'owner_id');\n }",
"function unsetID( )\n {\n unset( $this->ID );\n }",
"public function unsetReferenceId(): self\n {\n $this->instance->unsetReferenceId();\n return $this;\n }",
"public function unsetReferenceId(): self\n {\n $this->instance->unsetReferenceId();\n return $this;\n }",
"public function owner() \n {\n return $this->belongsTo('User', 'user_id');\n }",
"public function testSafeDropNonExistingFk()\n {\n $this->assertCount(2, $this->connection->getForeignKeyNames('writers'));\n $this->connection->dropForeignKey('writers', 'FK that does not exist');\n $this->assertCount(2, $this->connection->getForeignKeyNames('writers'));\n }",
"public function owner(){\n return $this->belongsTo(User::class, 'owner_id', 'id');\n }",
"public function removeIsolated()\n {\n $isolated_types = $this->type->doesntHave('movies')->get();\n\n foreach ($isolated_types as $type) {\n $this->delete($type->id);\n }\n }"
] | [
"0.63328475",
"0.6278603",
"0.60386664",
"0.5973452",
"0.58906764",
"0.5881164",
"0.5839303",
"0.58279693",
"0.57461524",
"0.57347137",
"0.5606209",
"0.5605955",
"0.560582",
"0.5590474",
"0.55903083",
"0.5553009",
"0.5519631",
"0.54708207",
"0.54617864",
"0.5437423",
"0.54134023",
"0.5381542",
"0.53717434",
"0.53699476",
"0.5350924",
"0.53458506",
"0.5335067",
"0.5326775",
"0.53258616",
"0.5315715",
"0.5306589",
"0.53047156",
"0.53011435",
"0.52980614",
"0.5293554",
"0.52718097",
"0.5256566",
"0.5252897",
"0.5252897",
"0.52493817",
"0.5248823",
"0.5234733",
"0.5217496",
"0.52056587",
"0.52021784",
"0.5185772",
"0.5178712",
"0.5174127",
"0.5174127",
"0.51736563",
"0.51732993",
"0.5157974",
"0.5147204",
"0.51302415",
"0.5123824",
"0.5107418",
"0.51034755",
"0.5100898",
"0.5097021",
"0.5093433",
"0.508816",
"0.50880593",
"0.5087579",
"0.5071054",
"0.5062191",
"0.50421953",
"0.5036174",
"0.50158554",
"0.5011683",
"0.50113046",
"0.500893",
"0.50062907",
"0.49994022",
"0.4996524",
"0.49929297",
"0.49882868",
"0.4987715",
"0.49831262",
"0.4970706",
"0.49665",
"0.4964151",
"0.49600476",
"0.49574786",
"0.49555978",
"0.49493206",
"0.49478263",
"0.49446818",
"0.49407554",
"0.49354374",
"0.49349123",
"0.4934603",
"0.49317506",
"0.49317506",
"0.4931248",
"0.49254003",
"0.49220946",
"0.49220946",
"0.4914451",
"0.49130568",
"0.49123847",
"0.49033636"
] | 0.0 | -1 |
unset the owning side of the relation if necessary | public function setExecutive(?Executive $executive): self
{
if ($executive === null && $this->executive !== null) {
$this->executive->setLegalPerson(null);
}
// set the owning side of the relation if necessary
if ($executive !== null && $executive->getLegalPerson() !== $this) {
$executive->setLegalPerson($this);
}
$this->executive = $executive;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function dissociate()\n {\n $this->farChild->setAttribute($this->firstKey, null);\n\n return $this->farChild->setRelation($this->relation, null);\n }",
"public function isRemoveFromRelationship();",
"public function clearPartnerssRelatedByPatientId()\n {\n $this->collPartnerssRelatedByPatientId = null; // important to set this to NULL since that means it is uninitialized\n }",
"public function resetRelations()\n\t{\n\t\t$this->relations = array();\n\t}",
"public function owning(){ return $this->morphTo();}",
"public function __unset($name)\n {\n if (array_key_exists($name, $this->_unsaved)) {\n // if changing property, remove relation model\n if (isset($this->_relationships[$name])) {\n unset($this->_relationships[$name]);\n }\n\n unset($this->_unsaved[$name]);\n }\n }",
"public function purge()\n {\n $this->owner()->where('current_organization_id', $this->id)\n ->update(['current_organization_id' => null]);\n\n $this->users()->where('current_organization_id', $this->id)\n ->update(['current_organization_id' => null]);\n\n $this->users()->detach();\n\n $this->delete();\n }",
"public function unSetInheritance(){\n\t\t$pdo = Env::getDbConnectionForShare();\n\t\t$this->delete($pdo);\n\t\tself::updateInheritancesCache();\n\t}",
"public function clearPartnerssRelatedByAgentId()\n {\n $this->collPartnerssRelatedByAgentId = null; // important to set this to NULL since that means it is uninitialized\n }",
"private function resetDependentRelations($attribute)\n {\n foreach ($this->_relationsDependencies[$attribute] as $relation) {\n unset($this->_related[$relation]);\n }\n unset($this->_relationsDependencies[$attribute]);\n }",
"function _delete_relation($object)\r\n\t{\r\n\t\tif ( ! empty($object->model) && ! empty($this->id) && ! empty($object->id))\r\n\t\t{\r\n\t\t\t// Determine relationship table name\r\n\t\t\t$relationship_table = $this->_get_relationship_table($object->prefix, $object->table, $object->model);\r\n\r\n\t\t\t$data = array($this->model . '_id' => $this->id, $object->model . '_id' => $object->id);\r\n\r\n\t\t\t// Delete relation\r\n\t\t\t$this->db->delete($relationship_table, $data);\r\n\r\n\t\t\t// Clear related object so it is refreshed on next access\r\n\t\t\t$this->{$object->model} = NULL;\r\n\r\n\t\t\treturn TRUE;\r\n\t\t}\r\n\r\n\t\treturn FALSE;\r\n\t}",
"public function clearRelations(): DataObject\n {\n foreach ($this::RELATIONS as $relationKey => $relation) {\n unset($this->{$relationKey});\n }\n\n return $this;\n }",
"public function purge(): void\n {\n $this->owner()->where('current_team_id', $this->id)\n ->update(['current_team_id' => null]);\n\n $this->users()->where('current_team_id', $this->id)\n ->update(['current_team_id' => null]);\n\n $this->users()->detach();\n\n $this->delete();\n }",
"public function removeRelation($name)\n\t{\n\t\tif (isset($this->relations[$name]))\n\t\t{\n\t\t\tunset ($this->relations[$name]);\n\t\t}\n\n\t\treturn $this->parentModel;\n\t}",
"public function __unset($key)\n {\n unset($this->attributes[$key], $this->relations[$key]);\n }",
"public function removeRelation(RelationInterface $relation);",
"public function clearRelationCache();",
"public function removeRelation($name)\n\t{\n\t\tunset($this->relations[$name]);\n\t}",
"public function unfriend() {\n $existed_relation_status = $this->get_relation_by_status(\"F\");\n if($existed_relation_status) {\n $this->delete_relation(\"F\");\n\n $relation = new UserRelation();\n $relation->set_property(\"from\", $this->to);\n $relation->set_property(\"to\", $this->from);\n\n $relation->delete_relation(\"F\");\n return true;\n }\n\n return false;\n }",
"function afterDelete() {\n \t\t$this->_ownerModel->deleteAll(array(\n \t\t\t\t'model' => $this->_Model->alias,\n \t\t\t\t'foreign_key' => $this->_Model->id,\n \t\t\t\t$this->settings[$this->_Model->alias]['userPrimaryKey'] => $this->_User,\n \t\t));\n\t\t}",
"private function clean_relations($colmodel) {\n foreach ($colmodel as $i => $col) {\n if (isset($col['relation'])) unset($colmodel[$i]['relation']);\n }\n return $colmodel;\n }",
"function unbindAll() {\n foreach (array(\n 'hasOne' => array_keys($this->hasOne),\n 'hasMany' => array_keys($this->hasMany),\n 'belongsTo' => array_keys($this->belongsTo),\n 'hasAndBelongsToMany' => array_keys($this->hasAndBelongsToMany)\n ) as $relation => $model) {\n $this->unbindModel(array($relation => $model));\n }\n }",
"public function afterDelete()\n {\n $this->resetPolymorphicRelation();\n if ($this->getPolymorphicRelation() !== null) {\n $this->getPolymorphicRelation()->delete();\n }\n\n parent::afterDelete();\n }",
"public function clear()\n {\n self::foreignChecks(false);\n $this->model->truncate();\n self::foreignChecks(true);\n }",
"public function clearConcepts()\n {\n foreach ($this->relationships as $relationship) {\n $relationship->clearConcepts();\n }\n }",
"public function beforeSave()\n {\n foreach ($this->relations as $rel) {\n if ($this->_settings[$rel['name']][0] === CActiveRecord::MANY_MANY ||\n $this->_settings[$rel['name']][0] === CActiveRecord::HAS_MANY\n ) {\n foreach ($this->owner->$rel['name'] as $m) {\n $m->save();\n }\n } elseif ($this->_settings[$rel['name']][0] === CActiveRecord::HAS_ONE) {\n $this->owner->{$rel['name']}->save();\n } elseif ($this->_settings[$rel['name']][0] === CActiveRecord::BELONGS_TO) {\n if ($this->owner->$rel['name'] === null) {\n // Set link ID attribute of owner model as null.\n $this->owner->setAttribute($this->_settings[$rel['name']][2], null);\n } else {\n // Save related model.\n $this->owner->{$rel['name']}->save();\n // Set link ID attribute of owner model as new relation ID.\n $this->owner->setAttribute($this->_settings[$rel['name']][2], $this->owner->{$rel['name']}->id);\n }\n }\n }\n }",
"abstract protected function removeOwner(int $ownerId, string $owner, string $ownerAttribute):bool;",
"public function adjustingMmRelationWithTablesnameAndFieldnameFieldDoNotTouchOtherRelations() {}",
"public function ensureConsistency()\n {\n\n if ($this->aActionPropertyTypeRelatedByid !== null && $this->id !== $this->aActionPropertyTypeRelatedByid->getactionTypeId()) {\n $this->aActionPropertyTypeRelatedByid = null;\n }\n }",
"public function unsetProperty()\n\t{\n\t\t$this -> tableName = '';\n\t\t$this -> databaseName = '';\n\t\t$this -> arrNewData = array();\n\t\t$this -> arrOldData = array();\n\t}",
"public function clearAssignedPrayersRelatedByPatientId()\n {\n $this->collAssignedPrayersRelatedByPatientId = null; // important to set this to NULL since that means it is uninitialized\n }",
"public function m2mDbRemove($attr)\n {\n $relName = $this->_relName($this->_relConfig($attr));\n $relation = $this->owner->getRelation($relName);\n\n $pkOwner = $this->_pkOwner();\n $df = $this->_relDefinition($relation);\n\n // deletes current junctions\n $this->_delJunctions($df[0], $df[2], $pkOwner);\n }",
"function clearAttributes()\n {\n $this->arrRelations = array();\n return true;\n }",
"public function clearShoutsRelatedByPosterId()\n\t{\n\t\t$this->collShoutsRelatedByPosterId = null; // important to set this to NULL since that means it is uninitialized\n\t}",
"public function onDeleteSetNull()\n {\n return $this->onDelete(ForeignKeyMode::SET_NULL);\n }",
"public function detachRelationship(Request $request, object $model, string $fieldName): bool;",
"public function unemploy(){\n unset($this->staffId);\n unset($this->store);\n $connection = new Connection();\n $link = $connection->connect();\n $link->exec(\"DELETE FROM staff WHERE user_id = '$this->id'\");\n $connection = null;\n }",
"public function reset()\n {\n $this->values[self::_HERO] = null;\n }",
"public function reset()\n {\n $this->values[self::_HERO] = null;\n }",
"public function clearPermissaosRelatedByCoUsuarioAlteracao()\n\t{\n\t\t$this->collPermissaosRelatedByCoUsuarioAlteracao = null; // important to set this to NULL since that means it is uninitialized\n\t}",
"public function onRelationManageRemove()\n {\n $this->beforeAjax();\n\n $recordId = post('record_id');\n $sessionKey = $this->deferredBinding ? $this->relationGetSessionKey() : null;\n $relatedModel = $this->relationModel;\n\n /*\n * Remove\n */\n if ($this->viewMode == 'multi') {\n\n $checkedIds = $recordId ? [$recordId] : post('checked');\n\n if (is_array($checkedIds)) {\n $foreignKeyName = $relatedModel->getKeyName();\n\n $models = $relatedModel->whereIn($foreignKeyName, $checkedIds)->get();\n foreach ($models as $model) {\n $this->relationObject->remove($model, $sessionKey);\n }\n }\n }\n /*\n * Unlink\n */\n elseif ($this->viewMode == 'single') {\n if ($this->relationType == 'belongsTo') {\n $this->relationObject->dissociate();\n $this->relationObject->getParent()->save();\n }\n elseif ($this->relationType == 'hasOne' || $this->relationType == 'morphOne') {\n if ($obj = $relatedModel->find($recordId)) {\n $this->relationObject->remove($obj, $sessionKey);\n }\n elseif ($this->viewModel->exists) {\n $this->relationObject->remove($this->viewModel, $sessionKey);\n }\n }\n\n $this->viewWidget->setFormValues([]);\n }\n\n return $this->relationRefresh();\n }",
"public function __unset($property) {\n\t\tif (strpos($property, 'source') === 0) {\n\t\t\t$property = lcfirst(substr($property, 6));\n\t\t\tif ($property === '') {\n\t\t\t\tunset($this->bean->source);\n\t\t\t} else {\n\t\t\t\tunset($this->source->$property);\n\t\t\t\t$this->bean->setMeta('tainted', true);\n\t\t\t}\n\t\t} elseif (strpos($property, 'remote') === 0) {\n\t\t\t$property = lcfirst(substr($property, 6));\n\t\t\tif ($property === '') {\n\t\t\t\tunset($this->bean->target);\n\t\t\t} else {\n\t\t\t\tunset($this->remote->$property);\n\t\t\t\t$this->bean->setMeta('tainted', true);\n\t\t\t}\n\t\t\t//Temporary properties are kept in the object, and not written to the database.\n\t\t} elseif (strpos($property, 'temp') === 0) {\n\t\t\t$property = lcfirst(substr($property, 4));\n\t\t\tunset($this->tempProperties[$property]);\n\t\t} else {\n\t\t\tif (isset($this->properties[$property])) {\n\t\t\t\tif ($this->loadedProperties === false) {\n\t\t\t\t\t$this->loadProperties();\n\t\t\t\t}\n\t\t\t\tunset($this->properties[$property]);\n\t\t\t\t$this->bean->setMeta('tainted', true);\n\t\t\t}\n\t\t\tif (isset($this->bean->$property)) {\n\t\t\t\tunset($this->bean->$property);\n\t\t\t}\n\t\t}\n\t}",
"public function remove()\n {\n try {\n $this->preRemove();\n $this->id = $this->data['id'];\n if ($this->owner_resource) {\n $api_owner = $this->owner_resource;\n $this->data = $this\n ->api\n ->$api_owner($this->owner_id)\n ->delete($this->data['id']);\n } else {\n $this->data = $this->api->delete($this->data['id']);\n }\n $this->postRemove();\n } catch (BadMethodCallException $e) {\n throw new BadMethodCallException(sprintf(\n \"You can't remove %s objects.\",\n get_called_class()\n ));\n }\n\n return $this;\n }",
"public function unsetProperty($name)\n {\n unset($this->owner->{$name});\n return $this->owner;\n }",
"public function resetDirty()\n {\n $this->dirty = false;\n $this->dirtyOne = false;\n $this->dirtyMany = false;\n }",
"public function unlinkRelationship(RelationshipInterface $relationship)\n\t{\n\t\t$relationship->setNode();\n\t\t$relationship->setOtherNode();\n\t}",
"public function beforeSave()\n {\n if ($this->parent_id == 0) {\n $this->parent_id = null;\n }\n }",
"function __destruct()\n\t{\n\t\t$query = \"set foreign_key_checks = 1\";\n\t\t$this->pdo_source->query($query);\t\t\n\t\t\n\t}",
"public function reset()\n\t{\n\t\tparent::reset();\n\n\t\t// Reset the primary key\n\t\t$this->id = null;\n\t}",
"public function reset()\n\t{\n\t\tparent::reset();\n\n\t\t// Reset the primary key\n\t\t$this->id = null;\n\t}",
"function revert_table() {\r\n $this->_table = $this->_table_org;\r\n $this->_table_org = NULL;\r\n }",
"public function testProjectAssignmentsUnlinkRelation()\n {\n }",
"public function clearAssignedPrayersRelatedByAgentId()\n {\n $this->collAssignedPrayersRelatedByAgentId = null; // important to set this to NULL since that means it is uninitialized\n }",
"public function truncate_legal_individual_and_client_table()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Individual::truncate();\n Legal::truncate();\n Client::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $this->assertNull(Individual::first());\n $this->assertNull(Legal::first());\n $this->assertNull(Client::first());\n }",
"public function removeAllRelatedPosts() {}",
"public function removeAssociationTarget($target)\n {\n }",
"function __destructor() {\n /**\n * Re-enable foreign key checks \n */\n if ($this->disableForeignKeyChecks === true) {\n mysqli_query($this->conn, 'SET foreign_key_checks = 1');\n }\n }",
"public function ensureConsistency()\n {\n if ($this->aSociete !== null && $this->soc_id_fk !== $this->aSociete->getID()) {\n $this->aSociete = null;\n }\n if ($this->aMTransport !== null && $this->transport_fk !== $this->aMTransport->getMTransport()) {\n $this->aMTransport = null;\n }\n }",
"public function truncate_legal_individual_and_client_table()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Legal::truncate();\n Individual::truncate();\n Client::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $this->assertNull(Legal::first());\n $this->assertNull(Individual::first());\n $this->assertNull(Client::first());\n }",
"public function clearShoutsRelatedByRecipientId()\n\t{\n\t\t$this->collShoutsRelatedByRecipientId = null; // important to set this to NULL since that means it is uninitialized\n\t}",
"private function warnForThroughRelations()\n {\n $this->warn(\"| Make sure that the \\\"{$this->parent}\\\" model has the foreign key \\\"\".Str::lower($this->farParent).\"_id\\\" and the \\\"{$this->throughChild}\\\" model has the foreign key \\\"\".Str::lower($this->parent).\"_id\\\"\\n\");\n }",
"public function deleteOwners(): void\n {\n foreach ($this->attributes as $attributeName) {\n $this->removeOwner($this->owner->primaryKey, $this->name, $attributeName);\n }\n }",
"public function __unset($key) {\n\t\tforeach (array('attributes', 'relationships') as $source) {\n\t\t\tunset($this->$source[$key]);\n\t\t}\n\t}",
"public function isReplaceRelationship();",
"public function aRemoveAllFrom ($attribute, $logical = false)\n {\n // CHEK: attribute es un atributo hasMany\n\n // Si el rol tiene el nombre de la assoc declarado, necesito ver cual es el nombre\n // completo de la key en hasOne o hasMany porque usa attribute__assocName.\n $attribute = $this->getRoleWithAssocName( $attribute );\n\n // Verifica si la relacion hasMany esta cargada, y sino la carga\n $this->lazyLoadHasMany($attribute);\n\n // Aqui llega con la coleccion cargada o inicializada, siempre!\n // =================================================================\n\n // Si la coleccion no tiene elementos no hace nada.\n if ( count($this->attributeValues[$attribute]) == 0 ) return;\n \n // Aqui llega si hay elementos en la coleccion.\n // =================================================================\n\n $pm = PersistentManager::getInstance();\n\n // Busco en atributos hasMany attr y si encuentro elimino.\n foreach ( $this->attributeValues[$attribute] as $i => $obj )\n {\n // Saca de la relacion el objeto con id=$id\n $this->attributeValues[$attribute][$i] = null;\n $this->attributeValues[$attribute] = array_filter($this->attributeValues[$attribute]); // La forma PHP de hacerlo... array sin NULLs...\n\n // TODO: Verificar si el nombre de este atributo es el correcto!\n // Dado el otro objeto y mi atributo, quiero el atributo del otro objeto que corresponda a la relacion con mi atributo.\n $attr2 = $obj->getHasOneAttributeNameByAssocAttribute( get_class($this), $attribute );\n if ($attr2 == NULL) $attr2 = $obj->getHasManyAttributeNameByAssocAttribute( get_class($this), $attribute );\n // FIXME: Problema si el atributo es hasOne! no encuentra el nombre del atributo!\n // TODO: La operacion deberia ser para los 2 lados y ser tanto para n-n como para 1-n\n \n // Por defecto la asociacion se borra fisicamente.\n $pm->remove_assoc( $this, $obj, $attribute, $attr2, $logical ); // TODO: Ok ahora falta hacer que el get considere asociaciones solo con daleted false cuando carga.\n }\n \n $this->dirtyMany = true; // Marca como editado el hasMany\n \n }",
"public function unsetEnforceUniqueness(): void\n {\n $this->enforceUniqueness = [];\n }",
"public function clear()\n {\n if (null !== $this->aCakeType) {\n $this->aCakeType->removeArticle($this);\n }\n if (null !== $this->aShape) {\n $this->aShape->removeArticle($this);\n }\n $this->article_id = null;\n $this->description = null;\n $this->price = null;\n $this->creation = null;\n $this->visible = null;\n $this->shape_id = null;\n $this->cake_type_id = null;\n $this->alreadyInSave = false;\n $this->clearAllReferences();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }",
"public function clearPermissaosRelatedByCoUsuarioCadastro()\n\t{\n\t\t$this->collPermissaosRelatedByCoUsuarioCadastro = null; // important to set this to NULL since that means it is uninitialized\n\t}",
"public function fetchRelatedEagerReturnsNullForEmptyRelationHasOne() {}",
"function remove_from_parent()\n {\n /* Cancel if there's nothing to do here */\n if (!$this->initially_was_account){\n return;\n }\n \n /* include global link_info */\n $ldap= $this->config->get_ldap_link();\n\n /* Remove and write to LDAP */\n plugin::remove_from_parent();\n\n /* Zero arrays */\n $this->attrs['scalixEmailAddress']= array();\n\n /* Unset fake boolean attributes from entry */\n foreach ($this->fakeBooleanAttributes as $val){\n $this->attrs[\"$val\"]= array();\n }\n\n /*unset scalixScalixObject*/\n $this->attrs['scalixScalixObject']=array();\n\n @DEBUG (DEBUG_LDAP, __LINE__, __FUNCTION__, __FILE__,$this->attributes, \"Save\");\n $ldap->cd($this->dn);\n $ldap->modify($this->attrs);\n if (!$ldap->success()){\n msg_dialog::display(_(\"LDAP error\"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));\n }\n\n /* Optionally execute a command after we're done */\n $this->handle_post_events(\"remove\");\n }",
"public function clearPolicy() : void\n {\n $this->model->clearPolicy();\n }",
"public function clearSolicitacaoResgatesRelatedBySolicitanteId()\n\t{\n\t\t$this->collSolicitacaoResgatesRelatedBySolicitanteId = null; // important to set this to NULL since that means it is uninitialized\n\t}",
"public static function clearRelatedInstancePool()\n {\n // Invalidate objects in \".$this->getClassNameFromBuilder($joinedTableTableMapBuilder).\" instance pool,\n // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.\n EmailManagerHistoryEmailTableMap::clearInstancePool();\n }",
"public function clearMemberReferrals()\n\t{\n\t\t$this->collMemberReferrals = null; // important to set this to NULL since that means it is uninitialized\n\t}",
"public function reset()\n {\n $this->values[self::_HERO_ID] = null;\n $this->values[self::_DYNA] = null;\n }",
"public function delete()\n {\n DB::beginTransaction();\n $res=parent::delete();\n \n if($res==true)\n {\n $relations=$this->morphMany('App\\Models\\Image', 'imageable');\n\n \n $relations->delete(); \n }\n\n DB::commit(); \n }",
"public function destroyRelationship(string $relationship, DaoModel $relation) : bool\n {\n return $this->getDaoRepository()->destroyRelation($this, $relationship, $relation);\n }",
"public function makeParent(): void\n {\n $this->parent = null;\n }",
"public function isOwnerOf( $attr )\n {\n // SOL TICKET #2\n // Dependiendo del tipo de relacion se si un objeto es duenio de otro:\n // - 1) Si la relacion es A (1)->(1) B entonces se necesita belongsTo explicito para no salvar en cascada relaciones que en realidad son blandas (p.e. modelado de *->1 donde el lado * en realidad es blando). (desde el modelo, esto es igual a (*)->(1))\n // - 2) Si la relacion es A (1)<->(1) B entonces se necesita belongsTo para saber cual es el lado fuerte.\n // - 3) Si la relacion es A (1)->(*) B entonces B belongsTo A.\n // - 4) Si la relacion es A (1)<->(*) B entonces B belongsTo A.\n // - 5) Si la relacion es A (*)->(*) B entonces B belongsTo A. (desde el modelo, es lo mismo que (1)->(*))\n // - 6) Si la relacion es A (*)<->(*) B entonces se necesita belongsTo en algun lado.\n //\n // La clase actual es A, el obj es de clase B.\n\n $_thisClass = get_class($this); //self::$thisClass; // get_class da PO, deberia usar otro valor y no la clase...\n\n // Verifico si tengo el atributo y esta en una relacion (hasMany o hasOne).\n //\n if (array_key_exists( $attr, $this->hasOne ))\n {\n $obj = new $this->hasOne[$attr]();\n\n // Si la relacion es unidireccional, se es duenio del otro solo si el otro declara belongsTo mi clase.\n if ($obj->hasOneOfThis( $_thisClass )) // 2) bidireccional 1..1\n {\n return $obj->belonsToClass( $_thisClass ); // Si el objeto que quiero saber si soy duenio pertenece a mi => si soy duenio de el.\n }\n else // 1) unidireccional 1..1\n {\n //return true;\n return $obj->belonsToClass( $_thisClass ); // Ahora se pide belongsTo obligatorio para 1..1 unidireccional (esto evita que se salven en cascada links que realmente son blandos)\n }\n }\n else if (array_key_exists( $attr, $this->hasMany ))\n {\n // Si tengo una relacion hasMany con migo mismo, tengo 1->* o *->*, para ambos casos debería devolver true.\n if ($this->hasMany[$attr] == $_thisClass) return true;\n \n $obj = new $this->hasMany[$attr]();\n\n if ($obj->hasOneOfThis( $_thisClass )) // 4) bidireccional 1..*\n {\n return true;\n }\n else\n {\n // 6) bidireccional *..*\n if ($obj->hasManyOfThis( $_thisClass ))\n {\n return $obj->belonsToClass( $_thisClass ); // problema: get_class(this) tira PO...\n }\n else // casos 3 o 5, como es unidireccional, toma el control la clase del lado que no es visto de la otra.\n {\n return true;\n }\n }\n }\n\n // Si llega aca deberia tirar un warning xq el atributo que me pasaron no es de una relacion...\n return false;\n \n }",
"public function setRelations() {}",
"public function testRelationshipsAreDeletedWithTheirUser(): void\n {\n $user = User::factory()->create([\n 'created_at' => now()->subYear(),\n ]);\n\n $booking = Booking::factory()->for($user)->create();\n $identifier = $user->identifiers()->create(['value' => 'test-value']);\n $subscription = $user->subscription()->create();\n\n $this->artisan('model:prune');\n\n $this->assertModelMissing($user);\n $this->assertModelMissing($booking);\n $this->assertModelMissing($identifier);\n $this->assertModelMissing($subscription);\n }",
"public function unset()\n {\n unset($this->value);\n }",
"public function clear()\n {\n $this->op_prime_id = null;\n $this->op_id = null;\n $this->op_prime_libelle = null;\n $this->op_prime_numero = null;\n $this->gdl_art_id = null;\n $this->operation_prime_currency_id = null;\n $this->operation_prime_r_reward_type_id = null;\n $this->operation_prime_r_reward_expedition_mode_id = null;\n $this->operation_prime_r_reward_transporter_id = null;\n $this->operation_prime_fixed_amount = null;\n $this->operation_prime_product_price_pourcentage = null;\n $this->operation_prime_maximum_amount = null;\n $this->alreadyInSave = false;\n $this->alreadyInValidation = false;\n $this->alreadyInClearAllReferencesDeep = false;\n $this->clearAllReferences();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }",
"public function clear()\n {\n $this->id = null;\n $this->name = null;\n $this->is_active = null;\n $this->is_closed = null;\n $this->from_date = null;\n $this->to_date = null;\n $this->sortable_rank = null;\n $this->alreadyInSave = false;\n $this->alreadyInValidation = false;\n $this->alreadyInClearAllReferencesDeep = false;\n $this->clearAllReferences();\n $this->applyDefaultValues();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }",
"public function has_or_relation()\n {\n }",
"public function safeDown()\n\t{\n $sql=\" ALTER TABLE `tbl_venta` DROP `punto_venta_id` ;\";\n $this->execute($sql);\n //quitando la columna pto_venta de tbl_empleado\n $sql=\" ALTER TABLE `tbl_empleado` DROP `punto_venta_id` ;\";\n $this->execute($sql);\n\t}",
"private function remove()\n {\n $this->checkPersister();\n\n $this->persister->beginTransaction();\n foreach ($this as $entity) {\n if (!empty($entity)) {\n $this->persister->remove($entity);\n }\n }\n\n $this->persister->commitTransaction();\n }",
"public function dropForeignKeys()\n\t{\n\t\t$table = $this->getTableName();\n\n\t\t// Does the table exist?\n\t\tif (blx()->db->getSchema()->getTable('{{'.$table.'}}'))\n\t\t{\n\t\t\tforeach ($this->getBelongsToRelations() as $name => $config)\n\t\t\t{\n\t\t\t\t$otherModel = new $config[1];\n\t\t\t\t$otherTable = $otherModel->getTableName();\n\n\t\t\t\t// Does the other table exist?\n\t\t\t\tif (blx()->db->getSchema()->getTable('{{'.$otherTable.'}}'))\n\t\t\t\t{\n\t\t\t\t\t$fkName = \"{$table}_{$name}_fk\";\n\t\t\t\t\tblx()->db->createCommand()->dropForeignKey($fkName, $table);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public function getForeignKey()\n {\n return 'owner_id';\n }",
"public function cancelled_by()\n {\n return $this->belongsTo(User::class);\n }",
"public function unsetReferenceId(): void\n {\n $this->referenceId = [];\n }",
"public function owner()\n {\n return $this->morphTo('owner');\n }",
"public function owner()\n {\n return $this->morphTo('owner');\n }",
"public function owner(){\n return $this->belongsTo('App\\Models\\User', 'owner_id');\n }",
"function unsetID( )\n {\n unset( $this->ID );\n }",
"public function unsetReferenceId(): self\n {\n $this->instance->unsetReferenceId();\n return $this;\n }",
"public function unsetReferenceId(): self\n {\n $this->instance->unsetReferenceId();\n return $this;\n }",
"public function owner() \n {\n return $this->belongsTo('User', 'user_id');\n }",
"public function owner(){\n return $this->belongsTo(User::class, 'owner_id', 'id');\n }",
"public function testSafeDropNonExistingFk()\n {\n $this->assertCount(2, $this->connection->getForeignKeyNames('writers'));\n $this->connection->dropForeignKey('writers', 'FK that does not exist');\n $this->assertCount(2, $this->connection->getForeignKeyNames('writers'));\n }",
"public function removeIsolated()\n {\n $isolated_types = $this->type->doesntHave('movies')->get();\n\n foreach ($isolated_types as $type) {\n $this->delete($type->id);\n }\n }"
] | [
"0.6332262",
"0.6278244",
"0.603881",
"0.5974293",
"0.5893006",
"0.58798075",
"0.5837344",
"0.58280724",
"0.57459784",
"0.57335603",
"0.5606816",
"0.56056285",
"0.5603825",
"0.559028",
"0.55886203",
"0.5551526",
"0.55196214",
"0.5470628",
"0.5461604",
"0.54381514",
"0.5413374",
"0.5381155",
"0.53727853",
"0.53704274",
"0.5352286",
"0.5347979",
"0.53344625",
"0.5328576",
"0.5327303",
"0.5314024",
"0.53071153",
"0.5302205",
"0.53009355",
"0.529866",
"0.5293027",
"0.5271396",
"0.525463",
"0.5253378",
"0.5253378",
"0.52507323",
"0.52491474",
"0.5232825",
"0.5217082",
"0.5204777",
"0.5202123",
"0.5184861",
"0.51793575",
"0.5173714",
"0.51736337",
"0.51736337",
"0.51726687",
"0.51580614",
"0.5147325",
"0.51312226",
"0.5123645",
"0.5106789",
"0.5103181",
"0.510106",
"0.509806",
"0.50940114",
"0.509167",
"0.5087376",
"0.5086006",
"0.50717884",
"0.50614977",
"0.50410926",
"0.5035281",
"0.5017479",
"0.5012377",
"0.50118035",
"0.5008651",
"0.50075144",
"0.49989247",
"0.4997029",
"0.4993213",
"0.4988235",
"0.49865517",
"0.49836287",
"0.49716368",
"0.49666983",
"0.4966073",
"0.4958011",
"0.49569827",
"0.49547756",
"0.49516636",
"0.49469176",
"0.49426803",
"0.4941936",
"0.4938257",
"0.4937068",
"0.4934504",
"0.49336484",
"0.49336484",
"0.49334833",
"0.4924164",
"0.49210548",
"0.49210548",
"0.4916342",
"0.49146318",
"0.49145448",
"0.49020267"
] | 0.0 | -1 |
unset the owning side of the relation if necessary | public function setAssociate(?Associate $associate): self
{
if ($associate === null && $this->associate !== null) {
$this->associate->setLegalPerson(null);
}
// set the owning side of the relation if necessary
if ($associate !== null && $associate->getLegalPerson() !== $this) {
$associate->setLegalPerson($this);
}
$this->associate = $associate;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function dissociate()\n {\n $this->farChild->setAttribute($this->firstKey, null);\n\n return $this->farChild->setRelation($this->relation, null);\n }",
"public function isRemoveFromRelationship();",
"public function clearPartnerssRelatedByPatientId()\n {\n $this->collPartnerssRelatedByPatientId = null; // important to set this to NULL since that means it is uninitialized\n }",
"public function resetRelations()\n\t{\n\t\t$this->relations = array();\n\t}",
"public function owning(){ return $this->morphTo();}",
"public function __unset($name)\n {\n if (array_key_exists($name, $this->_unsaved)) {\n // if changing property, remove relation model\n if (isset($this->_relationships[$name])) {\n unset($this->_relationships[$name]);\n }\n\n unset($this->_unsaved[$name]);\n }\n }",
"public function purge()\n {\n $this->owner()->where('current_organization_id', $this->id)\n ->update(['current_organization_id' => null]);\n\n $this->users()->where('current_organization_id', $this->id)\n ->update(['current_organization_id' => null]);\n\n $this->users()->detach();\n\n $this->delete();\n }",
"public function unSetInheritance(){\n\t\t$pdo = Env::getDbConnectionForShare();\n\t\t$this->delete($pdo);\n\t\tself::updateInheritancesCache();\n\t}",
"public function clearPartnerssRelatedByAgentId()\n {\n $this->collPartnerssRelatedByAgentId = null; // important to set this to NULL since that means it is uninitialized\n }",
"private function resetDependentRelations($attribute)\n {\n foreach ($this->_relationsDependencies[$attribute] as $relation) {\n unset($this->_related[$relation]);\n }\n unset($this->_relationsDependencies[$attribute]);\n }",
"function _delete_relation($object)\r\n\t{\r\n\t\tif ( ! empty($object->model) && ! empty($this->id) && ! empty($object->id))\r\n\t\t{\r\n\t\t\t// Determine relationship table name\r\n\t\t\t$relationship_table = $this->_get_relationship_table($object->prefix, $object->table, $object->model);\r\n\r\n\t\t\t$data = array($this->model . '_id' => $this->id, $object->model . '_id' => $object->id);\r\n\r\n\t\t\t// Delete relation\r\n\t\t\t$this->db->delete($relationship_table, $data);\r\n\r\n\t\t\t// Clear related object so it is refreshed on next access\r\n\t\t\t$this->{$object->model} = NULL;\r\n\r\n\t\t\treturn TRUE;\r\n\t\t}\r\n\r\n\t\treturn FALSE;\r\n\t}",
"public function clearRelations(): DataObject\n {\n foreach ($this::RELATIONS as $relationKey => $relation) {\n unset($this->{$relationKey});\n }\n\n return $this;\n }",
"public function purge(): void\n {\n $this->owner()->where('current_team_id', $this->id)\n ->update(['current_team_id' => null]);\n\n $this->users()->where('current_team_id', $this->id)\n ->update(['current_team_id' => null]);\n\n $this->users()->detach();\n\n $this->delete();\n }",
"public function removeRelation($name)\n\t{\n\t\tif (isset($this->relations[$name]))\n\t\t{\n\t\t\tunset ($this->relations[$name]);\n\t\t}\n\n\t\treturn $this->parentModel;\n\t}",
"public function __unset($key)\n {\n unset($this->attributes[$key], $this->relations[$key]);\n }",
"public function removeRelation(RelationInterface $relation);",
"public function clearRelationCache();",
"public function removeRelation($name)\n\t{\n\t\tunset($this->relations[$name]);\n\t}",
"public function unfriend() {\n $existed_relation_status = $this->get_relation_by_status(\"F\");\n if($existed_relation_status) {\n $this->delete_relation(\"F\");\n\n $relation = new UserRelation();\n $relation->set_property(\"from\", $this->to);\n $relation->set_property(\"to\", $this->from);\n\n $relation->delete_relation(\"F\");\n return true;\n }\n\n return false;\n }",
"function afterDelete() {\n \t\t$this->_ownerModel->deleteAll(array(\n \t\t\t\t'model' => $this->_Model->alias,\n \t\t\t\t'foreign_key' => $this->_Model->id,\n \t\t\t\t$this->settings[$this->_Model->alias]['userPrimaryKey'] => $this->_User,\n \t\t));\n\t\t}",
"private function clean_relations($colmodel) {\n foreach ($colmodel as $i => $col) {\n if (isset($col['relation'])) unset($colmodel[$i]['relation']);\n }\n return $colmodel;\n }",
"function unbindAll() {\n foreach (array(\n 'hasOne' => array_keys($this->hasOne),\n 'hasMany' => array_keys($this->hasMany),\n 'belongsTo' => array_keys($this->belongsTo),\n 'hasAndBelongsToMany' => array_keys($this->hasAndBelongsToMany)\n ) as $relation => $model) {\n $this->unbindModel(array($relation => $model));\n }\n }",
"public function afterDelete()\n {\n $this->resetPolymorphicRelation();\n if ($this->getPolymorphicRelation() !== null) {\n $this->getPolymorphicRelation()->delete();\n }\n\n parent::afterDelete();\n }",
"public function clear()\n {\n self::foreignChecks(false);\n $this->model->truncate();\n self::foreignChecks(true);\n }",
"public function clearConcepts()\n {\n foreach ($this->relationships as $relationship) {\n $relationship->clearConcepts();\n }\n }",
"public function beforeSave()\n {\n foreach ($this->relations as $rel) {\n if ($this->_settings[$rel['name']][0] === CActiveRecord::MANY_MANY ||\n $this->_settings[$rel['name']][0] === CActiveRecord::HAS_MANY\n ) {\n foreach ($this->owner->$rel['name'] as $m) {\n $m->save();\n }\n } elseif ($this->_settings[$rel['name']][0] === CActiveRecord::HAS_ONE) {\n $this->owner->{$rel['name']}->save();\n } elseif ($this->_settings[$rel['name']][0] === CActiveRecord::BELONGS_TO) {\n if ($this->owner->$rel['name'] === null) {\n // Set link ID attribute of owner model as null.\n $this->owner->setAttribute($this->_settings[$rel['name']][2], null);\n } else {\n // Save related model.\n $this->owner->{$rel['name']}->save();\n // Set link ID attribute of owner model as new relation ID.\n $this->owner->setAttribute($this->_settings[$rel['name']][2], $this->owner->{$rel['name']}->id);\n }\n }\n }\n }",
"abstract protected function removeOwner(int $ownerId, string $owner, string $ownerAttribute):bool;",
"public function adjustingMmRelationWithTablesnameAndFieldnameFieldDoNotTouchOtherRelations() {}",
"public function ensureConsistency()\n {\n\n if ($this->aActionPropertyTypeRelatedByid !== null && $this->id !== $this->aActionPropertyTypeRelatedByid->getactionTypeId()) {\n $this->aActionPropertyTypeRelatedByid = null;\n }\n }",
"public function unsetProperty()\n\t{\n\t\t$this -> tableName = '';\n\t\t$this -> databaseName = '';\n\t\t$this -> arrNewData = array();\n\t\t$this -> arrOldData = array();\n\t}",
"public function clearAssignedPrayersRelatedByPatientId()\n {\n $this->collAssignedPrayersRelatedByPatientId = null; // important to set this to NULL since that means it is uninitialized\n }",
"public function m2mDbRemove($attr)\n {\n $relName = $this->_relName($this->_relConfig($attr));\n $relation = $this->owner->getRelation($relName);\n\n $pkOwner = $this->_pkOwner();\n $df = $this->_relDefinition($relation);\n\n // deletes current junctions\n $this->_delJunctions($df[0], $df[2], $pkOwner);\n }",
"function clearAttributes()\n {\n $this->arrRelations = array();\n return true;\n }",
"public function clearShoutsRelatedByPosterId()\n\t{\n\t\t$this->collShoutsRelatedByPosterId = null; // important to set this to NULL since that means it is uninitialized\n\t}",
"public function onDeleteSetNull()\n {\n return $this->onDelete(ForeignKeyMode::SET_NULL);\n }",
"public function detachRelationship(Request $request, object $model, string $fieldName): bool;",
"public function unemploy(){\n unset($this->staffId);\n unset($this->store);\n $connection = new Connection();\n $link = $connection->connect();\n $link->exec(\"DELETE FROM staff WHERE user_id = '$this->id'\");\n $connection = null;\n }",
"public function reset()\n {\n $this->values[self::_HERO] = null;\n }",
"public function reset()\n {\n $this->values[self::_HERO] = null;\n }",
"public function clearPermissaosRelatedByCoUsuarioAlteracao()\n\t{\n\t\t$this->collPermissaosRelatedByCoUsuarioAlteracao = null; // important to set this to NULL since that means it is uninitialized\n\t}",
"public function onRelationManageRemove()\n {\n $this->beforeAjax();\n\n $recordId = post('record_id');\n $sessionKey = $this->deferredBinding ? $this->relationGetSessionKey() : null;\n $relatedModel = $this->relationModel;\n\n /*\n * Remove\n */\n if ($this->viewMode == 'multi') {\n\n $checkedIds = $recordId ? [$recordId] : post('checked');\n\n if (is_array($checkedIds)) {\n $foreignKeyName = $relatedModel->getKeyName();\n\n $models = $relatedModel->whereIn($foreignKeyName, $checkedIds)->get();\n foreach ($models as $model) {\n $this->relationObject->remove($model, $sessionKey);\n }\n }\n }\n /*\n * Unlink\n */\n elseif ($this->viewMode == 'single') {\n if ($this->relationType == 'belongsTo') {\n $this->relationObject->dissociate();\n $this->relationObject->getParent()->save();\n }\n elseif ($this->relationType == 'hasOne' || $this->relationType == 'morphOne') {\n if ($obj = $relatedModel->find($recordId)) {\n $this->relationObject->remove($obj, $sessionKey);\n }\n elseif ($this->viewModel->exists) {\n $this->relationObject->remove($this->viewModel, $sessionKey);\n }\n }\n\n $this->viewWidget->setFormValues([]);\n }\n\n return $this->relationRefresh();\n }",
"public function __unset($property) {\n\t\tif (strpos($property, 'source') === 0) {\n\t\t\t$property = lcfirst(substr($property, 6));\n\t\t\tif ($property === '') {\n\t\t\t\tunset($this->bean->source);\n\t\t\t} else {\n\t\t\t\tunset($this->source->$property);\n\t\t\t\t$this->bean->setMeta('tainted', true);\n\t\t\t}\n\t\t} elseif (strpos($property, 'remote') === 0) {\n\t\t\t$property = lcfirst(substr($property, 6));\n\t\t\tif ($property === '') {\n\t\t\t\tunset($this->bean->target);\n\t\t\t} else {\n\t\t\t\tunset($this->remote->$property);\n\t\t\t\t$this->bean->setMeta('tainted', true);\n\t\t\t}\n\t\t\t//Temporary properties are kept in the object, and not written to the database.\n\t\t} elseif (strpos($property, 'temp') === 0) {\n\t\t\t$property = lcfirst(substr($property, 4));\n\t\t\tunset($this->tempProperties[$property]);\n\t\t} else {\n\t\t\tif (isset($this->properties[$property])) {\n\t\t\t\tif ($this->loadedProperties === false) {\n\t\t\t\t\t$this->loadProperties();\n\t\t\t\t}\n\t\t\t\tunset($this->properties[$property]);\n\t\t\t\t$this->bean->setMeta('tainted', true);\n\t\t\t}\n\t\t\tif (isset($this->bean->$property)) {\n\t\t\t\tunset($this->bean->$property);\n\t\t\t}\n\t\t}\n\t}",
"public function remove()\n {\n try {\n $this->preRemove();\n $this->id = $this->data['id'];\n if ($this->owner_resource) {\n $api_owner = $this->owner_resource;\n $this->data = $this\n ->api\n ->$api_owner($this->owner_id)\n ->delete($this->data['id']);\n } else {\n $this->data = $this->api->delete($this->data['id']);\n }\n $this->postRemove();\n } catch (BadMethodCallException $e) {\n throw new BadMethodCallException(sprintf(\n \"You can't remove %s objects.\",\n get_called_class()\n ));\n }\n\n return $this;\n }",
"public function unsetProperty($name)\n {\n unset($this->owner->{$name});\n return $this->owner;\n }",
"public function resetDirty()\n {\n $this->dirty = false;\n $this->dirtyOne = false;\n $this->dirtyMany = false;\n }",
"public function unlinkRelationship(RelationshipInterface $relationship)\n\t{\n\t\t$relationship->setNode();\n\t\t$relationship->setOtherNode();\n\t}",
"public function beforeSave()\n {\n if ($this->parent_id == 0) {\n $this->parent_id = null;\n }\n }",
"function __destruct()\n\t{\n\t\t$query = \"set foreign_key_checks = 1\";\n\t\t$this->pdo_source->query($query);\t\t\n\t\t\n\t}",
"public function reset()\n\t{\n\t\tparent::reset();\n\n\t\t// Reset the primary key\n\t\t$this->id = null;\n\t}",
"public function reset()\n\t{\n\t\tparent::reset();\n\n\t\t// Reset the primary key\n\t\t$this->id = null;\n\t}",
"function revert_table() {\r\n $this->_table = $this->_table_org;\r\n $this->_table_org = NULL;\r\n }",
"public function testProjectAssignmentsUnlinkRelation()\n {\n }",
"public function clearAssignedPrayersRelatedByAgentId()\n {\n $this->collAssignedPrayersRelatedByAgentId = null; // important to set this to NULL since that means it is uninitialized\n }",
"public function truncate_legal_individual_and_client_table()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Individual::truncate();\n Legal::truncate();\n Client::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $this->assertNull(Individual::first());\n $this->assertNull(Legal::first());\n $this->assertNull(Client::first());\n }",
"public function removeAllRelatedPosts() {}",
"public function removeAssociationTarget($target)\n {\n }",
"function __destructor() {\n /**\n * Re-enable foreign key checks \n */\n if ($this->disableForeignKeyChecks === true) {\n mysqli_query($this->conn, 'SET foreign_key_checks = 1');\n }\n }",
"public function ensureConsistency()\n {\n if ($this->aSociete !== null && $this->soc_id_fk !== $this->aSociete->getID()) {\n $this->aSociete = null;\n }\n if ($this->aMTransport !== null && $this->transport_fk !== $this->aMTransport->getMTransport()) {\n $this->aMTransport = null;\n }\n }",
"public function truncate_legal_individual_and_client_table()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Legal::truncate();\n Individual::truncate();\n Client::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $this->assertNull(Legal::first());\n $this->assertNull(Individual::first());\n $this->assertNull(Client::first());\n }",
"public function clearShoutsRelatedByRecipientId()\n\t{\n\t\t$this->collShoutsRelatedByRecipientId = null; // important to set this to NULL since that means it is uninitialized\n\t}",
"private function warnForThroughRelations()\n {\n $this->warn(\"| Make sure that the \\\"{$this->parent}\\\" model has the foreign key \\\"\".Str::lower($this->farParent).\"_id\\\" and the \\\"{$this->throughChild}\\\" model has the foreign key \\\"\".Str::lower($this->parent).\"_id\\\"\\n\");\n }",
"public function deleteOwners(): void\n {\n foreach ($this->attributes as $attributeName) {\n $this->removeOwner($this->owner->primaryKey, $this->name, $attributeName);\n }\n }",
"public function __unset($key) {\n\t\tforeach (array('attributes', 'relationships') as $source) {\n\t\t\tunset($this->$source[$key]);\n\t\t}\n\t}",
"public function isReplaceRelationship();",
"public function aRemoveAllFrom ($attribute, $logical = false)\n {\n // CHEK: attribute es un atributo hasMany\n\n // Si el rol tiene el nombre de la assoc declarado, necesito ver cual es el nombre\n // completo de la key en hasOne o hasMany porque usa attribute__assocName.\n $attribute = $this->getRoleWithAssocName( $attribute );\n\n // Verifica si la relacion hasMany esta cargada, y sino la carga\n $this->lazyLoadHasMany($attribute);\n\n // Aqui llega con la coleccion cargada o inicializada, siempre!\n // =================================================================\n\n // Si la coleccion no tiene elementos no hace nada.\n if ( count($this->attributeValues[$attribute]) == 0 ) return;\n \n // Aqui llega si hay elementos en la coleccion.\n // =================================================================\n\n $pm = PersistentManager::getInstance();\n\n // Busco en atributos hasMany attr y si encuentro elimino.\n foreach ( $this->attributeValues[$attribute] as $i => $obj )\n {\n // Saca de la relacion el objeto con id=$id\n $this->attributeValues[$attribute][$i] = null;\n $this->attributeValues[$attribute] = array_filter($this->attributeValues[$attribute]); // La forma PHP de hacerlo... array sin NULLs...\n\n // TODO: Verificar si el nombre de este atributo es el correcto!\n // Dado el otro objeto y mi atributo, quiero el atributo del otro objeto que corresponda a la relacion con mi atributo.\n $attr2 = $obj->getHasOneAttributeNameByAssocAttribute( get_class($this), $attribute );\n if ($attr2 == NULL) $attr2 = $obj->getHasManyAttributeNameByAssocAttribute( get_class($this), $attribute );\n // FIXME: Problema si el atributo es hasOne! no encuentra el nombre del atributo!\n // TODO: La operacion deberia ser para los 2 lados y ser tanto para n-n como para 1-n\n \n // Por defecto la asociacion se borra fisicamente.\n $pm->remove_assoc( $this, $obj, $attribute, $attr2, $logical ); // TODO: Ok ahora falta hacer que el get considere asociaciones solo con daleted false cuando carga.\n }\n \n $this->dirtyMany = true; // Marca como editado el hasMany\n \n }",
"public function unsetEnforceUniqueness(): void\n {\n $this->enforceUniqueness = [];\n }",
"public function clear()\n {\n if (null !== $this->aCakeType) {\n $this->aCakeType->removeArticle($this);\n }\n if (null !== $this->aShape) {\n $this->aShape->removeArticle($this);\n }\n $this->article_id = null;\n $this->description = null;\n $this->price = null;\n $this->creation = null;\n $this->visible = null;\n $this->shape_id = null;\n $this->cake_type_id = null;\n $this->alreadyInSave = false;\n $this->clearAllReferences();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }",
"public function clearPermissaosRelatedByCoUsuarioCadastro()\n\t{\n\t\t$this->collPermissaosRelatedByCoUsuarioCadastro = null; // important to set this to NULL since that means it is uninitialized\n\t}",
"public function fetchRelatedEagerReturnsNullForEmptyRelationHasOne() {}",
"function remove_from_parent()\n {\n /* Cancel if there's nothing to do here */\n if (!$this->initially_was_account){\n return;\n }\n \n /* include global link_info */\n $ldap= $this->config->get_ldap_link();\n\n /* Remove and write to LDAP */\n plugin::remove_from_parent();\n\n /* Zero arrays */\n $this->attrs['scalixEmailAddress']= array();\n\n /* Unset fake boolean attributes from entry */\n foreach ($this->fakeBooleanAttributes as $val){\n $this->attrs[\"$val\"]= array();\n }\n\n /*unset scalixScalixObject*/\n $this->attrs['scalixScalixObject']=array();\n\n @DEBUG (DEBUG_LDAP, __LINE__, __FUNCTION__, __FILE__,$this->attributes, \"Save\");\n $ldap->cd($this->dn);\n $ldap->modify($this->attrs);\n if (!$ldap->success()){\n msg_dialog::display(_(\"LDAP error\"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));\n }\n\n /* Optionally execute a command after we're done */\n $this->handle_post_events(\"remove\");\n }",
"public function clearPolicy() : void\n {\n $this->model->clearPolicy();\n }",
"public function clearSolicitacaoResgatesRelatedBySolicitanteId()\n\t{\n\t\t$this->collSolicitacaoResgatesRelatedBySolicitanteId = null; // important to set this to NULL since that means it is uninitialized\n\t}",
"public static function clearRelatedInstancePool()\n {\n // Invalidate objects in \".$this->getClassNameFromBuilder($joinedTableTableMapBuilder).\" instance pool,\n // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.\n EmailManagerHistoryEmailTableMap::clearInstancePool();\n }",
"public function clearMemberReferrals()\n\t{\n\t\t$this->collMemberReferrals = null; // important to set this to NULL since that means it is uninitialized\n\t}",
"public function reset()\n {\n $this->values[self::_HERO_ID] = null;\n $this->values[self::_DYNA] = null;\n }",
"public function delete()\n {\n DB::beginTransaction();\n $res=parent::delete();\n \n if($res==true)\n {\n $relations=$this->morphMany('App\\Models\\Image', 'imageable');\n\n \n $relations->delete(); \n }\n\n DB::commit(); \n }",
"public function destroyRelationship(string $relationship, DaoModel $relation) : bool\n {\n return $this->getDaoRepository()->destroyRelation($this, $relationship, $relation);\n }",
"public function makeParent(): void\n {\n $this->parent = null;\n }",
"public function isOwnerOf( $attr )\n {\n // SOL TICKET #2\n // Dependiendo del tipo de relacion se si un objeto es duenio de otro:\n // - 1) Si la relacion es A (1)->(1) B entonces se necesita belongsTo explicito para no salvar en cascada relaciones que en realidad son blandas (p.e. modelado de *->1 donde el lado * en realidad es blando). (desde el modelo, esto es igual a (*)->(1))\n // - 2) Si la relacion es A (1)<->(1) B entonces se necesita belongsTo para saber cual es el lado fuerte.\n // - 3) Si la relacion es A (1)->(*) B entonces B belongsTo A.\n // - 4) Si la relacion es A (1)<->(*) B entonces B belongsTo A.\n // - 5) Si la relacion es A (*)->(*) B entonces B belongsTo A. (desde el modelo, es lo mismo que (1)->(*))\n // - 6) Si la relacion es A (*)<->(*) B entonces se necesita belongsTo en algun lado.\n //\n // La clase actual es A, el obj es de clase B.\n\n $_thisClass = get_class($this); //self::$thisClass; // get_class da PO, deberia usar otro valor y no la clase...\n\n // Verifico si tengo el atributo y esta en una relacion (hasMany o hasOne).\n //\n if (array_key_exists( $attr, $this->hasOne ))\n {\n $obj = new $this->hasOne[$attr]();\n\n // Si la relacion es unidireccional, se es duenio del otro solo si el otro declara belongsTo mi clase.\n if ($obj->hasOneOfThis( $_thisClass )) // 2) bidireccional 1..1\n {\n return $obj->belonsToClass( $_thisClass ); // Si el objeto que quiero saber si soy duenio pertenece a mi => si soy duenio de el.\n }\n else // 1) unidireccional 1..1\n {\n //return true;\n return $obj->belonsToClass( $_thisClass ); // Ahora se pide belongsTo obligatorio para 1..1 unidireccional (esto evita que se salven en cascada links que realmente son blandos)\n }\n }\n else if (array_key_exists( $attr, $this->hasMany ))\n {\n // Si tengo una relacion hasMany con migo mismo, tengo 1->* o *->*, para ambos casos debería devolver true.\n if ($this->hasMany[$attr] == $_thisClass) return true;\n \n $obj = new $this->hasMany[$attr]();\n\n if ($obj->hasOneOfThis( $_thisClass )) // 4) bidireccional 1..*\n {\n return true;\n }\n else\n {\n // 6) bidireccional *..*\n if ($obj->hasManyOfThis( $_thisClass ))\n {\n return $obj->belonsToClass( $_thisClass ); // problema: get_class(this) tira PO...\n }\n else // casos 3 o 5, como es unidireccional, toma el control la clase del lado que no es visto de la otra.\n {\n return true;\n }\n }\n }\n\n // Si llega aca deberia tirar un warning xq el atributo que me pasaron no es de una relacion...\n return false;\n \n }",
"public function setRelations() {}",
"public function testRelationshipsAreDeletedWithTheirUser(): void\n {\n $user = User::factory()->create([\n 'created_at' => now()->subYear(),\n ]);\n\n $booking = Booking::factory()->for($user)->create();\n $identifier = $user->identifiers()->create(['value' => 'test-value']);\n $subscription = $user->subscription()->create();\n\n $this->artisan('model:prune');\n\n $this->assertModelMissing($user);\n $this->assertModelMissing($booking);\n $this->assertModelMissing($identifier);\n $this->assertModelMissing($subscription);\n }",
"public function unset()\n {\n unset($this->value);\n }",
"public function clear()\n {\n $this->op_prime_id = null;\n $this->op_id = null;\n $this->op_prime_libelle = null;\n $this->op_prime_numero = null;\n $this->gdl_art_id = null;\n $this->operation_prime_currency_id = null;\n $this->operation_prime_r_reward_type_id = null;\n $this->operation_prime_r_reward_expedition_mode_id = null;\n $this->operation_prime_r_reward_transporter_id = null;\n $this->operation_prime_fixed_amount = null;\n $this->operation_prime_product_price_pourcentage = null;\n $this->operation_prime_maximum_amount = null;\n $this->alreadyInSave = false;\n $this->alreadyInValidation = false;\n $this->alreadyInClearAllReferencesDeep = false;\n $this->clearAllReferences();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }",
"public function clear()\n {\n $this->id = null;\n $this->name = null;\n $this->is_active = null;\n $this->is_closed = null;\n $this->from_date = null;\n $this->to_date = null;\n $this->sortable_rank = null;\n $this->alreadyInSave = false;\n $this->alreadyInValidation = false;\n $this->alreadyInClearAllReferencesDeep = false;\n $this->clearAllReferences();\n $this->applyDefaultValues();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }",
"public function has_or_relation()\n {\n }",
"public function safeDown()\n\t{\n $sql=\" ALTER TABLE `tbl_venta` DROP `punto_venta_id` ;\";\n $this->execute($sql);\n //quitando la columna pto_venta de tbl_empleado\n $sql=\" ALTER TABLE `tbl_empleado` DROP `punto_venta_id` ;\";\n $this->execute($sql);\n\t}",
"private function remove()\n {\n $this->checkPersister();\n\n $this->persister->beginTransaction();\n foreach ($this as $entity) {\n if (!empty($entity)) {\n $this->persister->remove($entity);\n }\n }\n\n $this->persister->commitTransaction();\n }",
"public function dropForeignKeys()\n\t{\n\t\t$table = $this->getTableName();\n\n\t\t// Does the table exist?\n\t\tif (blx()->db->getSchema()->getTable('{{'.$table.'}}'))\n\t\t{\n\t\t\tforeach ($this->getBelongsToRelations() as $name => $config)\n\t\t\t{\n\t\t\t\t$otherModel = new $config[1];\n\t\t\t\t$otherTable = $otherModel->getTableName();\n\n\t\t\t\t// Does the other table exist?\n\t\t\t\tif (blx()->db->getSchema()->getTable('{{'.$otherTable.'}}'))\n\t\t\t\t{\n\t\t\t\t\t$fkName = \"{$table}_{$name}_fk\";\n\t\t\t\t\tblx()->db->createCommand()->dropForeignKey($fkName, $table);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public function getForeignKey()\n {\n return 'owner_id';\n }",
"public function cancelled_by()\n {\n return $this->belongsTo(User::class);\n }",
"public function unsetReferenceId(): void\n {\n $this->referenceId = [];\n }",
"public function owner()\n {\n return $this->morphTo('owner');\n }",
"public function owner()\n {\n return $this->morphTo('owner');\n }",
"public function owner(){\n return $this->belongsTo('App\\Models\\User', 'owner_id');\n }",
"function unsetID( )\n {\n unset( $this->ID );\n }",
"public function unsetReferenceId(): self\n {\n $this->instance->unsetReferenceId();\n return $this;\n }",
"public function unsetReferenceId(): self\n {\n $this->instance->unsetReferenceId();\n return $this;\n }",
"public function owner() \n {\n return $this->belongsTo('User', 'user_id');\n }",
"public function owner(){\n return $this->belongsTo(User::class, 'owner_id', 'id');\n }",
"public function testSafeDropNonExistingFk()\n {\n $this->assertCount(2, $this->connection->getForeignKeyNames('writers'));\n $this->connection->dropForeignKey('writers', 'FK that does not exist');\n $this->assertCount(2, $this->connection->getForeignKeyNames('writers'));\n }",
"public function removeIsolated()\n {\n $isolated_types = $this->type->doesntHave('movies')->get();\n\n foreach ($isolated_types as $type) {\n $this->delete($type->id);\n }\n }"
] | [
"0.6332262",
"0.6278244",
"0.603881",
"0.5974293",
"0.5893006",
"0.58798075",
"0.5837344",
"0.58280724",
"0.57459784",
"0.57335603",
"0.5606816",
"0.56056285",
"0.5603825",
"0.559028",
"0.55886203",
"0.5551526",
"0.55196214",
"0.5470628",
"0.5461604",
"0.54381514",
"0.5413374",
"0.5381155",
"0.53727853",
"0.53704274",
"0.5352286",
"0.5347979",
"0.53344625",
"0.5328576",
"0.5327303",
"0.5314024",
"0.53071153",
"0.5302205",
"0.53009355",
"0.529866",
"0.5293027",
"0.5271396",
"0.525463",
"0.5253378",
"0.5253378",
"0.52507323",
"0.52491474",
"0.5232825",
"0.5217082",
"0.5204777",
"0.5202123",
"0.5184861",
"0.51793575",
"0.5173714",
"0.51736337",
"0.51736337",
"0.51726687",
"0.51580614",
"0.5147325",
"0.51312226",
"0.5123645",
"0.5106789",
"0.5103181",
"0.510106",
"0.509806",
"0.50940114",
"0.509167",
"0.5087376",
"0.5086006",
"0.50717884",
"0.50614977",
"0.50410926",
"0.5035281",
"0.5017479",
"0.5012377",
"0.50118035",
"0.5008651",
"0.50075144",
"0.49989247",
"0.4997029",
"0.4993213",
"0.4988235",
"0.49865517",
"0.49836287",
"0.49716368",
"0.49666983",
"0.4966073",
"0.4958011",
"0.49569827",
"0.49547756",
"0.49516636",
"0.49469176",
"0.49426803",
"0.4941936",
"0.4938257",
"0.4937068",
"0.4934504",
"0.49336484",
"0.49336484",
"0.49334833",
"0.4924164",
"0.49210548",
"0.49210548",
"0.4916342",
"0.49146318",
"0.49145448",
"0.49020267"
] | 0.0 | -1 |
Display a listing of the resource. | public function index(Chunk $chunk)
{
$user = $chunk->transaction->user;
return $this->showOne($user);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }",
"public function listing();",
"function index() {\n\t\t$this->show_list();\n\t}",
"public function actionList() {\n $this->_getList();\n }",
"public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }",
"public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }",
"public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }",
"function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}",
"public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }",
"public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }",
"public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}",
"function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}",
"public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }",
"public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}",
"public function actionRestList() {\n\t $this->doRestList();\n\t}",
"public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}",
"public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }",
"public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }",
"public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}",
"public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}",
"public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }",
"public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }",
"public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }",
"public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }",
"public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}",
"public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }",
"public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}",
"public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }",
"public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }",
"public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }",
"public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}",
"public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }",
"public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }",
"public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }",
"public function index()\n {\n return Resources::collection(Checking::paginate());\n }",
"public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }",
"public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }",
"public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }",
"public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }",
"public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }",
"public function view(){\n\t\t$this->buildListing();\n\t}",
"public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }",
"public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }",
"public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }",
"public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }",
"public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }",
"public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }",
"public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }",
"public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }",
"public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }",
"public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}",
"public function listAction() {}",
"public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }",
"public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }",
"public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }",
"public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }",
"public function executeList()\n {\n $this->setTemplate('list');\n }",
"public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }",
"function listing() {\r\n\r\n }",
"public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }",
"public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }",
"public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}",
"public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }",
"public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }",
"public function _index(){\n\t $this->_list();\n\t}",
"public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}",
"function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}",
"public function index()\n {\n $this->booklist();\n }",
"public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }",
"public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }",
"public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }",
"public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }",
"public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }",
"public function indexAction() {\n $this->_forward('list');\n }",
"public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }",
"public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }",
"public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}",
"public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }",
"public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }",
"public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }",
"public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }",
"public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }",
"public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}",
"public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }",
"public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }",
"public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }",
"public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}",
"public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }",
"public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }",
"public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }",
"public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }",
"public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }",
"public function index()\n {\n return view('admin.resources.index');\n }",
"public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}"
] | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.6830523",
"0.6802689",
"0.6797",
"0.67957735",
"0.67871135",
"0.6760129",
"0.67427456",
"0.6730486",
"0.67272323",
"0.67255723",
"0.67255723",
"0.67255723",
"0.67177945",
"0.6707866",
"0.6706713",
"0.6704375",
"0.6664782",
"0.6662871",
"0.6660302",
"0.6659404",
"0.6656656",
"0.6653517",
"0.6647965",
"0.6620322",
"0.66185474",
"0.6618499",
"0.6606105",
"0.6600617",
"0.65996987",
"0.6594775",
"0.6587389",
"0.6585109",
"0.6581641",
"0.6581017",
"0.6577157",
"0.65747666",
"0.6572513",
"0.65721947",
"0.6570553",
"0.65646994",
"0.6563556",
"0.6554194",
"0.65529937",
"0.65460825",
"0.65368485",
"0.653429",
"0.65328294",
"0.6526759",
"0.6526695",
"0.6526284",
"0.65191334",
"0.65183175",
"0.65174305",
"0.651703",
"0.65141153",
"0.6507088",
"0.65061647",
"0.6504046",
"0.64942145",
"0.6491893",
"0.64883405",
"0.6486392",
"0.6485077",
"0.64846045",
"0.6478858",
"0.64756656",
"0.64726377",
"0.6471126",
"0.64701074",
"0.6467418",
"0.6462195",
"0.64618355",
"0.6459199",
"0.6457831",
"0.6454631",
"0.64533997",
"0.6451915",
"0.6450861",
"0.6449301",
"0.64492667",
"0.64469045"
] | 0.0 | -1 |
Get the type of item | public function getType()
{
return $this->type;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getTypeOfItem()\n {\n return $this->type;\n }",
"public function type(): string\n {\n return $this->item['type'];\n }",
"public function get_type() {\n\t\treturn isset( $this->item['type'] ) ? esc_attr( $this->item['type'] ) : false;\n\t}",
"public function get_item_type() {\n $query = $this->db->get('item_type');\n if ($query->num_rows() > 0) {\n return $query->result();\n } else {\n return false;\n }\n }",
"protected function _getItemType()\n {\n return $this->getItemType()\n ? $this->getItemType()\n : $this->getConfig()->getDefaultItemType($this->getStoreId());\n }",
"public function getTipoItem()\n {\n return $this->tipo_item;\n }",
"function get_type() {\n\t\treturn $this->get_data( 'type' );\n\t}",
"public function getType()\n\t{\n\t\treturn $this->get('type');\n\t}",
"function getType() { \n\t\treturn $this->_type; \n\t}",
"public function get_type();",
"function getType() {\n\t\treturn $this->_type;\n\t}",
"function _get_type() {\n\t\treturn $this->type();\n\n\t}",
"public function getType()\n { return $this->get('type'); }",
"function getType () {\n\t\treturn $this->type;\n\t}",
"public function getType()\n {\n return $this->get(self::_TYPE);\n }",
"public function getType()\n {\n return $this->get(self::_TYPE);\n }",
"public function getType()\n {\n return $this->get(self::_TYPE);\n }",
"public function getType()\n {\n return $this->get(self::_TYPE);\n }",
"public function getType()\n {\n return $this->get(self::_TYPE);\n }",
"public function getType()\n {\n return $this->get(self::_TYPE);\n }",
"public function getType()\n {\n return $this->get(self::_TYPE);\n }",
"public function getType()\n {\n return $this->get(self::_TYPE);\n }",
"public function getType()\n {\n return $this->get(self::_TYPE);\n }",
"public function getType()\n {\n return $this->get(self::_TYPE);\n }",
"public function getType()\n {\n return $this->get(self::_TYPE);\n }",
"public function getType()\n {\n return $this->get(self::_TYPE);\n }",
"public function getType()\n {\n return $this->get(self::_TYPE);\n }",
"function getType() {\n\t\treturn $this->type;\n\t}",
"function getType() { return $this->_type; }",
"static function GetItemType() { return \"\"; }",
"public function getType()\r\n {\r\n return $this->m_type;\r\n }",
"public function getType()\r\n {\r\n return $this->_type;\r\n }",
"private function get_type(){\n\t\treturn $this->_type;\n\t}",
"public function getType()\n {\n return $this->_type;\n }",
"public function getType()\n {\n return $this->_type;\n }",
"public function getType()\n {\n return $this->_type;\n }",
"public function getType()\n {\n return $this->_type;\n }",
"public function getType()\n {\n return $this->_type;\n }",
"public function getType()\n {\n return $this->_type;\n }",
"public function getType()\n {\n return $this->_type;\n }",
"public function getType()\n\t{\n\t\treturn $this->getObject('type', null, 'type');\n\t}",
"public function getType()\n {\n\treturn $this->type;\n }",
"public function getType() \n {\n return $this->_type;\n }",
"public function getType() {\n return $this->_type;\n }",
"public function getType() {\n return $this->_type;\n }",
"public function get_type(){\n\t\treturn $this->_type;\n\t}",
"public function getType()\n {\n return $this->type;\n }",
"public function getType()\n {\n return parent::getValue('type');\n }",
"function getType() {\n return $this->type;\n }",
"public function getType()\n\t{\n\t\treturn $this->_type;\n\t}",
"public function getType()\n\t{\n\t\treturn $this->_type;\n\t}",
"public function getType()\n\t{\n\t\treturn $this->type; \n\n\t}"
] | [
"0.8958674",
"0.8254227",
"0.81540245",
"0.7931198",
"0.7861965",
"0.77731735",
"0.76110286",
"0.75611854",
"0.7532477",
"0.7512634",
"0.7508712",
"0.7477433",
"0.74753034",
"0.7471203",
"0.74619067",
"0.74619067",
"0.74619067",
"0.7461859",
"0.7461859",
"0.7461859",
"0.7461859",
"0.7461859",
"0.7461859",
"0.7461859",
"0.7461859",
"0.7461859",
"0.7461859",
"0.7456691",
"0.7453227",
"0.7450031",
"0.743274",
"0.74303526",
"0.7428687",
"0.74167764",
"0.74167764",
"0.74167764",
"0.74167764",
"0.74167764",
"0.74167764",
"0.74167764",
"0.7413115",
"0.7408317",
"0.7396331",
"0.73961264",
"0.73961264",
"0.73778135",
"0.7377703",
"0.7370925",
"0.7369201",
"0.7368573",
"0.7368573",
"0.73651785"
] | 0.0 | -1 |
Set the type of item | public function setType($type): Filemanager
{
$this->type = $type;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setType($type) {}",
"public function setType($type){ }",
"function setType($type) {\n\t\t$this->_type = $type;\n\t}",
"function setType($type) {\n\t\t$this->_type = $type;\n\t}",
"public function setType($type);",
"public function setType($type);",
"public function setType($type);",
"public function setType($type);",
"public function setType($type);",
"public function setType($type);",
"public function setType($type);",
"public function setType($type);",
"public function setType($type)\n {\n parent::setAttr(\"type\", $type);\n }",
"public function setType($type) {\n\t\tswitch ($type) {\n\t\t\tcase 'ul': \n\t\t\t\t$this->tag = \"ul\";\n\t\t\t\t$this->itemTag = \"li\"; \n\t\t\t\tbreak;\n\t\t\tcase 'ol': \n\t\t\t\t$this->tag = \"ol\";\n\t\t\t\t$this->itemTag = \"li\"; \n\t\t\t\tbreak;\n\t\t\tcase 'dl':\n\t\t\t\t$this->tag = \"dl\";\n\t\t\t\t$this->itemTag = \"dt\"; \t\t\t\t\n\t\t\t\tbreak;\n\t\t}\n\t}",
"function setType($type) {\n $this->type = $type;\n }",
"public function setType( $type )\n {\n }",
"public function setTyp( $type );",
"public function setType($type) {\n $this->type = $type;\n }",
"public function setType($type) {\n $this->type = $type;\n }",
"public function setType($type) {\n $this->type = $type;\n }",
"public function setType($type) {\n\t\t$this->data['type'] = $type;\n\t}",
"public function setType($type)\r\n {\r\n $this->type = $type;\r\n }",
"private function update_type($new_type) { \n\n\t\tif ($this->_update_item('type',$new_type,'50')) { \n\t\t\t$this->type = $new_type;\n\t\t}\n\n\t}",
"public function setType($type)\n\t{\n\t\t$this->_type = $type;\n\t}",
"public function setType($type)\n\t{\n\t\t$this->_type = $type;\n\t}",
"public function set_type( $type ) {\n\t\t$this->set_prop( 'type', sanitize_title( $type ) ) ;\n\t}",
"public function setType($type) {\n $this->type = $type;\n }",
"public function setType($type) {\n $this->type = $type;\n }",
"public function setType(string $type);",
"public function setType($type)\n {\n $this->type = $type;\n }",
"public function setType($type)\n {\n $this->type = $type;\n }",
"public function setType($type)\n {\n $this->type = $type;\n }",
"public function setType($type)\n {\n $this->type = $type;\n }",
"public function setType($type)\n {\n $this->type = $type;\n }",
"public function setType($type)\n {\n $this->type = $type;\n }",
"public function setType($type)\n {\n $this->type = $type;\n }",
"public function setType($type)\n {\n $this->type = $type;\n }",
"public function setType($type)\n {\n $this->type = $type;\n }",
"public function SetType($type){\r\r\n\t\t$this->type = (string) $type;\r\r\n\t}",
"public function setType($type)\n {\n $this['type'] = $type;\n }",
"public function setType($type)\n\t{\n\t\t$this->type = $type;\n\t}",
"public function setType($type)\n\t{\n\t\t$this->type = $type;\n\t}",
"public function setType( $type ) {\n\n\t\t$this->type = $type;\n\t}",
"public function SetType($type){\r\n\t\t$this->type = (string) $type;\r\n\t}",
"function setType($type = \"\")\n\t\t{\n\t\t\t$this->type = $type;\n\t\t}",
"public function setType($t){\n $this->type = $t;\n }",
"public function setItemType(QNameType $value): void\n {\n $this->itemTypeAttr = $value;\n }",
"public function setType($v)\n { return $this->set('type', $v); }",
"function setType($a_type)\n\t{\n\t\t$this->il_type = $a_type;\n\t}",
"public function setType(?string $type): void;",
"public function setType($type)\n{\n$this->type = $type;\n\nreturn $this;\n}",
"public function setType(string $type): self;",
"public function setType(string $type): self;",
"function setType($type) {\n\t\treturn $this->type = $type;\n\t}",
"public function setType(?string $type): void\n {\n }",
"protected function setType()\n {\n $this->client_type = $this->getType();\n }",
"public function setListItemType($listItemType) {\n\t\t$allowed = array('disc', 'circle', 'square');\n\t\t\n\t\tif (in_array($listItemType, $allowed)) {\n\t\t\t$this->setAttr('type', $listItemType);\n\t\t}\n\t}",
"public function setType(string $type)\n {\n $this->type = $type;\n }",
"public function setType($type)\n {\n $this->type = $type;\n\n return $this;\n }",
"public function setTypeAttribute($value)\n {\n $this->attributes['type'] = $value;\n }",
"function setType($value)\n {\n $this->setAttribute(\"type\", $value);\n return $this;\n }",
"public function setType(string $type) {\n $this->attributes()->set('type', $type);\n return $this;\n }",
"public function setType($type) {\n\t\tif($type == self::TYPE_TEXT){\n\t\t\t$this->type = self::TYPE_TEXT;\n\t\t} else {\n\t\t\t$this->type = self::TYPE_HTML;\n\t\t}\n\t}",
"public function setType($type)\n {\n $this->type = $type;\n\n return $this;\n }",
"public function setType(string $type): void\n {\n $this->type = $type;\n }",
"public function setType(string $type): void\n {\n $this->type = $type;\n }",
"public function setType(Choice $type)\n\t{\n\t\t$this->type=$type; \n\t\t$this->keyModified['type'] = 1; \n\n\t}",
"public function set_type($type) {\n $this->update([\n 'type' => $type\n ]);\n\n $this->type = $type;\n\n // finish configuring this OrderExchange\n $this->sync();\n }",
"public function setType($type)\n {\n $this->data['type'] = $type;\n return $this;\n }",
"public function set_type($type)\n {\n $this->set_default_property(self::PROPERTY_TYPE, $type);\n }",
"public function setType(?string $type): void\n {\n $this->type = $type;\n }",
"public function setType(?string $type): void\n {\n $this->type = $type;\n }",
"public function setType($type)\n {\n $this->type = $type;\n\n return $this;\n }",
"public function setType()\n {\n return;\n }",
"protected function set_type() {\n\n\t\t\t$this->type = 'kirki-editor';\n\n\t\t}",
"function variant_set_type($variant, $type) {}",
"public function setType($type)\n {\n $this->_type = $type;\n return $this;\n }",
"protected function setType(int $type):void {\r\n\t\t$this->type = $type;\r\n\t}",
"public function setType($type)\n {\n $this->values['Type'] = $type;\n return $this;\n }",
"public function setType($type)\n {\n $this->values['Type'] = $type;\n return $this;\n }",
"function setImageType($iType)\n\t{\n\t\tswitch ($iType) {\n\t\t\tcase 1:\n\t\t\t\t$this->type = $iType;\n\t\t\t\t$this->mimetype = 'image/gif';\n\t\t\t\t$this->setFilenameExtension();\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$this->type = $iType;\n\t\t\t\t$this->mimetype = 'image/jpeg';\n\t\t\t\t$this->setFilenameExtension();\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t$this->type = $iType;\n\t\t\t\t$this->mimetype = 'image/png';\n\t\t\t\t$this->setFilenameExtension();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->printError('invalid imagetype');\n\t\t}\n\t}",
"public function setTypeID($value) {\n\t\t$this->_type_id = $value;\n\t}",
"public function setType($type)\n {\n $this->model->_type = $type;\n return $this;\n }",
"public function setType($Type) \n {\n $this->Type = $Type;\n }",
"public function set($typeId, $class);",
"public function setType($type) :ISEntity\n {\n array_walk($this->types, function($name, $index) use ($type) {\n if($type === $name){\n $this->type = $index;\n }\n });\n if(is_null($this->type)) {\n if(isset($this->types[$type])) {\n $this->type = $type;\n }\n }\n return $this;\n }",
"public function setType($type) {\n $this->type = $type;\n return $this;\n }",
"public function setType($type)\n\n {\n\n $this->type = $type;\n\n\n\n return $this;\n\n }",
"public function set_type(String $_type){\n $this->_type = $_type;\n\n return $this;\n }",
"public function setType($aType) {\n $this->type = $aType;\n }",
"public function type($type)\n {\n $this->is_type = $type;\n return $this;\n }",
"public function setType($type)\n\t\t{\n\t\t\t$this->type = $type;\n\t\t\treturn $this;\n\t\t}",
"public function setType($data)\n {\n $this->_Type=$data;\n return $this;\n }",
"public function setTypeAttribute($type)\n {\n $this->attributes['type'] = str_replace(array(' '),'_',$type);\n }",
"public function setType($type)\n {\n $this->type = $type;\n return $this;\n }",
"public function setType($type)\n {\n $this->type = $type;\n return $this;\n }",
"public function setType($type)\n {\n $this->type = $type;\n return $this;\n }",
"public function setType($type)\n {\n $this->type = $type;\n return $this;\n }",
"public function setType($type)\n {\n $this->type = $type;\n return $this;\n }",
"public function setType($type)\n {\n $this->type = $type;\n return $this;\n }",
"public function setType($type)\n {\n $this->type = $type;\n return $this;\n }"
] | [
"0.7608214",
"0.75960016",
"0.75495374",
"0.75495374",
"0.7512871",
"0.7512871",
"0.7512871",
"0.7512871",
"0.7512871",
"0.7512871",
"0.7512871",
"0.7512871",
"0.75047445",
"0.74713886",
"0.74694693",
"0.7376642",
"0.7368976",
"0.7357867",
"0.7357867",
"0.7357867",
"0.7356744",
"0.73107314",
"0.72849226",
"0.72668386",
"0.72668386",
"0.7253384",
"0.7246702",
"0.7246702",
"0.72276175",
"0.7209959",
"0.7209959",
"0.7209959",
"0.7209959",
"0.7209959",
"0.7209959",
"0.7209959",
"0.7209959",
"0.7209959",
"0.7200643",
"0.71965885",
"0.71889573",
"0.71889573",
"0.7160648",
"0.7148175",
"0.71333975",
"0.71111053",
"0.7087387",
"0.7019054",
"0.69293517",
"0.6928981",
"0.6890922",
"0.6810913",
"0.6810913",
"0.6804503",
"0.6781818",
"0.6768684",
"0.6765221",
"0.6753874",
"0.67412937",
"0.67304575",
"0.6680801",
"0.66714835",
"0.66708755",
"0.6654186",
"0.66495574",
"0.66495574",
"0.6642917",
"0.6640847",
"0.66386706",
"0.6636841",
"0.6631953",
"0.6631953",
"0.65999573",
"0.65978074",
"0.659374",
"0.6577791",
"0.6553877",
"0.65535617",
"0.6528353",
"0.6528353",
"0.6519739",
"0.6493442",
"0.64761937",
"0.64760625",
"0.6474858",
"0.64720577",
"0.64711046",
"0.64650226",
"0.6462832",
"0.6459474",
"0.64588135",
"0.6449173",
"0.6447387",
"0.6441407",
"0.64291954",
"0.64291954",
"0.64291954",
"0.64291954",
"0.64291954",
"0.64291954",
"0.64291954"
] | 0.0 | -1 |
Get last updated datas from generated file | public function getLastUpdatedDatas(): array
{
$default = ['_wpgb_last_sync' => 0];
$lastUpdatedFile = $this->getLastUpdatedFile();
if (!file_exists($lastUpdatedFile)) {
return $default;
}
$this->lastUpdated = include $lastUpdatedFile;
if (!is_array($this->lastUpdated)) {
return $default;
}
if (!isset($this->lastUpdated['_wpgb_last_sync'])) {
$this->lastUpdated['_wpgb_last_sync'] = 0;
}
return $this->lastUpdated;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getLastUpdated();",
"function getLastModified() {\n\t\treturn $this->getData('lastModified');\n\t}",
"function getLastModified()\n {\n $this->loadStats();\n return $this->stat['mtime'];\n }",
"function getUpdatedata()\r\n\t{\r\n\r\n\t\t$elsettings = ELAdmin::config();\r\n\r\n\t\tinclude_once(JPATH_COMPONENT_ADMINISTRATOR.DS.'classes'.DS.'Snoopy.class.php');\r\n\r\n\t\t$snoopy = new Snoopy();\r\n\r\n\t\t//set the source file\r\n\t\t$file = 'http://update.schlu.net/elupdate.php';\r\n\r\n\t\t$snoopy->read_timeout \t= 30;\r\n\t\t$snoopy->agent \t\t\t= \"Mozilla/5.0 (compatible; Konqueror/3.2; Linux 2.6.2) (KHTML, like Gecko)\";\r\n\r\n\t\t$snoopy->fetch($file);\r\n\r\n\t\t$_updatedata = null;\r\n\r\n\t\tif ($snoopy->status != 200 || $snoopy->error) {\r\n\r\n\t\t\t$_updatedata->failed = 1;\r\n\r\n\t\t} else {\r\n\r\n\t\t\t$data = explode('|', $snoopy->results);\r\n\r\n\t\t\t$_updatedata->version \t\t= $data[0];\r\n\t\t\t$_updatedata->versiondetail\t= $data[1];\r\n\t\t\t$_updatedata->date\t\t\t= strftime( $elsettings->formatdate, strtotime( $data[2] ) );\r\n\t\t\t$_updatedata->info \t\t\t= $data[3];\r\n\t\t\t$_updatedata->download \t\t= $data[4];\r\n\t\t\t$_updatedata->notes\t\t\t= $data[5];\r\n\t\t\t$_updatedata->changes \t\t= explode(';', $data[6]);\r\n\t\t\t$_updatedata->failed \t\t= 0;\r\n\r\n\t\t\t$_updatedata->current = version_compare( '1.0.1', $_updatedata->version );\r\n\r\n\t\t}\r\n\r\n\t\treturn $_updatedata;\r\n\t}",
"public function getUpdated();",
"public function getUpdated();",
"protected function last_change() \n\t{\n\t\tif ( !is_null( $this->last_change ) )\n\t\t{\n\t\t\treturn $this->last_change;\n\t\t}\n\t\t\n\t\tforeach( $this->sources as $key => $file ) \n\t\t{\n\t\t\t$files[$key] = filemtime( $file );\n\t\t}\n\n\t\tsort( $files ); $files = array_reverse( $files );\n\n\t\treturn $this->last_change = $files[key($files)];\n\t}",
"public function getModifiedDate()\n {\n $this->modified_date = null;\n\n if ($this->exists === true) {\n } else {\n return;\n }\n\n if ($this->is_file === true) {\n } else {\n return;\n }\n\n $this->modified_date =\n $this->temp_files[$this->path]->year . '-' .\n $this->temp_files[$this->path]->month . '-' .\n $this->temp_files[$this->path]->day . ' ' .\n $this->temp_files[$this->path]->time;\n\n return;\n }",
"public function getLastUpdateDateTime() {\n\t\t// open file\n\t\t$lastUpdateStorageFile = fopen($this::LAST_UPDATE_STORAGE_FILE, $this::FILE_READ_ONLY_MODE);\n\t\n\t\t// read the first and unique line\n\t\t$lastUpdateDateTime = fgets($lastUpdateStorageFile);\n\t\n\t\t// Close the file\n\t\tfclose($lastUpdateStorageFile);\n\t\n\t\treturn $lastUpdateDateTime;\n\t}",
"public function getLastUpdate()\n {\n return Mage::app()->loadCache('admin_notifications_lastcheck');\n// return Mage::getStoreConfig(self::XML_LAST_UPDATE_PATH);\n }",
"public function getLastUpdatedFile(): string\n {\n $path = $this->getJsonTypeFolder();\n $this->lastUpdatedFile = $path . DIRECTORY_SEPARATOR . 'last-updated.php';\n return $this->lastUpdatedFile;\n }",
"function getLastModifiedDate() {\n\t\treturn $this->data_array['last_modified_date'];\n\t}",
"public function lastUpdateStr() {\n $statement = $this->db->prepare('SELECT \"created\" FROM \"temperature\" ORDER BY \"created\" DESC LIMIT 1');\n $result = $statement->execute();\n \n return $result->fetchArray(SQLITE3_ASSOC)['created']; \n }",
"public function getLastModified() {\n\t\treturn filemtime($this->filename);\n\t}",
"public function getLastModified(){\n return $this->lastModified;\n }",
"public function getLastAppData();",
"public function getModified($file);",
"public function generateLastModified()\n {\n static $lastModified;\n \n if ($lastModified !== null) {\n return $lastModified;\n }\n \n $request = Yii::app()->request;\n $row = array();\n \n if ($this->action->id == 'index') {\n \n $listUid = $request->getQuery('list_uid');\n \n $sql = '\n SELECT l.list_id, AVG(UNIX_TIMESTAMP(f.last_updated)) as `timestamp` \n FROM {{list}} l\n INNER JOIN {{list_field}} f ON f.list_id = l.list_id \n WHERE l.list_uid = :uid AND l.customer_id = :cid\n GROUP BY l.list_id \n ';\n $command = Yii::app()->getDb()->createCommand($sql);\n $command->bindValue(':uid', $listUid, PDO::PARAM_STR);\n $command->bindValue(':cid', (int)Yii::app()->user->getId(), PDO::PARAM_INT);\n \n $row = $command->queryRow();\n }\n \n if (isset($row['timestamp'])) {\n $timestamp = round($row['timestamp']);\n // avoid for when subscribers imported having same timestamp\n if (preg_match('/\\.(\\d+)/', $row['timestamp'], $matches)) {\n $timestamp += (int)$matches[1];\n }\n return $lastModified = $timestamp;\n }\n \n return $lastModified = parent::generateLastModified();\n }",
"public function getLastUpdate()\n {\n return $this->cache->load(\n self::CACHE_TAG\n );\n }",
"public function getInfo() {\n $file_info = $this->handler->fetch($this->update_info);\n if (isset($file_info['body'])) {\n return unserialize($file_info['body']);\n } else {\n return unserialize($file_info);\n }\n }",
"public function generateLastModified()\n {\n\n static $lastModified;\n\n if($lastModified!==null)\n {\n return $lastModified;\n }\n\n $request = Yii::app()->request;\n $row = array();\n\n if($this->action->id=='index')\n {\n\n $listUid = $request->getQuery('list_uid');\n $perPage = (int)$request->getQuery('per_page',10);\n $page = (int)$request->getQuery('page',1);\n\n $maxPerPage = 50;\n $minPerPage = 10;\n\n if($perPage<$minPerPage)\n {\n $perPage = $minPerPage;\n }\n\n if($perPage>$maxPerPage)\n {\n $perPage = $maxPerPage;\n }\n\n if($page<1)\n {\n $page = 1;\n }\n\n $list = Lists::model()->findByAttributes(array(\n 'list_uid' => $listUid,\n 'customer_id' => (int)Yii::app()->user->getId(),\n ));\n\n if(empty($list))\n {\n return $lastModified = parent::generateLastModified();\n }\n\n $limit = $perPage;\n $offset = ($page-1)*$perPage;\n\n $sql\n = '\n SELECT AVG(t.last_updated) as `timestamp`\n FROM (\n SELECT `a`.`list_id`, `a`.`status`, UNIX_TIMESTAMP(`a`.`last_updated`) as `last_updated`\n FROM `{{list_subscriber}}` `a`\n WHERE `a`.`list_id` = :lid\n ORDER BY a.`subscriber_id` DESC\n LIMIT :l OFFSET :o\n ) AS t\n WHERE `t`.`list_id` = :lid\n ';\n\n $command = Yii::app()->getDb()->createCommand($sql);\n $command->bindValue(':lid',(int)$list->list_id,PDO::PARAM_INT);\n $command->bindValue(':l',(int)$limit,PDO::PARAM_INT);\n $command->bindValue(':o',(int)$offset,PDO::PARAM_INT);\n\n $row = $command->queryRow();\n\n }\n elseif($this->action->id=='view')\n {\n\n $listUid = $request->getQuery('list_uid');\n $subscriberUid = $request->getQuery('subscriber_uid');\n\n $list = Lists::model()->findByAttributes(array(\n 'list_uid' => $listUid,\n 'customer_id' => (int)Yii::app()->user->getId(),\n ));\n\n if(empty($list))\n {\n return $lastModified = parent::generateLastModified();\n }\n\n $subscriber = ListSubscriber::model()->findByAttributes(array(\n 'subscriber_uid' => $subscriberUid,\n 'list_id' => $list->list_id,\n ));\n\n if(!empty($subscriber))\n {\n $row['timestamp'] = strtotime($subscriber->last_updated);\n }\n }\n\n if(isset($row['timestamp']))\n {\n $timestamp = round($row['timestamp']);\n if(preg_match('/\\.(\\d+)/',$row['timestamp'],$matches))\n {\n $timestamp += (int)$matches[1];\n }\n return $lastModified = $timestamp;\n }\n\n return $lastModified = parent::generateLastModified();\n }",
"public static function getLastModified() {}",
"public function getLastModified()\n {\n return filemtime($this->getFileName());\n }",
"function update_recently_edited($file)\n {\n }",
"public function last_modified() {\n\t\treturn $this->timestamp;\n\t}",
"public function getLastModified();",
"public function getLastModified();",
"public function getLastModified();",
"public function getLastModified();",
"public function updateLastUpdateDateTime() {\n\t\t// open file\n\t\t$lastUpdateStorageFile = fopen($this::LAST_UPDATE_STORAGE_FILE, $this::FILE_READ_WRITE_MODE);\n\t\t\n\t\t// Last update dateTime\n\t\t$date = new \\Datetime();\n\t\n\t\t// write the last update datetime\n\t\t$lastUpdateDateTime = fputs($lastUpdateStorageFile, $date->format('Y-m-d H:i:s'));\n\t\n\t\t// Close the file\n\t\tfclose($lastUpdateStorageFile);\n\t\n\t\treturn $lastUpdateDateTime;\n\t}",
"public function getLastUpdate() {\n\t\treturn $this->lastUpdate;\n\t}",
"public function lastModified(){\n if( $this->modifications ){\n return end( $this->modifications );\n }\n }",
"public function getLastUpdated() {\n return $this->lastUpdated;\n }",
"public function lastModification( ) {\n\n\t\treturn file_exists( $this->_path )\n\t\t\t? filemtime( $this->_path )\n\t\t\t: 0;\n\t}",
"public function getLast_modified() {\n\t\treturn $this->last_modified;\n\t}",
"function generate_recent_json_file() {\n // Open new file to write\n $json_file = new SplFileObject(\"../CCNice5RecentAudioFiles.json\", \"w\");\n $json_file->fwrite(\"[\\n\");\n\n // Retrieve all non new entries from the database\n $result = $this->pdo->query('SELECT * FROM files WHERE publishedfile = 1 ORDER BY date DESC LIMIT 5');\n\n // For each file generate json entry to be used for presentation\n foreach( $result as $i ){\n\n unset($i['newfile']);\n unset($i['flaggedfile']);\n unset($i['flagcomment']);\n unset($i['md5_sign']);\n unset($i['publishedfile']);\n unset($i['translated']);\n unset($i['downloads']);\n unset($i['filepath']);\n\n $readable_size = $this->convert_file_size($i['size']);\n $i['size'] = $readable_size;\n\n $json_file->fwrite(json_encode($i) . \",\\n\");\n }\n\n $json_file->fseek(-2, SEEK_CUR);\n\n $json_file->fwrite(\"\\n]\");\n $json_file = null;\n\n return;\n }",
"public static function last_updated($file)\n\t{\n\t\treturn filemtime($file);\n\t}",
"private function _lastChanged ($file)\n {\n return filectime($file);\n }",
"public function getLastUpdated(): int;",
"public function getLastUpdate()\n {\n return $this->lastUpdate;\n }",
"public function getLastUpdate()\n {\n return $this->lastUpdate;\n }",
"function bps_getLoginSecurityResetFileLastMod() {\n$filename = WP_CONTENT_DIR . '/bps-backup/master-backups/Login-Security-Alert-Reset.txt';\n$gmt_offset = get_option( 'gmt_offset' ) * 3600;\n\nif ( file_exists($filename) ) {\n\t$last_modified = date(\"F d Y H:i:s\", filemtime($filename) + $gmt_offset );\n\treturn $last_modified;\n\t}\n}",
"public function copiesUpdatedAt()\n {\n return Copy::lastUpdate()->toDateTimeString();\n }",
"public function get_daily_update(){\n\t\t$date = date(\"Y-m-d\");\n\n\t\tif(!Storage::disk('local')->exists(explode(\"\\\\\",__METHOD__)[3])){\n\t\t\tStorage::disk('local')->put(explode(\"\\\\\",__METHOD__)[3],\"\");\n\t\t}\n\t\t$log = explode(\"\\n\",Storage::disk('local')->get(explode(\"\\\\\",__METHOD__)[3]))[0]; // __CLASS__.\"@\".__FUNCTION__\n\n\t\tif($log == \"\")\n\t\t\t$new_date = \"\" ;\n\t\telse\n\t\t\t$new_date = json_decode(explode(\"\\n\",$log)[0],true)[0];\n\n\t\tif($new_date != $date){\n\n\t\t\tif($new_date == \"\"){\n\n\t\t\t\t/** first message */\n\t\t\t\t$detail = $this->get_update_range(\"dda_update\",0,\"#\",\"\");\n\n\t\t\t}else{\n\n\t\t\t\t$log_arr = json_decode($log,true);\n\t\t\t\t$last_line_title = array_values(array_slice($log_arr, -1))[0];\n\t\t\t \t$detail = $this->get_update_range(\"dda_update\",-1,\"#\",$last_line_title);\n\t\t\t\tarray_unshift($detail,$last_line_title);\n\n\t\t\t}\n\n\t\t\tarray_unshift($detail, $date);\n\n\t\t\tStorage::disk('local')->prepend(explode(\"\\\\\",__METHOD__)[3], json_encode($detail,JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE));\n\n\t\t}else{\n\n\t\t\t$detail = json_decode($log,true);\n\t\t}\n\n\t\t/**\n\t\t * process: change detail suit for wechat\n\t\t */\n\t\tforeach ($detail as $key => &$value) {\n\n\t\t\tif (strpos($value, '##') !== false && $key == 1) {\n\t\t\t\t$value = str_replace(array('#'), '',$value);\n\t\t\t\t$value = \"Section Title:\".$value;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (strpos($value, '##') !== false && $key == count($detail)-1) {\n\t\t\t\t$value = str_replace(array('#'), '',$value);\n\t\t\t\t$value = \"Next Section: \".$value;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$value = explode(\":*\",$value);\n\n\t\t\tif(isset($value[1])){\n\t\t\t\t$value = $value[1];\n\t\t\t}else{\n\t\t\t\t$value = $value[0];\n\t\t\t}\n\t\t}\n\n\n\t\treturn implode(\"\\n\",$detail);\n\n\t\t\n\t}",
"public function getDataUpdate()\n {\n return $this->data_update;\n }",
"public function getTimestampUpdated()\n {\n return $this->_getData(self::TIMESTAMP_UPDATED);\n }",
"public function getLastModified()\n {\n return $this->_lastModified;\n }",
"public function getLastModified()\n {\n return $this->lastModified;\n }",
"public function getLastModified()\n {\n return ($this->item['mtime'] ? $this->item['mtime'] : ($this->item['ctime'] ? $this->item['ctime'] : time()));\n }",
"public function getData() {\n return array_merge($this->data, $this->updates);\n }",
"public function getLastModified() {\n $cache = $this->getCache();\n\n $lastModified = 0;\n foreach ($cache['files'] as $mtime) {\n $lastModified = max($lastModified, $mtime);\n\n }\n return $lastModified;\n }",
"public function getLastModified()\n\t{\n\t\treturn $this->last_modified;\n\t}",
"public function fin()\n\t{\n\t\treturn $this->generated;\n\t}",
"function getFileRevision() {\n\t\treturn $this->getData('fileRevision');\n\t}",
"function getLastchange() {\n\t\treturn $this->get(\"lastchange\");\n\t}",
"public function getLastModified() {\n\t\treturn null;\n\t}",
"public function getUpdatedAt(){\n return $this->_getData(self::UPDATED_AT);\n }",
"public function getLastSaved(){\n return [];\n }",
"public function getLatestTimestamp()\n {\n return DB::table('product_models')->orderBy('updated', 'desc')->value('updated');\n }",
"public function LastUpdated()\n\t{\n\t\treturn $this->LastUpdated;\n\t}",
"function listLastupdate() {\n //$fileList = glob(\"../blogs/*.md\");\n $fileList = glob(\"blogs/*.md\");\n array_multisort(\n array_map( 'filemtime', $fileList ),\n SORT_NUMERIC,\n SORT_DESC,\n $fileList\n );\n\n $resultList = array();\n\n foreach ($fileList as $filename) {\n $fp = fopen($filename, \"r\");\n $content = fread($fp, filesize($filename));\n fclose($fp);\n\n $contentSplit = explode('---', $content);\n $headers = Yaml::parse($contentSplit[0]);\n\n if( $headers['published'] == 'true' ) {\n $result = new stdClass;\n $result->title = $headers['title'];\n $result->content = Markdown::defaultTransform($contentSplit[1]);;\n $resultList[$filename] = $result;\n }\n }\n return $resultList;\n}",
"function last_version($file_name) {\n echo $file_name .\"?v=\". filemtime($file_name);\n}",
"function getLatestReport($path){\n\t#$path = \"./reports\";\n\n\t$latest_ctime = 0;\n\t$latest_filename = '';\n\n\t$d = dir($path);\n\twhile (false !== ($entry = $d->read())) {\n\t\t$filepath = \"{$path}/{$entry}\";\n\t\t// could do also other checks than just checking whether the entry is a file\n\t\tif (is_file($filepath) && filectime($filepath) > $latest_ctime) {\n\t\t\t$latest_ctime = filectime($filepath);\n\t\t\t$latest_filename = $entry;\n\t \t}\n\t}\t\n\n\treturn $path . \"/\" . $latest_filename;\n\t// now $latest_filename contains the filename of the file that changed last\n}",
"public function getLastModificationDateTime() {\n $timestamp = $this->getUpdatedAt();\n // we don't know when the module content is updated, so we \"guess\"\n if ($this->getModule() != '') {\n $timestamp->setDate(date('Y'), date('m'), date('d'));\n }\n return $timestamp;\n }",
"function fetch_data_old()\n\t{\n\t\treturn $this->data_old;\n\t}",
"public function getLastModifiedAt()\n {\n return $this->lastModifiedAt;\n }",
"public function getLastModifiedAt()\n {\n return $this->lastModifiedAt;\n }",
"public function getLastModifiedAt()\n {\n return $this->lastModifiedAt;\n }",
"public function getLastModifiedAt()\n {\n return $this->lastModifiedAt;\n }",
"public function getLastModifiedAt()\n {\n return $this->lastModifiedAt;\n }",
"public function mtime();",
"public function lastUpdated(): string\n {\n return $this->weather['last_updated'];\n }",
"protected function getTimeStamp(){\n\t\t$result = $this->getFile()->getProperty('tstamp');\n\t\tif ($this->processedFile) {\n\t\t\t$result = $this->processedFile->getProperty('tstamp');\n\t\t}\n\t\treturn $result;\n\t}",
"public function lastModified();",
"public function lastModified();",
"public function getLastModified() {\n\n return null;\n\n }",
"function getData() {\n\t\treturn file_get_contents($this->getFile());\n\t}",
"public function getData() {\n\t\t$this->validate();\n\n\t\t// add file header record\n\t\t$data = $this->header->getData();\n\n\t\t// add file batch records\n\t\tforeach ($this->batches as $batch) {\n\t\t\t$data .= $batch->getData();\n\t\t}\n\t\t// add file control record.\n\t\t$data .= $this->control->getData();\n\n\t\treturn $data;\n\t}",
"public function getUpdatesFromPolling() {\n $updateIdCachePath = __DIR__ . '/last-update-id.txt';\n\n if (file_exists ($updateIdCachePath)) {\n $lastUpdate = file_get_contents($updateIdCachePath);\n $updates = $this->api->getUpdates((int)$lastUpdate + 1);\n } else {\n $updates = $this->api->getUpdates();\n }\n\n $maxUpdateId = 0;\n\n foreach ($updates as $update) {\n $this->processUpdate($update);\n\n $maxUpdateId = $maxUpdateId > $update->getUpdateId() ? $maxUpdateId : $update->getUpdateId();\n }\n\n if ($maxUpdateId) {\n file_put_contents($updateIdCachePath, $maxUpdateId);\n }\n }",
"public function getModified() {}",
"function getLastModifiedTime(){\n /*$output = dbcCmd(\"getLastModifiedTime\\n\");\n \n //Error Check\n if($output[\"stdout\"] == \"failed\\n\"){\n return str_replace(\"\\n\",\"\",$output[\"stdout\"]);\n }\n \n $rtn = array(\"lastModifiedTime\"=>str_replace(\"\\n\",\"\",$output[\"stdout\"]));\n return json_encode($rtn);*/\n return;\n}",
"public function getStamp()\n {\n $this->_init();\n return $this->_list_cache->getStamp();\n }",
"public function getRevisionData()\n {\n return $this->getData();\n }",
"public static function LastModified() {\r\n\t\t$cls = get_called_class();\r\n\t\tif (isset(self::$_lastModified[$cls]) && self::$_lastModified[$cls]->exists()) {\r\n\t\t\treturn self::$_lastModified[$cls];\r\n\t\t}\r\n\t\treturn null;\t\t\r\n\t}",
"protected function get_main_file_data() {\n\t\treturn $this->main_file_data;\n\t}",
"public function latest();",
"public function getInfo()\n {\n return $this->lastInfo;\n }",
"public function getLastUpdateTime()\n {\n return $this->last_update_time;\n }",
"public function getFileTime() {\n /* filemtime — Gets file modification time */\n $xmlfile = FCPATH.\"sitemap.xml\";\n if (file_exists($xmlfile)) {\n return date(\"F d Y H:i:s.\", filemtime($xmlfile));\n }else{\n return FALSE;\n }\n }",
"public function getUpdated() \n\t{\n\t\treturn $this->updated;\n\t}",
"public function getLastChange()\n {\n return $this->get(self::_LAST_CHANGE);\n }",
"public function getLastChange()\n {\n return $this->get(self::_LAST_CHANGE);\n }",
"public function getUpdated()\n {\n return $this->updated;\n }",
"public function getUpdated()\n {\n return $this->updated;\n }",
"public function getUpdated()\n {\n return $this->updated;\n }",
"public function getUpdated()\n {\n return $this->updated;\n }",
"public function getUpdated()\n {\n return $this->updated;\n }",
"public function getUpdated()\n {\n return $this->updated;\n }",
"public function getUpdated()\n {\n return $this->updated;\n }",
"public function getUpdated()\n {\n return $this->updated;\n }"
] | [
"0.67297137",
"0.6566174",
"0.63982856",
"0.6390526",
"0.6368484",
"0.6368484",
"0.6304694",
"0.61964375",
"0.6180791",
"0.6179822",
"0.6175283",
"0.6159767",
"0.6139355",
"0.6110932",
"0.6088952",
"0.60726416",
"0.6061608",
"0.60560626",
"0.604489",
"0.60127044",
"0.60126656",
"0.60105914",
"0.6004622",
"0.59626687",
"0.596266",
"0.59566027",
"0.59566027",
"0.59566027",
"0.59566027",
"0.5956023",
"0.5946383",
"0.59458774",
"0.59453803",
"0.5921738",
"0.59118444",
"0.59098834",
"0.5890248",
"0.58767235",
"0.58669555",
"0.585864",
"0.585864",
"0.58541495",
"0.58535707",
"0.585327",
"0.584687",
"0.584257",
"0.5837884",
"0.58235854",
"0.5822271",
"0.58171",
"0.5806276",
"0.579487",
"0.57757175",
"0.5772509",
"0.57722086",
"0.57602865",
"0.57495",
"0.57447",
"0.5733907",
"0.5719718",
"0.57171714",
"0.5704999",
"0.5690963",
"0.56888294",
"0.5687608",
"0.5673034",
"0.5673034",
"0.5673034",
"0.5673034",
"0.5673034",
"0.56641227",
"0.56592935",
"0.5654864",
"0.5649922",
"0.5649922",
"0.5637173",
"0.56220984",
"0.56191504",
"0.56184465",
"0.56139106",
"0.5596275",
"0.55957305",
"0.5593979",
"0.55729026",
"0.5571605",
"0.55667573",
"0.55645657",
"0.5564212",
"0.55623615",
"0.555769",
"0.55562806",
"0.5555985",
"0.5551645",
"0.5551645",
"0.5551645",
"0.5551645",
"0.5551645",
"0.5551645",
"0.5551645",
"0.5551645"
] | 0.7029623 | 0 |
Get the last updated time | public function getLastUpdated($itemSlug = '_wpgb_last_sync'): int
{
if (!is_null($this->lastUpdated) && isset($this->lastUpdated[$itemSlug])) {
return $this->lastUpdated[$itemSlug];
}
$this->lastUpdated = $this->getLastUpdatedDatas();
return (int)($this->lastUpdated[$itemSlug] ?? 0);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getLastUpdateTime()\n {\n return $this->last_update_time;\n }",
"public function getLastUpdateTime()\n\t{\n\t\treturn empty($this->lastUpdateTime) ? time() : $this->lastUpdateTime;\n\t}",
"public function getUpdatedTime() {\r\n return $this->updated_time;\r\n }",
"public function getLastUpdated();",
"public function lastUpdated()\n {\n // TODO: Implement lastUpdated() method.\n return self::$user['updated_at'];\n\n }",
"public function getUpdatedTime()\n {\n return $this->getAttribute('updatedTime');\n }",
"public function getUpdate_time()\r\n {\r\n return $this->update_time;\r\n }",
"public function getLastUpdatedTime() {\n // Fail due to double delete\n assert(!$this->hasBeenDeleted);\n \n // Fail due to unset 'last-updated-time' field\n assert(isset($this->parentDbFieldTable[self::LAST_UPDATED_TIME_KEY]));\n \n return $this->parentDbFieldTable[self::LAST_UPDATED_TIME_KEY]->getValue();\n }",
"public function getUpdateTime()\r\n {\r\n return $this->update_time;\r\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime() {\n return $this->update_time;\n }",
"public function getUpdatetime()\n {\n return $this->updateTime;\n }",
"public function LastUpdated()\n\t{\n\t\treturn $this->LastUpdated;\n\t}",
"public function getUpdateTime()\n {\n return isset($this->update_time) ? $this->update_time : null;\n }",
"public function getLastAutoRefreshTime()\n {\n return $this->get(self::_LAST_AUTO_REFRESH_TIME);\n }",
"public function getLastUpdated() {\n return $this->lastUpdated;\n }",
"function getLastModified()\n {\n $this->loadStats();\n return $this->stat['mtime'];\n }",
"public function getLastUpdateTime()\n {\n $time = Mage::getStoreConfig(self::XML_GEOIP_UPDATE_DB);\n if (!$time) {\n return false;\n }\n\n return date('F d, Y / h:i', $time);\n }",
"public function getLastUpdate() {\n\t\treturn $this->lastUpdate;\n\t}",
"public function getLastUpdate()\n {\n return $this->lastUpdate;\n }",
"public function getLastUpdate()\n {\n return $this->lastUpdate;\n }",
"public function last_modified() {\n\t\treturn $this->timestamp;\n\t}",
"public function getLastGetTime()\n {\n return $this->get(self::_LAST_GET_TIME);\n }",
"public function getLastStatusUpdateTime()\n {\n return $this->lastStatusUpdateTime;\n }",
"public function lastUpdated(): string\n {\n return $this->weather['last_updated'];\n }",
"public function getLastUpdate()\n {\n return $this->cache->load(\n self::CACHE_TAG\n );\n }",
"public function getLastModified()\n {\n return ($this->item['mtime'] ? $this->item['mtime'] : ($this->item['ctime'] ? $this->item['ctime'] : time()));\n }",
"public function getTimestampUpdated()\n {\n return $this->_getData(self::TIMESTAMP_UPDATED);\n }",
"public function lastUpdated()\n {\n $lastAction = $this->actions->sortBy('updated_at')->last();\n\n if ($lastAction && $lastAction->updated_at->gt($this->updated_at))\n return $lastAction->updated_at;\n else\n return $this->updated_at;\n }",
"function lastUpdate() {\n\t\tif ( !$this->postID && !$this->exists() )\n\t\t\treturn 999;\n\t\t\t\n\t\t$sql = \"SELECT last_update FROM $this->cacheTable WHERE post_id = \" . $this->db->escape( $this->postID ) . \"\";\n\t\t\n\t\t$results = $this->db->get_results( $sql );\n\t\t\n\t\tif ( !$results[0] )\n\t\t\treturn 999;\t\n\t\t\n\t\t$updateTime = strtotime( $results[0]->last_update );\n\t\t$current = strtotime( date( \"Y-m-d H:i:s\" ) );\t\t\n\t\t$lastUpdate = ( $current - $updateTime ) / 3600;\t\t\n\t\t\n\t\treturn $lastUpdate;\t\t\n\t\n\t}",
"public function getLastUpdate(): \\DateTime\n {\n return $this->lastUpdate;\n }",
"public function getLastModifiedTime();",
"public function getUpdateTimestamp()\n {\n return $this->updateTimestamp;\n }",
"public function getLastManualRefreshTime()\n {\n return $this->get(self::_LAST_MANUAL_REFRESH_TIME);\n }",
"public function getLastUpdateDateTime() {\n\t\t// open file\n\t\t$lastUpdateStorageFile = fopen($this::LAST_UPDATE_STORAGE_FILE, $this::FILE_READ_ONLY_MODE);\n\t\n\t\t// read the first and unique line\n\t\t$lastUpdateDateTime = fgets($lastUpdateStorageFile);\n\t\n\t\t// Close the file\n\t\tfclose($lastUpdateStorageFile);\n\t\n\t\treturn $lastUpdateDateTime;\n\t}",
"public function getLastUpdatedAt()\n {\n return $this->last_updated_at;\n }",
"public function getVersionUpdateTime()\n {\n return $this->version_update_time;\n }",
"public function getLastUpdatedOn()\n {\n return $this->_fields['LastUpdatedOn']['FieldValue'];\n }",
"public function getLastUpdateDatetime()\n {\n return $this->getValue('nb_icontact_prospect_last_update_datetime');\n }",
"function get_timemodified() {\n return $this->timemodified;\n }",
"public function getUpdateTs()\n {\n return $this->update_ts;\n }",
"public function updateLastUpdateDateTime() {\n\t\t// open file\n\t\t$lastUpdateStorageFile = fopen($this::LAST_UPDATE_STORAGE_FILE, $this::FILE_READ_WRITE_MODE);\n\t\t\n\t\t// Last update dateTime\n\t\t$date = new \\Datetime();\n\t\n\t\t// write the last update datetime\n\t\t$lastUpdateDateTime = fputs($lastUpdateStorageFile, $date->format('Y-m-d H:i:s'));\n\t\n\t\t// Close the file\n\t\tfclose($lastUpdateStorageFile);\n\t\n\t\treturn $lastUpdateDateTime;\n\t}",
"public function getDateLastUpdated()\n {\n if (isset($this->data['LastUpdatedDate'])) {\n return $this->data['LastUpdatedDate'];\n } else {\n return false;\n }\n }",
"function getLastModified() {\n\t\treturn $this->getData('lastModified');\n\t}",
"public function cached_timestamp()\n\t{\n\t\t$query = $this->_EE->db->get_where('dd_settings', array('key' => 'last_saved'));\n\t\treturn ($query->num_rows() > 0) ? $query->row()->value : 0 ;\n\t}",
"public function getGlobalUpdateTime() {\n\t\t$key = $this->getGlobalMemcKey( 'echo-notification-updated' );\n\t\tif ( $key === false ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn wfTimestamp( TS_MW, ObjectCache::getMainWANInstance()->getCheckKeyTime( $key ) );\n\t}",
"public function getUpdatedAt()\n {\n return $this->sys->getUpdatedAt();\n }",
"public function getLastUpdated(): int;",
"public function getLastStatusUpdate() {\n\t\treturn self::$_lastStatusUpdate;\n\t}",
"public function lastUpdatedDateTime(): string\n {\n return $this->pluck('lastUpdatedDateTime');\n }",
"public function getUpdated(): \\DateTime\n {\n return $this->updated;\n }",
"public function getUpdatedTimeAttribute() {\n\n\t\tif (request()->segment(1) == 'api') {\n\n\t\t\t$date = change_date_format($this->attributes['updated_at']);\n\t\t\t$datemonth = date($date, strtotime($this->attributes['updated_at']));\n\t\t\treturn $datemonth . ' at ' . date('H:i', strtotime($date));\n\n\t\t} else {\n\n\t\t\t$new_str = new DateTime($this->attributes['updated_at'], new DateTimeZone(Config::get('app.timezone')));\n\n\t\t\t$user = auth()->guard('store')->user();\n\t\t\t$new_str->setTimeZone(new DateTimeZone($user->user_address->default_timezone));\n\t\t\t$date = change_date_format($this->attributes['updated_at']);\n\t\t\t$datemonth = date($date, strtotime($this->attributes['updated_at']));\n\t\t\treturn $datemonth . ' at ' . $new_str->format('H:i');\n\n\t\t}\n\n\t}",
"public function getLastUpdated()\n {\n $packages = Package::get()->limit(1);\n if (!$packages->count()) {\n return '';\n }\n /** @var DBDatetime $datetime */\n $datetime = $packages->first()->dbObject('LastEdited');\n return $datetime->Date() . ' ' . $datetime->Time12();\n }",
"public function getUtcUpdated()\n {\n return $this->utc_updated;\n }",
"public function getLastModifiedAt()\n {\n return $this->lastModifiedAt;\n }",
"public function getLastModifiedAt()\n {\n return $this->lastModifiedAt;\n }",
"public function getLastModifiedAt()\n {\n return $this->lastModifiedAt;\n }",
"public function getLastModifiedAt()\n {\n return $this->lastModifiedAt;\n }",
"public function getLastModifiedAt()\n {\n return $this->lastModifiedAt;\n }",
"public function getUpdatedAt(){\n return $this->_getData(self::UPDATED_AT);\n }",
"public function getModifiedTime()\n\t{\n\t\treturn $this->modifiedTime; \n\n\t}",
"public static function getLastModified() {}",
"public function getLatestUpdateDate()\n {\n return $this->channel->getLatestUpdateDate();\n }",
"public function getUpdated_at()\n {\n return $this->updated_at;\n }",
"public function getUpdated_at()\n {\n return $this->updated_at;\n }",
"public function getUpdated_at()\n {\n return $this->updated_at;\n }",
"public function getUpdated_at()\n {\n return $this->updated_at;\n }",
"public function getUpdatedDate()\n {\n return $this->updated;\n }",
"public function getDateUpdated()\n {\n return $this->date_updated;\n }",
"public function getDateUpdated()\n {\n return $this->date_updated;\n }",
"public function getLastCheckTime()\n {\n return $this->cacheManager->load(self::LAST_CHECK_TIME_ID);\n }",
"public function get_short_updated_at()\n\t{\n\t\t$date = $this->updated_at;\n\t\tif ($date) return $date->format('H:i:s d-m-Y');\n\t}",
"public function getUpdateTime()\n\t{\n\t\t$column = self::COL_UPDATE_TIME;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (string)$v;\n\t\t}\n\n\t\treturn $v;\n\t}",
"public function getUpdateTime()\n\t{\n\t\t$column = self::COL_UPDATE_TIME;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (string)$v;\n\t\t}\n\n\t\treturn $v;\n\t}",
"public function getUpdateAt()\n {\n return $this->update_at;\n }",
"public function getUpdateAt()\n {\n return $this->update_at;\n }",
"public function get_updated_at() {\n\t\t\treturn $this->updated_at;\n\t\t}",
"public static function last_update()\n {\n $gallery_date = Gallery::orderBy('updated_at', 'desc')->value('updated_at');\n $gallery_last_date = (!empty($gallery_date)) ? date(strtotime($gallery_date . '+1 hours')) : '';\n $posts_date = Posts::orderBy('updated_at', 'desc')->value('updated_at');\n $posts_last_date = (!empty($posts_date)) ? date(strtotime($posts_date . '+1 hours')) : '';\n $newsletter_date = Newsletter::orderBy('updated_at', 'desc')->value('updated_at');\n $newsletter_last_date = (!empty($newsletter_date)) ? date(strtotime($newsletter_date . '+1 hours')) : '';\n $properties_date =\n DB::table('apimo_properties')\n ->select('updated_at')\n ->where(function($query) {\n $query->orWhere('reference', 'like', 'HSTP%')\n ->orWhere('reference', 'like', 'HD%');\n })\n ->orderBy('updated_at', 'desc')\n ->value('updated_at');\n $properties_last_date = (!empty($properties_date)) ? date(strtotime($properties_date . '+1 hours')) : '';\n\n $dates = [$posts_last_date, $gallery_last_date, $properties_last_date, $newsletter_last_date];\n\n $last_update = max($dates);\n\n return date('d.m.Y - H:i', (!empty($last_update)) ? $last_update : 0);\n }",
"public function getLastModified()\n {\n return $this->lastModified;\n }",
"protected function getTimeLastSaved()\n {\n return SiteConfig::current_site_config()->VimeoFeed_LastSaved;\n }"
] | [
"0.8686498",
"0.8473346",
"0.8449127",
"0.8371488",
"0.83354884",
"0.8262597",
"0.82565516",
"0.8240394",
"0.8182521",
"0.8171897",
"0.8171897",
"0.8171897",
"0.8171897",
"0.8171897",
"0.8171897",
"0.8171897",
"0.8171897",
"0.8171897",
"0.8171897",
"0.8171897",
"0.8171897",
"0.8171897",
"0.8171897",
"0.8171897",
"0.8171897",
"0.8171897",
"0.8171897",
"0.8171897",
"0.8171897",
"0.8171897",
"0.8171897",
"0.81455916",
"0.8131033",
"0.8091393",
"0.8076347",
"0.80226654",
"0.7979482",
"0.79644454",
"0.7915208",
"0.790739",
"0.7901327",
"0.7901327",
"0.78515196",
"0.7850438",
"0.78463256",
"0.7836864",
"0.7822265",
"0.7818896",
"0.777001",
"0.77127975",
"0.7701123",
"0.76844114",
"0.7676496",
"0.7629293",
"0.7582278",
"0.7581677",
"0.75680757",
"0.755914",
"0.75483865",
"0.7548278",
"0.75482225",
"0.75293386",
"0.7519137",
"0.7512956",
"0.74963045",
"0.74892086",
"0.74826926",
"0.7481842",
"0.7471714",
"0.74421835",
"0.7440512",
"0.7439395",
"0.7432097",
"0.7426203",
"0.7424189",
"0.74170333",
"0.74170333",
"0.74170333",
"0.74170333",
"0.74170333",
"0.74004066",
"0.73919743",
"0.7388547",
"0.738699",
"0.7372111",
"0.7372111",
"0.7372111",
"0.7372111",
"0.73702407",
"0.7365981",
"0.7365981",
"0.73615927",
"0.7337224",
"0.7336659",
"0.7336659",
"0.7317943",
"0.7317943",
"0.73105043",
"0.73058176",
"0.7303441",
"0.7302322"
] | 0.0 | -1 |
Set the last update time | public function setLastUpdated(int $lastUpdated, string $label = '_wpgb_last_sync'): Filemanager
{
$params = $this->getLastUpdatedDatas();
$path = $this->getLastUpdatedFile();
$params[$label] = $lastUpdated;
if ($label !== '_wpgb_last_sync') {
$params['_wpgb_last_sync'] = $lastUpdated;
}
$params = $this->cleanLastSyncParams($params);
$phpFileContent = '<?php return ' . var_export($params, true) . ';';
file_put_contents($path, $phpFileContent);
$this->setDbLastUpdated($lastUpdated, $label);
$this->lastUpdated = $lastUpdated;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected static function setSyncLastTime()\n {\n DB::update(\"UPDATE `sync_last_time` SET timestamp = ? WHERE id=?\", [time(), 1]);\n }",
"private function set_last_updated_at() {\n\n\t\tif ( ! static::get_table() instanceof TimestampedTable ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$dirty = $this->is_dirty();\n\n\t\t$this->set_attribute( static::get_table()->get_updated_at_column(), $this->fresh_timestamp() );\n\n\t\t// If the model is dirty, we don't want to commit our save since the user should already be calling save.\n\t\tif ( ! $dirty ) {\n\t\t\t$this->save();\n\t\t}\n\t}",
"function setPasswordUpdatedTime(){\n\t\t$this->setPasswordUpdated(time());\n\t}",
"public function markLastUpdate()\n {\n if (!$this->updatedAtOveridden) {\n $this->updatedAt = new \\DateTime();\n }\n }",
"protected function setUpdated(){\n if($this->_id > 0){\n $pfDB = DB\\Database::instance()->getDB('PF');\n\n $pfDB->exec(\n [\"UPDATE \" . $this->table . \" SET updated=NOW() WHERE id=:id\"],\n [\n [':id' => $this->_id]\n ]\n );\n }\n }",
"public function updateLastUsed()\n {\n if (\n $this->last_used_at === null ||\n $this->last_used_at < (new \\DateTime())->sub(new \\DateInterval('P1D'))\n ) {\n $this->last_used_at = new \\DateTime();\n $this->save();\n }\n }",
"private function setLastModifiedDateTime() {\n\t\ttry {\n\t\t\t$stmt = $this->db->prepare(\"UPDATE `$this->table` SET `datetime-last-modified` = NOW() WHERE `id` = ?\");\n\t\t\t$stmt->execute([$this->getID()]);\n\t\t} catch (PDOException $e) {\n\t\t\techo 'Post.class.php setLastModifiedDateTime() error: <br />';\n\t\t\tthrow new Exception($e->getMessage());\n\t\t}\n\n\t\t// Because we set the datetime from MySQL, we can't use PHP's datetime function to get the time as it may be slightly different\n\t\t$stmt = $this->db->prepare(\"SELECT `datetime-last-modified` FROM `$this->table` WHERE `id` = ?\");\n\t\t$stmt->execute([$this->getID()]);\n\n\t\tforeach ($stmt as $row) {\n\t\t\t$this->lastModifiedDate = $row['datetime-last-modified'];\n\t\t}\n\t}",
"public function setLastUpdate($lastUpdate)\n {\n $this->lastUpdate = $lastUpdate;\n }",
"public function setLastUpdated($lastUpdated);",
"public function setLastUpdate(\\DateTime $lastUpdate)\n {\n $this->lastUpdate = $lastUpdate;\n }",
"public function onPreUpdate()\n {\n $this->lastUpdatedDateTime = new \\DateTime(\"now\");\n }",
"public function updateQueryTime()\n\t{\n\t\t$this->setLastQueryTime(time());\n\t\t$this->save();\n\t}",
"public function setLastStatusUpdate($value) {\n\t\t$value = date('d-M-Y', strtotime($value));\n\t\tself::$_lastStatusUpdate = $value;\n\t}",
"public function getUpdate_time()\r\n {\r\n return $this->update_time;\r\n }",
"public function updateLastPing()\n {\n $this->last_ping = Carbon::now();\n $this->save();\n }",
"public function setTimeStamp()\n\t{\n\t\t$this->_current_timestamp = time();\n\t}",
"public function UpdateLastActivity()\n\t{\n\t\tif (isset($_SESSION['timestamp']) && $_SESSION['timestamp'] - time() > 60 * 10)\n\t\t{\n\t\t\t// If it's been enough time (say, 10 minutes), generate new session ID\n\t\t\t// to help prevent session hijacking\n\t\t\tsession_regenerate_id();\n\t\t\t$_SESSION['timestamp'] = time();\n\t\t}\n\n\t\t$this->LastActivity = now();\n\t\t$this->Save();\n\t}",
"private function updateUpdatedAtField() {\n foreach (static::getFields() as $field_name => $field) {\n if ($field instanceof UpdatedAtField) {\n $this->$field_name = time();\n }\n }\n }",
"public function setLastUpdate()\n {\n Mage::app()->saveCache(time(), 'admin_notifications_lastcheck');\n// $config = Mage::getModel('core/config');\n// /* @var $config Mage_Core_Model_Config */\n// $config->saveConfig(self::XML_LAST_UPDATE_PATH, time());\n return $this;\n }",
"public function getLastUpdateTime()\n {\n return $this->last_update_time;\n }",
"public function refreshUpdated()\n {\n $this->setUpdated(new \\DateTime());\n }",
"public function onPreUpdate()\r\n {\r\n $this->updated_at = new \\DateTime(\"now\");\r\n }",
"protected function _update()\n\t{\n\t\t$this->date_modified = \\Core\\Date::getInstance(null,\\Core\\Date::SQL_FULL, true)->toString();\n\t\t$this->last_online = $this->date_modified;\n\t}",
"public function UpdateLastLogin() {\r\n\t\t\t$_SESSION[__CLASS__.$this->intId.'_LastLogin'] = $this->dttLastLogin;\r\n\t\t\t$this->dttLastLogin = new QDateTime(QDateTime::Now);\r\n\t\t}",
"public function refreshUpdated() {\n $this->setUpdated(new \\DateTime(\"now\"));\n}",
"public function getUpdatetime()\n {\n return $this->updateTime;\n }",
"public function setSysLastChanged() {}",
"public function onPreUpdate()\n {\n $this->updated = new \\DateTime(\"now\");\n }",
"public function updateUpdatedAt()\n {\n $this->setUpdatedAt(new \\Datetime());\n }",
"private function _timestamp()\n \t{\n \t\t$this->updated_at = time();\n \t\tif (!$this->exists) $this->created_at = $this->updated_at;\n \t}",
"public function update_login_time() {\n\t\t$this->last_login = date('Y-m-d H:i:s');\n\t\t$this->db->update('admin_login', $this, array('id' => 1));\n\t}",
"public function onPreUpdate()\n {\n $this->modified_at = new \\DateTime(\"now\");\n }",
"public function beforeUpdate()\n {\n\t\t// Asignar fecha y hora de ultima actualizacion\n// $this->updatedon = time();\n }",
"public function getUpdateTime()\r\n {\r\n return $this->update_time;\r\n }",
"public function onPreUpdate(): void\n {\n $this->updated = new DateTime(\"now\", new DateTimeZone(\"UTC\"));\n }",
"public function onPreUpdate(): void\n {\n $this->updated = new DateTime(\"now\", new DateTimeZone(\"UTC\"));\n }",
"function set_date_to_now()\n {\n $this->timestamp=time();\n }",
"public function beforeUpdate()\n {\n $this->update_at=time();\n }",
"public function onPreUpdate()\n {\n $this->updated = new \\DateTime('now');\n }",
"protected function setUpdatedTime($updated_time) {\r\n $this->updated_time = strtotime($updated_time);\r\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function preUpdate()\n {\n $this->updated = new \\DateTime(\"now\");\n }",
"public function preUpdate()\n {\n $this->updated = new \\DateTime(\"now\");\n }",
"public function getUpdateTime()\n {\n return isset($this->update_time) ? $this->update_time : null;\n }",
"public function setLastUpdatedDateTime($val)\n {\n $this->_propDict[\"lastUpdatedDateTime\"] = $val;\n return $this;\n }",
"public function setLastUpdatedDateTime($val)\n {\n $this->_propDict[\"lastUpdatedDateTime\"] = $val;\n return $this;\n }",
"public function setLastUpdatedDateTime($val)\n {\n $this->_propDict[\"lastUpdatedDateTime\"] = $val;\n return $this;\n }",
"public function refreshTimestamp();",
"public function getUpdatedTime() {\r\n return $this->updated_time;\r\n }",
"public function updateTopicModifiedDate()\n {\n $this->setAttribute( 'modified', time() );\n $this->store();\n }",
"public function getLastUpdated();",
"public function addUpdated()\n {\n try {\n $date = new DateTime();\n $this->updated_at = $date->format('Y-m-d H:i:s');\n $this->updated_by = 0;\n } catch (Exception $e) {\n print_r($e);\n }\n }",
"public function refreshUpdateAt() {\n // Get session\n $securitySession = $this->getSecuritySession();\n if($securitySession != null) {\n $securitySession[self::SESS_UPDATED_AT] = time();\n $this->setSecuritySessionFromArray($securitySession);\n }\n }",
"public function onPreUpdate()\n {\n $this->updatedAt = new \\DateTime(\"now\");\n }",
"private function setLastUpdateDate( $date ) {\n Mage::getModel('core/config')->saveConfig('taxjar/config/last_update', $date);\n }",
"public function onPreUpdate()\n {\n $this->fechaUltimaModificacion = new \\DateTime(\"now\");\n }",
"public function setLastLogin() {\n $this->lastLogin = new DateTime();\n }",
"protected function _update()\n {\r\n $this->date_updated = new Zend_Db_Expr(\"NOW()\");\n parent::_update();\n }",
"public function setLastUpdatedDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('lastUpdatedDateTime', $value);\n }",
"public function setLastUpdate($v)\n {\n $dt = PropelDateTime::newInstance($v, null, 'DateTime');\n if ($this->last_update !== null || $dt !== null) {\n $currentDateAsString = ($this->last_update !== null && $tmpDt = new DateTime($this->last_update)) ? $tmpDt->format('Y-m-d H:i:s') : null;\n $newDateAsString = $dt ? $dt->format('Y-m-d H:i:s') : null;\n if ( ($currentDateAsString !== $newDateAsString) // normalized values don't match\n || ($dt->format('Y-m-d H:i:s') === '2021-06-07 11:49:57') // or the entered value matches the default\n ) {\n $this->last_update = $newDateAsString;\n $this->modifiedColumns[] = SanitasiPeer::LAST_UPDATE;\n }\n } // if either are not null\n\n\n return $this;\n }",
"public function onPreUpdate()\n {\n $this->setUpdated(new \\DateTime(\"now\"));\n }",
"public function _update()\n {\n $this->updatedAt = new \\DateTime();\n }",
"public function getUpdateTime() {\n return $this->update_time;\n }",
"public function setLastUpdate($v)\n {\n $dt = PropelDateTime::newInstance($v, null, 'DateTime');\n if ($this->last_update !== null || $dt !== null) {\n $currentDateAsString = ($this->last_update !== null && $tmpDt = new DateTime($this->last_update)) ? $tmpDt->format('Y-m-d H:i:s') : null;\n $newDateAsString = $dt ? $dt->format('Y-m-d H:i:s') : null;\n if ($currentDateAsString !== $newDateAsString) {\n $this->last_update = $newDateAsString;\n $this->modifiedColumns[] = JadwalPeer::LAST_UPDATE;\n }\n } // if either are not null\n\n\n return $this;\n }",
"public function refreshUpdated(): void\n {\n $this->setUpdatedAt(new \\DateTime());\n }",
"public function setLastUpdated($lastUpdated) {\n\t\t$this->lastUpdated = $lastUpdated !== null ? ((int) $lastUpdated) : null;\n\t}",
"function set_timemodified() {\n $this->timemodified = time();\n return true;\n }",
"public function preUpdate()\n {\n $this->updated = new \\DateTime();\n }",
"public function setLastUpdatedNow()\n {\n $this->setLastUpdated(new \\DateTime());\n return $this;\n }",
"public function getLastUpdateTime()\n\t{\n\t\treturn empty($this->lastUpdateTime) ? time() : $this->lastUpdateTime;\n\t}",
"public function updateLastUpdateDateTime() {\n\t\t// open file\n\t\t$lastUpdateStorageFile = fopen($this::LAST_UPDATE_STORAGE_FILE, $this::FILE_READ_WRITE_MODE);\n\t\t\n\t\t// Last update dateTime\n\t\t$date = new \\Datetime();\n\t\n\t\t// write the last update datetime\n\t\t$lastUpdateDateTime = fputs($lastUpdateStorageFile, $date->format('Y-m-d H:i:s'));\n\t\n\t\t// Close the file\n\t\tfclose($lastUpdateStorageFile);\n\t\n\t\treturn $lastUpdateDateTime;\n\t}",
"public function onPreUpdate()\n {\n $this->updatedAt = new \\DateTime(\"now\");\n }",
"public function onPreUpdate()\n {\n $this->updatedAt = new \\DateTime(\"now\");\n }",
"public function setLastUpdateAttribute($date)\n {\n $myDate = Carbon::createFromFormat('Y-m-d', $date);\n if ($myDate > Carbon::now()) {\n $this->attributes['last_update'] = Carbon::parse($date);\n } else {\n $this->attributes['last_update'] = Carbon::createFromFormat('Y-m-d', $date);\n }\n }",
"public function setLastUpdateAttribute($date)\n {\n $myDate = Carbon::createFromFormat('Y-m-d', $date);\n if ($myDate > Carbon::now()) {\n $this->attributes['last_update'] = Carbon::parse($date);\n } else {\n $this->attributes['last_update'] = Carbon::createFromFormat('Y-m-d', $date);\n }\n }",
"public function setLastCommentTimeAsCurrent()\n {\n return $this->setLastCommentTime(date('Y-m-d H:i:s'));\n }",
"public function setLastUpdate($v)\n {\n $dt = PropelDateTime::newInstance($v, null, 'DateTime');\n if ($this->last_update !== null || $dt !== null) {\n $currentDateAsString = ($this->last_update !== null && $tmpDt = new DateTime($this->last_update)) ? $tmpDt->format('Y-m-d H:i:s') : null;\n $newDateAsString = $dt ? $dt->format('Y-m-d H:i:s') : null;\n if ( ($currentDateAsString !== $newDateAsString) // normalized values don't match\n || ($dt->format('Y-m-d H:i:s') === '2020-04-16 09:40:03') // or the entered value matches the default\n ) {\n $this->last_update = $newDateAsString;\n $this->modifiedColumns[] = SekolahPaudPeer::LAST_UPDATE;\n }\n } // if either are not null\n\n\n return $this;\n }",
"public function onPreUpdate()\n {\n $this->updatedAt = new DateTime();\n }",
"public function onPreUpdate()\n {\n $this->updatedAt = new DateTime();\n }",
"function updateLastModifiedDate() {\n\t\t$res = db_query_params ('UPDATE artifact SET last_modified_date=EXTRACT(EPOCH FROM now())::integer WHERE artifact_id=$1',\n\t\t\tarray ($this->getID()));\n\t\treturn (!$res);\n\t}"
] | [
"0.8155485",
"0.77068883",
"0.74061143",
"0.7370321",
"0.7333412",
"0.72929245",
"0.72300535",
"0.72154397",
"0.71358526",
"0.70852673",
"0.70781827",
"0.7046952",
"0.7044843",
"0.7026482",
"0.7024208",
"0.6999232",
"0.6966089",
"0.69466645",
"0.6945771",
"0.6941941",
"0.69284564",
"0.69196",
"0.69127923",
"0.68816626",
"0.6870996",
"0.6846551",
"0.6830727",
"0.68279564",
"0.682222",
"0.681742",
"0.68091846",
"0.68013906",
"0.6793986",
"0.6779875",
"0.67575663",
"0.67575663",
"0.67406726",
"0.6738965",
"0.67353714",
"0.67121696",
"0.67066044",
"0.67066044",
"0.67066044",
"0.67066044",
"0.67066044",
"0.67066044",
"0.67066044",
"0.67066044",
"0.67066044",
"0.67066044",
"0.67066044",
"0.67066044",
"0.67066044",
"0.67066044",
"0.67066044",
"0.67066044",
"0.67066044",
"0.67066044",
"0.67066044",
"0.67066044",
"0.67066044",
"0.67066044",
"0.6700717",
"0.6700717",
"0.6700558",
"0.67002916",
"0.67002916",
"0.67002916",
"0.6699695",
"0.6697338",
"0.6696001",
"0.66951084",
"0.6690033",
"0.66840875",
"0.66834843",
"0.6682447",
"0.66811705",
"0.6674537",
"0.6672779",
"0.66685563",
"0.6658329",
"0.66579103",
"0.6656182",
"0.66548765",
"0.66527957",
"0.66523474",
"0.6644811",
"0.66443866",
"0.6639934",
"0.6633486",
"0.6618628",
"0.66175663",
"0.6593075",
"0.6593075",
"0.6591494",
"0.6591494",
"0.65911233",
"0.65664214",
"0.65656203",
"0.65656203",
"0.65586096"
] | 0.0 | -1 |
Get the last updated time from database | public function getDbLastUpdated($itemSlug = '_wpgb_last_sync'): int
{
$lastUpdated = $this->getDbLastSync();
if (!isset($lastUpdated[$itemSlug])) {
$lastUpdated[$itemSlug] = 0;
}
return (int)$lastUpdated[$itemSlug];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getLastUpdatedTime() {\n // Fail due to double delete\n assert(!$this->hasBeenDeleted);\n \n // Fail due to unset 'last-updated-time' field\n assert(isset($this->parentDbFieldTable[self::LAST_UPDATED_TIME_KEY]));\n \n return $this->parentDbFieldTable[self::LAST_UPDATED_TIME_KEY]->getValue();\n }",
"public function lastUpdated()\n {\n // TODO: Implement lastUpdated() method.\n return self::$user['updated_at'];\n\n }",
"public function getLastUpdated();",
"public function getLastUpdateTime()\n {\n return $this->last_update_time;\n }",
"public function getUpdatedTime() {\r\n return $this->updated_time;\r\n }",
"public function getUpdatedTime()\n {\n return $this->getAttribute('updatedTime');\n }",
"public function LastUpdated()\n\t{\n\t\treturn $this->LastUpdated;\n\t}",
"public function getUpdate_time()\r\n {\r\n return $this->update_time;\r\n }",
"function lastUpdate() {\n\t\tif ( !$this->postID && !$this->exists() )\n\t\t\treturn 999;\n\t\t\t\n\t\t$sql = \"SELECT last_update FROM $this->cacheTable WHERE post_id = \" . $this->db->escape( $this->postID ) . \"\";\n\t\t\n\t\t$results = $this->db->get_results( $sql );\n\t\t\n\t\tif ( !$results[0] )\n\t\t\treturn 999;\t\n\t\t\n\t\t$updateTime = strtotime( $results[0]->last_update );\n\t\t$current = strtotime( date( \"Y-m-d H:i:s\" ) );\t\t\n\t\t$lastUpdate = ( $current - $updateTime ) / 3600;\t\t\n\t\t\n\t\treturn $lastUpdate;\t\t\n\t\n\t}",
"public function getUpdatetime()\n {\n return $this->updateTime;\n }",
"public function getUpdateTime()\n\t{\n\t\t$column = self::COL_UPDATE_TIME;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (string)$v;\n\t\t}\n\n\t\treturn $v;\n\t}",
"public function getUpdateTime()\n\t{\n\t\t$column = self::COL_UPDATE_TIME;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (string)$v;\n\t\t}\n\n\t\treturn $v;\n\t}",
"public function getTimestampUpdated()\n {\n return $this->_getData(self::TIMESTAMP_UPDATED);\n }",
"public function getLastUpdate()\n {\n return $this->lastUpdate;\n }",
"public function getLastUpdate()\n {\n return $this->lastUpdate;\n }",
"public function lastUpdateStr() {\n $statement = $this->db->prepare('SELECT \"created\" FROM \"temperature\" ORDER BY \"created\" DESC LIMIT 1');\n $result = $statement->execute();\n \n return $result->fetchArray(SQLITE3_ASSOC)['created']; \n }",
"public function getLastUpdate() {\n\t\treturn $this->lastUpdate;\n\t}",
"protected static function queryLastSyncTimeOnDb()\n {\n $sync_last_time = DB::table(\"sync_last_time\")->value('timestamp');\n\n return ($sync_last_time);\n }",
"public function getLastUpdatedAt()\n {\n return $this->last_updated_at;\n }",
"public function getLastUpdateTime()\n\t{\n\t\treturn empty($this->lastUpdateTime) ? time() : $this->lastUpdateTime;\n\t}",
"public function getLastUpdated() {\n return $this->lastUpdated;\n }",
"public function lastUpdated()\n {\n $lastAction = $this->actions->sortBy('updated_at')->last();\n\n if ($lastAction && $lastAction->updated_at->gt($this->updated_at))\n return $lastAction->updated_at;\n else\n return $this->updated_at;\n }",
"public function getLastUpdate(): \\DateTime\n {\n return $this->lastUpdate;\n }",
"public function getLastUpdateTime()\n {\n $time = Mage::getStoreConfig(self::XML_GEOIP_UPDATE_DB);\n if (!$time) {\n return false;\n }\n\n return date('F d, Y / h:i', $time);\n }",
"public function getUpdatedAt(){\n return $this->_getData(self::UPDATED_AT);\n }",
"public function getLatestTimestamp()\n {\n return DB::table('product_models')->orderBy('updated', 'desc')->value('updated');\n }",
"public function getLastUpdatedOn()\n {\n return $this->_fields['LastUpdatedOn']['FieldValue'];\n }",
"public function last_modified() {\n\t\treturn $this->timestamp;\n\t}",
"public function lastUpdatedDateTime(): string\n {\n return $this->pluck('lastUpdatedDateTime');\n }",
"public function getUpdateTime()\r\n {\r\n return $this->update_time;\r\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"function lastupdatetime($table){\n if (first(\"SHOW TABLE STATUS FROM \" . $GLOBALS[\"database\"] . \" LIKE '\" . $table . \"';\", true , \"API.lastupdatetime\")[\"Engine\"] == \"InnoDB\") {\n $filename = first('SHOW VARIABLES WHERE Variable_name = \"datadir\"', true , \"API.lastupdatetime\")[\"Value\"] . $GLOBALS[\"database\"] . '/' . $table . '.ibd';\n return filemtime($filename);//UNIX datestamp\n }\n return first(\"SELECT UPDATE_TIME FROM information_schema.tables WHERE TABLE_SCHEMA = '\" . $GLOBALS[\"database\"] . \"' AND TABLE_NAME = '\" . $table . \"'\", true , \"API.lastupdatetime\")[\"UPDATE_TIME\"];//unknown format\n}",
"public function getUpdateTime()\n {\n return isset($this->update_time) ? $this->update_time : null;\n }",
"function getLastModified()\n {\n $this->loadStats();\n return $this->stat['mtime'];\n }",
"public function getUpdateTimestamp()\n {\n return $this->updateTimestamp;\n }",
"public function getLastUpdated()\n {\n $packages = Package::get()->limit(1);\n if (!$packages->count()) {\n return '';\n }\n /** @var DBDatetime $datetime */\n $datetime = $packages->first()->dbObject('LastEdited');\n return $datetime->Date() . ' ' . $datetime->Time12();\n }",
"public function getLastAutoRefreshTime()\n {\n return $this->get(self::_LAST_AUTO_REFRESH_TIME);\n }",
"public function getUpdateTime() {\n return $this->update_time;\n }",
"public function getUpdatedAt()\n {\n return $this->sys->getUpdatedAt();\n }",
"public function getDateLastUpdated()\n {\n if (isset($this->data['LastUpdatedDate'])) {\n return $this->data['LastUpdatedDate'];\n } else {\n return false;\n }\n }",
"public function getLastUpdate()\n {\n return $this->cache->load(\n self::CACHE_TAG\n );\n }",
"public function getLastUpdateDatetime()\n {\n return $this->getValue('nb_icontact_prospect_last_update_datetime');\n }",
"public function getLastUpdated(): int;",
"public function getLastModified()\n {\n return ($this->item['mtime'] ? $this->item['mtime'] : ($this->item['ctime'] ? $this->item['ctime'] : time()));\n }",
"public static function last_update()\n {\n $gallery_date = Gallery::orderBy('updated_at', 'desc')->value('updated_at');\n $gallery_last_date = (!empty($gallery_date)) ? date(strtotime($gallery_date . '+1 hours')) : '';\n $posts_date = Posts::orderBy('updated_at', 'desc')->value('updated_at');\n $posts_last_date = (!empty($posts_date)) ? date(strtotime($posts_date . '+1 hours')) : '';\n $newsletter_date = Newsletter::orderBy('updated_at', 'desc')->value('updated_at');\n $newsletter_last_date = (!empty($newsletter_date)) ? date(strtotime($newsletter_date . '+1 hours')) : '';\n $properties_date =\n DB::table('apimo_properties')\n ->select('updated_at')\n ->where(function($query) {\n $query->orWhere('reference', 'like', 'HSTP%')\n ->orWhere('reference', 'like', 'HD%');\n })\n ->orderBy('updated_at', 'desc')\n ->value('updated_at');\n $properties_last_date = (!empty($properties_date)) ? date(strtotime($properties_date . '+1 hours')) : '';\n\n $dates = [$posts_last_date, $gallery_last_date, $properties_last_date, $newsletter_last_date];\n\n $last_update = max($dates);\n\n return date('d.m.Y - H:i', (!empty($last_update)) ? $last_update : 0);\n }",
"public function lastUpdated(): string\n {\n return $this->weather['last_updated'];\n }",
"protected static function updated_at(): mixed\n\t{\n\t\treturn self::$query->updated_at;\n\t}",
"protected static function updated_at(): mixed\n\t{\n\t\treturn self::$query->updated_at;\n\t}",
"public function getUpdatedTimeAttribute() {\n\n\t\tif (request()->segment(1) == 'api') {\n\n\t\t\t$date = change_date_format($this->attributes['updated_at']);\n\t\t\t$datemonth = date($date, strtotime($this->attributes['updated_at']));\n\t\t\treturn $datemonth . ' at ' . date('H:i', strtotime($date));\n\n\t\t} else {\n\n\t\t\t$new_str = new DateTime($this->attributes['updated_at'], new DateTimeZone(Config::get('app.timezone')));\n\n\t\t\t$user = auth()->guard('store')->user();\n\t\t\t$new_str->setTimeZone(new DateTimeZone($user->user_address->default_timezone));\n\t\t\t$date = change_date_format($this->attributes['updated_at']);\n\t\t\t$datemonth = date($date, strtotime($this->attributes['updated_at']));\n\t\t\treturn $datemonth . ' at ' . $new_str->format('H:i');\n\n\t\t}\n\n\t}",
"public function getDateUpdated()\n {\n return $this->date_updated;\n }",
"public function getDateUpdated()\n {\n return $this->date_updated;\n }",
"public function cached_timestamp()\n\t{\n\t\t$query = $this->_EE->db->get_where('dd_settings', array('key' => 'last_saved'));\n\t\treturn ($query->num_rows() > 0) ? $query->row()->value : 0 ;\n\t}",
"public function getUpdateAt()\n {\n return $this->update_at;\n }",
"public function getUpdateAt()\n {\n return $this->update_at;\n }",
"public function getUpdated(): \\DateTime\n {\n return $this->updated;\n }",
"public function getUpdated_at()\n {\n return $this->updated_at;\n }",
"public function getUpdated_at()\n {\n return $this->updated_at;\n }",
"public function getUpdated_at()\n {\n return $this->updated_at;\n }",
"public function getUpdated_at()\n {\n return $this->updated_at;\n }",
"public function getLastUpdateDateTime() {\n\t\t// open file\n\t\t$lastUpdateStorageFile = fopen($this::LAST_UPDATE_STORAGE_FILE, $this::FILE_READ_ONLY_MODE);\n\t\n\t\t// read the first and unique line\n\t\t$lastUpdateDateTime = fgets($lastUpdateStorageFile);\n\t\n\t\t// Close the file\n\t\tfclose($lastUpdateStorageFile);\n\t\n\t\treturn $lastUpdateDateTime;\n\t}",
"public function updated_at()\n\t{\n return $this->date($this->updated_at);\n\t}",
"public function updated_at()\n\t{\n return $this->date($this->updated_at);\n\t}",
"public function updated_at()\n\t{\n return $this->date($this->updated_at);\n\t}",
"public function getDateUpdate()\n {\n return $this->date_update;\n }",
"public function getDateUpdate()\n {\n return $this->date_update;\n }",
"public function getLastModifiedTime();",
"function getUpdateTime(){\n\t\t$max = 0;\n\t\t$tables =& $this->tables();\n\t\tforeach ( array_keys($tables()) as $tablename ){\n\t\t\t$max = max($max, strtotime($tables[$tablename]->getUpdateTime()) );\n\t\t}\n\t\treturn date('Y-m-d H:i:s', $max);\n\t}",
"public function getUpdatedDate()\n {\n return $this->updated;\n }",
"public function getUpdatedAt()\n\t{\n\t\treturn $this->updatedAt;\n\t}",
"function getLastModified() {\n\t\treturn $this->getData('lastModified');\n\t}",
"public function getLastGetTime()\n {\n return $this->get(self::_LAST_GET_TIME);\n }",
"public function updatedAt(){\n return $this->_formatDate($this->updated_at);\n }",
"public function get_updated_at() {\n\t\t\treturn $this->updated_at;\n\t\t}",
"public function getUpdatedAt()\n {\n return $this->updated_at;\n }",
"public function getUpdatedAt()\n {\n return $this->updated_at;\n }",
"public function getUpdatedAt()\n {\n return $this->updated_at;\n }",
"public function getUpdatedAt()\n {\n return $this->updated_at;\n }",
"public function getUpdatedAt()\n {\n return $this->updated_at;\n }",
"public function getUpdatedAt()\n {\n return $this->updated_at;\n }",
"public function getUpdatedAt()\n {\n return $this->updated_at;\n }"
] | [
"0.82712525",
"0.8089064",
"0.8056265",
"0.8006304",
"0.79064226",
"0.778679",
"0.7732577",
"0.7727924",
"0.7718884",
"0.7701962",
"0.7662897",
"0.7662897",
"0.7648392",
"0.763974",
"0.763974",
"0.7627361",
"0.7613628",
"0.76116157",
"0.76116127",
"0.7606241",
"0.7593019",
"0.7567166",
"0.75574124",
"0.75551677",
"0.75250113",
"0.7513177",
"0.75049275",
"0.7488769",
"0.7472375",
"0.74466634",
"0.7442608",
"0.7442608",
"0.7442608",
"0.7442608",
"0.7442608",
"0.7442608",
"0.7442608",
"0.7442608",
"0.7442608",
"0.7442608",
"0.7442608",
"0.7442608",
"0.7442608",
"0.7442608",
"0.7442608",
"0.7442608",
"0.7442608",
"0.7442608",
"0.7442608",
"0.7442608",
"0.7442608",
"0.7442608",
"0.7442238",
"0.74369544",
"0.74308294",
"0.7415104",
"0.74136627",
"0.7400347",
"0.73967767",
"0.7387199",
"0.73718435",
"0.7358497",
"0.7356202",
"0.7334211",
"0.7326053",
"0.73163396",
"0.7294384",
"0.7286641",
"0.7286641",
"0.7270135",
"0.7260558",
"0.7260558",
"0.72591674",
"0.7245013",
"0.7245013",
"0.7238868",
"0.72291887",
"0.72291887",
"0.72291887",
"0.72291887",
"0.72264177",
"0.7218029",
"0.7218029",
"0.7218029",
"0.7206744",
"0.7206744",
"0.71912587",
"0.71789294",
"0.71755815",
"0.7170351",
"0.7170271",
"0.7157495",
"0.7156537",
"0.7152326",
"0.71455824",
"0.71455824",
"0.71455824",
"0.71455824",
"0.71455824",
"0.71455824",
"0.71455824"
] | 0.0 | -1 |
Get the last updated time from database | public function setDbLastUpdated($lastUpdated, string $label = '_wpgb_last_sync'): bool
{
$lastSync = $this->getDbLastSync();
$lastSync[$label] = $lastUpdated;
if ($label !== '_wpgb_last_sync') {
$lastSync['_wpgb_last_sync'] = $lastUpdated;
}
$lastSync = $this->cleanLastSyncParams($lastSync);
return update_option("wpgb/{$this->type}/last_sync", $lastSync, true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getLastUpdatedTime() {\n // Fail due to double delete\n assert(!$this->hasBeenDeleted);\n \n // Fail due to unset 'last-updated-time' field\n assert(isset($this->parentDbFieldTable[self::LAST_UPDATED_TIME_KEY]));\n \n return $this->parentDbFieldTable[self::LAST_UPDATED_TIME_KEY]->getValue();\n }",
"public function lastUpdated()\n {\n // TODO: Implement lastUpdated() method.\n return self::$user['updated_at'];\n\n }",
"public function getLastUpdated();",
"public function getLastUpdateTime()\n {\n return $this->last_update_time;\n }",
"public function getUpdatedTime() {\r\n return $this->updated_time;\r\n }",
"public function getUpdatedTime()\n {\n return $this->getAttribute('updatedTime');\n }",
"public function LastUpdated()\n\t{\n\t\treturn $this->LastUpdated;\n\t}",
"public function getUpdate_time()\r\n {\r\n return $this->update_time;\r\n }",
"function lastUpdate() {\n\t\tif ( !$this->postID && !$this->exists() )\n\t\t\treturn 999;\n\t\t\t\n\t\t$sql = \"SELECT last_update FROM $this->cacheTable WHERE post_id = \" . $this->db->escape( $this->postID ) . \"\";\n\t\t\n\t\t$results = $this->db->get_results( $sql );\n\t\t\n\t\tif ( !$results[0] )\n\t\t\treturn 999;\t\n\t\t\n\t\t$updateTime = strtotime( $results[0]->last_update );\n\t\t$current = strtotime( date( \"Y-m-d H:i:s\" ) );\t\t\n\t\t$lastUpdate = ( $current - $updateTime ) / 3600;\t\t\n\t\t\n\t\treturn $lastUpdate;\t\t\n\t\n\t}",
"public function getUpdatetime()\n {\n return $this->updateTime;\n }",
"public function getUpdateTime()\n\t{\n\t\t$column = self::COL_UPDATE_TIME;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (string)$v;\n\t\t}\n\n\t\treturn $v;\n\t}",
"public function getUpdateTime()\n\t{\n\t\t$column = self::COL_UPDATE_TIME;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (string)$v;\n\t\t}\n\n\t\treturn $v;\n\t}",
"public function getTimestampUpdated()\n {\n return $this->_getData(self::TIMESTAMP_UPDATED);\n }",
"public function getLastUpdate()\n {\n return $this->lastUpdate;\n }",
"public function getLastUpdate()\n {\n return $this->lastUpdate;\n }",
"public function lastUpdateStr() {\n $statement = $this->db->prepare('SELECT \"created\" FROM \"temperature\" ORDER BY \"created\" DESC LIMIT 1');\n $result = $statement->execute();\n \n return $result->fetchArray(SQLITE3_ASSOC)['created']; \n }",
"public function getLastUpdate() {\n\t\treturn $this->lastUpdate;\n\t}",
"protected static function queryLastSyncTimeOnDb()\n {\n $sync_last_time = DB::table(\"sync_last_time\")->value('timestamp');\n\n return ($sync_last_time);\n }",
"public function getLastUpdatedAt()\n {\n return $this->last_updated_at;\n }",
"public function getLastUpdateTime()\n\t{\n\t\treturn empty($this->lastUpdateTime) ? time() : $this->lastUpdateTime;\n\t}",
"public function getLastUpdated() {\n return $this->lastUpdated;\n }",
"public function lastUpdated()\n {\n $lastAction = $this->actions->sortBy('updated_at')->last();\n\n if ($lastAction && $lastAction->updated_at->gt($this->updated_at))\n return $lastAction->updated_at;\n else\n return $this->updated_at;\n }",
"public function getLastUpdate(): \\DateTime\n {\n return $this->lastUpdate;\n }",
"public function getLastUpdateTime()\n {\n $time = Mage::getStoreConfig(self::XML_GEOIP_UPDATE_DB);\n if (!$time) {\n return false;\n }\n\n return date('F d, Y / h:i', $time);\n }",
"public function getUpdatedAt(){\n return $this->_getData(self::UPDATED_AT);\n }",
"public function getLatestTimestamp()\n {\n return DB::table('product_models')->orderBy('updated', 'desc')->value('updated');\n }",
"public function getLastUpdatedOn()\n {\n return $this->_fields['LastUpdatedOn']['FieldValue'];\n }",
"public function last_modified() {\n\t\treturn $this->timestamp;\n\t}",
"public function lastUpdatedDateTime(): string\n {\n return $this->pluck('lastUpdatedDateTime');\n }",
"public function getUpdateTime()\r\n {\r\n return $this->update_time;\r\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"function lastupdatetime($table){\n if (first(\"SHOW TABLE STATUS FROM \" . $GLOBALS[\"database\"] . \" LIKE '\" . $table . \"';\", true , \"API.lastupdatetime\")[\"Engine\"] == \"InnoDB\") {\n $filename = first('SHOW VARIABLES WHERE Variable_name = \"datadir\"', true , \"API.lastupdatetime\")[\"Value\"] . $GLOBALS[\"database\"] . '/' . $table . '.ibd';\n return filemtime($filename);//UNIX datestamp\n }\n return first(\"SELECT UPDATE_TIME FROM information_schema.tables WHERE TABLE_SCHEMA = '\" . $GLOBALS[\"database\"] . \"' AND TABLE_NAME = '\" . $table . \"'\", true , \"API.lastupdatetime\")[\"UPDATE_TIME\"];//unknown format\n}",
"public function getUpdateTime()\n {\n return isset($this->update_time) ? $this->update_time : null;\n }",
"function getLastModified()\n {\n $this->loadStats();\n return $this->stat['mtime'];\n }",
"public function getUpdateTimestamp()\n {\n return $this->updateTimestamp;\n }",
"public function getLastUpdated()\n {\n $packages = Package::get()->limit(1);\n if (!$packages->count()) {\n return '';\n }\n /** @var DBDatetime $datetime */\n $datetime = $packages->first()->dbObject('LastEdited');\n return $datetime->Date() . ' ' . $datetime->Time12();\n }",
"public function getLastAutoRefreshTime()\n {\n return $this->get(self::_LAST_AUTO_REFRESH_TIME);\n }",
"public function getUpdateTime() {\n return $this->update_time;\n }",
"public function getUpdatedAt()\n {\n return $this->sys->getUpdatedAt();\n }",
"public function getDateLastUpdated()\n {\n if (isset($this->data['LastUpdatedDate'])) {\n return $this->data['LastUpdatedDate'];\n } else {\n return false;\n }\n }",
"public function getLastUpdate()\n {\n return $this->cache->load(\n self::CACHE_TAG\n );\n }",
"public function getLastUpdateDatetime()\n {\n return $this->getValue('nb_icontact_prospect_last_update_datetime');\n }",
"public function getLastUpdated(): int;",
"public function getLastModified()\n {\n return ($this->item['mtime'] ? $this->item['mtime'] : ($this->item['ctime'] ? $this->item['ctime'] : time()));\n }",
"public static function last_update()\n {\n $gallery_date = Gallery::orderBy('updated_at', 'desc')->value('updated_at');\n $gallery_last_date = (!empty($gallery_date)) ? date(strtotime($gallery_date . '+1 hours')) : '';\n $posts_date = Posts::orderBy('updated_at', 'desc')->value('updated_at');\n $posts_last_date = (!empty($posts_date)) ? date(strtotime($posts_date . '+1 hours')) : '';\n $newsletter_date = Newsletter::orderBy('updated_at', 'desc')->value('updated_at');\n $newsletter_last_date = (!empty($newsletter_date)) ? date(strtotime($newsletter_date . '+1 hours')) : '';\n $properties_date =\n DB::table('apimo_properties')\n ->select('updated_at')\n ->where(function($query) {\n $query->orWhere('reference', 'like', 'HSTP%')\n ->orWhere('reference', 'like', 'HD%');\n })\n ->orderBy('updated_at', 'desc')\n ->value('updated_at');\n $properties_last_date = (!empty($properties_date)) ? date(strtotime($properties_date . '+1 hours')) : '';\n\n $dates = [$posts_last_date, $gallery_last_date, $properties_last_date, $newsletter_last_date];\n\n $last_update = max($dates);\n\n return date('d.m.Y - H:i', (!empty($last_update)) ? $last_update : 0);\n }",
"public function lastUpdated(): string\n {\n return $this->weather['last_updated'];\n }",
"protected static function updated_at(): mixed\n\t{\n\t\treturn self::$query->updated_at;\n\t}",
"protected static function updated_at(): mixed\n\t{\n\t\treturn self::$query->updated_at;\n\t}",
"public function getUpdatedTimeAttribute() {\n\n\t\tif (request()->segment(1) == 'api') {\n\n\t\t\t$date = change_date_format($this->attributes['updated_at']);\n\t\t\t$datemonth = date($date, strtotime($this->attributes['updated_at']));\n\t\t\treturn $datemonth . ' at ' . date('H:i', strtotime($date));\n\n\t\t} else {\n\n\t\t\t$new_str = new DateTime($this->attributes['updated_at'], new DateTimeZone(Config::get('app.timezone')));\n\n\t\t\t$user = auth()->guard('store')->user();\n\t\t\t$new_str->setTimeZone(new DateTimeZone($user->user_address->default_timezone));\n\t\t\t$date = change_date_format($this->attributes['updated_at']);\n\t\t\t$datemonth = date($date, strtotime($this->attributes['updated_at']));\n\t\t\treturn $datemonth . ' at ' . $new_str->format('H:i');\n\n\t\t}\n\n\t}",
"public function getDateUpdated()\n {\n return $this->date_updated;\n }",
"public function getDateUpdated()\n {\n return $this->date_updated;\n }",
"public function cached_timestamp()\n\t{\n\t\t$query = $this->_EE->db->get_where('dd_settings', array('key' => 'last_saved'));\n\t\treturn ($query->num_rows() > 0) ? $query->row()->value : 0 ;\n\t}",
"public function getUpdateAt()\n {\n return $this->update_at;\n }",
"public function getUpdateAt()\n {\n return $this->update_at;\n }",
"public function getUpdated(): \\DateTime\n {\n return $this->updated;\n }",
"public function getUpdated_at()\n {\n return $this->updated_at;\n }",
"public function getUpdated_at()\n {\n return $this->updated_at;\n }",
"public function getUpdated_at()\n {\n return $this->updated_at;\n }",
"public function getUpdated_at()\n {\n return $this->updated_at;\n }",
"public function getLastUpdateDateTime() {\n\t\t// open file\n\t\t$lastUpdateStorageFile = fopen($this::LAST_UPDATE_STORAGE_FILE, $this::FILE_READ_ONLY_MODE);\n\t\n\t\t// read the first and unique line\n\t\t$lastUpdateDateTime = fgets($lastUpdateStorageFile);\n\t\n\t\t// Close the file\n\t\tfclose($lastUpdateStorageFile);\n\t\n\t\treturn $lastUpdateDateTime;\n\t}",
"public function updated_at()\n\t{\n return $this->date($this->updated_at);\n\t}",
"public function updated_at()\n\t{\n return $this->date($this->updated_at);\n\t}",
"public function updated_at()\n\t{\n return $this->date($this->updated_at);\n\t}",
"public function getDateUpdate()\n {\n return $this->date_update;\n }",
"public function getDateUpdate()\n {\n return $this->date_update;\n }",
"public function getLastModifiedTime();",
"function getUpdateTime(){\n\t\t$max = 0;\n\t\t$tables =& $this->tables();\n\t\tforeach ( array_keys($tables()) as $tablename ){\n\t\t\t$max = max($max, strtotime($tables[$tablename]->getUpdateTime()) );\n\t\t}\n\t\treturn date('Y-m-d H:i:s', $max);\n\t}",
"public function getUpdatedDate()\n {\n return $this->updated;\n }",
"public function getUpdatedAt()\n\t{\n\t\treturn $this->updatedAt;\n\t}",
"function getLastModified() {\n\t\treturn $this->getData('lastModified');\n\t}",
"public function getLastGetTime()\n {\n return $this->get(self::_LAST_GET_TIME);\n }",
"public function updatedAt(){\n return $this->_formatDate($this->updated_at);\n }",
"public function get_updated_at() {\n\t\t\treturn $this->updated_at;\n\t\t}",
"public function getUpdatedAt()\n {\n return $this->updated_at;\n }",
"public function getUpdatedAt()\n {\n return $this->updated_at;\n }",
"public function getUpdatedAt()\n {\n return $this->updated_at;\n }",
"public function getUpdatedAt()\n {\n return $this->updated_at;\n }",
"public function getUpdatedAt()\n {\n return $this->updated_at;\n }",
"public function getUpdatedAt()\n {\n return $this->updated_at;\n }",
"public function getUpdatedAt()\n {\n return $this->updated_at;\n }"
] | [
"0.82712525",
"0.8089064",
"0.8056265",
"0.8006304",
"0.79064226",
"0.778679",
"0.7732577",
"0.7727924",
"0.7718884",
"0.7701962",
"0.7662897",
"0.7662897",
"0.7648392",
"0.763974",
"0.763974",
"0.7627361",
"0.7613628",
"0.76116157",
"0.76116127",
"0.7606241",
"0.7593019",
"0.7567166",
"0.75574124",
"0.75551677",
"0.75250113",
"0.7513177",
"0.75049275",
"0.7488769",
"0.7472375",
"0.74466634",
"0.7442608",
"0.7442608",
"0.7442608",
"0.7442608",
"0.7442608",
"0.7442608",
"0.7442608",
"0.7442608",
"0.7442608",
"0.7442608",
"0.7442608",
"0.7442608",
"0.7442608",
"0.7442608",
"0.7442608",
"0.7442608",
"0.7442608",
"0.7442608",
"0.7442608",
"0.7442608",
"0.7442608",
"0.7442608",
"0.7442238",
"0.74369544",
"0.74308294",
"0.7415104",
"0.74136627",
"0.7400347",
"0.73967767",
"0.7387199",
"0.73718435",
"0.7358497",
"0.7356202",
"0.7334211",
"0.7326053",
"0.73163396",
"0.7294384",
"0.7286641",
"0.7286641",
"0.7270135",
"0.7260558",
"0.7260558",
"0.72591674",
"0.7245013",
"0.7245013",
"0.7238868",
"0.72291887",
"0.72291887",
"0.72291887",
"0.72291887",
"0.72264177",
"0.7218029",
"0.7218029",
"0.7218029",
"0.7206744",
"0.7206744",
"0.71912587",
"0.71789294",
"0.71755815",
"0.7170351",
"0.7170271",
"0.7157495",
"0.7156537",
"0.7152326",
"0.71455824",
"0.71455824",
"0.71455824",
"0.71455824",
"0.71455824",
"0.71455824",
"0.71455824"
] | 0.0 | -1 |
Get the last updated time | public function getLastUpdatedFile(): string
{
$path = $this->getJsonTypeFolder();
$this->lastUpdatedFile = $path . DIRECTORY_SEPARATOR . 'last-updated.php';
return $this->lastUpdatedFile;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getLastUpdateTime()\n {\n return $this->last_update_time;\n }",
"public function getLastUpdateTime()\n\t{\n\t\treturn empty($this->lastUpdateTime) ? time() : $this->lastUpdateTime;\n\t}",
"public function getUpdatedTime() {\r\n return $this->updated_time;\r\n }",
"public function getLastUpdated();",
"public function lastUpdated()\n {\n // TODO: Implement lastUpdated() method.\n return self::$user['updated_at'];\n\n }",
"public function getUpdatedTime()\n {\n return $this->getAttribute('updatedTime');\n }",
"public function getUpdate_time()\r\n {\r\n return $this->update_time;\r\n }",
"public function getLastUpdatedTime() {\n // Fail due to double delete\n assert(!$this->hasBeenDeleted);\n \n // Fail due to unset 'last-updated-time' field\n assert(isset($this->parentDbFieldTable[self::LAST_UPDATED_TIME_KEY]));\n \n return $this->parentDbFieldTable[self::LAST_UPDATED_TIME_KEY]->getValue();\n }",
"public function getUpdateTime()\r\n {\r\n return $this->update_time;\r\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime()\n {\n return $this->update_time;\n }",
"public function getUpdateTime() {\n return $this->update_time;\n }",
"public function getUpdatetime()\n {\n return $this->updateTime;\n }",
"public function LastUpdated()\n\t{\n\t\treturn $this->LastUpdated;\n\t}",
"public function getUpdateTime()\n {\n return isset($this->update_time) ? $this->update_time : null;\n }",
"public function getLastAutoRefreshTime()\n {\n return $this->get(self::_LAST_AUTO_REFRESH_TIME);\n }",
"public function getLastUpdated() {\n return $this->lastUpdated;\n }",
"function getLastModified()\n {\n $this->loadStats();\n return $this->stat['mtime'];\n }",
"public function getLastUpdateTime()\n {\n $time = Mage::getStoreConfig(self::XML_GEOIP_UPDATE_DB);\n if (!$time) {\n return false;\n }\n\n return date('F d, Y / h:i', $time);\n }",
"public function getLastUpdate() {\n\t\treturn $this->lastUpdate;\n\t}",
"public function getLastUpdate()\n {\n return $this->lastUpdate;\n }",
"public function getLastUpdate()\n {\n return $this->lastUpdate;\n }",
"public function last_modified() {\n\t\treturn $this->timestamp;\n\t}",
"public function getLastGetTime()\n {\n return $this->get(self::_LAST_GET_TIME);\n }",
"public function getLastStatusUpdateTime()\n {\n return $this->lastStatusUpdateTime;\n }",
"public function lastUpdated(): string\n {\n return $this->weather['last_updated'];\n }",
"public function getLastUpdate()\n {\n return $this->cache->load(\n self::CACHE_TAG\n );\n }",
"public function getLastModified()\n {\n return ($this->item['mtime'] ? $this->item['mtime'] : ($this->item['ctime'] ? $this->item['ctime'] : time()));\n }",
"public function getTimestampUpdated()\n {\n return $this->_getData(self::TIMESTAMP_UPDATED);\n }",
"public function lastUpdated()\n {\n $lastAction = $this->actions->sortBy('updated_at')->last();\n\n if ($lastAction && $lastAction->updated_at->gt($this->updated_at))\n return $lastAction->updated_at;\n else\n return $this->updated_at;\n }",
"function lastUpdate() {\n\t\tif ( !$this->postID && !$this->exists() )\n\t\t\treturn 999;\n\t\t\t\n\t\t$sql = \"SELECT last_update FROM $this->cacheTable WHERE post_id = \" . $this->db->escape( $this->postID ) . \"\";\n\t\t\n\t\t$results = $this->db->get_results( $sql );\n\t\t\n\t\tif ( !$results[0] )\n\t\t\treturn 999;\t\n\t\t\n\t\t$updateTime = strtotime( $results[0]->last_update );\n\t\t$current = strtotime( date( \"Y-m-d H:i:s\" ) );\t\t\n\t\t$lastUpdate = ( $current - $updateTime ) / 3600;\t\t\n\t\t\n\t\treturn $lastUpdate;\t\t\n\t\n\t}",
"public function getLastUpdate(): \\DateTime\n {\n return $this->lastUpdate;\n }",
"public function getLastModifiedTime();",
"public function getUpdateTimestamp()\n {\n return $this->updateTimestamp;\n }",
"public function getLastManualRefreshTime()\n {\n return $this->get(self::_LAST_MANUAL_REFRESH_TIME);\n }",
"public function getLastUpdateDateTime() {\n\t\t// open file\n\t\t$lastUpdateStorageFile = fopen($this::LAST_UPDATE_STORAGE_FILE, $this::FILE_READ_ONLY_MODE);\n\t\n\t\t// read the first and unique line\n\t\t$lastUpdateDateTime = fgets($lastUpdateStorageFile);\n\t\n\t\t// Close the file\n\t\tfclose($lastUpdateStorageFile);\n\t\n\t\treturn $lastUpdateDateTime;\n\t}",
"public function getLastUpdatedAt()\n {\n return $this->last_updated_at;\n }",
"public function getVersionUpdateTime()\n {\n return $this->version_update_time;\n }",
"public function getLastUpdatedOn()\n {\n return $this->_fields['LastUpdatedOn']['FieldValue'];\n }",
"public function getLastUpdateDatetime()\n {\n return $this->getValue('nb_icontact_prospect_last_update_datetime');\n }",
"function get_timemodified() {\n return $this->timemodified;\n }",
"public function getUpdateTs()\n {\n return $this->update_ts;\n }",
"public function updateLastUpdateDateTime() {\n\t\t// open file\n\t\t$lastUpdateStorageFile = fopen($this::LAST_UPDATE_STORAGE_FILE, $this::FILE_READ_WRITE_MODE);\n\t\t\n\t\t// Last update dateTime\n\t\t$date = new \\Datetime();\n\t\n\t\t// write the last update datetime\n\t\t$lastUpdateDateTime = fputs($lastUpdateStorageFile, $date->format('Y-m-d H:i:s'));\n\t\n\t\t// Close the file\n\t\tfclose($lastUpdateStorageFile);\n\t\n\t\treturn $lastUpdateDateTime;\n\t}",
"public function getDateLastUpdated()\n {\n if (isset($this->data['LastUpdatedDate'])) {\n return $this->data['LastUpdatedDate'];\n } else {\n return false;\n }\n }",
"function getLastModified() {\n\t\treturn $this->getData('lastModified');\n\t}",
"public function cached_timestamp()\n\t{\n\t\t$query = $this->_EE->db->get_where('dd_settings', array('key' => 'last_saved'));\n\t\treturn ($query->num_rows() > 0) ? $query->row()->value : 0 ;\n\t}",
"public function getGlobalUpdateTime() {\n\t\t$key = $this->getGlobalMemcKey( 'echo-notification-updated' );\n\t\tif ( $key === false ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn wfTimestamp( TS_MW, ObjectCache::getMainWANInstance()->getCheckKeyTime( $key ) );\n\t}",
"public function getUpdatedAt()\n {\n return $this->sys->getUpdatedAt();\n }",
"public function getLastUpdated(): int;",
"public function getLastStatusUpdate() {\n\t\treturn self::$_lastStatusUpdate;\n\t}",
"public function lastUpdatedDateTime(): string\n {\n return $this->pluck('lastUpdatedDateTime');\n }",
"public function getUpdated(): \\DateTime\n {\n return $this->updated;\n }",
"public function getUpdatedTimeAttribute() {\n\n\t\tif (request()->segment(1) == 'api') {\n\n\t\t\t$date = change_date_format($this->attributes['updated_at']);\n\t\t\t$datemonth = date($date, strtotime($this->attributes['updated_at']));\n\t\t\treturn $datemonth . ' at ' . date('H:i', strtotime($date));\n\n\t\t} else {\n\n\t\t\t$new_str = new DateTime($this->attributes['updated_at'], new DateTimeZone(Config::get('app.timezone')));\n\n\t\t\t$user = auth()->guard('store')->user();\n\t\t\t$new_str->setTimeZone(new DateTimeZone($user->user_address->default_timezone));\n\t\t\t$date = change_date_format($this->attributes['updated_at']);\n\t\t\t$datemonth = date($date, strtotime($this->attributes['updated_at']));\n\t\t\treturn $datemonth . ' at ' . $new_str->format('H:i');\n\n\t\t}\n\n\t}",
"public function getLastUpdated()\n {\n $packages = Package::get()->limit(1);\n if (!$packages->count()) {\n return '';\n }\n /** @var DBDatetime $datetime */\n $datetime = $packages->first()->dbObject('LastEdited');\n return $datetime->Date() . ' ' . $datetime->Time12();\n }",
"public function getUtcUpdated()\n {\n return $this->utc_updated;\n }",
"public function getLastModifiedAt()\n {\n return $this->lastModifiedAt;\n }",
"public function getLastModifiedAt()\n {\n return $this->lastModifiedAt;\n }",
"public function getLastModifiedAt()\n {\n return $this->lastModifiedAt;\n }",
"public function getLastModifiedAt()\n {\n return $this->lastModifiedAt;\n }",
"public function getLastModifiedAt()\n {\n return $this->lastModifiedAt;\n }",
"public function getUpdatedAt(){\n return $this->_getData(self::UPDATED_AT);\n }",
"public function getModifiedTime()\n\t{\n\t\treturn $this->modifiedTime; \n\n\t}",
"public static function getLastModified() {}",
"public function getLatestUpdateDate()\n {\n return $this->channel->getLatestUpdateDate();\n }",
"public function getUpdated_at()\n {\n return $this->updated_at;\n }",
"public function getUpdated_at()\n {\n return $this->updated_at;\n }",
"public function getUpdated_at()\n {\n return $this->updated_at;\n }",
"public function getUpdated_at()\n {\n return $this->updated_at;\n }",
"public function getUpdatedDate()\n {\n return $this->updated;\n }",
"public function getDateUpdated()\n {\n return $this->date_updated;\n }",
"public function getDateUpdated()\n {\n return $this->date_updated;\n }",
"public function getLastCheckTime()\n {\n return $this->cacheManager->load(self::LAST_CHECK_TIME_ID);\n }",
"public function get_short_updated_at()\n\t{\n\t\t$date = $this->updated_at;\n\t\tif ($date) return $date->format('H:i:s d-m-Y');\n\t}",
"public function getUpdateTime()\n\t{\n\t\t$column = self::COL_UPDATE_TIME;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (string)$v;\n\t\t}\n\n\t\treturn $v;\n\t}",
"public function getUpdateTime()\n\t{\n\t\t$column = self::COL_UPDATE_TIME;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (string)$v;\n\t\t}\n\n\t\treturn $v;\n\t}",
"public function getUpdateAt()\n {\n return $this->update_at;\n }",
"public function getUpdateAt()\n {\n return $this->update_at;\n }",
"public function get_updated_at() {\n\t\t\treturn $this->updated_at;\n\t\t}",
"public static function last_update()\n {\n $gallery_date = Gallery::orderBy('updated_at', 'desc')->value('updated_at');\n $gallery_last_date = (!empty($gallery_date)) ? date(strtotime($gallery_date . '+1 hours')) : '';\n $posts_date = Posts::orderBy('updated_at', 'desc')->value('updated_at');\n $posts_last_date = (!empty($posts_date)) ? date(strtotime($posts_date . '+1 hours')) : '';\n $newsletter_date = Newsletter::orderBy('updated_at', 'desc')->value('updated_at');\n $newsletter_last_date = (!empty($newsletter_date)) ? date(strtotime($newsletter_date . '+1 hours')) : '';\n $properties_date =\n DB::table('apimo_properties')\n ->select('updated_at')\n ->where(function($query) {\n $query->orWhere('reference', 'like', 'HSTP%')\n ->orWhere('reference', 'like', 'HD%');\n })\n ->orderBy('updated_at', 'desc')\n ->value('updated_at');\n $properties_last_date = (!empty($properties_date)) ? date(strtotime($properties_date . '+1 hours')) : '';\n\n $dates = [$posts_last_date, $gallery_last_date, $properties_last_date, $newsletter_last_date];\n\n $last_update = max($dates);\n\n return date('d.m.Y - H:i', (!empty($last_update)) ? $last_update : 0);\n }",
"public function getLastModified()\n {\n return $this->lastModified;\n }",
"protected function getTimeLastSaved()\n {\n return SiteConfig::current_site_config()->VimeoFeed_LastSaved;\n }"
] | [
"0.8686498",
"0.8473346",
"0.8449127",
"0.8371488",
"0.83354884",
"0.8262597",
"0.82565516",
"0.8240394",
"0.8182521",
"0.8171897",
"0.8171897",
"0.8171897",
"0.8171897",
"0.8171897",
"0.8171897",
"0.8171897",
"0.8171897",
"0.8171897",
"0.8171897",
"0.8171897",
"0.8171897",
"0.8171897",
"0.8171897",
"0.8171897",
"0.8171897",
"0.8171897",
"0.8171897",
"0.8171897",
"0.8171897",
"0.8171897",
"0.8171897",
"0.81455916",
"0.8131033",
"0.8091393",
"0.8076347",
"0.80226654",
"0.7979482",
"0.79644454",
"0.7915208",
"0.790739",
"0.7901327",
"0.7901327",
"0.78515196",
"0.7850438",
"0.78463256",
"0.7836864",
"0.7822265",
"0.7818896",
"0.777001",
"0.77127975",
"0.7701123",
"0.76844114",
"0.7676496",
"0.7629293",
"0.7582278",
"0.7581677",
"0.75680757",
"0.755914",
"0.75483865",
"0.7548278",
"0.75482225",
"0.75293386",
"0.7519137",
"0.7512956",
"0.74963045",
"0.74892086",
"0.74826926",
"0.7481842",
"0.7471714",
"0.74421835",
"0.7440512",
"0.7439395",
"0.7432097",
"0.7426203",
"0.7424189",
"0.74170333",
"0.74170333",
"0.74170333",
"0.74170333",
"0.74170333",
"0.74004066",
"0.73919743",
"0.7388547",
"0.738699",
"0.7372111",
"0.7372111",
"0.7372111",
"0.7372111",
"0.73702407",
"0.7365981",
"0.7365981",
"0.73615927",
"0.7337224",
"0.7336659",
"0.7336659",
"0.7317943",
"0.7317943",
"0.73105043",
"0.73058176",
"0.7303441",
"0.7302322"
] | 0.0 | -1 |
Set the last updated file | public function setLastUpdatedFile(string $lastUpdatedFile): Filemanager
{
$this->lastUpdatedFile = $lastUpdatedFile;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function update_recently_edited($file)\n {\n }",
"private function set_last_updated_at() {\n\n\t\tif ( ! static::get_table() instanceof TimestampedTable ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$dirty = $this->is_dirty();\n\n\t\t$this->set_attribute( static::get_table()->get_updated_at_column(), $this->fresh_timestamp() );\n\n\t\t// If the model is dirty, we don't want to commit our save since the user should already be calling save.\n\t\tif ( ! $dirty ) {\n\t\t\t$this->save();\n\t\t}\n\t}",
"public function updateLastUpdateDateTime() {\n\t\t// open file\n\t\t$lastUpdateStorageFile = fopen($this::LAST_UPDATE_STORAGE_FILE, $this::FILE_READ_WRITE_MODE);\n\t\t\n\t\t// Last update dateTime\n\t\t$date = new \\Datetime();\n\t\n\t\t// write the last update datetime\n\t\t$lastUpdateDateTime = fputs($lastUpdateStorageFile, $date->format('Y-m-d H:i:s'));\n\t\n\t\t// Close the file\n\t\tfclose($lastUpdateStorageFile);\n\t\n\t\treturn $lastUpdateDateTime;\n\t}",
"public function setSysLastChanged() {}",
"public function updateLastUsed()\n {\n if (\n $this->last_used_at === null ||\n $this->last_used_at < (new \\DateTime())->sub(new \\DateInterval('P1D'))\n ) {\n $this->last_used_at = new \\DateTime();\n $this->save();\n }\n }",
"public function getLastUpdated();",
"private function setLastUpdateDate( $date ) {\n Mage::getModel('core/config')->saveConfig('taxjar/config/last_update', $date);\n }",
"public function save() {\n $this->lastModified = new \\DateTime();\n parent::save();\n }",
"private function setLastModifiedDateTime() {\n\t\ttry {\n\t\t\t$stmt = $this->db->prepare(\"UPDATE `$this->table` SET `datetime-last-modified` = NOW() WHERE `id` = ?\");\n\t\t\t$stmt->execute([$this->getID()]);\n\t\t} catch (PDOException $e) {\n\t\t\techo 'Post.class.php setLastModifiedDateTime() error: <br />';\n\t\t\tthrow new Exception($e->getMessage());\n\t\t}\n\n\t\t// Because we set the datetime from MySQL, we can't use PHP's datetime function to get the time as it may be slightly different\n\t\t$stmt = $this->db->prepare(\"SELECT `datetime-last-modified` FROM `$this->table` WHERE `id` = ?\");\n\t\t$stmt->execute([$this->getID()]);\n\n\t\tforeach ($stmt as $row) {\n\t\t\t$this->lastModifiedDate = $row['datetime-last-modified'];\n\t\t}\n\t}",
"public function setLastUpdated($lastUpdated);",
"public function setLastUpdate()\n {\n Mage::app()->saveCache(time(), 'admin_notifications_lastcheck');\n// $config = Mage::getModel('core/config');\n// /* @var $config Mage_Core_Model_Config */\n// $config->saveConfig(self::XML_LAST_UPDATE_PATH, time());\n return $this;\n }",
"public static function getLastModified() {}",
"protected static function setSyncLastTime()\n {\n DB::update(\"UPDATE `sync_last_time` SET timestamp = ? WHERE id=?\", [time(), 1]);\n }",
"public function setLastUpdated(int $lastUpdated, string $label = '_wpgb_last_sync'): Filemanager\n {\n $params = $this->getLastUpdatedDatas();\n\n $path = $this->getLastUpdatedFile();\n\n $params[$label] = $lastUpdated;\n if ($label !== '_wpgb_last_sync') {\n $params['_wpgb_last_sync'] = $lastUpdated;\n }\n\n $params = $this->cleanLastSyncParams($params);\n\n $phpFileContent = '<?php return ' . var_export($params, true) . ';';\n file_put_contents($path, $phpFileContent);\n $this->setDbLastUpdated($lastUpdated, $label);\n $this->lastUpdated = $lastUpdated;\n return $this;\n }",
"public static function setLastModified($timestamp) {}",
"protected function setUpdated(){\n if($this->_id > 0){\n $pfDB = DB\\Database::instance()->getDB('PF');\n\n $pfDB->exec(\n [\"UPDATE \" . $this->table . \" SET updated=NOW() WHERE id=:id\"],\n [\n [':id' => $this->_id]\n ]\n );\n }\n }",
"function updateLastModifiedDate() {\n\t\t$res = db_query_params ('UPDATE artifact SET last_modified_date=EXTRACT(EPOCH FROM now())::integer WHERE artifact_id=$1',\n\t\t\tarray ($this->getID()));\n\t\treturn (!$res);\n\t}",
"public function updated(File $file)\n {\n $file->modified_by = Auth::user()->id;\n\n $file->save();\n }",
"public function setLastStatusUpdate($value) {\n\t\t$value = date('d-M-Y', strtotime($value));\n\t\tself::$_lastStatusUpdate = $value;\n\t}",
"public function updateTopicModifiedDate()\n {\n $this->setAttribute( 'modified', time() );\n $this->store();\n }",
"public function markLastUpdate()\n {\n if (!$this->updatedAtOveridden) {\n $this->updatedAt = new \\DateTime();\n }\n }",
"private function _lastChanged ($file)\n {\n return filectime($file);\n }",
"public function setLastUpdate($lastUpdate)\n {\n $this->lastUpdate = $lastUpdate;\n }",
"public function getLastModified();",
"public function getLastModified();",
"public function getLastModified();",
"public function getLastModified();",
"public function getLastUpdatedFile(): string\n {\n $path = $this->getJsonTypeFolder();\n $this->lastUpdatedFile = $path . DIRECTORY_SEPARATOR . 'last-updated.php';\n return $this->lastUpdatedFile;\n }",
"public function addMarkToFile( ){\n if( isset( $GLOBALS['config']['dir_database'] ) ){\n file_put_contents( $GLOBALS['config']['dir_database'].'database-last-modification', time( ) );\n }\n }",
"public function refreshUpdated()\n {\n $this->setUpdated(new \\DateTime());\n }",
"protected function last_change() \n\t{\n\t\tif ( !is_null( $this->last_change ) )\n\t\t{\n\t\t\treturn $this->last_change;\n\t\t}\n\t\t\n\t\tforeach( $this->sources as $key => $file ) \n\t\t{\n\t\t\t$files[$key] = filemtime( $file );\n\t\t}\n\n\t\tsort( $files ); $files = array_reverse( $files );\n\n\t\treturn $this->last_change = $files[key($files)];\n\t}",
"public function setLastUpdated($lastUpdated) {\n\t\t$this->lastUpdated = $lastUpdated !== null ? ((int) $lastUpdated) : null;\n\t}",
"function wplastfm_update($file, $src) {\r\n global $wplastfm_options;\r\n \r\n if (time()-$wplastfm_options['cache'] > @filemtime($file)) {\r\n $data = wplastfm_get_recenttracks($src);\r\n if (!empty($data)) {\r\n $handle = fopen($file, \"w\");\r\n fwrite($handle, $data);\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }",
"public function refreshUploaded()\n {\n $this->setUploaded(new \\DateTime());\n }",
"public function updateAction()\n {\n// $client = $init->getClient();\n// $init->updateFile($client);\n }",
"public function UpdateLastActivity()\n\t{\n\t\tif (isset($_SESSION['timestamp']) && $_SESSION['timestamp'] - time() > 60 * 10)\n\t\t{\n\t\t\t// If it's been enough time (say, 10 minutes), generate new session ID\n\t\t\t// to help prevent session hijacking\n\t\t\tsession_regenerate_id();\n\t\t\t$_SESSION['timestamp'] = time();\n\t\t}\n\n\t\t$this->LastActivity = now();\n\t\t$this->Save();\n\t}",
"function http_send_last_modified($timestamp = null) {}",
"public function refreshUpdated() {\n $this->setUpdated(new \\DateTime(\"now\"));\n}",
"public function setFile($file)\n\t{\n\t\t$this->file = $file;\n\t\t// check if we have an old image path\n\t\tif (isset($this->image)) {\n\t\t\t// store the old name to delete after the update\n\t\t\t$this->temp = $this->image;\n\t\t\t$this->image = null;\n\t\t} else {\n\t\t\t$this->image = 'initial';\n\t\t}\n\t}",
"public function setModifiedValue()\n {\n $this->setModified(new \\DateTime());\n }",
"public function getLastModified() {\n\t\treturn filemtime($this->filename);\n\t}",
"public function markLastUpdate(){\n if(!$this->updatedAtOveridden) $this->updatedAt = new \\DateTime();\n if($this->applicant) //child pages dont have direct links to the application\n $this->applicant->markLastUpdate();\n if($this->parent) //child pages should update their parents\n $this->parent->markLastUpdate();\n }",
"public function setLastUpdateAttribute($date)\n {\n $myDate = Carbon::createFromFormat('Y-m-d', $date);\n if ($myDate > Carbon::now()) {\n $this->attributes['last_update'] = Carbon::parse($date);\n } else {\n $this->attributes['last_update'] = Carbon::createFromFormat('Y-m-d', $date);\n }\n }",
"public function setLastUpdateAttribute($date)\n {\n $myDate = Carbon::createFromFormat('Y-m-d', $date);\n if ($myDate > Carbon::now()) {\n $this->attributes['last_update'] = Carbon::parse($date);\n } else {\n $this->attributes['last_update'] = Carbon::createFromFormat('Y-m-d', $date);\n }\n }",
"public static function last_updated($file)\n\t{\n\t\treturn filemtime($file);\n\t}",
"public function addUpdated()\n {\n try {\n $date = new DateTime();\n $this->updated_at = $date->format('Y-m-d H:i:s');\n $this->updated_by = 0;\n } catch (Exception $e) {\n print_r($e);\n }\n }",
"public function setLastUpdatedDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('lastUpdatedDateTime', $value);\n }",
"public function setExecUpdateOnSave()\n {\n Configuration::updateValue('DF_UPDATE_ON_SAVE_LAST_EXEC', date('Y-m-d H:i:s'));\n }",
"public function getLastModified(){\n return $this->lastModified;\n }",
"public function lastModified();",
"public function lastModified();",
"public function lastModification( ) {\n\n\t\treturn file_exists( $this->_path )\n\t\t\t? filemtime( $this->_path )\n\t\t\t: 0;\n\t}",
"public function assertUpdateDefaults() {\n\t\t\t$this->set('lastModified', 'NOW()', false);\n\t\t\t$this->enclose('lastModified', false);\n\t\t}",
"public function setLast_modified( $last_modified ) {\n\t\t$this->last_modified = $last_modified;\n\t}",
"public function setFile(File $file)\n\t{\n\t\t$this->file=$file; \n\t\t$this->keyModified['file'] = 1; \n\n\t}",
"public function lastest_version(): self {\n\t\tif ( $this->does_file_exist( $this->src ) ) {\n\t\t\t$this->ver = strtotime( get_headers( $this->src, 1 )['Last-Modified'] );\n\t\t}\n\t\treturn $this;\n\t}",
"public function mtime()\n {\n }",
"public function mtime()\n {\n }",
"public function mtime()\n {\n }",
"public function mtime()\n {\n }",
"public function mtime()\n {\n }",
"public function getLastModified()\n {\n return filemtime($this->getFileName());\n }",
"public function set_last_modified($timestamp)\n\t{\n\t\t$this->last_modified = max($timestamp, $this->last_modified);\n\t}",
"public function onPreUpdate()\n {\n $this->modified_at = new \\DateTime(\"now\");\n }",
"public function refreshUpdated(): void\n {\n $this->setUpdatedAt(new \\DateTime());\n }",
"public function UpdateLastLogin() {\r\n\t\t\t$_SESSION[__CLASS__.$this->intId.'_LastLogin'] = $this->dttLastLogin;\r\n\t\t\t$this->dttLastLogin = new QDateTime(QDateTime::Now);\r\n\t\t}",
"protected function _update()\n\t{\n\t\t$this->date_modified = \\Core\\Date::getInstance(null,\\Core\\Date::SQL_FULL, true)->toString();\n\t\t$this->last_online = $this->date_modified;\n\t}",
"public function onPreUpdate()\n {\n $this->lastUpdatedDateTime = new \\DateTime(\"now\");\n }",
"public function updateLastPing()\n {\n $this->last_ping = Carbon::now();\n $this->save();\n }",
"function setPasswordUpdatedTime(){\n\t\t$this->setPasswordUpdated(time());\n\t}",
"public function setLastUpdatedNow()\n {\n $this->setLastUpdated(new \\DateTime());\n return $this;\n }",
"public function getNewFilePath()\r\n {\r\n return $this->_newFilePath;\r\n }",
"function wp_cache_set_users_last_changed()\n {\n }",
"public function mtime($file)\n {\n }",
"public function mtime($file)\n {\n }",
"public function mtime($file)\n {\n }",
"public function mtime($file)\n {\n }",
"public function mtime($file)\n {\n }",
"public function updateFile(File $file): void;",
"function last_version($file_name) {\n echo $file_name .\"?v=\". filemtime($file_name);\n}",
"public function setModifiedAt()\n {\n $this->modifiedAt = new \\DateTime();\n }",
"public function update()\n {\n $this->storage->set(self::STORAGE_KEY, md5(time()));\n }",
"function setLastModified($dateModified) {\n\t\t$this->setData('lastModified', $dateModified);\n\t}",
"function add_last_changes($dir,$name,$count = false){\n\n\t$info = json_decode(file_get_contents($dir.'_info.json'));\n\n\tdate_default_timezone_set('Europe/Minsk');\n\n\tif($count){\n\t\tif(!is_dir($dir.$name)){\n\t\t\t$json = json_decode(file_get_contents($dir.$name.'.json'));\n\t\t\t$records = count($json);\n\t\t} else {\n\t\t\t$json = json_decode(file_get_contents($dir.$name.'/_info.json'));\n\t\t\t$records = count($json);\n\t\t}\n\t}\n\n\tfor($i = 0; $i < count($info); $i++){\n\t\tif($info[$i]->name == $name){\n\t\t\t$info[$i]->last_changes = date(\"d.m.Y / H:i:s\");\n\t\t\tif($count){\n\t\t\t\t$info[$i]->total = $records;\n\t\t\t}\n\t\t}\n\t}\n\n\t$fp = fopen($dir.'_info.json','w');\n\tfwrite($fp,json_encode($info));\n\tfclose($fp);\n}",
"protected function _updateFileIdentifier() {}",
"public function setLastUpdate(\\DateTime $lastUpdate)\n {\n $this->lastUpdate = $lastUpdate;\n }",
"public function setModificationTime( $timestamp )\n {\n $this->mtime = $timestamp;\n list( $this->properties[\"lastModFileTime\"], $this->properties[\"lastModFileDate\"] ) = self::timestampToDosFormat( $timestamp );\n }",
"private function last_version($file_name){ \n if (file_exists($file_name)){\n return $file_name.\"?v=\".filemtime($file_name); \n } \n }",
"public function setFull_Filename(){\n \t $this->filename = $this->setDestination().'/'.$this->id.'.'.$this->ext;; \n\t}",
"protected function updateLastTrace() {\n $this->last_trace = time();\n }",
"function bps_getLoginSecurityResetFileLastMod() {\n$filename = WP_CONTENT_DIR . '/bps-backup/master-backups/Login-Security-Alert-Reset.txt';\n$gmt_offset = get_option( 'gmt_offset' ) * 3600;\n\nif ( file_exists($filename) ) {\n\t$last_modified = date(\"F d Y H:i:s\", filemtime($filename) + $gmt_offset );\n\treturn $last_modified;\n\t}\n}",
"public function getModifiedDate()\n {\n $this->modified_date = null;\n\n if ($this->exists === true) {\n } else {\n return;\n }\n\n if ($this->is_file === true) {\n } else {\n return;\n }\n\n $this->modified_date =\n $this->temp_files[$this->path]->year . '-' .\n $this->temp_files[$this->path]->month . '-' .\n $this->temp_files[$this->path]->day . ' ' .\n $this->temp_files[$this->path]->time;\n\n return;\n }",
"function getLastModified() {\n\t\treturn $this->getData('lastModified');\n\t}",
"public function onPreUpdate()\r\n {\r\n $this->updated_at = new \\DateTime(\"now\");\r\n }",
"public function setLastModified($value)\n {\n $this->_headers[ODataConstants::HTTPRESPONSE_HEADER_LASTMODIFIED] \n = $value;\n }",
"function setLastchange($d) {\n\t\tif ($d) {\n\t\t\t$newtime = dateTimeConvert($d);\n\t\t\tif ($newtime === false) return;\n\t\t\t$this->set('expiredate', $newtime);\n\t\t} else {\n\t\t\t$this->set('expiredate', NULL);\n\t\t}\n\t}",
"function wp_cache_set_sites_last_changed()\n {\n }",
"public function updateFilesystem()\n {\n }",
"function stampModified() {\n\t\treturn $this->setLastModified(Core::getCurrentDate());\n\t}",
"public function getLastModified()\n {\n return $this->lastModified;\n }"
] | [
"0.66107726",
"0.64566094",
"0.6416091",
"0.63932437",
"0.636297",
"0.6277795",
"0.6251553",
"0.6227783",
"0.62220216",
"0.62154377",
"0.6203205",
"0.61497694",
"0.61457026",
"0.6139894",
"0.61393416",
"0.61297613",
"0.60660297",
"0.6062222",
"0.6053718",
"0.6049115",
"0.6048578",
"0.6035959",
"0.60023916",
"0.599759",
"0.599759",
"0.599759",
"0.599759",
"0.59880096",
"0.5983182",
"0.5982296",
"0.5976633",
"0.5965767",
"0.5951842",
"0.5883782",
"0.5858861",
"0.58545375",
"0.58525795",
"0.58329314",
"0.58283097",
"0.5818768",
"0.58101666",
"0.5810142",
"0.58079714",
"0.58079714",
"0.5806702",
"0.58035654",
"0.58029383",
"0.5801893",
"0.57976776",
"0.5793032",
"0.5793032",
"0.57853454",
"0.578334",
"0.57784295",
"0.57742923",
"0.5761762",
"0.5754058",
"0.57536286",
"0.5753242",
"0.5753242",
"0.5753242",
"0.5747338",
"0.57462317",
"0.57432157",
"0.5731785",
"0.56895286",
"0.5689378",
"0.56753445",
"0.5666426",
"0.5665048",
"0.56576777",
"0.5650165",
"0.5640997",
"0.5640288",
"0.5640288",
"0.5640288",
"0.5640288",
"0.563831",
"0.5633203",
"0.56294036",
"0.56248647",
"0.5620785",
"0.56198066",
"0.560706",
"0.5601944",
"0.55948037",
"0.5591431",
"0.55792093",
"0.5575421",
"0.5565459",
"0.55634457",
"0.55602616",
"0.55592346",
"0.5556654",
"0.5551324",
"0.5548106",
"0.5539512",
"0.5537104",
"0.5530313",
"0.5524053"
] | 0.61478996 | 12 |
Indicate if synchronisation is needed | public function needToSync(string $slug = '_wpgb_last_sync'): bool
{
$lastUpdated = $this->getLastUpdated($slug);
$dbLastUpdated = $this->getDbLastUpdated($slug);
return $dbLastUpdated !== $lastUpdated;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function check_sync()\n {\n }",
"public function beforeSyncing() {}",
"public function is_synchronised_with_external() {\n return false;\n }",
"function canRunSynchronization( $synk )\n {\n return SynkHelperSynchronizations::canRun( $synk );\n }",
"abstract protected function isSyncRequired($entity);",
"public function isSyncable()\n {\n\n return static::$isSyncable;\n\n }",
"public function isConcurrent();",
"public function afterSyncing() {}",
"protected function lockingEnabled()\n {\n return $this->lock === null ? true : $this->lock;\n }",
"public function isSyncable() {\n return (bool) $this->_syncable;\n }",
"function sync() {\n\t\t// TODO\n\t}",
"protected function _syncTrapped() {}",
"public function stream_lock($operation) {\n return FALSE;\n }",
"public function can_sync(){\n\t\tif( true === $this->can_sync ){\n\t\t\treturn true;\n\t\t}\n\t\t$this->find_tags();\n\t\t$this->find_binds();\n\t\t$this->can_sync = ! empty( $this->binds );\n\t\treturn $this->can_sync;\n\t}",
"public function setup_sync()\n {\n }",
"public function lock(): void {}",
"public function lock(): void {}",
"public function lock(): void {}",
"public function lock(): void {}",
"public function lock(): void {}",
"public function lock(): void;",
"private function isSingleCourseSync(): bool\n {\n return !empty($this->maconomyId);\n }",
"public function sync();",
"public function sync();",
"abstract protected function lock(): void;",
"function isDispatched() ;",
"public function lock() {}",
"function isAcquired() ;",
"public function isSynced(): bool\n {\n return $this->synced;\n }",
"public function isLocked() {}",
"public function getSynchronized()\n {\n\n return $this->synchronized;\n\n }",
"public function shouldLoadJsAsync()\n {\n return (!$this->_remoteConfig->get(\"javascript_synced\"));\n }",
"public function synchronized($sync = true)\n {\n\n // Data und saved data sind jetzt identisch\n if ($sync)\n $this->savedData = $this->data;\n\n $this->synchronized = $sync;\n\n }",
"public function isAcquired() {}",
"public function isAcquired() {}",
"public function isAcquired() {}",
"public function isAcquired() {}",
"protected function in_progress() {\n\t\treturn 'in_progress' === get_option( 'ratesync_sync_status' );\n\t}",
"public function isDispatched() {}",
"public function isDispatched() {}",
"protected function lockRecord()\n\t{\n\t\t//\tignore locking\n\t\treturn true;\n\t}",
"public function trylock() {}",
"public static function synchronizelPermission(): bool\n {\n if (self::allPermission()) {\n return true;\n } else {\n return false;\n }\n }",
"public function is_locked(): bool {\n\t\t// TODO: Implement this.\n\t\treturn true;\n\t}",
"public function isAsynchronous(): bool\n {\n return true;\n }",
"public function lockToNormal() {}",
"public function synchronize($params = array())\n {\n $this->synchronized = true;\n }",
"static function init()\r\n {\r\n if (self::$initialized == false) {\r\n self::$UPDATE = new SynchronizationMode(1);\r\n self::$IGNORE = new SynchronizationMode(2);\r\n self::$initialized = true;\r\n }\r\n }",
"function lock()\n{\n}",
"public function isLocked();",
"public function isLocked();",
"public function isLocked();",
"public function lockShared($lock_waiting_option = null) {}",
"public function isSyncEnabled() {\n $subsStatus = $this->getContactFlag('subscribe_setting');\n if ($this->isServiceActive() && $subsStatus) {\n return true;\n }\n return false;\n }",
"private function synchronize() {\n\t\t$response = $this->send(self::$synchronize_uri, self::SYNC_SIZE);\n\t\t$this->_set_sync($response);\n\t}",
"public function hasSyncKey()\n {\n return $this->get(self::SYNC_KEY) !== null;\n }",
"public function execute()\n {\n if ($this->synchronizer->isSynchronizationRequired()) {\n $this->synchronizer->synchronize();\n }\n }",
"public function isShared() : bool;",
"protected function _handle()\n {\n $this->_logger->meta('Handling SYNC command.');\n\n // Check policy\n if (!$this->checkPolicyKey($this->_activeSync->getPolicyKey(), Horde_ActiveSync::SYNC_SYNCHRONIZE)) {\n return true;\n }\n\n // Check global errors.\n if ($error = $this->_activeSync->checkGlobalError()) {\n $this->_statusCode = $error;\n $this->_handleGlobalSyncError();\n return true;\n }\n\n // Defaults\n $this->_statusCode = self::STATUS_SUCCESS;\n $partial = false;\n\n try {\n $this->_collections = $this->_activeSync->getCollectionsObject();\n } catch (Horde_ActiveSync_Exception $e) {\n $this->_statusCode = self::STATUS_SERVERERROR;\n $this->_handleGlobalSyncError();\n return true;\n }\n\n // Sanity check\n if ($this->_device->version >= Horde_ActiveSync::VERSION_TWELVEONE) {\n // We don't have a previous FOLDERSYNC.\n if (!$this->_collections->haveHierarchy()) {\n $this->_logger->info('No HIERARCHY SYNCKEY in sync_cache, invalidating.');\n $this->_statusCode = self::STATUS_FOLDERSYNC_REQUIRED;\n $this->_handleGlobalSyncError();\n return true;\n }\n }\n\n // Start decoding request\n if (!$this->_decoder->getElementStartTag(Horde_ActiveSync::SYNC_SYNCHRONIZE)) {\n if ($this->_device->version >= Horde_ActiveSync::VERSION_TWELVEONE) {\n $this->_logger->meta('Empty Sync request, taking info from SyncCache.');\n if ($this->_collections->cachedCollectionCount() == 0) {\n $this->_logger->warn('Empty SYNC request but no SyncCache or SyncCache with no collections.');\n $this->_statusCode = self::STATUS_REQUEST_INCOMPLETE;\n $this->_handleGlobalSyncError();\n return true;\n } else {\n if (!$this->_collections->initEmptySync()) {\n $this->_statusCode = self::STATUS_REQUEST_INCOMPLETE;\n $this->_handleGlobalSyncError();\n return true;\n }\n }\n } else {\n $this->_statusCode = self::STATUS_REQUEST_INCOMPLETE;\n $this->_handleGlobalSyncError();\n $this->_logger->err('Empty Sync request and protocolversion < 12.1');\n return true;\n }\n } else {\n // Start decoding request.\n $this->_collections->hangingSync = false;\n while (($sync_tag = ($this->_decoder->getElementStartTag(Horde_ActiveSync::SYNC_WINDOWSIZE) ? Horde_ActiveSync::SYNC_WINDOWSIZE :\n ($this->_decoder->getElementStartTag(Horde_ActiveSync::SYNC_FOLDERS) ? Horde_ActiveSync::SYNC_FOLDERS :\n ($this->_decoder->getElementStartTag(Horde_ActiveSync::SYNC_PARTIAL) ? Horde_ActiveSync::SYNC_PARTIAL :\n ($this->_decoder->getElementStartTag(Horde_ActiveSync::SYNC_WAIT) ? Horde_ActiveSync::SYNC_WAIT :\n ($this->_decoder->getElementStartTag(Horde_ActiveSync::SYNC_HEARTBEATINTERVAL) ? Horde_ActiveSync::SYNC_HEARTBEATINTERVAL :\n -1)))))) != -1 ) {\n\n switch($sync_tag) {\n case Horde_ActiveSync::SYNC_HEARTBEATINTERVAL:\n if ($hbinterval = $this->_decoder->getElementContent()) {\n $this->_collections->setHeartbeat(array('hbinterval' => $hbinterval));\n $this->_collections->hangingSync = true;\n $this->_decoder->getElementEndTag();\n if ($hbinterval > (self::MAX_HEARTBEAT)) {\n $this->_logger->err('HeartbeatInterval outside of allowed range.');\n $this->_statusCode = self::STATUS_INVALID_WAIT_HEARTBEAT;\n $this->_handleGlobalSyncError(self::MAX_HEARTBEAT);\n return true;\n }\n }\n break;\n case Horde_ActiveSync::SYNC_WAIT:\n if ($wait = $this->_decoder->getElementContent()) {\n $this->_collections->setHeartbeat(array('wait' => $wait));\n $this->_collections->hangingSync = true;\n $this->_decoder->getElementEndTag();\n if ($wait > (self::MAX_HEARTBEAT / 60)) {\n $this->_logger->err('Wait value outside of allowed range.');\n $this->_statusCode = self::STATUS_INVALID_WAIT_HEARTBEAT;\n $this->_handleGlobalSyncError(self::MAX_HEARBEAT / 60);\n return true;\n }\n }\n break;\n case Horde_ActiveSync::SYNC_PARTIAL:\n if ($this->_decoder->getElementContent(Horde_ActiveSync::SYNC_PARTIAL)) {\n $this->_decoder->getElementEndTag();\n }\n $partial = true;\n break;\n case Horde_ActiveSync::SYNC_WINDOWSIZE:\n $this->_collections->setDefaultWindowSize($this->_decoder->getElementContent());\n if (!$this->_decoder->getElementEndTag()) {\n $this->_logger->err('PROTOCOL ERROR');\n return false;\n }\n break;\n case Horde_ActiveSync::SYNC_FOLDERS:\n if (!$this->_parseSyncFolders()) {\n // Any errors are handled in _parseSyncFolders() and\n // appropriate error codes sent to device.\n return true;\n }\n }\n }\n\n if ($this->_device->version >= Horde_ActiveSync::VERSION_TWELVEONE) {\n // These are not allowed in the same request.\n if ($this->_collections->hbinterval !== false &&\n $this->_collections->wait !== false) {\n\n $this->_logger->err('Received both HBINTERVAL and WAIT interval in same request.');\n $this->_statusCode = Horde_ActiveSync_Status::INVALID_XML;\n $this->_handleGlobalSyncError();\n return true;\n }\n\n // Fill in missing sticky data from cache.\n $this->_collections->validateFromCache();\n }\n\n // Ensure we have OPTIONS values.\n $this->_collections->ensureOptions();\n\n // Full or partial sync request?\n if ($partial === true) {\n $this->_logger->info('Executing a PARTIAL SYNC.');\n if (!$this->_collections->initPartialSync()) {\n $this->_statusCode = self::STATUS_REQUEST_INCOMPLETE;\n $this->_handleGlobalSyncError();\n return true;\n }\n } else {\n // Full request.\n $this->_collections->initFullSync();\n }\n\n // End SYNC tag.\n if (!$this->_decoder->getElementEndTag()) {\n $this->_statusCode = self::STATUS_PROTERROR;\n $this->_handleGlobalSyncError();\n $this->_logger->err('PROTOCOL ERROR: Missing closing SYNC tag');\n return false;\n }\n\n // We MUST have syncable collections by now.\n if (!$this->_collections->haveSyncableCollections($this->_device->version)) {\n $this->_statusCode = self::STATUS_KEYMISM;\n $this->_handleGlobalSyncError();\n return true;\n }\n\n // Update the syncCache with the new collection data.\n $this->_collections->updateCache();\n\n // Save.\n $this->_collections->save(true);\n\n $this->_logger->meta('All synckeys confirmed. Continuing with SYNC');\n }\n\n $pingSettings = $this->_driver->getHeartbeatConfig();\n\n // Override the total, per-request, WINDOWSIZE?\n if (!empty($pingSettings['maximumrequestwindowsize'])) {\n $this->_collections->setDefaultWindowSize($pingSettings['maximumrequestwindowsize'], true);\n }\n\n // If this is >= 12.1, see if we want a looping SYNC.\n if ($this->_collections->canDoLoopingSync() &&\n $this->_device->version >= Horde_ActiveSync::VERSION_TWELVEONE &&\n $this->_statusCode == self::STATUS_SUCCESS) {\n\n // Calculate the heartbeat\n if (!$heartbeat = $this->_collections->getHeartbeat()) {\n $heartbeat = !empty($pingSettings['heartbeatdefault'])\n ? $pingSettings['heartbeatdefault']\n : 10;\n }\n\n // Wait for changes.\n $changes = $this->_collections->pollForChanges($heartbeat, $pingSettings['waitinterval']);\n if ($changes !== true && $changes !== false) {\n switch ($changes) {\n case Horde_ActiveSync_Collections::COLLECTION_ERR_STALE:\n $this->_logger->info('Changes in cache detected during looping SYNC exiting here.');\n return true;\n case Horde_ActiveSync_Collections::COLLECTION_ERR_FOLDERSYNC_REQUIRED;\n $this->_statusCode = self::STATUS_FOLDERSYNC_REQUIRED;\n $this->_handleGlobalSyncError();\n return true;\n case Horde_ActiveSync_Collections::COLLECTION_ERR_SYNC_REQUIRED;\n $this->_statusCode = self::STATUS_REQUEST_INCOMPLETE;\n $this->_handleGlobalSyncError();\n return true;\n default:\n $this->_statusCode = self::STATUS_SERVERERROR;\n $this->_handleGlobalSyncError();\n return true;\n }\n }\n }\n\n // See if we can do an empty response\n if ($this->_device->version >= Horde_ActiveSync::VERSION_TWELVEONE &&\n $this->_statusCode == self::STATUS_SUCCESS &&\n empty($changes) &&\n $this->_collections->canSendEmptyResponse()) {\n\n $this->_logger->info('Sending an empty SYNC response.');\n $this->_collections->lastsyncendnormal = time();\n $this->_collections->save(true);\n return true;\n }\n\n $this->_logger->info(sprintf(\n 'Completed parsing incoming request. Peak memory usage: %d.',\n memory_get_peak_usage(true))\n );\n\n // Start output to client\n $this->_encoder->startWBXML();\n $this->_encoder->startTag(Horde_ActiveSync::SYNC_SYNCHRONIZE);\n $this->_encoder->startTag(Horde_ActiveSync::SYNC_STATUS);\n $this->_encoder->content(self::STATUS_SUCCESS);\n $this->_encoder->endTag();\n\n // Start SYNC_FOLDERS\n $this->_encoder->startTag(Horde_ActiveSync::SYNC_FOLDERS);\n\n // Get the exporter.\n $exporter = new Horde_ActiveSync_Connector_Exporter_Sync(\n $this->_activeSync,\n $this->_encoder\n );\n\n // Loop through each collection and send all changes, replies, fetchids\n // etc...\n $cnt_global = 0;\n $over_window = false;\n foreach ($this->_collections as $id => $collection) {\n $statusCode = self::STATUS_SUCCESS;\n $changecount = 0;\n\n if ($over_window || $cnt_global > $this->_collections->getDefaultWindowSize()) {\n $this->_sendOverWindowResponse($collection);\n continue;\n }\n\n // Initialize this collection's state.\n try {\n $this->_collections->initCollectionState($collection);\n } catch (Horde_ActiveSync_Exception_StateGone $e) {\n $this->_logger->warn('SYNC terminating, state not found');\n $statusCode = self::STATUS_KEYMISM;\n } catch (Horde_ActiveSync_Exception_FolderGone $e) {\n // This isn't strictly correct, but at least some versions of\n // iOS need this in order to catch missing state.\n $this->_logger->err($e->getMessage());\n $statusCode = self::STATUS_FOLDERSYNC_REQUIRED;\n } catch (Horde_ActiveSync_Exception_StaleState $e) {\n $this->_logger->notice($e->getMessage());\n return false;\n } catch (Horde_ActiveSync_Exception $e) {\n $this->_logger->err($e->getMessage());\n return false;\n }\n\n // Clients are allowed to NOT request changes. We still must check\n // for them since this would otherwise screw up conflict detection\n // (we can't update sync_ts until we actually check for changes). In\n // this case, we just don't send the changes back to the client\n // until the next SYNC that does set GETCHANGES using the\n // MOREAVAILABLE mechanism.\n if (!empty($collection['importedchanges']) && empty($collection['getchanges'])) {\n $forceChanges = true;\n $collection['getchanges'] = true;\n $this->_logger->notice('Forcing a GETCHANGES due to incoming changes.');\n }\n\n // Check for server-side changes, if requested.\n if ($statusCode == self::STATUS_SUCCESS && !empty($collection['getchanges'])) {\n try {\n $changecount = $this->_collections->getCollectionChangeCount();\n } catch (Horde_ActiveSync_Exception_StaleState $e) {\n $this->_logger->err(sprintf(\n 'Force restting of state for %s: %s',\n $id,\n $e->getMessage()));\n $this->_state->loadState(\n array(),\n null,\n Horde_ActiveSync::REQUEST_TYPE_SYNC,\n $id);\n $statusCode = self::STATUS_KEYMISM;\n } catch (Horde_ActiveSync_Exception_StateGone $e) {\n $this->_logger->warn('SYNCKEY not found. Reset required.');\n $statusCode = self::STATUS_KEYMISM;\n } catch (Horde_ActiveSync_Exception_FolderGone $e) {\n $this->_logger->warn('FOLDERSYNC required, collection gone.');\n $statusCode = self::STATUS_FOLDERSYNC_REQUIRED;\n } catch (Horde_ActiveSync_Exception_TemporaryFailure $e) {\n $this->_logger->err(sprintf(\n 'Failure in polling for changes: \"%s\".',\n $e->getMessage())\n );\n $statusCode = Horde_ActiveSync_Status::SERVER_ERROR_RETRY;\n } catch (Horde_Exception_AuthenticationFailure $e) {\n $this->_logger->err('Lost authentication during SYNC!!');\n $statusCode = self::STATUS_SERVERERROR;\n }\n }\n\n // Get new synckey if needed. We need a new synckey if any of the\n // following are true:\n // - There are any changes (incoming or outgoing).\n // - This is the initial sync pairing of the collection.\n // - We received a SYNC due to changes found during a PING\n // (See Bug: 12075).\n if ($statusCode == self::STATUS_SUCCESS &&\n (!empty($collection['importedchanges']) ||\n !empty($changecount) ||\n $collection['synckey'] == '0' ||\n $this->_state->getSyncKeyCounter($collection['synckey']) == 1 ||\n !empty($collection['fetchids']) ||\n $this->_collections->hasPingChangeFlag($id))) {\n\n try {\n $collection['newsynckey'] = $this->_state->getNewSyncKeyWrapper($collection['synckey']);\n $this->_logger->meta(sprintf(\n 'Old SYNCKEY: %s, New SYNCKEY: %s',\n $collection['synckey'],\n $collection['newsynckey'])\n );\n } catch (Horde_ActiveSync_Exception $e) {\n $statusCode = self::STATUS_KEYMISM;\n }\n }\n\n // Start SYNC_FOLDER\n $this->_encoder->startTag(Horde_ActiveSync::SYNC_FOLDER);\n\n //SYNC_FOLDERTYPE\n $exporter->syncFolderType($collection);\n\n // SYNC_KEY\n $exporter->syncKey($collection);\n\n // SYNC_FOLDERID\n $exporter->syncFolderId($collection);\n\n // SYNC_STATUS\n $exporter->syncStatus($statusCode);\n\n if ($statusCode == self::STATUS_SUCCESS) {\n // Server changes\n if ($statusCode == self::STATUS_SUCCESS &&\n empty($forceChanges) &&\n !empty($collection['getchanges'])) {\n\n $max_windowsize = !empty($pingSettings['maximumwindowsize'])\n ? min($collection['windowsize'], $pingSettings['maximumwindowsize'])\n : $collection['windowsize'];\n\n // MOREAVAILABLE?\n if (!empty($changecount) &&\n (($changecount > $max_windowsize) || $cnt_global + $changecount > $this->_collections->getDefaultWindowSize())) {\n $this->_logger->meta(sprintf(\n 'Sending MOREAVAILABLE. WINDOWSIZE = %d, $changecount = %d, MAX_REQUEST_WINDOWSIZE = %d, $cnt_global = %d',\n $max_windowsize, $changecount, $this->_collections->getDefaultWindowSize(), $cnt_global)\n );\n $this->_encoder->startTag(Horde_ActiveSync::SYNC_MOREAVAILABLE, false, true);\n $over_window = ($cnt_global + $changecount > $this->_collections->getDefaultWindowSize());\n }\n\n // Send each message now.\n if (!empty($changecount)) {\n $exporter->setChanges($this->_collections->getCollectionChanges(false), $collection);\n $this->_encoder->startTag(Horde_ActiveSync::SYNC_COMMANDS);\n $cnt_collection = 0;\n while ($cnt_collection < $max_windowsize &&\n $cnt_global < $this->_collections->getDefaultWindowSize() &&\n $progress = $exporter->sendNextChange()) {\n $this->_logger->meta(sprintf(\n 'Peak memory usage after message: %d',\n memory_get_peak_usage(true))\n );\n if ($progress === true) {\n ++$cnt_collection;\n ++$cnt_global;\n }\n }\n $this->_encoder->endTag();\n }\n }\n\n // Check for SYNC_REPLIES\n if (!empty($collection['clientids']) || !empty($collection['fetchids'])\n || !empty($collection['missing']) || !empty($collection['importfailures'])\n || !empty($collection['modifiedids'])) {\n\n // Start SYNC_REPLIES\n $this->_encoder->startTag(Horde_ActiveSync::SYNC_REPLIES);\n\n // SYNC_MODIFY failures\n if (!empty($collection['importfailures'])) {\n $exporter->modifyFailures($collection);\n }\n\n // EAS 16. CHANGED responses for items that need one. This\n // is basically the results of any AirSyncBaseAttachments\n // actions on Appointment or Draft Email items.\n if ($this->_device->version >= Horde_ActiveSync::VERSION_SIXTEEN &&\n !empty($collection['modifiedids'])) {\n $exporter->syncModifiedResponse($collection);\n }\n\n // Server IDs for new items we received from client\n if (!empty($collection['clientids'])) {\n $exporter->syncAddResponse($collection);\n }\n\n // Errors from missing messages in REMOVE requests.\n if (!empty($collection['missing'])) {\n $exporter->missingRemove($collection);\n }\n\n if (!empty($collection['fetchids'])) {\n $exporter->fetchIds($this->_driver, $collection);\n }\n\n // End SYNC_REPLIES\n $this->_encoder->endTag();\n }\n\n // Save state\n if (!empty($collection['newsynckey'])) {\n $this->_state->setNewSyncKey($collection['newsynckey']);\n $this->_state->save();\n // Add the new synckey to the syncCache\n $this->_collections->addConfirmedKey($collection['newsynckey']);\n $this->_collections->updateCollection(\n $collection,\n array('newsynckey' => true, 'unsetChanges' => true, 'unsetPingChangeFlag' => true)\n );\n } elseif (!isset($changes)) {\n // See if we could benefit from updating the collection's\n // syncStamp value even though there were no changes. If\n // $changes is set, we did a looping sync and already took\n // care of this.\n try {\n $this->_state->updateSyncStamp();\n } catch (Horde_ActiveSync_Exception $e) {\n $this->_logger->err($e->getMessage());\n }\n }\n }\n\n // End SYNC_FOLDER\n $this->_encoder->endTag();\n $this->_logger->meta(sprintf(\n 'Collection output peak memory usage: %d',\n memory_get_peak_usage(true))\n );\n }\n\n // End SYNC_FOLDERS\n $this->_encoder->endTag();\n\n // End SYNC_SYNCHRONIZE\n $this->_encoder->endTag();\n\n if ($this->_device->version >= Horde_ActiveSync::VERSION_TWELVEONE) {\n if ($this->_collections->checkStaleRequest()) {\n $this->_logger->info('Changes detected in sync_cache during wait interval, exiting without updating cache.');\n return true;\n } else {\n $this->_collections->lastsyncendnormal = time();\n $this->_collections->save(true);\n }\n } else {\n $this->_collections->save(true);\n }\n\n return true;\n }",
"public function isLocked()\n {\n return !!$this->special;\n }",
"public function isConsistent() {}",
"private function is_locked(){\n\t\t//return $batch_txt_file_object->exists();\n\t\treturn \"no\";\n\t\t\n\t}",
"public function isAcquired()\n {\n return $this->counter > 0;\n }",
"function using_dbsync(){\n\n if( !isset( $this->using_dbsync ) ){\n\n $dbsync_check = $this->single_rec(\"select 'YES' using_dbsync from dba_tables where owner= 'DBAMGR' and table_name = 'DBSYNC_STANDBY'\");\n\n if( isset( $dbsync_check->USING_DBSYNC ) ){\n $this->using_dbsync = 1;\n }else{\n $this->using_dbsync = 0;\n }\n\n }\n return $this->using_dbsync;\n }",
"public function in_transaction() {\r\n return isset($this->sem_id) && $this->sem_id;\r\n }",
"public function isWaiting();",
"public function getDataLocked(): bool;",
"public function lock()\n {\n $this->lock = true;\n }",
"protected function _syncSubject() {}",
"public function daily_sync()\n {\n /** @var $helper Mailigen_Synchronizer_Helper_Data */\n $helper = Mage::helper('mailigen_synchronizer');\n if (!$helper->isEnabled()) {\n return \"Module is disabled\";\n }\n\n /**\n * Synchronize Newsletter\n */\n try {\n if ($helper->canAutoSyncNewsletter()) {\n /** @var $mailigen Mailigen_Synchronizer_Model_Mailigen */\n $mailigen = Mage::getModel('mailigen_synchronizer/mailigen');\n $mailigen->syncNewsletter();\n }\n } catch (Exception $e) {\n Mage::helper('mailigen_synchronizer/log')->logException($e);\n }\n\n /**\n * Synchronize Customers\n */\n try {\n if ($helper->canAutoSyncCustomers() || $helper->getManualSync()) {\n if ($helper->getManualSync()) {\n $helper->setManualSync(0);\n }\n\n /** @var $mailigen Mailigen_Synchronizer_Model_Mailigen */\n $mailigen = Mage::getModel('mailigen_synchronizer/mailigen');\n $mailigen->syncCustomers();\n }\n } catch (Exception $e) {\n Mage::helper('mailigen_synchronizer/log')->logException($e);\n }\n }",
"private function _init()\n {\n if (!$this->_isInitialized()) {\n $this->synchronize();\n }\n }",
"public function isAcquired($name)\n {\n return in_array($name, $this->_locks, true);\n }",
"public function lock()\n {\n $this->locked = true;\n }",
"public function forceSynchonization()\n {\n $observer = App::make(ObserverContract::class);\n\n $observer->forceSynchonization($this);\n }",
"public function acquireSharedLock() {}",
"public function notify() : bool{}",
"function &runSynchronization( $synk, &$options ) {\n\t\t// load the plugins\n\t\tJPluginHelper::importPlugin( 'synk' );\n\t\t\t\t\n\t\t$success = false; \n\t\t\n\t\tif (!isset($options['synktype'])) {\n\t\t\treturn $success;\n\t\t}\n\n\t\t/**\n\t\t*\n\t\t* CAN THE SYNK BE RUN\n\t\t*\n\t\t*/\n\t\tif ( !$this->canRunSynchronization( $synk ) ) {\n\t\t\treturn $success;\n\t\t}\n\t\t\t\t\n\t\t/**\n\t\t*\n\t\t* RUN THE SYNK\n\t\t*\n\t\t*/\n\t\t$runSynk = &$this->_executeSynchronization( $synk, $options );\n\n\t\t/**\n\t\t*\n\t\t* LOG THE SYNK\n\t\t*\n\t\t*/\n\t\t$logSynk = &$this->logSynchronization( $synk, $options, $runSynk );\n\t\t\n\t\treturn $runSynk;\n\t}",
"public function allowMultithreading()\n {\n return $this->_allow_multithreading;\n }",
"private function check_lock($name){\n\t\tif(in_array($name, $this->lock)){\n\t\t\t$this->dtstatus = \"Var IS locked\";\n\t\t\treturn TRUE;\n\t\t}\n\t\telse{\n\t\t\t$this->dtstatus = \"Var IS NOT locked\";\n\t\t\treturn false;\n\t\t}\n\t}",
"public function isAquired() {\n if (isset(self::$hSemaphores[$this->key]))\n return is_resource(self::$hSemaphores[$this->key]);\n return false;\n }",
"public function hasMayParallelize()\n {\n return $this->may_parallelize !== null;\n }",
"public function supportsLocks() {\n\n return $this->rootNode instanceof Sabre_DAV_ILockable || $this->lockManager;\n\n }",
"public function wasDeadlock() {\n\t\treturn false;\n\t}",
"public function isLocked() {\n return $this->lock->get('enable', false);\n }",
"public function is_ready();",
"public function is_calendar_sync_enabled() {\n return $this->is_connected() && $this->get_calendar_id();\n }",
"public function lockExclusive($lock_waiting_option = null) {}",
"function cacheObjectLocked ()\n {\n return is_file($this->cacheObjectId.'.lock');\n }",
"public function getIsNewSingleExecution() {}",
"protected function _get_ready() {\n $this->report_warning(\"This is the default (empty) implementation of _get_ready() method, seems that this object lacks specific implementation\");\n }",
"public function lock()\n\t{\n\t\t$this->immutable = true;\n\t}",
"public function lock_read() {}",
"public function synchronize($params = array())\n {\n }",
"public function synchronize($params = array())\n {\n }",
"public function hasTransferUponMergerOrAcquisition() {\n\t\treturn $this->transferUponMergerOrAcquisition;\n\t}",
"public function isAsync(): bool\n {\n return $this->async;\n }",
"public function isAsync();",
"private function isLocked() {\n return true === $this->status->is_locked;\n }",
"public function synchronize($params = array());",
"public function synchronized(\\Closure $closure): mixed;",
"public function ownsLock()\n {\n return $this->owner() === $this->id;\n }"
] | [
"0.71573484",
"0.7011674",
"0.69501686",
"0.664892",
"0.6419912",
"0.6383724",
"0.6236275",
"0.6183338",
"0.61810786",
"0.6172207",
"0.6096192",
"0.60919535",
"0.6088453",
"0.60672057",
"0.60423964",
"0.6012649",
"0.6012649",
"0.6012649",
"0.6012649",
"0.6012649",
"0.60001117",
"0.59935606",
"0.5979215",
"0.5979215",
"0.5967904",
"0.59485173",
"0.594242",
"0.5916326",
"0.5878817",
"0.5869544",
"0.58682173",
"0.58658934",
"0.58529687",
"0.5847444",
"0.5847444",
"0.5847444",
"0.58465296",
"0.5832082",
"0.5817705",
"0.5817705",
"0.5816316",
"0.5796498",
"0.5786909",
"0.5774104",
"0.5765152",
"0.5755911",
"0.57488024",
"0.5721683",
"0.5713439",
"0.57120824",
"0.57120824",
"0.57120824",
"0.56934404",
"0.56826913",
"0.56747234",
"0.5656283",
"0.5655763",
"0.5654041",
"0.56538373",
"0.5636116",
"0.5612631",
"0.5612048",
"0.5606499",
"0.559513",
"0.5591663",
"0.55178237",
"0.5496014",
"0.5491777",
"0.54850155",
"0.5457937",
"0.54393536",
"0.5437298",
"0.5400953",
"0.5399896",
"0.5394874",
"0.53854066",
"0.5383645",
"0.53830504",
"0.53571296",
"0.5356845",
"0.5352894",
"0.5346601",
"0.53422564",
"0.5327032",
"0.53259337",
"0.53173614",
"0.5312425",
"0.53064984",
"0.5303036",
"0.5297246",
"0.52819186",
"0.52629757",
"0.52589",
"0.52589",
"0.52585644",
"0.5254242",
"0.52505666",
"0.5247828",
"0.5237788",
"0.52317977",
"0.5229287"
] | 0.0 | -1 |
Create json folders if needed | public function maybeCreateJsonFolder()
{
$path = $this->getJsonFolder();
if (!file_exists($path)) {
mkdir($path, 0777, true);
}
if (!file_exists($path . DIRECTORY_SEPARATOR . $this->type)) {
mkdir($path . DIRECTORY_SEPARATOR . $this->type, 0777, true);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function create_folder($json_path,$name){\n\tif (!file_exists($json_path)){\n\t\tmkdir($json_path, 0777);\n\t}\n\tif(!file_exists($json_path.'_info.json')){\n\t\t$fp = fopen($json_path.'_info.json','w');\n\t\tfwrite($fp,'[]');\n\t\tfclose($fp);\n\t}\n\tif (file_exists($json_path.$name)){\n\t\treturn 'folder exist';\n\t} else {\n\t\tmkdir($json_path.$name, 0777);\n\t\t$fp = fopen($json_path.$name.'/_info.json','w');\n\t\tfwrite($fp,'[]');\n\t\tfclose($fp);\n\t\tif($name != ''){\n\t\t\twrite_info_file($json_path,$name);\n\t\t}\n\t\treturn 'created';\n\t}\n}",
"function create_json($json_path,$folder,$name,$object){\n\t$dir = $json_path.$folder.'/';\n\tif(file_exists($dir.$name.'.json')){\n\t\treturn 'file exist';\n\t}\n\tif(!file_exists($dir)){\n\t\tcreate_folder($json_path,$folder);\n\t}\n\twrite_info_file($dir,$name);\n\t$fp = fopen($dir.$name.'.json','w');\n\tfwrite($fp,'[]');\n\tfclose($fp);\n\tif($object != ''){\n\t\t$push = json_push($json_path,$folder,$name,$object);\n\t}\n\tadd_last_changes($json_path,$folder,true);\n\tadd_last_changes($dir,$name,true);\n\treturn 'json is created';\n}",
"public function include_json_folders()\n {\n }",
"private function generatePluginJsonFile()\n {\n $path = $this->pluginRepository->getPluginPath($this->getName()).'plugin.json';\n\n if (! $this->filesystem->isDirectory($dir = dirname($path))) {\n $this->filesystem->makeDirectory($dir, 0775, true);\n }\n\n $this->filesystem->put($path, $this->getStubContents('json'));\n\n $this->console->info(\"Created : {$path}\");\n }",
"private function verifyPatch(){\n if(!file_exists('json'))\n return mkdir(\"json\");\n else\n return true;\n }",
"function make_json($data) {\n // generate JSON path with a random filename\n $json_path = __dir__ . '/datasets/' . make_name(10) . '.json';\n // convert PHP array into JSON string\n $json_data = json_encode($data);\n // write the JSON string to the file\n file_put_contents($json_path, $json_data);\n return $json_path;\n }",
"function open_folder($json_path,$folder){\n\tif($folder == ''){\n\t\t$dir = $json_path;\n\t} else {\n\t\t$dir = $json_path.$folder.'/';\n\t}\n\tif(!file_exists($dir)){\n\t\treturn 'no exist';\n\t} else {\n\t\t$files = scandir($dir);\n\t\tarray_splice($files,0,2);\n\t\t$result = new stdClass();\n\t\tfor($i = 0; $i < count($files); $i++){\n\t\t\tif(is_dir($dir.$files[$i])){\n\t\t\t\t$subdir = scandir($dir.$files[$i]);\n\t\t\t\tarray_splice($subdir,0,2);\n\t\t\t\t$subdir_res = new stdClass();\n\t\t\t\tfor($j = 0; $j < count($subdir); $j++){\n\t\t\t\t\t$json = file_get_contents($dir.$files[$i].'/'.$subdir[$j]);\n\t\t\t\t\t$array_json = json_decode($json);\n\t\t\t\t\t$name = explode('.',$subdir[$j]);\n\t\t\t\t\t$subdir_res->$name[0] = $array_json;\n\t\t\t\t}\n\t\t\t\t$result->$files[$i] = $subdir_res;\n\t\t\t} else {\n\t\t\t\t$json = file_get_contents($dir.$files[$i]);\n\t\t\t\t$array_json = json_decode($json);\n\t\t\t\t$name = explode('.',$files[$i]);\n\t\t\t\t$result->$name[0] = $array_json;\n\t\t\t}\n\t\t}\n\t\treturn json_encode($result);\n\t}\n}",
"private function writeJSON($dir) {\r\n $sections = GearSection::getAll($this->id_shop, false);\r\n $data = array();\r\n foreach($sections as $section) {\r\n $std = new stdClass();\r\n $std->name = $section->name;\r\n $std->label = $section->label;\r\n $std->active = $section->active;\r\n $std->description = $section->description;\r\n $std->order = $section->order;\r\n \r\n $options = GearOption::getBySection($section->id, $this->id_shop, false);\r\n $std->options = array();\r\n foreach ($options as $option) {\r\n $opt = new stdClass();\r\n $opt->name = $option->name;\r\n $opt->value = $option->value;\r\n $opt->label = $option->label;\r\n $opt->active = $option->active;\r\n $opt->description = $option->description;\r\n $opt->field = $option->field;\r\n $opt->order = $option->order;\r\n \r\n array_push($std->options, $opt);\r\n }\r\n \r\n array_push($data, $std);\r\n }\r\n \r\n $file = $dir.DIRECTORY_SEPARATOR.date('YmdHis').'.json';\r\n if (file_put_contents($file, json_encode($data))) {\r\n return $file;\r\n }\r\n return false;\r\n }",
"function json_builder($directories)\n{\n global $totalcount;\n $output = [];\n $output[\"cameras\"] = camera_mapper($directories);\n $output[\"stats\"] = [\"videos\" => $totalcount, \"directories\" => count($directories), \"generated\" => time()];\n $output = json_encode($output, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT);\n file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . \"cached.json\", $output);\n return $output;\n}",
"public function createJson(){\n $json = fopen($this->getFilePath(), 'w');\n$content = \"{\n \\\"require\\\" : {\n },\n \\\"bower\\\" : [\n ]\n}\";\n fwrite($json, $content);\n fclose($json);\n }",
"protected function createDirectories() :void\n {\n $directories = ['Entities', 'Resources', 'Services'];\n\n foreach ($directories as $directory) {\n $directory = app_path($directory);\n\n Storage::makeDirectory($directory, true);\n Storage::put($directory . '/' . '.gitkeep', \"\");\n }\n }",
"public function make_json_file()\n\t{\n\t\t$json_file = fopen('recipes.json', 'w');\n\t\tfwrite($json_file, $this->json_result);\n\t\tfclose($json_file);\t\n\t}",
"function createDataPaths() {\n foreach ($this->data_paths as $path) {\n if (!file_exists($this->root . $path)) {\n mkdir($this->root . $path);\n }\n }\n }",
"public function createFolders() {\n $this->output('Current directory: ' . getcwd());\n\n // user folder.\n try {\n \\File::read_dir($this->repo_home . '/' . $this->user_id);\n $this->output('User directory already exist.');\n } catch (Exception $e) {\n $p = new Process('mkdir ' . $this->repo_home . '/' . $this->user_id);\n $p->run();\n $this->output('Created user Directory: ' . $this->user_dir);\n }\n $this->user_dir = $this->repo_home . '/' . $this->user_id;\n\n // repo folder.\n try {\n \\File::read_dir($this->user_dir . '/' . $this->deploy_id);\n $this->output('Repository directory already exist.');\n } catch (Exception $ex) {\n $p = new Process('mkdir ' . $this->user_dir . '/' . $this->deploy_id);\n $p->run();\n $this->output('Created repository directory: ' . $this->repo_dir);\n }\n $this->repo_dir = $this->user_dir . '/' . $this->deploy_id;\n }",
"private function mustCreateFolder(){\n }",
"function generate_json_file() {\n // Open new file to write\n $json_file = new SplFileObject(\"../CCNiceAudioFiles.json\", \"w\");\n $json_file->fwrite(\"[\\n\");\n\n // Retrieve all non new entries from the database\n $result = $this->get_list_of_published_files();\n\n // For each file generate json entry to be used for presentation\n foreach( $result as $i ){\n\n unset($i['newfile']);\n unset($i['flaggedfile']);\n unset($i['flagcomment']);\n unset($i['md5_sign']);\n unset($i['publishedfile']);\n unset($i['translated']);\n unset($i['downloads']);\n unset($i['filepath']);\n\n $readable_size = $this->convert_file_size($i['size']);\n $i['size'] = $readable_size;\n\n $json_file->fwrite(json_encode($i) . \",\\n\");\n }\n\n $json_file->fseek(-2, SEEK_CUR);\n\n $json_file->fwrite(\"\\n]\");\n $json_file = null;\n\n return;\n }",
"function create_folder($name)\n{\n $location = Path::get_repository_path() . 'lib/content_object/';\n Filesystem::create_dir($location . $name);\n}",
"public function createDirectories()\n {\n self::createDirectory($this->contentDirectoryPath);\n\n if ($this->staticPreviewIsEnabled())\n self::createDirectory($this->cacheDirectoryPath);\n }",
"function json_push($json_path,$folder,$name,$object){\n\t$dir = $json_path.$folder.'/';\n\tif(!file_exists($dir)){\n\t\treturn 'no folder';\n\t}\n\tif(!file_exists($dir.$name.'.json')){\n\t\treturn 'no json';\n\t}\n\tif($object == ''){\n\t\treturn 'no object';\n\t}\n\t$json = json_decode(file_get_contents($dir.$name.'.json'));\n\tif($json != '' && $json != []){\n\t\t$newObject = new stdClass;\n\t\tforeach($json[0] as $key => $value){\n\t\t\t$newObject->$key = null;\n\t\t}\n\t\tforeach($newObject as $key => $value){\n\t\t\tif(property_exists($object,$key)){\n\t\t\t\t$newObject->$key = $object->$key;\n\t\t\t}\n\t\t}\n\t\tarray_push($json,$newObject);\n\t} else {\n\t\tarray_push($json,$object);\n\t}\n\t$fp = fopen($dir.$name.'.json','w');\n\tfwrite($fp,json_encode($json));\n\tfclose($fp);\n\tadd_last_changes($json_path.'/',$folder);\n\tadd_last_changes($dir.'/',$name, true);\n\treturn 'object is added';\n}",
"protected function setUp()\r\n {\r\n $this->object = new Json;\r\n mkdir('data/tests');\r\n file_put_contents('data/tests/test.json', json_encode(\\MockObject\\FileDataStub::getData()));\r\n }",
"function makeDirectories()\n {\n $pathFolderStr = '';\n foreach ($this->nestedArray as $i => $part) {\n $pathFolderStr .= $part.'/';\n if (!is_dir($this->baseDestinationFolder.$pathFolderStr)) {\n mkdir($this->baseDestinationFolder.$pathFolderStr);\n }\n }\n }",
"public function mkdirDeepCreatesDirectoryWithAndWithoutDoubleSlashesDataProvider() {}",
"function createFiles()\n {\n $this->debug(\"start createFiles $this->tempdir\");\n\n if (!file_exists($this->tempdir)) {\n\n return false;\n }\n $fh = opendir($this->tempdir);\n if (!$fh) {\n return false;\n }\n $this->debug(\"start processFiles $fh\");\n $jsonfiles = array();\n while (false !== ($file = readdir($fh))) {\n\n if (strpos($file, 'json') !== false) {\n $jsonfiles[] = $file;\n }\n }\n closedir($fh);\n unset($this->playlistID);\n //Playlist\n\n if (count($jsonfiles) > 0) {\n $this->debug(\"process playlist $this->playlistID\");\n //TODO Create folder xml\n $videos = array();\n foreach ($jsonfiles as $jsonfile) {\n $this->debug(\"start processFiles file $jsonfile\");\n if (!$this->createVideoXMLAndCopy($jsonfile)) {\n return false;\n }\n }\n }\n if (count($jsonfiles) > 1 && isset($this->playlistID)) {\n //Playlist\n foreach ($jsonfiles as $jsonfile) {\n $json = json_decode(file_get_contents(\"$this->tempdir/$jsonfile\"));\n $playlistname = $json->playlist;\n $nr = $json->playlist_index;\n $id = $json->id;\n $videos[$nr] = $id;\n }\n $plfile = \"$this->tempdir/$this->playlistID.xml\";\n $data = \"<playlist xmlns=\\\"http://www.make.tv/smt/playout/library\\\" id=\\\"$this->playlistID\\\">\\n<title><![CDATA[$playlistname]]></title>\";\n foreach ($videos as $video) {\n $data .= \"\\n<video id=\\\"$video\\\" libraryId=\\\"\\\" status=\\\"0\\\" />\";\n };\n $data .= \"\\n</playlist>\";\n if (file_put_contents($plfile, $data, LOCK_EX) === false) {\n return false;\n }\n $this->deleteJSONFiles();\n rename($this->tempdir, \"$this->targetdir/$this->playlistID\");\n } else {\n //single videofile\n $this->debug(\"rename files\");\n $fh = opendir($this->tempdir);\n while (false !== ($file = readdir($fh))) {\n $this->debug(\"rename $file\");\n if (strpos($file, '.xml') !== false || strpos($file, '.mp4') !== false) {\n rename(\"$this->tempdir/$file\", \"$this->targetdir/$file\");\n }\n }\n closedir($fh);\n $this->deleteJSONFiles();\n }\n\n $this->debug(\"end createFiles \");\n return true;\n }",
"private function ensureFolderStructure()\n {\n $localeDir = Strata::getLocalePath();\n if (!is_dir($localeDir)) {\n mkdir($localeDir);\n }\n }",
"private static function folders_path(){\n\t\treturn dirname(__DIR__) . '/content/folders.json';\n\t}",
"protected function createDirectory() {}",
"protected function createOtherDirs()\n {\n $this->createDir('Database', true);\n $this->createDir('Database/Migrations', true);\n $this->createDir('Database/Seeds', true);\n $this->createDir('Filters', true);\n $this->createDir('Language', true);\n $this->createDir('Validation', true);\n }",
"function put_json_output()\n\t{\n\t\tif(!file_exists(\"employee_wage_output.json\"))\n\t\t{\n\t\t\ttouch(\"employee_wage_output.json\");\t\t\t//Creating file if not exists\n\t\t\t$json_file=\"employee_wage_output.json\";\t\t//Getting filename into variable\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$json_file=\"employee_wage_output.json\";\t\t//Getting filename into variable\n\t\t}\n\t\t//Getting old data from file\n\t\t$old_json_data = file_get_contents($json_file);\n\n\t\t//Checking if is not empty\n\t\tif($old_json_data!=null)\n\t\t{\n\t\t\t//Merging old data with new data\n\t\t\t$old_data = json_decode($old_json_data);\n\t\t\tarray_push($old_data, $this->employee_data);\n\n\t\t\t//Converting data into json format\n\t\t\t$json_data = json_encode($old_data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//Converting data into json format\n\t\t\t$json_data = json_encode($this->employee_data);\n\t\t}\n\t\t\n\t\t//Putting json data into output file\n\t\tfile_put_contents($json_file, $json_data);\n\n\t}",
"private static function makeJSON(string $dir) : array\n\t{\n\t\tstatic $index = 0;\n\n\t\t$aeFiles = \\MarkNotes\\Files::getInstance();\n\t\t$aeEvents = \\MarkNotes\\Events::getInstance();\n\t\t$aeSession = \\MarkNotes\\Session::getInstance();\n\t\t$aeSettings = \\MarkNotes\\Settings::getInstance();\n\n\t\t$root = str_replace('/', DS, $aeSettings->getFolderDocs(true));\n\n\t\t$rootNode = $aeSettings->getFolderDocs(false);\n\n\t\t// Get the list of files and folders for the treeview\n\t\t$arrEntries = self::directoryToArray($dir);\n\n\t\t// Now, prepare the JSON return\n\t\t$sDirectoryText = basename($dir);\n\t\t$sID = str_replace(dirname($root) . DS, '', $dir);\n\t\t$sID = rtrim($sID, DS) . DS;\n\n\t\t// It's a folder node\n\t\t$dataURL = str_replace(DS, '/', str_replace(dirname($root) . DS, '', $dir));\n\t\t$dataURL .= (($root == $dir) ? '' : '/') . 'index.html';\n\n\t\tif (PHP_7_0) {\n\t\t\t// Avoid PHP 7.0.x bug : handle accents\n\t\t\t$arrSettings = $aeSettings->getPlugins('/interface');\n\t\t\t$bConvert = boolval($arrSettings['accent_conversion'] ?? 1);\n\n\t\t\tif ($bConvert) {\n\t\t\t\t$sID = iconv('UTF-8', 'UTF-8//IGNORE', utf8_encode($sID));\n\n\t\t\t\t// accent_conversion in settings.json has\n\t\t\t\t// been initialized to 1 => make the conversion\n\t\t\t\t$sDirectoryText = iconv('UTF-8', 'UTF-8//IGNORE', utf8_encode($sDirectoryText));\n\n\t\t\t\t$dataURL = iconv('UTF-8', 'UTF-8//IGNORE', utf8_encode($dataURL));\n\t\t\t}\n\t\t}\n\n\t\t$listDir = [\n\t\t\t'id' => md5($sID),\n\t\t\t'type' => 'folder',\n\t\t\t'icon' => 'folder',\n\t\t\t'text' => str_replace(DS, '/', $sDirectoryText),\n\t\t\t'state' => [\n\t\t\t\t// Opened only if the top root folder\n\t\t\t\t'opened' => (($root == $dir) ? 1 : 0),\n\t\t\t\t'disabled' => 1\n\t\t\t],\n\t\t\t'data' => [\n\t\t\t\t//'task' => 'display',\n\t\t\t\t// Right clic on the node ?\n\t\t\t\t// Open the_folder/index.html page\n\t\t\t\t'url' => $dataURL,\n\t\t\t\t'path' => str_replace(DS, '/', $sID)\n\t\t\t],\n\t\t\t'children' => []\n\t\t];\n\n\t\t$dirs = [];\n\t\t$files = [];\n\n\t\tforeach ($arrEntries as $entry) {\n\t\t\tif ($entry['type'] == 'file') {\n\t\t\t\t$entry['name'] = str_replace('/', DS, $entry['name']);\n\n\t\t\t\t// We're processing a filename\n\t\t\t\t$index += 1;\n\n\t\t\t\t//Filename but without the extension (and no path)\n\t\t\t\t$filename = str_replace('.md', '', basename($entry['name']));\n\n\t\t\t\t// Relative filename like f.i.\n\t\t\t\t// docs/the_folder/a_note.md\n\t\t\t\t$id = str_replace($root, $rootNode, $entry['name']);\n\n\t\t\t\tif (PHP_7_0) {\n\t\t\t\t\tif ($bConvert) {\n\t\t\t\t\t\t// accent_conversion in settings.json has\n\t\t\t\t\t\t// been initialized to 1 => make the conversion\n\t\t\t\t\t\t$id = iconv('UTF-8', 'UTF-8//IGNORE', utf8_encode($id));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Right-click on a file = open it's HTML version\n\t\t\t\t$dataURL = str_replace($root, '', $entry['name']);\n\n\t\t\t\t// Should be relative to the /docs folder\n\t\t\t\t$dataURL = $aeSettings->getFolderDocs(false) . $dataURL;\n\t\t\t\t$dataURL = str_replace(DS, '/', $dataURL) . '.html';\n\n\t\t\t\t$sFileText = $filename;\n\n\t\t\t\t// If the title is really long, …\n\t\t\t\t// 30 characters in the treeview are enough\n\t\t\t\tif (strlen($sFileText) > TREEVIEW_MAX_FILENAME_LENGTH) {\n\t\t\t\t\t/* We'll truncate the filename to only the first ...\n\t\t\t\t\tthirty ... characters\n\t\t\t\t\tBut, special case, when the filename is truncated,\n\t\t\t\t\tif the very last position is an accentuated char.,\n\t\t\t\t\twe can't truncate exactly at that size because such\n\t\t\t\t\tcharacter is on two bytes. We can only keep the first\n\t\t\t\t\tone otherwise we'll have an encoding problem.\n\t\t\t\t\tSo, in this case, truncate one more char (so keep\n\t\t\t\t\t29 f.i.)\n\t\t\t\t\t*/\n\t\t\t\t\ttry {\n\t\t\t\t\t\t$wLen = TREEVIEW_MAX_FILENAME_LENGTH;\n\t\t\t\t\t\t$tmp = json_encode(substr($sFileText, 0, $wLen));\n\t\t\t\t\t\tif (json_last_error() === JSON_ERROR_UTF8) {\n\t\t\t\t\t\t\t$wLen--;\n\t\t\t\t\t\t\t$tmp = json_encode(substr($sFileText, 0, $wLen));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$sFileText = substr($sFileText, 0, $wLen) . ' …';\n\t\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t\t/*<!-- build:debug -->*/\n\t\t\t\t\t\tdie(\"<pre style='background-color:yellow;'>\" . __FILE__ . ' - ' . __LINE__ . ' ' . print_r($sFileText, true) . '</pre>');\n\t\t\t\t\t\t/*<!-- endbuild -->*/\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$dataBasename = $aeFiles->removeExtension(basename($dataURL));\n\n\t\t\t\t$dataFile = str_replace($root, '', $entry['name']);\n\t\t\t\t$dataFile = str_replace(DS, '/', $dataFile);\n\n\t\t\t\t$default_task = 'task.export.html';\n\n\t\t\t\t// In the list of files, help the jsTree plugin\n\t\t\t\t// to know that the action should be EDIT and not DISPLAY\n\t\t\t\t// when the user click on the note that was just created\n\t\t\t\t$lastAddedNote = trim($aeSession->get('last_added_note', ''));\n\n\t\t\t\tif ($dataBasename === $lastAddedNote) {\n\t\t\t\t\t$default_task = 'task.edit.form';\n\t\t\t\t}\n\n\t\t\t\tif (PHP_7_0) {\n\t\t\t\t\tif ($bConvert) {\n\t\t\t\t\t\t// accent_conversion in settings.json has\n\t\t\t\t\t\t// been initialized to 1 => make the conversion\n\t\t\t\t\t\t$sFileText = iconv('UTF-8', 'UTF-8//IGNORE', utf8_encode($sFileText));\n\n\t\t\t\t\t\t$dataBasename = iconv('UTF-8', 'UTF-8//IGNORE', utf8_encode($dataBasename));\n\n\t\t\t\t\t\t$dataFile = iconv('UTF-8', 'UTF-8//IGNORE', utf8_encode($dataFile));\n\n\t\t\t\t\t\t$dataURL = iconv('UTF-8', 'UTF-8//IGNORE', utf8_encode($dataURL));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$files[] = [\n\t\t\t\t\t'id' => md5($id),\n\t\t\t\t\t'icon' => 'file file-md',\n\t\t\t\t\t'text' => $sFileText,\n\t\t\t\t\t'data' => [\n\t\t\t\t\t\t'basename' => $dataBasename,\n\t\t\t\t\t\t'task' => $default_task,\n\t\t\t\t\t\t'file' => $dataFile,\n\t\t\t\t\t\t'url' => $dataURL\n\t\t\t\t\t],\n\t\t\t\t\t'state' => [\n\t\t\t\t\t\t'opened' => 0,\t// A file isn't opened\n\t\t\t\t\t\t'selected' => 0 // and isn't selected by default\n\t\t\t\t\t]\n\t\t\t\t];\n\t\t\t} elseif ($entry['type'] == 'folder') {\n\t\t\t\t// It's a folder\n\n\t\t\t\t// Derive the folder name\n\t\t\t\t// From c:/sites/marknotes/docs/the_folder, keep /the_folder/\n\t\t\t\t$fname = str_replace($root, '', $entry['name']);\n\t\t\t\t$fname = DS . ltrim(rtrim($fname, DS), DS) . DS;\n\n\t\t\t\t// The folder should start and end with the slash\n\t\t\t\t// so \"/the_folder/\" and not something else.\n\t\t\t\t$tmp = [\n\t\t\t\t\t'folder' => rtrim($root, DS) . $fname,\n\t\t\t\t\t'return' => true\n\t\t\t\t];\n\n\t\t\t\t$args = [&$tmp];\n\n\t\t\t\t// If the task.acls.cansee wasn't fired i.e. when\n\t\t\t\t// there was no folder to protect, the trigger even\n\t\t\t\t// return False. Otherwise, trigger return True :\n\t\t\t\t// the plugin has been fired\n\t\t\t\tif (static::$bACLsLoaded) {\n\t\t\t\t\t$bReturn = $aeEvents->trigger('task.acls.cansee::run', $args);\n\t\t\t\t} else {\n\t\t\t\t\t// ACLs plugin not loaded; every files / folders\n\t\t\t\t\t// can be accessed\n\t\t\t\t\t$args[0]['return'] = 1;\n\t\t\t\t\t$bReturn = true;\n\t\t\t\t}\n\n\t\t\t\t// The canSeeFolder event will initialize the 'return'\n\t\t\t\t// parameter to false when the current user can't see the\n\t\t\t\t// folder i.e. don't have the permission to see it. This\n\t\t\t\t// permission is defined in the acls plugin options\n\t\t\t\t//\n\t\t\t\t// See function run() of\n\t\t\t\t// MarkNotes\\Plugins\\Task\\ACLs\\cansee.php\n\t\t\t\t// for more information\n\t\t\t\t//\n\t\t\t\t// $bReturn === false ==> there was no protected folder.\n\t\t\t\tif (($bReturn === false) || ($args[0]['return'] === 1)) {\n\t\t\t\t\t//$dirs [] = utf8_decode($entry['name']);\n\t\t\t\t\t$dirs[] = $entry['name'];\n\t\t\t\t}\n\t\t\t} // if ($entry['type']=='folder')\n\t\t} // foreach\n\n\t\t// The current folder has been processed, are\n\t\t// there subfolders in it ?\n\t\tif (count($dirs) > 0) {\n\t\t\tforeach ($dirs as $d) {\n\t\t\t\tlist($arrChildren, $tmp) = self::makeJSON($d);\n\t\t\t\t$listDir['children'][] = $arrChildren;\n\t\t\t}\n\t\t}\n\n\t\tforeach ($files as $file) {\n\t\t\t$listDir['children'][] = $file;\n\t\t}\n\n\t\treturn [$listDir, $index];\n\t}",
"protected function buildFsTree()\n {\n mkdir($this->config_path, 0755, true);\n mkdir($this->compiledViewsPath(), 0755, true);\n }",
"public function processJsonFiles(){\n $filesList = $this->getFileList();\n foreach ($filesList as $key => $file) {\n //do this at your will\n if( !preg_match('/.json/', $file['Key'] ) ){\n continue;\n }\n $fileContents = $this->getFile($file['Key']);\n $fileProcessed = $this->processFile($fileContents);\n $this->saveFile($file['Key'], $fileProcessed);\n }\n }",
"public function include_json_folder($path = '')\n {\n }",
"private function createAppModelFolder(){\n \n // Return a boolean to process completed\n return Storage::disk('models')->makeDirectory($this->appNamePath);\n\n }",
"function saveNewFolder(){\r\n\r\n\t\t// get ajax data\r\n\t\t$phpData = file_get_contents('php://input');\r\n\r\n\t\tif(!is_dir('../code/' . $phpData)) {\r\n\t\t mkdir('../code/' . $phpData, 0777, true);\r\n\r\n\t\t $ex = explode(\"/\", $phpData);\t\r\n\t\t echo $ex[count($ex) -1];\t\t \r\n\t\t}\r\n\t\telse{\r\n\t\t\t$newFolderName = $phpData . '_' . (string) rand();\r\n\t\t\tmkdir('../code/' . $newFolderName , 0777, true);\r\n\r\n\t\t\t$ex1 = explode(\"/\", $newFolderName);\t\r\n\t\t echo $ex1[count($ex1) -1];\r\n\t\t}\r\n\r\n\t}",
"protected function createDirectories()\n {\n if (! is_dir(app_path('Http/Controllers/Teamwork'))) {\n mkdir(app_path('Http/Controllers/Teamwork'), 0755, true);\n }\n if (! is_dir(app_path('Listeners/Teamwork'))) {\n mkdir(app_path('Listeners/Teamwork'), 0755, true);\n }\n if (! is_dir(base_path('resources/views/teamwork'))) {\n mkdir(base_path('resources/views/teamwork'), 0755, true);\n }\n if (! is_dir(base_path('resources/views/teamwork/emails'))) {\n mkdir(base_path('resources/views/teamwork/emails'), 0755, true);\n }\n if (! is_dir(base_path('resources/views/teamwork/members'))) {\n mkdir(base_path('resources/views/teamwork/members'), 0755, true);\n }\n }",
"protected function createDirectories() {\n\t\t@mkdir($this->getAbsoluteBasePath(), 0777, TRUE); // @ - Directories may exist\n\t}",
"protected function createDirectories()\n {\n if (! is_dir(app_path('Handlers'))) {\n mkdir(app_path('Handlers'), 0755, true);\n }\n\n if (! is_dir(app_path('Handlers/EventHandlers'))) {\n mkdir(app_path('Handlers/EventHandlers'), 0755, true);\n }\n\n if (! is_dir(app_path('Http/Controllers/Wechat'))) {\n mkdir(app_path('Http/Controllers/Wechat'), 0755, true);\n }\n }",
"public function createBaseFilesAndFolders()\n {\n $this\n ->createRootFolder()\n ->createRelsFolderAndFile()\n ->createDocPropsFolderAndFiles()\n ->createXlFolderAndSubFolders();\n }",
"protected function _createDirs()\n {\n $dir = $this->_class_dir;\n \n if (! file_exists($dir)) {\n $this->_outln('Creating app directory.');\n mkdir($dir, 0755, true);\n } else {\n $this->_outln('App directory exists.');\n }\n \n $list = array('Layout', 'Locale', 'Public', 'View');\n \n foreach ($list as $sub) {\n if (! file_exists(\"$dir/$sub\")) {\n $this->_outln(\"Creating app $sub directory.\");\n mkdir(\"$dir/$sub\", 0755, true);\n } else {\n $this->_outln(\"App $sub directory exists.\");\n }\n }\n }",
"function add_acf_json_folder_path( $paths ) {\n\t$paths['path'] = get_template_directory() . '/inc/config/acf-exports/';\n\n\treturn $paths;\n}",
"public function taskSaveNewFolder(): void\n {\n $directory = $this->getDirectory();\n if (!$directory) {\n throw new RuntimeException('Not Found', 404);\n }\n\n $collection = $directory->getIndex();\n if (!($collection instanceof PageCollection || $collection instanceof PageIndex)) {\n throw new RuntimeException('Task saveNewFolder works only for pages', 400);\n }\n\n $data = $this->data;\n $route = trim($data['route'] ?? '', '/');\n\n // TODO: Folder name needs to be validated! However we test against /=\"' as they are dangerous characters.\n $folder = mb_strtolower($data['folder'] ?? '');\n if ($folder === '' || preg_match('![=\"\\']!u', $folder) !== 0) {\n throw new RuntimeException('Creating folder failed, bad folder name', 400);\n }\n\n $parent = $route ? $directory->getObject($route) : $collection->getRoot();\n if (!$parent instanceof PageObject) {\n throw new RuntimeException('Creating folder failed, bad parent route', 400);\n }\n\n if (!$parent->isAuthorized('create', 'admin', $this->user)) {\n throw new RuntimeException($this->admin::translate('PLUGIN_ADMIN.INSUFFICIENT_PERMISSIONS_FOR_TASK') . ' create.', 403);\n }\n\n $path = $parent->getFlexDirectory()->getStorageFolder($parent->getStorageKey());\n if (!$path) {\n throw new RuntimeException('Creating folder failed, bad parent storage path', 400);\n }\n\n // Ordering\n $orders = $parent->children()->visible()->getProperty('order');\n $maxOrder = 0;\n foreach ($orders as $order) {\n $maxOrder = max($maxOrder, (int)$order);\n }\n\n $orderOfNewFolder = $maxOrder ? sprintf('%02d.', $maxOrder+1) : '';\n $new_path = $path . '/' . $orderOfNewFolder . $folder;\n\n /** @var UniformResourceLocator $locator */\n $locator = $this->grav['locator'];\n if ($locator->isStream($new_path)) {\n $new_path = $locator->findResource($new_path, true, true);\n } else {\n $new_path = GRAV_ROOT . '/' . $new_path;\n }\n\n Folder::create($new_path);\n Cache::clearCache('invalidate');\n $directory->getCache('index')->clear();\n\n $this->grav->fireEvent('onAdminAfterSaveAs', new Event(['path' => $new_path]));\n\n $this->admin->setMessage($this->admin::translate('PLUGIN_FLEX_OBJECTS.CONTROLLER.TASK_NEW_FOLDER_SUCCESS'));\n\n $this->setRedirect($this->referrerRoute->toString(true));\n }",
"function createFolder($folder_name, $parent_id){\n $url = $this->url.\"files\";\n $post['data'] = array(\n 'attributes' => array( \n \"name\" => $folder_name,\n \"parent_id\" => $parent_id,\n ),\n \"type\" => \"files\" \n );\n $post = json_encode($post);\n $result = $this->post_to_zoho($url, $post);\n return $result;\n }",
"public function createAppDirectory() {\n $dir = app_path() . '/EasyApi';\n if (!file_exists($dir)) {\n mkdir($dir);\n }\n }",
"function write_info_file($dir,$name){\n\t$info = json_decode(file_get_contents($dir.'_info.json'));\n\n\tdate_default_timezone_set('Europe/Minsk');\n\n\t$newObject = new stdClass;\n\t$newObject->name = $name;\n\t$newObject->created = date(\"d.m.Y / H:i:s\");\n\n\tarray_push($info,$newObject);\n\t$file = json_encode($info);\n\n\t$fp = fopen($dir.'_info.json', 'w');\n\tfwrite($fp,$file);\n\tfclose($fp);\n}",
"function delete_folder($json_path,$folder){\n\tif($folder == ''){\n\t\t$dir = $json_path;\n\t} else {\n\t\t$dir = $json_path.$folder.'/';\n\t}\n\tif(!file_exists($dir)){\n\t\treturn 'no exist';\n\t} else {\n\t\tif($folder != ''){\n\t\t\t$json = json_decode(file_get_contents($json_path.'_info.json'));\n\t\t\tfor($i = 0; $i < count($json); $i++){\n\t\t\t\tif($json[$i]->name == $folder){\n\t\t\t\t\tarray_splice($json,$i,1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$open = fopen($json_path.'_info.json','w');\n\t\t\tfwrite($open,json_encode($json));\n\t\t\tfclose($open);\n\t\t}\n\t\treturn removeDirectory($dir);\n\t}\n}",
"protected function createNecessaryDirectoriesInDocumentRoot() {}",
"protected function createNecessaryDirectoriesInDocumentRoot() {}",
"function settings_save_json($path)\n {\n }",
"function open_json($json_path,$folder,$name){\n\t$dir = $json_path.$folder.'/';\n\tif(!file_exists($dir)){\n\t\treturn 'no folder';\n\t}\n\tif(!file_exists($dir.$name.'.json')){\n\t\treturn 'no json';\n\t}\n\treturn file_get_contents($dir.$name.'.json');\n}",
"function mscaffolding_prepare_directories($name)\n\t{\n\t\tmkdir(\"data/scaffolding/\" . $name);\n\t\tmkdir(\"data/scaffolding/\" . $name . \"/views\");\n\t}",
"public function createAssetsFolder()\n\t{\n\t\t$path = $this->config->get('laravel-grunt::assets_path');\n\n\t\tif( ! $this->filesystem->exists($path))\n\t\t{\n\t\t\t$this->filesystem->makeDirectory($path, 0777, true);\n\t\t}\n\t}",
"private function constructFilePath()\r\n {\r\n $this->filePath = MENU_PATH . \"/\" . $this->nameOfJson . \".json\";\r\n }",
"function createJsonFileName($data){\n $filename = __DIR__ . DIRECTORY_SEPARATOR . 'jsons' . DIRECTORY_SEPARATOR . urlencode($data['name'] . \"_\" . $data['pavarde'] . '.json'); /** nurodomas kelias iki konkretaus .json failo */\n var_dump($data);\n return $filename; /** grazinam gauta info */\n\n}",
"protected function write()\n {\n if (!is_dir($this->path)) {\n mkdir($this->path);\n }\n\n file_put_contents($this->file, json_encode([\n 'network' => $this->network,\n 'epoch' => static::$epoch,\n 'iteration' => static::$iteration,\n 'a' => $this->a,\n 'e' => $this->e\n ]));\n }",
"function testMakeJSON(){\n $file = $_SERVER[\"DOCUMENT_ROOT\"].'/C&C_Companion/pages/cards/cards.json';\n\n //Clear file contents and set current file text string to be equa to it\n file_put_contents($file, \"\");\n $current = file_get_contents($file);\n\n $current.= \"[\\n\";\n\n //Check whether the first object has been encoded so that only the first object\n //has no comma in front of it\n $started = false;\n foreach($this->cards as $card){\n if(get_class($card) == \"Summon\"){\n continue;\n }\n\n if($started){\n $current .= \",\\n\\n\\t\".json_encode($card);\n }else{\n $current.= \"\\t\".json_encode($card);\n $started = true;\n }\n\n }\n\n $current.= \"\\n]\";\n\n //Set the file's contents to be equal to the constructed string\n file_put_contents($file, $current);\n\n $this->assertTrue(true);\n }",
"public function createDirectoriesIfTheyDontExist()\n {\n $directories = array(\n $this->getNewSitemapPath(),\n $this->getExistingSitemapPath()\n );\n foreach ($directories as $directory){\n if(!file_exists($directory)){\n mkdir($directory);\n }\n }\n }",
"function json_dir($ftp, $flag = FALSE, $value = FALSE, $bad_files = FALSE)\n{\n\t//flags\n $json_data = array();\n \n\t//save current directory\n\t$curdir = ftp_pwd($ftp);\n\n\t//current dir JSON\n $files = files_in_cur_dir($ftp,1);\n\n $parent_dir = array();\n //parent dir JSON\n \t//check for root, cdup returns true\n\tif($curdir!=='/' && @ftp_cdup($ftp)) {\n\t\t$parent_dir = files_in_cur_dir($ftp,0);\n\t\tftp_chdir($ftp, $curdir);\n\t}\n\t$json_data[SESSION_STATUS] = true;\n\tif($flag !== FALSE)\n\t{\n\t $json_data[$flag] = $value;\n\t if($flag === 'rmFile' && $value === 'false') {\n\t \t//include $files\n\t \t$json_data['rmFail'] = $bad_files;\n\t }\n\t}\n\t$json_data[CUR_DIR] = $curdir;\n\t$json_data[FILES] = $files;\n\t$json_data[PARENT_DIR] = $parent_dir;\n\treturn json_encode($json_data);\n}",
"function createFolders($filename=COMPILER_FOLDER){\n\tif (file_exists($filename)) {\n\t return false;\n\t} else {\n\t\t@mkdir($filename);\n\t\tif($filename==COMPILER_FOLDER){\t\n\t\t\tcreateFolders(COMPILER_STANDART);\n\t\t\tcreateFolders(COMPILER_COMMERSE);\n\t\t\tcreateFolders(COMPILER_MEMBERSHIP);\t\n\t\t\tcreateFolders(COMPILER_STANDART.'/wp/');\n\t\t\tcreateFolders(COMPILER_COMMERSE.'/wp/');\n\t\t\tcreateFolders(COMPILER_MEMBERSHIP.'/wp/');\t\t\n\t\t\tcopy(COMPILER_PATH.'unpacking/db_upload.php', COMPILER_STANDART.'/wp/db_upload.php');\t\n\t\t\tcopy(COMPILER_PATH.'unpacking/db_upload.php', COMPILER_COMMERSE.'/wp/db_upload.php');\t\t\n\t\t\tcopy(COMPILER_PATH.'unpacking/db_upload.php', COMPILER_MEMBERSHIP.'/wp/db_upload.php');\n\t\t\tcopy(COMPILER_PATH.'unpacking/unzip.php', COMPILER_FOLDER.'/unzip.php');\n\t\t}\n\t return true;\n\t}\n}",
"function delete_json($json_path, $folder,$name){\n\t$dir = $json_path.$folder.'/';\n\tif(!file_exists($dir)){\n\t\treturn 'no folder';\n\t}\n\tif(!file_exists($dir.$name.'.json')){\n\t\treturn 'no json';\n\t}\n\tunlink($dir.$name.'.json');\n\t$info = json_decode(file_get_contents($dir.'_info.json'));\n\tfor($i = 0; $i< count($info); $i++){\n\t\tif($info[$i]->name == $name){\n\t\t\tarray_splice($info,$i,1);\n\t\t}\n\t}\n\t$fp = fopen($dir.'_info.json','w');\n\tfwrite($fp,json_encode($info));\n\tfclose($fp);\n\treturn 'json deleted';\n}",
"public function scanJsonFiles()\r\n {\r\n $themes = [];\r\n foreach (glob($this->themes_path('*'), GLOB_ONLYDIR) as $themeFolder) {\r\n $themeFolder = realpath($themeFolder);\r\n if (file_exists($jsonFilename = $themeFolder . '/' . 'theme.json')) {\r\n\r\n $folders = explode(DIRECTORY_SEPARATOR, $themeFolder);\r\n $themeName = end($folders);\r\n\r\n // default theme settings\r\n $defaults = [\r\n 'name' => $themeName,\r\n 'asset-path' => $themeName,\r\n 'extends' => null,\r\n ];\r\n\r\n // If theme.json is not an empty file parse json values\r\n $json = file_get_contents($jsonFilename);\r\n if ($json !== \"\") {\r\n $data = json_decode($json, true);\r\n if ($data === null) {\r\n throw new \\Exception(\"Invalid theme.json file at [$themeFolder]\");\r\n }\r\n } else {\r\n $data = [];\r\n }\r\n\r\n // We already know views-path since we have scaned folders.\r\n // we will overide this setting if exists\r\n $data['views-path'] = $themeName;\r\n\r\n $themes[] = array_merge($defaults, $data);\r\n }\r\n }\r\n return $themes;\r\n }",
"public static function generateJSON();",
"protected function prepareJsonStructure(){\n\t\t\n\t}",
"private function createFolder()\n {\n if (!file_exists($this->cacheDir)) {//if folder doesn't exist\n mkdir($this->cacheDir, 0755);//create folder\n }\n if (!file_exists($this->cacheFile)) {//if cache doesnt exist\n $file = fopen($this->cacheFile, 'w');\n fclose($file);\n } else {\n return true;\n } //return true if folder exists\n }",
"public function create()\n {\n return renderToJson($this->folder . \"create\");\n }",
"public function exportJson()\n {\n $time = time();\n $filePath = ROOT_DIR . \"/data/beer_$time.json\";\n try {\n file_put_contents($filePath, json_encode($this->items));\n\n App::cliLog(\"Successfully exported to $filePath\");\n } catch (Exception $e) {\n App::cliLog($e->getMessage());\n }\n }",
"public function createDirectoriesIfTheyDontExist()\n\t{\n\t\t$directories = array(\n\t\t\t$this->getIntegrationDirectory(),\n\t\t\t$this->getProductsProcessingDirectory(),\n\t\t\t$this->getProductsProcessedDirectory(),\n\t\t\t$this->getStockProcessingDirectory(),\n\t\t\t$this->getStockProcessedDirectory()\n\t\t);\n\t\tforeach ($directories as $directory){\n\t\t\tif(!file_exists($directory)){\n\t\t\t\tmkdir($directory);\n\t\t\t}\n\t\t}\n\t}",
"public function gatherJSON($dir=NULL) {\n\n\t\t$dir = $dir !== NULL ? rtrim($dir, '/') : '';\n\n\t\t// TODO: check if glob(...) returns an array first\n\t\t$menuFiles = glob($dir . '/*/menu.json');\n\t\tif(is_array($menuFiles)) {\n\n\t\t\tforeach($menuFiles AS $item) {\n\n\t\t\t\tif(is_file($item)) {\n\n\t\t\t\t\t$content = json_decode(file_get_contents($item), true);\n\t\t\t\t\tif($content != NULL) {\n\t\t\t\t\t\t$content['controller'] = $content['controller'] ? $content['controller'] : basename(dirname($item));\n\t\t\t\t\t\t$this->JSON[] = $content;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t$dirs = glob($dir . '/*', GLOB_ONLYDIR);\n\t\tif(is_array($dirs)) {\n\t\t\tforeach(glob($dir . '/*', GLOB_ONLYDIR) AS $subdirs) {\n\t\t\t\t$this->gatherJSON($subdirs);\n\t\t\t}\n\t\t}\n\n\t\treturn $this;\n\n\t}",
"private function createAppControllerFolder(){\n\n // Return a boolean to process completed\n return Storage::disk('controllers')->makeDirectory($this->appNamePath);\n\n\n }",
"function createFolders(&$drive_service, &$client, &$configObj, &$UsersAFSObj) \n{\n // Recreate the user's AFS directory structure inside Box\n \n $afsFilesFolder = createFolder($drive_service, \"AFS Migration Files\", \"Home for migrated files\", \"root\", $configObj);\n $UsersAFSObj->folderList[$UsersAFSObj->afsPath] = $afsFilesFolder->getID();\n ++$UsersAFSObj->numFoldersUploaded;\n $logline = date('Y-m-d H:i:s') . \" User's AFS Path: \" . $UsersAFSObj->afsPath . \"\\n\"; \n $logline = date('Y-m-d H:i:s') . \" Our root folder ID: \" . $UsersAFSObj->folderList[$UsersAFSObj->afsPath] . \"\\n\"; \n fwrite($configObj->logFile, $logline);\n \n foreach ($UsersAFSObj->folderList as $key => $value) \n {\n\n // Avoid creating a folder for the root directory \n if (strcmp($key, $UsersAFSObj->afsPath) == 0) \n { \n continue; \n } \n\n // Make sure the folder still exists in AFS \n if (!file_exists($key)) \n { \n continue; \n } \n\n $parentFolderID = $UsersAFSObj->folderList[getParentFolder($key)];\n $logline = date('Y-m-d H:i:s') . \" Parent folder name: \" . getParentFolder($key) . \"\\n\"; \n $logline = $logline . date('Y-m-d H:i:s') . \" Parent folder ID: \" . $parentFolderID . \"\\n\"; \n fwrite($configObj->logFile, $logline);\n\n // See if the access token is about to expire\n if ($client->isAccessTokenExpired())\n {\n //Trade access token for refresh token\n if ($client->refreshToken($configObj->refreshToken) == null)\n {\n $logline = date('Y-m-d H:i:s') . \": Using refresh token, access token granted. \\n\"; \n fwrite($configObj->logFile, $logline);\n }\n else\n {\n $logline = date('Y-m-d H:i:s') . \": Unable to obtain access token. \\n\"; \n fwrite($configObj->logFile, $logline);\n }\n }\n\n //Create folder \n $logline = date('Y-m-d H:i:s') . \" The folder name: \" . getFileName($key) . \"\\n\"; \n $folder = createFolder($drive_service, getFileName($key), \"\", $parentFolderID, $configObj);\n\n if ($folder)\n {\n //If creation worked, store folder ID for the file uploads\n ++$UsersAFSObj->numFoldersUploaded;\n $UsersAFSObj->folderList[$key] = $folder->getID();\n $logline = $logline . date('Y-m-d H:i:s') . \" Success! The ID of this new folder is: \" . $folder->getID() . \"\\n\"; \n fwrite($configObj->logFile, $logline); \n }\n else\n {\n $logline = $logline . date('Y-m-d H:i:s') . \" The following folder could not be created: \" . $folder->getID() . \"\\n\"; \n fwrite($configObj->logFile, $logline); \n }\n }\n}",
"protected static function getJsonFolder(): string\n {\n return apply_filters('wpgb_extended/sync/json_folder', get_stylesheet_directory() . DIRECTORY_SEPARATOR . 'wpgb-json');\n }",
"public function createFolder()\r\n\t{\r\n //Check if we have all variables that we need\r\n $public_key = $this->input->post('parent_public_key');\r\n $folder_name = $this->input->post('folder_name');\r\n\t\t$user_id = $this->authentication->uid;\r\n\r\n //TODO !!!!! Validate the path here !!!!!\r\n if($folder_name == '' || $public_key == ''){\r\n\t\t\t$this->errorMessage('Please enter a folder name');\r\n redirect('/dashboard');\r\n }\r\n\r\n\t\t//Variable to check if the folder exists\r\n\t\t$folder_exists = false;\r\n\r\n\t\t//Make sure that the parent exists\r\n\t\tif($public_key == '0'){\r\n\t\t\t//We're in the main directory\r\n\t\t\t$parent_id = 0;\r\n\t\t\t$folder_exists = true;\r\n\t\t}\r\n\r\n\t\tif($this->DataModel->folderExists(array('public_key' => $public_key), $this->authentication->uid)){\r\n\t\t\t//We found the parent folder\r\n\t\t\t$folder_exists = true;\r\n\t\t\t$parent_id = $this->DataModel->getFolderInfo(array('public_key' => $public_key), $this->authentication->uid)['id'];\r\n\t\t}\r\n\r\n\t\t//Check if the folder is shared with the user\r\n\t\tif($this->DataModel->folderExists(array('public_key' => $public_key))){\r\n\t\t\t$folder = $this->DataModel->getFolderInfo(array('public_key' => $public_key));\r\n\t\t\tif($this->DataModel->hasSharedAccessFolder($public_key, $this->authentication->uid)){\r\n\t\t\t\tif($this->DataModel->sharedPermission == 1){\r\n\t\t\t\t\t$folder_exists = true;\r\n\t\t\t\t\t//Set the user id of the user who owns the shared folder\r\n\t\t\t\t\t$user_id = $folder['user_id'];\r\n\t\t\t\t\t$parent_id = $folder['id'];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//Final check if the folder exists\r\n\t\tif($folder_exists == false){\r\n\t\t\tredirect(\"/dashboard\");\r\n\t\t}\r\n\r\n\t\t//Check if the user is allowed to create new folders (limit)\r\n\t\t$stats = $this->usagestatistics->getUser($user_id);\r\n\t\tif($stats['usage']['foldercount'] < $stats['max']['foldercount'] || $stats['max']['foldercount'] == 0){\r\n\t\t\t//Create the folder\r\n\t $this->DataModel->createFolder($parent_id, $folder_name, $user_id);\r\n\t\t\t$this->successMessage($this->lang->line('success_folder_created'));\r\n\t\t}else{\r\n\t\t\t//The folder could not be created.\r\n\t\t\t$this->errorMessage($this->lang->line('error_folder_usageLimit'));\r\n\t\t}\r\n\r\n\t\t//Redirect the user to the dasbhoard if the parent folder was the \"main\" folder\r\n\t\tif($parent_id == 0){\r\n\t\t\tredirect('/dashboard');\r\n\t\t}\r\n\r\n\t\t//If the owner of the folder is the current user\r\n\t\tif($this->authentication->uid == $user_id){\r\n\t\t\tredirect('folders/'.$public_key);\r\n\t\t}else{\r\n\t\t\t//If it's a shared folder\r\n\t\t\tredirect('sharedFolder/'.$public_key);\r\n\t\t}\r\n\r\n\t}",
"function jsonSave()\n {\n try {\n file_put_contents($this->fname, json_encode($this->content));\n } catch (Exception $e) {\n echo $e;\n }\n }",
"private function loadJson(){\n if(file_exists($this->fullPath.$this->jsonFile)) {\n $arCfg = get_object_vars(json_decode(file_get_contents($this->fullPath.$this->jsonFile)));\n $this->loadConfigs($arCfg);\n }\n }",
"protected function createSrcFolderInApplication(){\n \n $srcDirPath = DIR_APPLICATION . DIRECTORY_SEPARATOR . DIRNAME_CLASSES;\n $filesystem = new \\Illuminate\\Filesystem\\Filesystem();\n if(!$filesystem->exists($srcDirPath)) {\n $filesystem->makeDirectory($srcDirPath);\n }\n }",
"private function writeAppData()\n {\n $fileName = \"{$this->storeDirectory}/appData.json\";\n $data = json_encode([\n 'default-counter' => $this->defaultCounter,\n ]);\n file_put_contents($fileName, $data, JSON_PRETTY_PRINT);\n }",
"public function buildJson();",
"public function converterJsonfile(){\n try {\n\n /**\n * Algoritmo para consumir a API e receber em $planets os dados dos planetas\n */\n $flag = 1;\n do{\n $cl = curl_init();\n curl_setopt($cl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($cl, CURLOPT_URL, \"https://swapi.co/api/planets/?page=$flag\");\n curl_setopt($cl, CURLOPT_HTTPHEADER, array(\"Content-Type: application/json;\") );\n $compare = json_decode( curl_exec($cl) );\n foreach( $compare->results as $value ){\n $planets[] = $value;\n }\n $flag++;\n curl_close($cl);\n }while( NULL != $compare->next );\n\n //Com todos os planetas agora monto meus dados conforme o banco de dados e insiro no final.\n foreach( $planets as $planet ){\n\n $data_planet[] = array( \n 'nome' => $planet->name , \n 'clima' => $planet->climate, \n 'terreno' => $planet->terrain, \n 'cnt_aparicoes' => count($planet->films), \n );\n }\n\n //Insert com todos os dados\n $response = $this->model->insert( $data_planet );\n\n return response()->json( $response . ', todos os dados foram carregados e inseridos corretamente!', Response::HTTP_OK );\n \n } catch (Exception $e) {\n return response()->json( [ 'Error' => $e ], Response::HTTP_INTERNAL_SERVER_ERROR );\n }\n\n }",
"private function createObjects($dir_path) {\n $dir = opendir($dir_path);\n while ($name = readdir($dir)) {\n if (in_array($name, array('.', '..', '.DS_Store', 'CVS'))) {\n continue;\n }\n $this->createObject($dir_path . \"/\" . $name);\n }\n }",
"public function store()\n\t{\n\t\t$container = AssetService::getContainer($this->request->get('container'), 'local', 'Assets');\n\t\t$parent = $container->folder($this->request->get('parent'));\n\t\t$basename = $this->request->get('basename');\n\n\t\t// correct data\n\t\t// next -->\n\t\t$folder = $parent->createFolder($basename);\n\n\n\t\tif($folder){\n\t\t\treturn [\n\t\t\t\t'success' \t=> true,\n\t\t\t\t'message'\t=> 'Folder Created',\n\t\t\t\t'folder'\t=> $folder->toArray()\n\t\t\t];\n\t\t}\n\n\t\treturn [\n\t\t\t'success' => false,\n\t\t\t'message'\t=> 'Folder is not created',\n\t\t\t'folder'\t=> []\n\t\t];\n\t}",
"private function parseInputFolders()\n {\n $folders = [];\n // Look for json files in the current path\n $finder = new Finder();\n $finder->files()->in($this->inputPath . '/activities');\n if ($finder->count() > 0) {\n foreach ($finder as $json) {\n $activityJson = json_decode(file_get_contents($json));\n $this->itemReferences = $activityJson->data->items;\n if (!empty($this->itemReferences)) {\n foreach ($this->itemReferences as $itemref) {\n $itemref = md5($itemref);\n $folders[] = $this->inputPath . '/items/' . $itemref . '.json';\n }\n } else {\n $this->output->writeln(\"<error>Error converting : No item refrences found in the activity json</error>\");\n }\n }\n } else {\n $finder->files()->in($this->inputPath . '/items');\n foreach ($finder as $json) {\n $folders[] = $this->inputPath . '/items/' . $json->getRelativePathname();\n }\n }\n return $folders;\n }",
"protected function createSubDirectories()\n {\n // Form the full path with sub dirs for the new command\n // e.g. \"my-project/commands/my/new/Cmd.php\"\n $this->command_dir_path = $this->console->getConfig()->getBlacksmithCommandsPath() . DIRECTORY_SEPARATOR . $this->arg->getSubDirPath();\n\n if (!file_exists($this->command_dir_path)) {\n mkdir($this->command_dir_path, 0755, true);\n }\n }",
"private function createAppRoutesFolder(){\n return Storage::disk('routes')->makeDirectory($this->appNamePath);\n }",
"function createFolder(string $foldername);",
"public function run()\n {\n\n \t\n \t$data = [\n \t[\n \t'name' => 'Directory 1',\n \t]\n\n ];\n \tforeach ($data as $key => $value) {\n \t\t$array = [];\n \t\t$exist = Directory::where('name',$value['name'])->count();\n \t\tif(!$exist){\n \t\t\t$array =\n \t\t\t[\n \t\t\t'name' => $value['name'],\n \t\t\t];\n \t\t\tDirectory::create($array);\n \t\t}\n \t\t\n \t}\n }",
"public function testCreateFolder()\n {\n $remoteFolder = \"TestData/In\";\n\n $localName = \"Book1.xlsx\";\n $remoteName = \"Book1.xlsx\";\n\n CellsApiTestBase::ready( $this->instance,$localName ,$remoteFolder . \"/\" . $remoteName , \"\");\n \n $request = new CreateFolderRequest();\n $request->setPath( \"OutResul/NewFolder\");\n $request->setStorageName( \"\");\n $this->instance->createFolder($request);\n }",
"protected function init()\n {\n $dir = $this->getDir();\n\n if (!file_exists($dir)) {\n mkdir($dir, 0755, true);\n }\n }",
"public function create_default_folders() {\n $rcube = rcube::get_instance();\n\n // create default folders if they do not exist\n foreach (self::$folder_types as $type) {\n if ($folder = $rcube->config->get($type . '_mbox')) {\n if (!$this->folder_exists($folder)) {\n $this->create_folder($folder, true, $type);\n } else if (!$this->folder_exists($folder, true)) {\n $this->subscribe($folder);\n }\n }\n }\n }",
"private function createFolderIndex(){\n //Just testing the command\n //$this->info('Starting to search the folder: '.$this->file_storage);\n $this->folders = array();\n $this->invalid_files = array();\n $this->count = 0;\n\n //Tagging all files to be able to find removed files at the end\n $SQL = \"UPDATE files SET found = '0'\";\n DB::connection('mysql')->update($SQL);\n $SQL = \"UPDATE folders SET found = '0'\";\n DB::connection('mysql')->update($SQL);\n\n //Checking if cache file exist, if not just create all the index on ES\n $this->checkCacheFolder();\n //Loop through the directories to get files ad folders\n $this->listFolderFiles($this->file_storage);//$_ENV['EBT_FILE_STORAGE']);\n //Check if any folder is missing from cache and try to create on ES\n $this->compareCacheFolders();\n\n //Remove files/folders that hasn't been found\n //if ($this->confirm('Do you wish to remove missing files? [y|N]')) {\n $this->removeMissingFiles();\n //}\n }",
"public function createServiceDirectories($path)\n\t{\n\t\tforeach ($this->directories as $directory) {\n\t\t\t$this->createDirectory($path . '/' . $directory);\n\t\t\t$this->createFile($path . '/' . $directory . '/.gitkeep');\n\t\t}\n\t}",
"function createSubFolders($folders)\n {\n array_map(function ($folder) {\n $functionName = \"init{$folder}Folder\";\n $this->$functionName();\n }, $folders);\n }",
"public function create_folder_name(){\n // create folder name\n return $this->config['prefix'].$this->user['code'];\n }",
"function createDirectoryIfNonExistent() {\n if (! file_exists($this->path)) {\n mkdir($this->path);\n }\n }",
"public function makeJson($r)\n {\n $data = array();\n foreach ($r->permissions()->where('parent', 0)->get() as $perm) {\n $data[] = [\n 'title' => $perm->name,\n 'custom-link' => $perm->slug,\n \"icon\" => \"fa fa-dashboard fa-fw\",\n 'is_core' => 'yes'\n ];\n }\n\n foreach ($r->permissions()->where('parent', '!=', 0)->get() as $perm) {\n $parent = Permissions::find($perm->parent);\n foreach ($data as $k => $v) {\n if ($v['title'] == $parent->name) {\n $data[$k]['children'][] = [\n 'title' => $perm->name,\n 'custom-link' => \"/admin/\" . str_replace('.', '/', $perm->slug),\n \"icon\" => \"fa fa-dashboard fa-fw\",\n 'is_core' => 'yes'\n ];\n }\n }\n }\n\n //using our model for get menus\n $role = Roles::find($r->id);\n $menu = $role->menus()->where('menus_id', 1)->first();\n File::put(config('paths.ADMIN_MENU_VARIATION') . '/' . $menu->id . '.json', json_encode($data, true));\n return $data;\n }",
"function writeJson($file,$data){ \r\n if(file_exists($file)) {\r\n $tempString = file_get_contents($file);\r\n $handle = fopen($file, 'w+');\r\n $tempArr = json_decode($tempString);\r\n $tempArr[] = $data;\r\n $readyData = json_encode($tempArr);\r\n fwrite($handle,$readyData);\r\n fclose($handle);\r\n }else{\r\n $handle = fopen($file, 'w+');\r\n $tempArr = [];\r\n $tempArr[] = $data;\r\n fwrite($handle,json_encode($tempArr));\r\n fclose($handle);\r\n }\r\n }",
"function create_cover_folder(): void\n{\n $folder = folder_covers();\n if (!file_exists($folder)) {\n mkdir($folder);\n }\n}",
"public function rebuildCache()\r\n {\r\n $themes = $this->scanJsonFiles();\r\n // file_put_contents($this->cachePath, json_encode($themes, JSON_PRETTY_PRINT));\r\n\r\n $stub = file_get_contents(__DIR__ . '/stubs/cache.stub');\r\n $contents = str_replace('[CACHE]', var_export($themes, true), $stub);\r\n file_put_contents($this->cachePath, $contents);\r\n }",
"public function setUp()\n {\n $this->data = array(\n 'folder_name_1' => array(\n 'src' => 'source_1',\n 'dst' => 'destination_1',\n ),\n 'folder_name_2' => array(\n 'src' => 'source_2',\n 'dst' => 'destination_2',\n 'client' => 'test'\n )\n );\n }",
"private function makeDirectory(): void\n {\n $this->directory = $this->simulation->fileAbsolutePath('correlations/' . $this->id);\n Utils::createDirectory($this->directory);\n }",
"function createImportDirectory()\n\t{\n\t\tinclude_once \"./Services/Utilities/classes/class.ilUtil.php\";\n\t\t$svy_data_dir = ilUtil::getDataDir().\"/svy_data\";\n\t\tilUtil::makeDir($svy_data_dir);\n\t\t\n\t\tif(!is_writable($svy_data_dir))\n\t\t{\n\t\t\t$this->ilias->raiseError(\"Survey Data Directory (\".$svy_data_dir\n\t\t\t\t.\") not writeable.\",$this->ilias->error_obj->FATAL);\n\t\t}\n\n\t\t// create test directory (data_dir/svy_data/svy_<id>)\n\t\t$svy_dir = $svy_data_dir.\"/svy_\".$this->getId();\n\t\tilUtil::makeDir($svy_dir);\n\t\tif(!@is_dir($svy_dir))\n\t\t{\n\t\t\t$this->ilias->raiseError(\"Creation of Survey Directory failed.\",$this->ilias->error_obj->FATAL);\n\t\t}\n\n\t\t// create import subdirectory (data_dir/svy_data/svy_<id>/import)\n\t\t$import_dir = $svy_dir.\"/import\";\n\t\tilUtil::makeDir($import_dir);\n\t\tif(!@is_dir($import_dir))\n\t\t{\n\t\t\t$this->ilias->raiseError(\"Creation of Import Directory failed.\",$this->ilias->error_obj->FATAL);\n\t\t}\n\t}",
"function writeFile($data) {\n\t$my_file = \"users.json\";\n\t$users = [];\n\tif(file_exists($my_file)){\n\t\t$users = json_decode(file_get_contents($my_file), true);\n\t}\n\t$users[] = $data;\n\t$jsonData = json_encode($users);\n\tfile_put_contents($my_file, $jsonData);\n}"
] | [
"0.75539535",
"0.72299606",
"0.69478077",
"0.66032505",
"0.65489686",
"0.6457422",
"0.6383531",
"0.63791955",
"0.6326167",
"0.6315164",
"0.6243355",
"0.6229677",
"0.62111354",
"0.615342",
"0.6150553",
"0.6147826",
"0.61475325",
"0.611959",
"0.61034745",
"0.6090873",
"0.60867333",
"0.6068171",
"0.6056159",
"0.6049733",
"0.6015871",
"0.5961994",
"0.594546",
"0.5927285",
"0.591525",
"0.5907176",
"0.58956134",
"0.58425784",
"0.5822693",
"0.5815879",
"0.58039546",
"0.5791028",
"0.57899743",
"0.57728976",
"0.57562983",
"0.57087475",
"0.56987405",
"0.56799006",
"0.5673618",
"0.566069",
"0.56559336",
"0.56366867",
"0.56366867",
"0.56342846",
"0.5622986",
"0.5611648",
"0.56060034",
"0.56048083",
"0.56028515",
"0.5598099",
"0.5598031",
"0.55699",
"0.55418867",
"0.5534573",
"0.55289155",
"0.5524004",
"0.55090517",
"0.5478728",
"0.5467048",
"0.546089",
"0.5450895",
"0.5444393",
"0.5443518",
"0.54241675",
"0.54229677",
"0.541727",
"0.541466",
"0.5411551",
"0.5402567",
"0.5400981",
"0.53929985",
"0.5381872",
"0.5379705",
"0.5357518",
"0.534509",
"0.53405696",
"0.53382427",
"0.533021",
"0.53295857",
"0.53291005",
"0.5302953",
"0.5298461",
"0.5290366",
"0.52854735",
"0.52844346",
"0.5270602",
"0.52670383",
"0.5261122",
"0.5260327",
"0.5252242",
"0.5251012",
"0.5247293",
"0.52387637",
"0.52340686",
"0.52260995",
"0.5224215"
] | 0.83077216 | 0 |
Return the main json folder | protected static function getJsonFolder(): string
{
return apply_filters('wpgb_extended/sync/json_folder', get_stylesheet_directory() . DIRECTORY_SEPARATOR . 'wpgb-json');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function getJsonFilePath()\n {\n $menusetConfig = self::getMenusetConfig();\n //return Globals::getWorkFolder() . $menusetConfig->setting->fileName;\n return Globals::getDataFilePath($menusetConfig->setting->fileName_detail);\n }",
"private static function folders_path(){\n\t\treturn dirname(__DIR__) . '/content/folders.json';\n\t}",
"public static function getOldJsonFilePath()\n {\n $menusetConfig = self::getMenusetConfig();\n //return Globals::getWorkFolder() . $menusetConfig->setting->fileName;\n return Globals::getDataFilePath($menusetConfig->setting->fileName);\n }",
"protected function getJsonTypeFolder(): string\n {\n $path = self::getJsonFolder();\n return $path . DIRECTORY_SEPARATOR . $this->type;\n }",
"public function include_json_folders()\n {\n }",
"public function getFilepath()\n {\n return $this->folder.'/'.$this->file.'.json';\n }",
"public function getJsonPath()\r\n {\r\n return $this->root.'/'.$this->route.'/bebras.json';\r\n }",
"private function get_composer_json_path() {\n\t\treturn $this->composer_json_path;\n\t}",
"public function json_path() {\n\t\tif ( ! file_exists( LITESPEED_STATIC_DIR . '/crawler/' . $this->_sitemeta ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn LITESPEED_STATIC_URL . '/crawler/' . $this->_sitemeta;\n\t}",
"public function directory() {\n $config = \\Drupal::config('webspark_isearch.settings');\n $directory_url = $config->get('directory_path');\n return $this->retriveJsonFromService($directory_url);\n }",
"public function include_json_folder($path = '')\n {\n }",
"public function getMainDirectory()\n {\n return $this->getDirectory();\n }",
"public function getPathToComposerJSON()\n {\n return $this->_pathToComposerJson;\n }",
"public function getPattern(): string\n\t{\n\t\treturn __DIR__ . DIRECTORY_SEPARATOR . 'test.json';\n\t}",
"public static function getJsonConfigFile()\n {\n return self::fixtureDir().'/fixture_config.json';\n }",
"public static function getSampleJsonFile()\n {\n return self::fixtureDir().'/fixture_sample.json';\n }",
"public static function getDataFolder()\n {\n $class = get_called_class();\n $strip = explode('\\\\', $class);\n\n return RELEASE_NAME_DATA . '/' . strtolower(array_pop($strip)) . 's';\n }",
"public function gatherJSON($dir=NULL) {\n\n\t\t$dir = $dir !== NULL ? rtrim($dir, '/') : '';\n\n\t\t// TODO: check if glob(...) returns an array first\n\t\t$menuFiles = glob($dir . '/*/menu.json');\n\t\tif(is_array($menuFiles)) {\n\n\t\t\tforeach($menuFiles AS $item) {\n\n\t\t\t\tif(is_file($item)) {\n\n\t\t\t\t\t$content = json_decode(file_get_contents($item), true);\n\t\t\t\t\tif($content != NULL) {\n\t\t\t\t\t\t$content['controller'] = $content['controller'] ? $content['controller'] : basename(dirname($item));\n\t\t\t\t\t\t$this->JSON[] = $content;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t$dirs = glob($dir . '/*', GLOB_ONLYDIR);\n\t\tif(is_array($dirs)) {\n\t\t\tforeach(glob($dir . '/*', GLOB_ONLYDIR) AS $subdirs) {\n\t\t\t\t$this->gatherJSON($subdirs);\n\t\t\t}\n\t\t}\n\n\t\treturn $this;\n\n\t}",
"function open_folder($json_path,$folder){\n\tif($folder == ''){\n\t\t$dir = $json_path;\n\t} else {\n\t\t$dir = $json_path.$folder.'/';\n\t}\n\tif(!file_exists($dir)){\n\t\treturn 'no exist';\n\t} else {\n\t\t$files = scandir($dir);\n\t\tarray_splice($files,0,2);\n\t\t$result = new stdClass();\n\t\tfor($i = 0; $i < count($files); $i++){\n\t\t\tif(is_dir($dir.$files[$i])){\n\t\t\t\t$subdir = scandir($dir.$files[$i]);\n\t\t\t\tarray_splice($subdir,0,2);\n\t\t\t\t$subdir_res = new stdClass();\n\t\t\t\tfor($j = 0; $j < count($subdir); $j++){\n\t\t\t\t\t$json = file_get_contents($dir.$files[$i].'/'.$subdir[$j]);\n\t\t\t\t\t$array_json = json_decode($json);\n\t\t\t\t\t$name = explode('.',$subdir[$j]);\n\t\t\t\t\t$subdir_res->$name[0] = $array_json;\n\t\t\t\t}\n\t\t\t\t$result->$files[$i] = $subdir_res;\n\t\t\t} else {\n\t\t\t\t$json = file_get_contents($dir.$files[$i]);\n\t\t\t\t$array_json = json_decode($json);\n\t\t\t\t$name = explode('.',$files[$i]);\n\t\t\t\t$result->$name[0] = $array_json;\n\t\t\t}\n\t\t}\n\t\treturn json_encode($result);\n\t}\n}",
"public function getFilePath() {\n return base_path() . '/lam.json';\n }",
"public function acf_json_save_dir( $path )\n {\n if( !$this->dev ) return $path;\n return $this->plugin_dir.'/data/acf-json/';\n }",
"function open_json($json_path,$folder,$name){\n\t$dir = $json_path.$folder.'/';\n\tif(!file_exists($dir)){\n\t\treturn 'no folder';\n\t}\n\tif(!file_exists($dir.$name.'.json')){\n\t\treturn 'no json';\n\t}\n\treturn file_get_contents($dir.$name.'.json');\n}",
"protected function getTestAssetPath($name)\n {\n return __DIR__ . '/TestAssets/Json/' . $name . '.json';\n }",
"private function get_composer_json() {\n\t\treturn new JsonFile( $this->get_composer_json_path() );\n\t}",
"function createJsonFileName($data){\n $filename = __DIR__ . DIRECTORY_SEPARATOR . 'jsons' . DIRECTORY_SEPARATOR . urlencode($data['name'] . \"_\" . $data['pavarde'] . '.json'); /** nurodomas kelias iki konkretaus .json failo */\n var_dump($data);\n return $filename; /** grazinam gauta info */\n\n}",
"public function ajax_get_folder_contents() {\n\n\t\t$path = '#' === rgget( 'path' ) ? '/' : rgget( 'path' );\n\n\t\techo wp_json_encode( $this->get_folder_tree( $path, rgget( 'first_load' ) ) );\n\t\tdie();\n\n\t}",
"static public function getKekuleDir()\n {\n return kekulejs_configs::getScriptDir();\n }",
"public function getResultsFromJson() {\n $module_handler = \\Drupal::service('module_handler');\n $module_path = $module_handler->getModule('socion')->getPath();\n $json_data_path = $module_path .\"/json/sociotypes_data.json\";\n\n $json_data_path = Json::decode(file_get_contents($json_data_path));\n\n return $json_data_path;\n }",
"function get_json_content_full_file_name(SupportedLanguages $supportedLanguage, string $pageName): string\n{\n return BASE_DIR.'/content/'.$pageName.'-'.$supportedLanguage->value.'.json';\n}",
"protected static function path()\n {\n return config('app.home_path').'/.eco/config.json';\n }",
"public static function folderPath(){\n\t\treturn DATA.static::$folderPrefix.'files/';\n\t}",
"public function getLogDir() {\n return json_encode($this->setLogDir());\n }",
"function acf_get_local_json_files()\n{\n}",
"function make_json($data) {\n // generate JSON path with a random filename\n $json_path = __dir__ . '/datasets/' . make_name(10) . '.json';\n // convert PHP array into JSON string\n $json_data = json_encode($data);\n // write the JSON string to the file\n file_put_contents($json_path, $json_data);\n return $json_path;\n }",
"function add_acf_json_folder_path( $paths ) {\n\t$paths['path'] = get_template_directory() . '/inc/config/acf-exports/';\n\n\treturn $paths;\n}",
"public function getMyFolder($projectId = false) {\n echo json_encode($this->listMyFolder($this->pathCreator . '/' . $projectId));\n }",
"function get_info($json_path,$folder){\n\tif($folder == ''){\n\t\t$dir = $json_path;\n\t} else {\n\t\t$dir = $json_path.$folder;\n\t}\n\tif(!file_exists($dir)){\n\t\treturn 'no exist';\n\t} else {\n\t\t$file = file_get_contents($dir.'/_info.json');\n\t\tif($file == '' || $file == '[]'){\n\t\t\treturn 'empty';\n\t\t} else {\n\t\t\treturn $file;\n\t\t}\n\t}\n}",
"public static function getStorageDescriptorPath()\n {\n return preg_replace('/.php$/', '.json', __FILE__);\n }",
"public static function getStorageDescriptorPath()\n {\n return preg_replace('/.php$/', '.json', __FILE__);\n }",
"public static function getStorageDescriptorPath()\n {\n return preg_replace('/.php$/', '.json', __FILE__);\n }",
"public static function getStorageDescriptorPath()\n {\n return preg_replace('/.php$/', '.json', __FILE__);\n }",
"public static function get_directory() : string {\r\n\t\treturn Core::get_app_path( self::$directory );\r\n\t}",
"protected function getInstalledJsonPath() {\n // Alternative approach.\n // $installed_json_file = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'installed-libraries.json';\n\n /** @var \\Composer\\Package\\CompletePackage $installer_library_package */\n $installer_library_package = $this->composer->getRepositoryManager()->getLocalRepository()->findPackage(\n static::PACKAGE_NAME,\n '*'\n );\n\n if (!$installer_library_package || !$installer_library_package instanceof CompletePackage) {\n // This should never happen.\n throw new \\LogicException('Could not resolve the %s package!', static::PACKAGE_NAME);\n }\n\n return $this->installationManager->getInstallPath($installer_library_package) . '/installed-libraries.json';\n }",
"private function getDir() {\n return sprintf(\"%s/%s/\", app_path(), config('newportal.portlets.namespace'));\n }",
"public function getDir();",
"function dirPath() { return (\"../\"); }",
"function dirPath () { return (\"../../\"); }",
"function read_dir($system_dir) {\n\t$file_type = 'file';\n\tif (is_dir($system_dir)) {\n\t\tif ($dir = opendir($system_dir)) {\n\t\t\twhile ( ($file = readdir($dir)) !== false ) {\n\t\t\t\tif ($file != \".\" && $file != \"..\") {\n\t\t\t\t\t$dir_name [] = $file;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$data ['data'] = @$dir_name;\n\t\t\treturn json_encode($data);\n\t\t\tclosedir($dir);\n\t\t}\n\t}\n}",
"public function getApiPathMultipleResource() {\n return $this->getGenericPath() . '.json';\n }",
"public function getRootFolder() : string;",
"protected function getObjectsDirectory()\n {\n return $this->cacheDirectory . self::DIR_OBJECTS . \"/\";\n }",
"function monk_json_load( $paths ) {\n\t\t\tunset($paths[0]);\n\t\t\t\n\t\t\t\n\t\t\t// append path\n\t\t\t$paths[] = get_stylesheet_directory() . '/acf-json';\n\t\t\t\n\t\t\t\n\t\t\t// return\n\t\t\treturn $paths;\n\t\t\t\n\t}",
"public function getFolder();",
"public function getJsonConfigfile(){\n $json = file_get_contents( $this->config_base_path.$this->jsonFile);\n //Decode JSON\n $array = json_decode($json,true);\n return $array;\n }",
"public function getJsonConfigfile(){\n $json = file_get_contents( $this->config_base_path.$this->jsonFile);\n //Decode JSON\n $array = json_decode($json,true);\n return $array;\n }",
"public function getMockDataPath()\n {\n return base_path('tests/js/mocks/');\n }",
"function getSerializeFolder()\n {\n return $this->_props['SerializeFolder'];\n }",
"function jsonToArray($dir, $file){\n/** Nurodomas kelias iki jsons folderio */ /** __DIR__ - atvaizduoja visa kelia iki failo kuriame naudojamas '__DIR__' pvz:C:\\wamp\\www\\Mindaugas\\2018.09.12 */\n $path = __DIR__ . DIRECTORY_SEPARATOR . $dir . DIRECTORY_SEPARATOR; \n $file = file_get_contents($path . $file , FILE_USE_INCLUDE_PATH); /** $file(kintamasis) Paims info(pagal nurodyta kelia su $path) is jsons folderio */\n $allInfo = json_decode($file, true); /** $allInfo(kintamasis) decodins .json failus i php masyvus*/\n\n return $allInfo; /** Grazinam visa info is .json failu kaip masyvą */\n}",
"function getJson($fileName){\n $file = __DIR__ . \"/settings/$fileName.json\";\n if(file_exists($file)){\n return json_decode(file_get_contents($file), true);\n }else{\n return array();\n }\n}",
"private function constructFilePath()\r\n {\r\n $this->filePath = MENU_PATH . \"/\" . $this->nameOfJson . \".json\";\r\n }",
"public function path() {\n\t\t\treturn rtrim($this->application->configuration([ \"packagemanager\", \"directory\" ]), \"/\") . \"/\" . $this->package_directory;\n\t\t}",
"function dirPath() {return (\"../../../../\"); }",
"protected function getApplicationSourceFolder()\n {\n $folders = scandir(getcwd());\n\n foreach ($folders as $folder) {\n preg_match('/bolt-.*/', $folder, $result);\n if($result){\n $folderName = $result[0];\n break;\n }\n }\n\n return $folderName;\n }",
"private function _getCachePath() {\n return DIR_PUBLIC_CACHE_SEARCHES . $this->_id . '.json';\n }",
"public function getDirectory(): string;",
"public function getFolder()\n {\n return $this->config['folder'] . '/' . basename($this->themeSlug);\n }",
"public function maybeCreateJsonFolder()\n {\n $path = $this->getJsonFolder();\n\n if (!file_exists($path)) {\n mkdir($path, 0777, true);\n }\n if (!file_exists($path . DIRECTORY_SEPARATOR . $this->type)) {\n mkdir($path . DIRECTORY_SEPARATOR . $this->type, 0777, true);\n }\n }",
"public static function ApplicationFolder()\n {\n return dirname(dirname(__DIR__)).DIRECTORY_SEPARATOR.Configuration::getApplicationFolder();\n }",
"public function getJsonFiles(): array\n {\n $path = $this->getJsonTypeFolder();\n $jsonFiles = [];\n $files = scandir($path);\n foreach ($files as $file) {\n if (strpos($file, '.json') === false) {\n continue;\n }\n $jsonFiles[] = $path . DIRECTORY_SEPARATOR . $file;\n }\n return $jsonFiles;\n }",
"public function root(): string\n {\n return $this->instances->demo()->config()->root() . '/public/' . $this->name;\n }",
"function getRootLevelFolder() ;",
"public function getRootLevelFolder() {}",
"public function getDirectory();",
"public function getDirectory();",
"private function getTemplatesFolderLocation()\n {\n return str_replace('//', '/', APP_DIR . '/') . self::TEMPLATES_DIR;\n }",
"function create_folder($json_path,$name){\n\tif (!file_exists($json_path)){\n\t\tmkdir($json_path, 0777);\n\t}\n\tif(!file_exists($json_path.'_info.json')){\n\t\t$fp = fopen($json_path.'_info.json','w');\n\t\tfwrite($fp,'[]');\n\t\tfclose($fp);\n\t}\n\tif (file_exists($json_path.$name)){\n\t\treturn 'folder exist';\n\t} else {\n\t\tmkdir($json_path.$name, 0777);\n\t\t$fp = fopen($json_path.$name.'/_info.json','w');\n\t\tfwrite($fp,'[]');\n\t\tfclose($fp);\n\t\tif($name != ''){\n\t\t\twrite_info_file($json_path,$name);\n\t\t}\n\t\treturn 'created';\n\t}\n}",
"public function getFolderPath(){}",
"public function getVersionJsnFullPath()\n {\n return CONFIG . 'version.json';\n }",
"static public function getDir(){\n return __DIR__ . '/Adapter/Format/';\n }",
"public function getDir(): string;",
"private static function makeJSON(string $dir) : array\n\t{\n\t\tstatic $index = 0;\n\n\t\t$aeFiles = \\MarkNotes\\Files::getInstance();\n\t\t$aeEvents = \\MarkNotes\\Events::getInstance();\n\t\t$aeSession = \\MarkNotes\\Session::getInstance();\n\t\t$aeSettings = \\MarkNotes\\Settings::getInstance();\n\n\t\t$root = str_replace('/', DS, $aeSettings->getFolderDocs(true));\n\n\t\t$rootNode = $aeSettings->getFolderDocs(false);\n\n\t\t// Get the list of files and folders for the treeview\n\t\t$arrEntries = self::directoryToArray($dir);\n\n\t\t// Now, prepare the JSON return\n\t\t$sDirectoryText = basename($dir);\n\t\t$sID = str_replace(dirname($root) . DS, '', $dir);\n\t\t$sID = rtrim($sID, DS) . DS;\n\n\t\t// It's a folder node\n\t\t$dataURL = str_replace(DS, '/', str_replace(dirname($root) . DS, '', $dir));\n\t\t$dataURL .= (($root == $dir) ? '' : '/') . 'index.html';\n\n\t\tif (PHP_7_0) {\n\t\t\t// Avoid PHP 7.0.x bug : handle accents\n\t\t\t$arrSettings = $aeSettings->getPlugins('/interface');\n\t\t\t$bConvert = boolval($arrSettings['accent_conversion'] ?? 1);\n\n\t\t\tif ($bConvert) {\n\t\t\t\t$sID = iconv('UTF-8', 'UTF-8//IGNORE', utf8_encode($sID));\n\n\t\t\t\t// accent_conversion in settings.json has\n\t\t\t\t// been initialized to 1 => make the conversion\n\t\t\t\t$sDirectoryText = iconv('UTF-8', 'UTF-8//IGNORE', utf8_encode($sDirectoryText));\n\n\t\t\t\t$dataURL = iconv('UTF-8', 'UTF-8//IGNORE', utf8_encode($dataURL));\n\t\t\t}\n\t\t}\n\n\t\t$listDir = [\n\t\t\t'id' => md5($sID),\n\t\t\t'type' => 'folder',\n\t\t\t'icon' => 'folder',\n\t\t\t'text' => str_replace(DS, '/', $sDirectoryText),\n\t\t\t'state' => [\n\t\t\t\t// Opened only if the top root folder\n\t\t\t\t'opened' => (($root == $dir) ? 1 : 0),\n\t\t\t\t'disabled' => 1\n\t\t\t],\n\t\t\t'data' => [\n\t\t\t\t//'task' => 'display',\n\t\t\t\t// Right clic on the node ?\n\t\t\t\t// Open the_folder/index.html page\n\t\t\t\t'url' => $dataURL,\n\t\t\t\t'path' => str_replace(DS, '/', $sID)\n\t\t\t],\n\t\t\t'children' => []\n\t\t];\n\n\t\t$dirs = [];\n\t\t$files = [];\n\n\t\tforeach ($arrEntries as $entry) {\n\t\t\tif ($entry['type'] == 'file') {\n\t\t\t\t$entry['name'] = str_replace('/', DS, $entry['name']);\n\n\t\t\t\t// We're processing a filename\n\t\t\t\t$index += 1;\n\n\t\t\t\t//Filename but without the extension (and no path)\n\t\t\t\t$filename = str_replace('.md', '', basename($entry['name']));\n\n\t\t\t\t// Relative filename like f.i.\n\t\t\t\t// docs/the_folder/a_note.md\n\t\t\t\t$id = str_replace($root, $rootNode, $entry['name']);\n\n\t\t\t\tif (PHP_7_0) {\n\t\t\t\t\tif ($bConvert) {\n\t\t\t\t\t\t// accent_conversion in settings.json has\n\t\t\t\t\t\t// been initialized to 1 => make the conversion\n\t\t\t\t\t\t$id = iconv('UTF-8', 'UTF-8//IGNORE', utf8_encode($id));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Right-click on a file = open it's HTML version\n\t\t\t\t$dataURL = str_replace($root, '', $entry['name']);\n\n\t\t\t\t// Should be relative to the /docs folder\n\t\t\t\t$dataURL = $aeSettings->getFolderDocs(false) . $dataURL;\n\t\t\t\t$dataURL = str_replace(DS, '/', $dataURL) . '.html';\n\n\t\t\t\t$sFileText = $filename;\n\n\t\t\t\t// If the title is really long, …\n\t\t\t\t// 30 characters in the treeview are enough\n\t\t\t\tif (strlen($sFileText) > TREEVIEW_MAX_FILENAME_LENGTH) {\n\t\t\t\t\t/* We'll truncate the filename to only the first ...\n\t\t\t\t\tthirty ... characters\n\t\t\t\t\tBut, special case, when the filename is truncated,\n\t\t\t\t\tif the very last position is an accentuated char.,\n\t\t\t\t\twe can't truncate exactly at that size because such\n\t\t\t\t\tcharacter is on two bytes. We can only keep the first\n\t\t\t\t\tone otherwise we'll have an encoding problem.\n\t\t\t\t\tSo, in this case, truncate one more char (so keep\n\t\t\t\t\t29 f.i.)\n\t\t\t\t\t*/\n\t\t\t\t\ttry {\n\t\t\t\t\t\t$wLen = TREEVIEW_MAX_FILENAME_LENGTH;\n\t\t\t\t\t\t$tmp = json_encode(substr($sFileText, 0, $wLen));\n\t\t\t\t\t\tif (json_last_error() === JSON_ERROR_UTF8) {\n\t\t\t\t\t\t\t$wLen--;\n\t\t\t\t\t\t\t$tmp = json_encode(substr($sFileText, 0, $wLen));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$sFileText = substr($sFileText, 0, $wLen) . ' …';\n\t\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t\t/*<!-- build:debug -->*/\n\t\t\t\t\t\tdie(\"<pre style='background-color:yellow;'>\" . __FILE__ . ' - ' . __LINE__ . ' ' . print_r($sFileText, true) . '</pre>');\n\t\t\t\t\t\t/*<!-- endbuild -->*/\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$dataBasename = $aeFiles->removeExtension(basename($dataURL));\n\n\t\t\t\t$dataFile = str_replace($root, '', $entry['name']);\n\t\t\t\t$dataFile = str_replace(DS, '/', $dataFile);\n\n\t\t\t\t$default_task = 'task.export.html';\n\n\t\t\t\t// In the list of files, help the jsTree plugin\n\t\t\t\t// to know that the action should be EDIT and not DISPLAY\n\t\t\t\t// when the user click on the note that was just created\n\t\t\t\t$lastAddedNote = trim($aeSession->get('last_added_note', ''));\n\n\t\t\t\tif ($dataBasename === $lastAddedNote) {\n\t\t\t\t\t$default_task = 'task.edit.form';\n\t\t\t\t}\n\n\t\t\t\tif (PHP_7_0) {\n\t\t\t\t\tif ($bConvert) {\n\t\t\t\t\t\t// accent_conversion in settings.json has\n\t\t\t\t\t\t// been initialized to 1 => make the conversion\n\t\t\t\t\t\t$sFileText = iconv('UTF-8', 'UTF-8//IGNORE', utf8_encode($sFileText));\n\n\t\t\t\t\t\t$dataBasename = iconv('UTF-8', 'UTF-8//IGNORE', utf8_encode($dataBasename));\n\n\t\t\t\t\t\t$dataFile = iconv('UTF-8', 'UTF-8//IGNORE', utf8_encode($dataFile));\n\n\t\t\t\t\t\t$dataURL = iconv('UTF-8', 'UTF-8//IGNORE', utf8_encode($dataURL));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$files[] = [\n\t\t\t\t\t'id' => md5($id),\n\t\t\t\t\t'icon' => 'file file-md',\n\t\t\t\t\t'text' => $sFileText,\n\t\t\t\t\t'data' => [\n\t\t\t\t\t\t'basename' => $dataBasename,\n\t\t\t\t\t\t'task' => $default_task,\n\t\t\t\t\t\t'file' => $dataFile,\n\t\t\t\t\t\t'url' => $dataURL\n\t\t\t\t\t],\n\t\t\t\t\t'state' => [\n\t\t\t\t\t\t'opened' => 0,\t// A file isn't opened\n\t\t\t\t\t\t'selected' => 0 // and isn't selected by default\n\t\t\t\t\t]\n\t\t\t\t];\n\t\t\t} elseif ($entry['type'] == 'folder') {\n\t\t\t\t// It's a folder\n\n\t\t\t\t// Derive the folder name\n\t\t\t\t// From c:/sites/marknotes/docs/the_folder, keep /the_folder/\n\t\t\t\t$fname = str_replace($root, '', $entry['name']);\n\t\t\t\t$fname = DS . ltrim(rtrim($fname, DS), DS) . DS;\n\n\t\t\t\t// The folder should start and end with the slash\n\t\t\t\t// so \"/the_folder/\" and not something else.\n\t\t\t\t$tmp = [\n\t\t\t\t\t'folder' => rtrim($root, DS) . $fname,\n\t\t\t\t\t'return' => true\n\t\t\t\t];\n\n\t\t\t\t$args = [&$tmp];\n\n\t\t\t\t// If the task.acls.cansee wasn't fired i.e. when\n\t\t\t\t// there was no folder to protect, the trigger even\n\t\t\t\t// return False. Otherwise, trigger return True :\n\t\t\t\t// the plugin has been fired\n\t\t\t\tif (static::$bACLsLoaded) {\n\t\t\t\t\t$bReturn = $aeEvents->trigger('task.acls.cansee::run', $args);\n\t\t\t\t} else {\n\t\t\t\t\t// ACLs plugin not loaded; every files / folders\n\t\t\t\t\t// can be accessed\n\t\t\t\t\t$args[0]['return'] = 1;\n\t\t\t\t\t$bReturn = true;\n\t\t\t\t}\n\n\t\t\t\t// The canSeeFolder event will initialize the 'return'\n\t\t\t\t// parameter to false when the current user can't see the\n\t\t\t\t// folder i.e. don't have the permission to see it. This\n\t\t\t\t// permission is defined in the acls plugin options\n\t\t\t\t//\n\t\t\t\t// See function run() of\n\t\t\t\t// MarkNotes\\Plugins\\Task\\ACLs\\cansee.php\n\t\t\t\t// for more information\n\t\t\t\t//\n\t\t\t\t// $bReturn === false ==> there was no protected folder.\n\t\t\t\tif (($bReturn === false) || ($args[0]['return'] === 1)) {\n\t\t\t\t\t//$dirs [] = utf8_decode($entry['name']);\n\t\t\t\t\t$dirs[] = $entry['name'];\n\t\t\t\t}\n\t\t\t} // if ($entry['type']=='folder')\n\t\t} // foreach\n\n\t\t// The current folder has been processed, are\n\t\t// there subfolders in it ?\n\t\tif (count($dirs) > 0) {\n\t\t\tforeach ($dirs as $d) {\n\t\t\t\tlist($arrChildren, $tmp) = self::makeJSON($d);\n\t\t\t\t$listDir['children'][] = $arrChildren;\n\t\t\t}\n\t\t}\n\n\t\tforeach ($files as $file) {\n\t\t\t$listDir['children'][] = $file;\n\t\t}\n\n\t\treturn [$listDir, $index];\n\t}",
"public function getCacheFolder()\n {\n\n return dirname(__FILE__) . '/../../store/cache/';\n }",
"protected function getCoreFolder() {\n return 'core/' . $this->getCollectionDirectory();\n }",
"public static function getParentNameSpaces(): array{\n $configs = json_decode(file_get_contents(self::$composerPath),true);\n // get only neccesary data\n $configs = $configs['autoload']['psr-4'];\n foreach($configs as $key => $value){\n unset($configs[$key]);\n $configs[stripslashes($key)] = $value;\n }\n foreach($configs as $key => $value){\n $configs[$key] = explode(DIRECTORY_SEPARATOR,$value)[0];\n }\n return $configs;\n }",
"public function mainBanner()\n {\n $file = Storage::disk('mainB')->allFiles();\n return Response::json($file,200);\n }",
"private static function getCurrentFolder() : string {\n return self::getPath() . '/' . date('Y-M');\n }",
"public abstract function getDirectory();",
"private function generatePluginJsonFile()\n {\n $path = $this->pluginRepository->getPluginPath($this->getName()).'plugin.json';\n\n if (! $this->filesystem->isDirectory($dir = dirname($path))) {\n $this->filesystem->makeDirectory($dir, 0775, true);\n }\n\n $this->filesystem->put($path, $this->getStubContents('json'));\n\n $this->console->info(\"Created : {$path}\");\n }",
"public function getDir() {\n return Yii::getAlias('@static').'/'.$this->module.'/'. $this->parent_id .'/';\n }",
"public function loadFilesProduction()\r\n {\r\n $id = Input::get('ID');\r\n $project = Project::find($id);\r\n $files=[];\r\n if($project!=null)\r\n {\r\n $internalFiles = $project->filesByType(array('vendor','university','designer','writer','attorney','2d'));\r\n foreach($internalFiles as $file)\r\n {\r\n $files[]=['id'=>$file->id,'name'=>$file->fileName,'url'=>$file->url,'date'=>$file->created_at];\r\n }\r\n }\r\n return json_encode($files);\r\n }",
"protected function getConfigFolder(): string\n {\n return realpath($this->getBasePath().DIRECTORY_SEPARATOR.'fixtures'.DIRECTORY_SEPARATOR.'config');\n }",
"public function jsonFile() \n\t{\t\n\t\tif(isset($GLOBALS['userID']) && isset($_GET['group']) && is_file('src/'.$_GET['group'].'/'.$GLOBALS['userID'].'.json'))\n\t\t{\n\t\t\t//cookie temp Char for possessed chars overrides _COOKIE[Char]\n\t\t\tif(!empty($_COOKIE['tempChar']))\n\t\t\t{\n\t\t\t\t$path = 'src/'.$_GET['group'].'/'.$GLOBALS['userID'].'.json';\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\t$path = 'src/'.$_GET['group'].'/'.$GLOBALS['userID'].'.json';\n\t\t\t}\t\t\t\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$path = 'placeholder.json';\n\t\t}\n\t\t//import json file \n\t\t$jsonFile = file_get_contents($path);\n\t\t$charData = json_decode($jsonFile);\n\t\t$GLOBALS['chardata'] = $charData;\n\t\treturn ($charData);\n\t}",
"function json_dir($ftp, $flag = FALSE, $value = FALSE, $bad_files = FALSE)\n{\n\t//flags\n $json_data = array();\n \n\t//save current directory\n\t$curdir = ftp_pwd($ftp);\n\n\t//current dir JSON\n $files = files_in_cur_dir($ftp,1);\n\n $parent_dir = array();\n //parent dir JSON\n \t//check for root, cdup returns true\n\tif($curdir!=='/' && @ftp_cdup($ftp)) {\n\t\t$parent_dir = files_in_cur_dir($ftp,0);\n\t\tftp_chdir($ftp, $curdir);\n\t}\n\t$json_data[SESSION_STATUS] = true;\n\tif($flag !== FALSE)\n\t{\n\t $json_data[$flag] = $value;\n\t if($flag === 'rmFile' && $value === 'false') {\n\t \t//include $files\n\t \t$json_data['rmFail'] = $bad_files;\n\t }\n\t}\n\t$json_data[CUR_DIR] = $curdir;\n\t$json_data[FILES] = $files;\n\t$json_data[PARENT_DIR] = $parent_dir;\n\treturn json_encode($json_data);\n}",
"public function getAssetFolder()\n {\n return $this->config()->asset_folder;\n }",
"public function getAssetFolder()\n {\n return $this->config()->asset_folder;\n }",
"public function getRootDir();",
"public function collectComposerJsonFile()\r\n {\r\n\r\n $files_found = $this->findSpecificFile($this->site_root, \"composer.json\");\r\n if($files_found)\r\n $this->file_list = array_merge($this->file_list, $files_found);\r\n }",
"public function getPartialRootPath() {}",
"public function getBasePath(): string;",
"public function getBasePath(): string;"
] | [
"0.7276001",
"0.72007674",
"0.7038732",
"0.69294846",
"0.6918873",
"0.676119",
"0.67483765",
"0.6615697",
"0.6529628",
"0.64791346",
"0.6445162",
"0.64349157",
"0.6339038",
"0.63173676",
"0.6306815",
"0.629962",
"0.6207142",
"0.61385286",
"0.6133637",
"0.6100365",
"0.6046247",
"0.60366726",
"0.5959273",
"0.5957367",
"0.5951971",
"0.5940872",
"0.5905427",
"0.5888224",
"0.581931",
"0.581003",
"0.58038276",
"0.5802826",
"0.5796502",
"0.57676345",
"0.5765232",
"0.57645005",
"0.57562804",
"0.57435405",
"0.57435405",
"0.57435405",
"0.57435405",
"0.5742615",
"0.5735333",
"0.5721944",
"0.5715483",
"0.5679218",
"0.56638175",
"0.56637436",
"0.5661815",
"0.56613135",
"0.56611246",
"0.56580746",
"0.5646763",
"0.56369823",
"0.56369823",
"0.56339204",
"0.5633147",
"0.563021",
"0.56247425",
"0.56231856",
"0.5622639",
"0.5601698",
"0.559877",
"0.5593386",
"0.558865",
"0.55836225",
"0.5582199",
"0.5571646",
"0.5569388",
"0.5562124",
"0.55604136",
"0.55569094",
"0.5554112",
"0.5554112",
"0.55489385",
"0.5548534",
"0.55479103",
"0.5534364",
"0.5533915",
"0.5528487",
"0.551653",
"0.5507631",
"0.54993916",
"0.54979414",
"0.5495834",
"0.5489449",
"0.548359",
"0.54750043",
"0.547362",
"0.546203",
"0.54567826",
"0.54521537",
"0.5451016",
"0.54507786",
"0.54507786",
"0.54484826",
"0.544398",
"0.54373854",
"0.5418546",
"0.5418546"
] | 0.76785845 | 0 |
Return the specific type json folder | protected function getJsonTypeFolder(): string
{
$path = self::getJsonFolder();
return $path . DIRECTORY_SEPARATOR . $this->type;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected static function getJsonFolder(): string\n {\n return apply_filters('wpgb_extended/sync/json_folder', get_stylesheet_directory() . DIRECTORY_SEPARATOR . 'wpgb-json');\n }",
"public function include_json_folders()\n {\n }",
"private static function folders_path(){\n\t\treturn dirname(__DIR__) . '/content/folders.json';\n\t}",
"public function include_json_folder($path = '')\n {\n }",
"public function getDataWithTypePath() {}",
"public function directory() {\n $config = \\Drupal::config('webspark_isearch.settings');\n $directory_url = $config->get('directory_path');\n return $this->retriveJsonFromService($directory_url);\n }",
"public function maybeCreateJsonFolder()\n {\n $path = $this->getJsonFolder();\n\n if (!file_exists($path)) {\n mkdir($path, 0777, true);\n }\n if (!file_exists($path . DIRECTORY_SEPARATOR . $this->type)) {\n mkdir($path . DIRECTORY_SEPARATOR . $this->type, 0777, true);\n }\n }",
"private function _getTypeDirectory( $type )\n\t\t{\n\t\t\t$config = Config::getInstance();\n\t\t\t$directory = null;\n\t\t\tswitch ( $type ) {\n\t\t\t\tcase 'installed':\n\t\t\t\tcase 'uninstalled':\n\t\t\t\t\t$directory = $config->notification->libPluginDirectory;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'recently_installed':\n\t\t\t\tcase 'run_out':\n\t\t\t\tcase 'expired':\n\t\t\t\tcase 'trial_run_out':\n\t\t\t\tcase 'trial_expired':\n\t\t\t\t\t$directory = $config->notification->indexDirectory;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'current_month_overdraft':\n\t\t\t\tcase 'expired_overdraft':\n\t\t\t\tcase 'unpaid_overdraft':\n\t\t\t\t\t$directory = $config->notification->optionsDirectory;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'forgot':\n\t\t\t\t\t$directory = $config->notification->authDirectory;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\treturn $directory;\n\t\t}",
"public static function getJsonFilePath()\n {\n $menusetConfig = self::getMenusetConfig();\n //return Globals::getWorkFolder() . $menusetConfig->setting->fileName;\n return Globals::getDataFilePath($menusetConfig->setting->fileName_detail);\n }",
"public function get_directory_by_type ( $type = 'bundled' ) {\n\t\t$path = '';\n\t\tswitch ( $type ) {\n\t\t\tcase 'standalone':\n\t\t\t\t$path = trailingslashit( WP_PLUGIN_DIR );\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'downloadable':\n\t\t\t\t$path = $this->downloads_path;\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'bundled':\n\t\t\tdefault:\n\t\t\t\t$path = $this->components_path;\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn $path;\n\t}",
"function open_folder($json_path,$folder){\n\tif($folder == ''){\n\t\t$dir = $json_path;\n\t} else {\n\t\t$dir = $json_path.$folder.'/';\n\t}\n\tif(!file_exists($dir)){\n\t\treturn 'no exist';\n\t} else {\n\t\t$files = scandir($dir);\n\t\tarray_splice($files,0,2);\n\t\t$result = new stdClass();\n\t\tfor($i = 0; $i < count($files); $i++){\n\t\t\tif(is_dir($dir.$files[$i])){\n\t\t\t\t$subdir = scandir($dir.$files[$i]);\n\t\t\t\tarray_splice($subdir,0,2);\n\t\t\t\t$subdir_res = new stdClass();\n\t\t\t\tfor($j = 0; $j < count($subdir); $j++){\n\t\t\t\t\t$json = file_get_contents($dir.$files[$i].'/'.$subdir[$j]);\n\t\t\t\t\t$array_json = json_decode($json);\n\t\t\t\t\t$name = explode('.',$subdir[$j]);\n\t\t\t\t\t$subdir_res->$name[0] = $array_json;\n\t\t\t\t}\n\t\t\t\t$result->$files[$i] = $subdir_res;\n\t\t\t} else {\n\t\t\t\t$json = file_get_contents($dir.$files[$i]);\n\t\t\t\t$array_json = json_decode($json);\n\t\t\t\t$name = explode('.',$files[$i]);\n\t\t\t\t$result->$name[0] = $array_json;\n\t\t\t}\n\t\t}\n\t\treturn json_encode($result);\n\t}\n}",
"private function _get_asset_type_dir($type)\n\t{\n\t\t$asset_dir = '';\n\t\t\n\t\t$asset_dir .= $this->_ci->config->item('bucket_assets_path');\n\t\t$asset_dir .= $this->_ci->config->item('bucket_assets_' . $type . '_path');\n\t\t\n\t\treturn $asset_dir;\n\t}",
"function get_info($json_path,$folder){\n\tif($folder == ''){\n\t\t$dir = $json_path;\n\t} else {\n\t\t$dir = $json_path.$folder;\n\t}\n\tif(!file_exists($dir)){\n\t\treturn 'no exist';\n\t} else {\n\t\t$file = file_get_contents($dir.'/_info.json');\n\t\tif($file == '' || $file == '[]'){\n\t\t\treturn 'empty';\n\t\t} else {\n\t\t\treturn $file;\n\t\t}\n\t}\n}",
"public function getJsonFiles(): array\n {\n $path = $this->getJsonTypeFolder();\n $jsonFiles = [];\n $files = scandir($path);\n foreach ($files as $file) {\n if (strpos($file, '.json') === false) {\n continue;\n }\n $jsonFiles[] = $path . DIRECTORY_SEPARATOR . $file;\n }\n return $jsonFiles;\n }",
"public function getFolder();",
"public function getPattern(): string\n\t{\n\t\treturn __DIR__ . DIRECTORY_SEPARATOR . 'test.json';\n\t}",
"function open_json($json_path,$folder,$name){\n\t$dir = $json_path.$folder.'/';\n\tif(!file_exists($dir)){\n\t\treturn 'no folder';\n\t}\n\tif(!file_exists($dir.$name.'.json')){\n\t\treturn 'no json';\n\t}\n\treturn file_get_contents($dir.$name.'.json');\n}",
"public function getFilepath()\n {\n return $this->folder.'/'.$this->file.'.json';\n }",
"public function getResultsFromJson() {\n $module_handler = \\Drupal::service('module_handler');\n $module_path = $module_handler->getModule('socion')->getPath();\n $json_data_path = $module_path .\"/json/sociotypes_data.json\";\n\n $json_data_path = Json::decode(file_get_contents($json_data_path));\n\n return $json_data_path;\n }",
"private function loadMediaTypes()\n {\n return json_decode(file_get_contents(__DIR__ . '/mediatypes.json'), true);\n }",
"public function getFlatFolders()\n {\n $society_id = OauthToken::find(\\Input::get('access_token'))->society_id;\n $user_id = OauthToken::find(\\Input::get('access_token'))->user_id;\n\t\t\n\t\t$search = \\Input::get('search',null);\n $type = \\Input::get('type',1);\n//\t\tprint_r($type);exit;\n\t\t$binds = ['offset'=>\\Input::get('offset',0),'limit'=>\\Input::get('limit',10)];\n \n $where = ' where f.society_id = \"'.$society_id.'\" and f.deleted_at IS NULL';\n\t\tif ($search) {\n\t\t\t$where .= ' and f.name like :search and f.type= :type';\n\t\t\t$binds['search'] = '%'.$search.'%';\n $binds['type'] =$type;\n\t\t}else{\n $where .= ' and f.type = :type';\n $binds['type'] = $type;\n }\n \n $results = \\DB::select(\"select f.*,users.first_name,users.last_name,f.name as folder_name,date_format(f.created_at,'%d-%m-%Y') as created_at from admin_folder as f INNER JOIN users on f.user_id=users.id $where order by f.id desc limit :limit offset :offset\",$binds);\n \n \n\t\t$count = \\DB::selectOne(\n\t\t\t\t\t\"select count(*) as total from admin_folder as f $where\",\n\t\t\t\t\t$search ? array('search'=>'%'.$search.'%','type'=>$type) : array('type'=>$type)\n\t\t\t\t);\n\n\t\treturn ['total'=>$count->total,'data'=>$results];\n }",
"function create_folder($json_path,$name){\n\tif (!file_exists($json_path)){\n\t\tmkdir($json_path, 0777);\n\t}\n\tif(!file_exists($json_path.'_info.json')){\n\t\t$fp = fopen($json_path.'_info.json','w');\n\t\tfwrite($fp,'[]');\n\t\tfclose($fp);\n\t}\n\tif (file_exists($json_path.$name)){\n\t\treturn 'folder exist';\n\t} else {\n\t\tmkdir($json_path.$name, 0777);\n\t\t$fp = fopen($json_path.$name.'/_info.json','w');\n\t\tfwrite($fp,'[]');\n\t\tfclose($fp);\n\t\tif($name != ''){\n\t\t\twrite_info_file($json_path,$name);\n\t\t}\n\t\treturn 'created';\n\t}\n}",
"public function getType()\n {\n return 'json';\n }",
"function get_tours_info($type){\n\tif($type == 'belarus'){\n\t\t$patch = '../../jsdb/JSON/tours/belarus.json';\n\t}\n\tif($type == 'belarus_pref'){\n\t\t$patch = '../../jsdb/JSON/tours/belarus_pref.json';\n\t}\n\tif($type == 'foreigners'){\n\t\t$patch = '../../jsdb/JSON/tours/foreigners.json';\n\t}\n\tif($type == 'foreigners_pref'){\n\t\t$patch = '../../jsdb/JSON/tours/foreigners_pref.json';\n\t}\n\t$object = json_decode(file_get_contents($patch));\n\tforeach($object[0] as $key => $value){\n\t\tfor($i = 1; $i < count($value); $i++){\n\t\t\t$img_patch = $value[$i]->img;\n\t\t\t$scan = scandir('../../'.$img_patch);\n\t\t\tarray_splice($scan,0,2);\n\t\t\t$res_img = array();\n\t\t\tfor($j = 0; $j < count($scan); $j++){\n\t\t\t\t$img_res_patch = $img_patch.'/'.$scan[$j];\n\t\t\t\tarray_push($res_img,$img_res_patch);\n\t\t\t}\n\t\t\t$value[$i]->img = $res_img;\n\t\t}\n\t}\n\treturn json_encode($object[0]);\n}",
"public function getByType($type)\n\t{\n\t\t$respond = array();\n\t\t$gallery = Gallery::where('type','=',$type)->get();\n\t\tif (count($gallery) == 0)\n\t\t{\n\t\t\t$respond = array('code'=>'404','status' => 'Not Found');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$respond = array('code'=>'200','status' => 'OK','messages'=>$gallery);\n\t\t}\n\t\treturn Response::json($respond);\n\t}",
"public function getJsonPath()\r\n {\r\n return $this->root.'/'.$this->route.'/bebras.json';\r\n }",
"public function getApiPathMultipleResource() {\n return $this->getGenericPath() . '.json';\n }",
"public static function getStorageDescriptorPath()\n {\n return preg_replace('/.php$/', '.json', __FILE__);\n }",
"public static function getStorageDescriptorPath()\n {\n return preg_replace('/.php$/', '.json', __FILE__);\n }",
"public static function getStorageDescriptorPath()\n {\n return preg_replace('/.php$/', '.json', __FILE__);\n }",
"public static function getStorageDescriptorPath()\n {\n return preg_replace('/.php$/', '.json', __FILE__);\n }",
"public static function getOldJsonFilePath()\n {\n $menusetConfig = self::getMenusetConfig();\n //return Globals::getWorkFolder() . $menusetConfig->setting->fileName;\n return Globals::getDataFilePath($menusetConfig->setting->fileName);\n }",
"function GetFolders($currentFolder, $type)\n{\n $trust_mode = $type != 'Image' ;\n\n // Array that will hold the folders names.\n $aFolders = array() ;\n\n $sServerDir = $trust_mode ? FCK_TRUSTUPLOAD_PATH . $currentFolder : FCK_UPLOAD_PATH . $currentFolder ;\n $oCurrentFolder = opendir($sServerDir) ;\n\n while (($sFile = readdir($oCurrentFolder)) !== false) {\n if ($sFile != '.' && $sFile != '..' && is_dir($sServerDir . $sFile)) {\n $aFolders[] = '<Folder name=\"' . ConvertToXmlAttribute($sFile) . '\" />' ;\n }\n }\n\n closedir($oCurrentFolder) ;\n\n // Open the \"Folders\" node.\n echo \"<Folders>\" ;\n\n sort($aFolders) ;\n foreach ($aFolders as $sFolder) {\n echo $sFolder ;\n }\n\n // Close the \"Folders\" node.\n echo \"</Folders>\" ;\n}",
"function createJsonFileName($data){\n $filename = __DIR__ . DIRECTORY_SEPARATOR . 'jsons' . DIRECTORY_SEPARATOR . urlencode($data['name'] . \"_\" . $data['pavarde'] . '.json'); /** nurodomas kelias iki konkretaus .json failo */\n var_dump($data);\n return $filename; /** grazinam gauta info */\n\n}",
"public function getFolderInfo() {}",
"public function getFolderTypes ()\n {\n return $this->conn->select(\n array('table' => 'folder_type_data' ,\n 'orderBy' => 'description ASC'));\n }",
"function jsonToArray($dir, $file){\n/** Nurodomas kelias iki jsons folderio */ /** __DIR__ - atvaizduoja visa kelia iki failo kuriame naudojamas '__DIR__' pvz:C:\\wamp\\www\\Mindaugas\\2018.09.12 */\n $path = __DIR__ . DIRECTORY_SEPARATOR . $dir . DIRECTORY_SEPARATOR; \n $file = file_get_contents($path . $file , FILE_USE_INCLUDE_PATH); /** $file(kintamasis) Paims info(pagal nurodyta kelia su $path) is jsons folderio */\n $allInfo = json_decode($file, true); /** $allInfo(kintamasis) decodins .json failus i php masyvus*/\n\n return $allInfo; /** Grazinam visa info is .json failu kaip masyvą */\n}",
"public function loadFilesProduction()\r\n {\r\n $id = Input::get('ID');\r\n $project = Project::find($id);\r\n $files=[];\r\n if($project!=null)\r\n {\r\n $internalFiles = $project->filesByType(array('vendor','university','designer','writer','attorney','2d'));\r\n foreach($internalFiles as $file)\r\n {\r\n $files[]=['id'=>$file->id,'name'=>$file->fileName,'url'=>$file->url,'date'=>$file->created_at];\r\n }\r\n }\r\n return json_encode($files);\r\n }",
"public function getTypePath() {\n $type = preg_replace(\"/\\[.*?\\]/\", \"\", $this->type);\n $pathRewrite = str_replace(\"\\\\\", \"/\", $type);\n return $pathRewrite != $type ? \"/\" . ltrim($pathRewrite, \"/\") : null;\n }",
"public function getObjectTypeDirName()\n {\n return $this->dirName;\n }",
"public function getResourceType() {}",
"public function getResourceType() {}",
"public function getResourceType() {}",
"public function getResourceType() {}",
"public function getResourceType() {}",
"public function getResourceType() {}",
"public function getResourceType() {}",
"public function getResourceType() {}",
"public function json_path() {\n\t\tif ( ! file_exists( LITESPEED_STATIC_DIR . '/crawler/' . $this->_sitemeta ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn LITESPEED_STATIC_URL . '/crawler/' . $this->_sitemeta;\n\t}",
"function read_dir($system_dir) {\n\t$file_type = 'file';\n\tif (is_dir($system_dir)) {\n\t\tif ($dir = opendir($system_dir)) {\n\t\t\twhile ( ($file = readdir($dir)) !== false ) {\n\t\t\t\tif ($file != \".\" && $file != \"..\") {\n\t\t\t\t\t$dir_name [] = $file;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$data ['data'] = @$dir_name;\n\t\t\treturn json_encode($data);\n\t\t\tclosedir($dir);\n\t\t}\n\t}\n}",
"function acf_get_local_json_files()\n{\n}",
"function add_acf_json_folder_path( $paths ) {\n\t$paths['path'] = get_template_directory() . '/inc/config/acf-exports/';\n\n\treturn $paths;\n}",
"public static function getDataFolder()\n {\n $class = get_called_class();\n $strip = explode('\\\\', $class);\n\n return RELEASE_NAME_DATA . '/' . strtolower(array_pop($strip)) . 's';\n }",
"public function listFolderTypes()\n {\n $this->_init();\n return $this->_list_cache->getFolderTypes();\n }",
"function getPath($ctype,$listtype){\n\n\t\tif($ctype == 'image'){\n\t\t\treturn 'uploads/pics/';\n\t\t}else if($ctype == 'uploads'){\n\t\t\treturn 'uploads/media/';\n\t\t}else if($ctype == 'textpic'){\n\t\t\treturn 'uploads/pics/';\n\t\t}else if($ctype == 'multimedia'){\n\t\t\treturn 'uploads/media/';\n\t\t}else if($ctype == 'list'){\n\t\t\t/*\n\t\t\tAll plugins are listed as list.\n\t\t\t*/\n\t\t\tif(preg_match('/typoflash/',$listtype)){\n\t\t\t\treturn 'uploads/tx_typoflash/';\n\t\t\t}else if(preg_match('/flashbg/',$listtype)){\n\t\t\t\treturn 'uploads/tx_flashbg/';\n\t\t\t\n\t\t\t\n\t\t\t}\n\t\t\n\t\t}else{\n\t\t\treturn '';\n\t\t}\n\t\n\t}",
"public function getFolderPath(){}",
"function wp_get_block_name_from_theme_json_path($path)\n {\n }",
"function ajaxLoadType( $type = false )\n\t{\n\t\tglobal $_response, $lang, $rlSmarty, $rlListingTypes, $pages;\n\t\t\n\t\t/* fetch type details */\n\t\t$rlSmarty -> assign_by_ref('type', $type);\n\t\t\n\t\t/* fetch categories */\n\t\t$categories = $GLOBALS['rlCategories'] -> getCatTree(0, $type);\n\t\t$rlSmarty -> assign_by_ref('categories', $categories);\n\t\t\n\t\t/* collect paths */\n\t\t$paths_cat = $this -> getCatTitles($type);\n\t\t\n\t\t$js .= \"cats = new Array(); \";\n\t\tforeach ($paths_cat as $key => $value)\n\t\t{\n\t\t\t$js .= \"cats['{$value['ID']}'] = '{$value['Path']}'; \";\n\t\t}\n\t\t\n\t\t$tpl = 'blocks' . RL_DS . 'categories' . RL_DS . 'parent_cats_tree.tpl';\n\t\t$_response -> assign(\"parent_categories\", 'innerHTML', $GLOBALS['rlSmarty'] -> fetch( $tpl, null, null, false ));\n\t\t\n\t\t$postfix = $rlListingTypes -> types[$type]['Cat_postfix'] ? '.html' : '/';\n\t\t\n\t\t$_response -> script(\"\n\t\t\t$('div#parent_category').slideDown();\n\t\t\t$('span#listing_type_loading').fadeOut();\n\t\t\tflynax.treeLoadLevel();\n\t\t\t$('#cat_postfix_el').html('{$postfix}');\n\t\t\");\n\n\t\t/* set visible path */\n\t\t$_response -> script(\"$('#ab').html('\". $pages['lt_'. $type] .\"/'); {$js}\");\n\t\t\t\t\n\t\treturn $_response;\n\t}",
"public function ajax_get_folder_contents() {\n\n\t\t$path = '#' === rgget( 'path' ) ? '/' : rgget( 'path' );\n\n\t\techo wp_json_encode( $this->get_folder_tree( $path, rgget( 'first_load' ) ) );\n\t\tdie();\n\n\t}",
"public function getResourceType();",
"public function getResourceType();",
"public function getResourceType();",
"public function getResourceType();",
"public function getClassFolder($type)\n {\n return isset($this->namespaces[$type]) ? $this->namespaces[$type] : false;\n }",
"function culturefeed_get_searchable_type_by_path($path = '') {\n if (!$path) {\n $menu_item = menu_get_item();\n $path = $menu_item['path'];\n // If path contains % argument for rss of ajax we use agenda/search\n if ($path == 'agenda/search/%') {\n $path = 'agenda/search';\n }\n }\n foreach (culturefeed_get_searchable_types() as $name => $type) {\n if ($type['path'] == $path) {\n $type['name'] = $name;\n return $type;\n }\n }\n return FALSE;\n}",
"private static function makeJSON(string $dir) : array\n\t{\n\t\tstatic $index = 0;\n\n\t\t$aeFiles = \\MarkNotes\\Files::getInstance();\n\t\t$aeEvents = \\MarkNotes\\Events::getInstance();\n\t\t$aeSession = \\MarkNotes\\Session::getInstance();\n\t\t$aeSettings = \\MarkNotes\\Settings::getInstance();\n\n\t\t$root = str_replace('/', DS, $aeSettings->getFolderDocs(true));\n\n\t\t$rootNode = $aeSettings->getFolderDocs(false);\n\n\t\t// Get the list of files and folders for the treeview\n\t\t$arrEntries = self::directoryToArray($dir);\n\n\t\t// Now, prepare the JSON return\n\t\t$sDirectoryText = basename($dir);\n\t\t$sID = str_replace(dirname($root) . DS, '', $dir);\n\t\t$sID = rtrim($sID, DS) . DS;\n\n\t\t// It's a folder node\n\t\t$dataURL = str_replace(DS, '/', str_replace(dirname($root) . DS, '', $dir));\n\t\t$dataURL .= (($root == $dir) ? '' : '/') . 'index.html';\n\n\t\tif (PHP_7_0) {\n\t\t\t// Avoid PHP 7.0.x bug : handle accents\n\t\t\t$arrSettings = $aeSettings->getPlugins('/interface');\n\t\t\t$bConvert = boolval($arrSettings['accent_conversion'] ?? 1);\n\n\t\t\tif ($bConvert) {\n\t\t\t\t$sID = iconv('UTF-8', 'UTF-8//IGNORE', utf8_encode($sID));\n\n\t\t\t\t// accent_conversion in settings.json has\n\t\t\t\t// been initialized to 1 => make the conversion\n\t\t\t\t$sDirectoryText = iconv('UTF-8', 'UTF-8//IGNORE', utf8_encode($sDirectoryText));\n\n\t\t\t\t$dataURL = iconv('UTF-8', 'UTF-8//IGNORE', utf8_encode($dataURL));\n\t\t\t}\n\t\t}\n\n\t\t$listDir = [\n\t\t\t'id' => md5($sID),\n\t\t\t'type' => 'folder',\n\t\t\t'icon' => 'folder',\n\t\t\t'text' => str_replace(DS, '/', $sDirectoryText),\n\t\t\t'state' => [\n\t\t\t\t// Opened only if the top root folder\n\t\t\t\t'opened' => (($root == $dir) ? 1 : 0),\n\t\t\t\t'disabled' => 1\n\t\t\t],\n\t\t\t'data' => [\n\t\t\t\t//'task' => 'display',\n\t\t\t\t// Right clic on the node ?\n\t\t\t\t// Open the_folder/index.html page\n\t\t\t\t'url' => $dataURL,\n\t\t\t\t'path' => str_replace(DS, '/', $sID)\n\t\t\t],\n\t\t\t'children' => []\n\t\t];\n\n\t\t$dirs = [];\n\t\t$files = [];\n\n\t\tforeach ($arrEntries as $entry) {\n\t\t\tif ($entry['type'] == 'file') {\n\t\t\t\t$entry['name'] = str_replace('/', DS, $entry['name']);\n\n\t\t\t\t// We're processing a filename\n\t\t\t\t$index += 1;\n\n\t\t\t\t//Filename but without the extension (and no path)\n\t\t\t\t$filename = str_replace('.md', '', basename($entry['name']));\n\n\t\t\t\t// Relative filename like f.i.\n\t\t\t\t// docs/the_folder/a_note.md\n\t\t\t\t$id = str_replace($root, $rootNode, $entry['name']);\n\n\t\t\t\tif (PHP_7_0) {\n\t\t\t\t\tif ($bConvert) {\n\t\t\t\t\t\t// accent_conversion in settings.json has\n\t\t\t\t\t\t// been initialized to 1 => make the conversion\n\t\t\t\t\t\t$id = iconv('UTF-8', 'UTF-8//IGNORE', utf8_encode($id));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Right-click on a file = open it's HTML version\n\t\t\t\t$dataURL = str_replace($root, '', $entry['name']);\n\n\t\t\t\t// Should be relative to the /docs folder\n\t\t\t\t$dataURL = $aeSettings->getFolderDocs(false) . $dataURL;\n\t\t\t\t$dataURL = str_replace(DS, '/', $dataURL) . '.html';\n\n\t\t\t\t$sFileText = $filename;\n\n\t\t\t\t// If the title is really long, …\n\t\t\t\t// 30 characters in the treeview are enough\n\t\t\t\tif (strlen($sFileText) > TREEVIEW_MAX_FILENAME_LENGTH) {\n\t\t\t\t\t/* We'll truncate the filename to only the first ...\n\t\t\t\t\tthirty ... characters\n\t\t\t\t\tBut, special case, when the filename is truncated,\n\t\t\t\t\tif the very last position is an accentuated char.,\n\t\t\t\t\twe can't truncate exactly at that size because such\n\t\t\t\t\tcharacter is on two bytes. We can only keep the first\n\t\t\t\t\tone otherwise we'll have an encoding problem.\n\t\t\t\t\tSo, in this case, truncate one more char (so keep\n\t\t\t\t\t29 f.i.)\n\t\t\t\t\t*/\n\t\t\t\t\ttry {\n\t\t\t\t\t\t$wLen = TREEVIEW_MAX_FILENAME_LENGTH;\n\t\t\t\t\t\t$tmp = json_encode(substr($sFileText, 0, $wLen));\n\t\t\t\t\t\tif (json_last_error() === JSON_ERROR_UTF8) {\n\t\t\t\t\t\t\t$wLen--;\n\t\t\t\t\t\t\t$tmp = json_encode(substr($sFileText, 0, $wLen));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$sFileText = substr($sFileText, 0, $wLen) . ' …';\n\t\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t\t/*<!-- build:debug -->*/\n\t\t\t\t\t\tdie(\"<pre style='background-color:yellow;'>\" . __FILE__ . ' - ' . __LINE__ . ' ' . print_r($sFileText, true) . '</pre>');\n\t\t\t\t\t\t/*<!-- endbuild -->*/\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$dataBasename = $aeFiles->removeExtension(basename($dataURL));\n\n\t\t\t\t$dataFile = str_replace($root, '', $entry['name']);\n\t\t\t\t$dataFile = str_replace(DS, '/', $dataFile);\n\n\t\t\t\t$default_task = 'task.export.html';\n\n\t\t\t\t// In the list of files, help the jsTree plugin\n\t\t\t\t// to know that the action should be EDIT and not DISPLAY\n\t\t\t\t// when the user click on the note that was just created\n\t\t\t\t$lastAddedNote = trim($aeSession->get('last_added_note', ''));\n\n\t\t\t\tif ($dataBasename === $lastAddedNote) {\n\t\t\t\t\t$default_task = 'task.edit.form';\n\t\t\t\t}\n\n\t\t\t\tif (PHP_7_0) {\n\t\t\t\t\tif ($bConvert) {\n\t\t\t\t\t\t// accent_conversion in settings.json has\n\t\t\t\t\t\t// been initialized to 1 => make the conversion\n\t\t\t\t\t\t$sFileText = iconv('UTF-8', 'UTF-8//IGNORE', utf8_encode($sFileText));\n\n\t\t\t\t\t\t$dataBasename = iconv('UTF-8', 'UTF-8//IGNORE', utf8_encode($dataBasename));\n\n\t\t\t\t\t\t$dataFile = iconv('UTF-8', 'UTF-8//IGNORE', utf8_encode($dataFile));\n\n\t\t\t\t\t\t$dataURL = iconv('UTF-8', 'UTF-8//IGNORE', utf8_encode($dataURL));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$files[] = [\n\t\t\t\t\t'id' => md5($id),\n\t\t\t\t\t'icon' => 'file file-md',\n\t\t\t\t\t'text' => $sFileText,\n\t\t\t\t\t'data' => [\n\t\t\t\t\t\t'basename' => $dataBasename,\n\t\t\t\t\t\t'task' => $default_task,\n\t\t\t\t\t\t'file' => $dataFile,\n\t\t\t\t\t\t'url' => $dataURL\n\t\t\t\t\t],\n\t\t\t\t\t'state' => [\n\t\t\t\t\t\t'opened' => 0,\t// A file isn't opened\n\t\t\t\t\t\t'selected' => 0 // and isn't selected by default\n\t\t\t\t\t]\n\t\t\t\t];\n\t\t\t} elseif ($entry['type'] == 'folder') {\n\t\t\t\t// It's a folder\n\n\t\t\t\t// Derive the folder name\n\t\t\t\t// From c:/sites/marknotes/docs/the_folder, keep /the_folder/\n\t\t\t\t$fname = str_replace($root, '', $entry['name']);\n\t\t\t\t$fname = DS . ltrim(rtrim($fname, DS), DS) . DS;\n\n\t\t\t\t// The folder should start and end with the slash\n\t\t\t\t// so \"/the_folder/\" and not something else.\n\t\t\t\t$tmp = [\n\t\t\t\t\t'folder' => rtrim($root, DS) . $fname,\n\t\t\t\t\t'return' => true\n\t\t\t\t];\n\n\t\t\t\t$args = [&$tmp];\n\n\t\t\t\t// If the task.acls.cansee wasn't fired i.e. when\n\t\t\t\t// there was no folder to protect, the trigger even\n\t\t\t\t// return False. Otherwise, trigger return True :\n\t\t\t\t// the plugin has been fired\n\t\t\t\tif (static::$bACLsLoaded) {\n\t\t\t\t\t$bReturn = $aeEvents->trigger('task.acls.cansee::run', $args);\n\t\t\t\t} else {\n\t\t\t\t\t// ACLs plugin not loaded; every files / folders\n\t\t\t\t\t// can be accessed\n\t\t\t\t\t$args[0]['return'] = 1;\n\t\t\t\t\t$bReturn = true;\n\t\t\t\t}\n\n\t\t\t\t// The canSeeFolder event will initialize the 'return'\n\t\t\t\t// parameter to false when the current user can't see the\n\t\t\t\t// folder i.e. don't have the permission to see it. This\n\t\t\t\t// permission is defined in the acls plugin options\n\t\t\t\t//\n\t\t\t\t// See function run() of\n\t\t\t\t// MarkNotes\\Plugins\\Task\\ACLs\\cansee.php\n\t\t\t\t// for more information\n\t\t\t\t//\n\t\t\t\t// $bReturn === false ==> there was no protected folder.\n\t\t\t\tif (($bReturn === false) || ($args[0]['return'] === 1)) {\n\t\t\t\t\t//$dirs [] = utf8_decode($entry['name']);\n\t\t\t\t\t$dirs[] = $entry['name'];\n\t\t\t\t}\n\t\t\t} // if ($entry['type']=='folder')\n\t\t} // foreach\n\n\t\t// The current folder has been processed, are\n\t\t// there subfolders in it ?\n\t\tif (count($dirs) > 0) {\n\t\t\tforeach ($dirs as $d) {\n\t\t\t\tlist($arrChildren, $tmp) = self::makeJSON($d);\n\t\t\t\t$listDir['children'][] = $arrChildren;\n\t\t\t}\n\t\t}\n\n\t\tforeach ($files as $file) {\n\t\t\t$listDir['children'][] = $file;\n\t\t}\n\n\t\treturn [$listDir, $index];\n\t}",
"public static function get($type, $file) {\n return \\theme\\DIR . \"/assets/${type}/${file}.${type}\";\n }",
"public function getDirectory(): string;",
"function map_name_to_camera($path)\n{\n\n $path = $path . DIRECTORY_SEPARATOR . \"meta\";\n $fileList = new DirectoryIterator($path);\n foreach ($fileList as $fileinfo) {\n if ($fileinfo->getExtension() == \"json\") {\n $files[$fileinfo->getMTime()] = $fileinfo->getFilename();\n\n }\n }\n krsort($files);\n $latest = ($path . DIRECTORY_SEPARATOR . reset($files));\n if (file_exists($latest)) {\n $json = json_decode(file_get_contents($latest));\n $name = $json->meta->cameraName;\n return $name;\n } else {\n return \"JSON MISSING\";\n }\n}",
"private function readTypes() {\n $files = $this->path->read();\n\n foreach ($files as $file) {\n if ($file->isDirectory()) {\n continue;\n }\n\n $this->readType($file->getName());\n }\n }",
"public function loadFilesVendor()\r\n {\r\n $id = Input::get('ID');\r\n $uid = Input::get('UID');\r\n $project = Project::find($id);\r\n $files=[];\r\n if($project!=null)\r\n {\r\n $rol = $this->getRol($uid);\r\n $internalFiles = $project->filesByType(array('vendor',$rol));\r\n foreach($internalFiles as $file)\r\n {\r\n $files[]=['id'=>$file->id,'name'=>$file->fileName,'url'=>$file->url];\r\n }\r\n }\r\n return json_encode($files);\r\n }",
"function mimetypes()\n {\n return json_decode(file_get_contents(__DIR__.'/../../resources/data/mimetypes.json'), true);\n }",
"protected function getPattern(): string\n\t{\n\t\treturn $this->getDirectory() . $this->getGroup() . 'data_*_localized.json';\n\t}",
"function scan_students()\n {\n $current_students = [];\n $di = new RecursiveDirectoryIterator('students/');\n foreach (new RecursiveIteratorIterator($di) as $filename => $file) {\n $path_info = pathinfo($filename);\n if($path_info['extension']=='json'){\n array_push($current_students,$path_info['filename']);\n }\n }\n // echo print_r($current_students);\n return $current_students;\n }",
"function get_all_files($some_folder,$type){\n $rs = [];\n if ($handle = opendir($some_folder)) {\n while (false !== ($entry = readdir($handle))) {\n if ($entry != \".\" && $entry != \"..\") {\n $pathinfo = pathinfo($entry);\n if(!empty($pathinfo['extension'])){\n if($pathinfo['extension']==$type){\n $rs[]=$some_folder.\"/\".$entry;\n }\n }\n }\n }\n \n closedir($handle);\n }\n \n return $rs;\n }",
"protected function getResourceFilesRecurrent($type, $folder = '') {\r\n\t\t$files = array();\r\n\t\tif($folder == '') {\r\n\t\t\t$folder = \\simtpl\\application::getRootPath() . \"/resources/{$type}/controls\";\r\n\t\t}\r\n\t\t$files_in_folder = glob($folder . \"/*\");\r\n\t\tforeach($files_in_folder as $file_path) {\r\n\t\t\tif(is_dir($file_path)) {\r\n\t\t\t\t$files = array_merge($files, $this->getResourceFilesRecurrent($type, rtrim($file_path, \"\\\\/ \")));\r\n\t\t\t} elseif(preg_match(\"/^.+\\.{$type}$/i\", $file_path)) {\r\n\t\t\t\t$files[] = $file_path;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $files;\r\n\t}",
"function searchinPho_json($type, $id) {\n\t $base = \"https://inpho.cogs.indiana.edu\";\n\t $format = \"json\";\n\t $url = $base . '/' . $type . '/' . $id . '.' . $format;\n\t $data = @file_get_contents($url, o, null, null);\n\t return $data;\n\t}",
"public static function getPathType($type, $element, $folder, $client) {\n\t\tswitch($type) {\n\t\t\tcase 'plugin':\n\t\t\t\treturn Array('variable'=>'plg_xml', 'path_opt'=>$folder.'/'.$element);\n\t\t\t\tbreak;\n\t\t\tcase 'component':\n\t\t\t\treturn Array('variable'=>'com_xml', 'path_opt'=>$element);\n\t\t\t\tbreak;\n\t\t\tcase 'module':\n\t\t\t\treturn Array('variable'=>'mod'.intval($client).'_xml', 'path_opt'=>$element);\n\t\t\t\tbreak;\n\t\t}\n\t}",
"private function get_composer_json_path() {\n\t\treturn $this->composer_json_path;\n\t}",
"private function type($type) {\n\t\t$t = $this->api_map[$type];\n\t\t$t[\"url\"] = $this->get(\"store_url\") . $t[\"url\"] . \"?api_key=\".$this->get(\"api_key\");\n\t\treturn $t;\n\t}",
"function DNUI_get_all_dir_or_files($dir, $type) {\r\n if ($type == 0) {\r\n return DNUI_get_dirs(array($dir));\r\n } else if ($type == 1) {\r\n $out = array();\r\n $arrayDirOrFile = DNUI_scan_dir($dir);\r\n foreach ($arrayDirOrFile as $key => $value) {\r\n if (!is_dir($filename)) {\r\n array_push($out, $filename);\r\n }\r\n }\r\n return $out;\r\n }\r\n return array();\r\n}",
"public abstract function getDirectory();",
"function GetFolders($currentFolder, $type)\n{\n$trust_mode = $type != 'Image';\n\n // Array that will hold the folders names.\n $aFolders = array();\n\n $sServerDir = $trust_mode ? FCK_TRUSTUPLOAD_PATH . $currentFolder : FCK_UPLOAD_PATH . $currentFolder;\n $oCurrentFolder = opendir($sServerDir);\n\n while (($sFile = readdir($oCurrentFolder)) !== false) {\n if ($sFile != '.' && $sFile != '..' && is_dir($sServerDir . $sFile)) {\n $aFolders[] = '<Folder name=\"' . ConvertToXmlAttribute($sFile) . '\" />';\n }\n }\n\n closedir($oCurrentFolder);\n\n // Open the \"Folders\" node.\n echo \"<Folders>\";\n\n sort($aFolders);\n foreach ($aFolders as $sFolder) {\n echo $sFolder;\n }\n\n // Close the \"Folders\" node.\n echo \"</Folders>\";\n}",
"private function obtainFiles($dir,$type){\n $files = glob($dir.\"/{*.$type}\",GLOB_BRACE);\n $names =\"\";\n foreach ($files as $ima)\n $names[]=array_pop(explode(\"/\",$ima));\n if(!$names) return false;\n return $names;\n }",
"public function getName()\n {\n return 'oo_folder';\n }",
"public function loadFilesProject()\r\n {\r\n $id = Input::get('ID');\r\n $project = Project::find($id);\r\n $files=[];\r\n if($project!=null)\r\n {\r\n $internalAndPublicFiles = $project->filesByType(array('internal','public'));\r\n foreach($internalAndPublicFiles as $file)\r\n {\r\n $files[]=['id'=>$file->id,'name'=>$file->fileName,'url'=>$file->url,'date'=>$file->created_at];\r\n }\r\n }\r\n return json_encode($files);\r\n }",
"public static function templatePath($type= 'front'){\n $ci =& get_instance();\n return 'themes/'.$type;\n }",
"static public function getDir(){\n return __DIR__ . '/Adapter/Format/';\n }",
"function json_dir($ftp, $flag = FALSE, $value = FALSE, $bad_files = FALSE)\n{\n\t//flags\n $json_data = array();\n \n\t//save current directory\n\t$curdir = ftp_pwd($ftp);\n\n\t//current dir JSON\n $files = files_in_cur_dir($ftp,1);\n\n $parent_dir = array();\n //parent dir JSON\n \t//check for root, cdup returns true\n\tif($curdir!=='/' && @ftp_cdup($ftp)) {\n\t\t$parent_dir = files_in_cur_dir($ftp,0);\n\t\tftp_chdir($ftp, $curdir);\n\t}\n\t$json_data[SESSION_STATUS] = true;\n\tif($flag !== FALSE)\n\t{\n\t $json_data[$flag] = $value;\n\t if($flag === 'rmFile' && $value === 'false') {\n\t \t//include $files\n\t \t$json_data['rmFail'] = $bad_files;\n\t }\n\t}\n\t$json_data[CUR_DIR] = $curdir;\n\t$json_data[FILES] = $files;\n\t$json_data[PARENT_DIR] = $parent_dir;\n\treturn json_encode($json_data);\n}",
"function get_json_content_full_file_name(SupportedLanguages $supportedLanguage, string $pageName): string\n{\n return BASE_DIR.'/content/'.$pageName.'-'.$supportedLanguage->value.'.json';\n}",
"public function getDirectory();",
"public function getDirectory();",
"public function acf_json_save_dir( $path )\n {\n if( !$this->dev ) return $path;\n return $this->plugin_dir.'/data/acf-json/';\n }",
"function monk_json_load( $paths ) {\n\t\t\tunset($paths[0]);\n\t\t\t\n\t\t\t\n\t\t\t// append path\n\t\t\t$paths[] = get_stylesheet_directory() . '/acf-json';\n\t\t\t\n\t\t\t\n\t\t\t// return\n\t\t\treturn $paths;\n\t\t\t\n\t}",
"public function getAssetPath($type)\n {\n $src = $this->get('src', Config::get('theming.theme'));\n $path = '/' . $type . '/' . Str::ensureRight($src, '.' . $type);\n $manifest = $this->getManifest()->get($path);\n return $this->themeUrl($manifest ? $manifest : $path);\n }",
"function email_get_root_folder_name($type) {\n\n\tif ($type == EMAIL_INBOX) {\n\t\t$name = get_string('inbox', 'block_email_list');\n\t} else if ($type == EMAIL_SENDBOX) {\n\t\t$name = get_string('sendbox', 'block_email_list');\n\t} else if ($type == EMAIL_TRASH) {\n\t\t$name = get_string('trash', 'block_email_list');\n\t} else if ($type == EMAIL_DRAFT) {\n\t\t$name = get_string('draft', 'block_email_list');\n\t} else {\n\t\t// Type is not defined\n\t\t$name = '';\n\t}\n\n\treturn $name;\n}",
"public static function getAllResources($type){\n\t\t$template = themesDB::getThemeName();\n\t\t$folder = TEMPLATES_PATH.$template.'/'.$type.'/';\n\t\t$typePom = explode('_',$type);\n\t\t$files = baseFile::getFilesList($folder,$typePom[0]);\t\n\t\t$finalArr = array();\n\t\tforeach ($files as $file){\n\t\t\tif (preg_match('/main.css/', $file->path) or preg_match('/main.js/', $file->path) or preg_match('/less.css/', $file->path)) {\n\t\t\t\t$main[] = $file->path;\n\t\t\t}else{\n\t\t\t\t$finalArr[] = $file->path;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (is_array($main) and is_array($finalArr)) {\n\t\t\t$finalArr = array_merge($finalArr,$main);\n\t\t}elseif (is_array($main)){\n\t\t\t$finalArr = $main;\n\t\t}\n\n\t\treturn $finalArr;\n\t}",
"function efflab_cb_get_module_hierarchy( $contentType, $contentTypeSlug ) {\n // Check if a custom template exists in the theme folder, if not, load the plugin template file\n if ( file_exists( get_stylesheet_directory().'/effigylabs/acf-content-builder/modules/'.$contentTypeSlug.'/'.$contentTypeSlug.'.php') ) {\n \t$file = get_stylesheet_directory().'/effigylabs/acf-content-builder/modules/'.$contentTypeSlug.'/'.$contentTypeSlug.'.php';\n }\n else {\n $file = EFFLAB_CB_BASE_DIR .'/modules/'.$contentTypeSlug.'/'.$contentTypeSlug.'.php';\n }\n return $file ;\n}",
"public function getFolder()\n {\n return $this->config['folder'] . '/' . basename($this->themeSlug);\n }",
"function _templateFolder() {\n return Inflector::underscore(str_replace(\n 'Component', '', $this->toString()\n ));\n }"
] | [
"0.70150065",
"0.68049645",
"0.64805144",
"0.62121886",
"0.62039524",
"0.6192704",
"0.61773866",
"0.6164664",
"0.6017311",
"0.6006568",
"0.59874046",
"0.59389734",
"0.59311026",
"0.5891274",
"0.58490455",
"0.58218867",
"0.5793915",
"0.57829434",
"0.5710022",
"0.57071495",
"0.56922495",
"0.56864697",
"0.56517184",
"0.5599654",
"0.5598638",
"0.55985075",
"0.5568679",
"0.5535047",
"0.5535047",
"0.5535047",
"0.5535047",
"0.5532067",
"0.5530788",
"0.5519736",
"0.55180043",
"0.55171514",
"0.5516333",
"0.5502282",
"0.5493365",
"0.5485848",
"0.54843396",
"0.54843396",
"0.54843396",
"0.54843396",
"0.54843396",
"0.54843396",
"0.54843396",
"0.54843396",
"0.54641426",
"0.54628545",
"0.5449284",
"0.5435511",
"0.54231364",
"0.54191756",
"0.5390302",
"0.53820324",
"0.53798735",
"0.53683054",
"0.53640425",
"0.53495204",
"0.53495204",
"0.53495204",
"0.53495204",
"0.53434914",
"0.53322315",
"0.5332028",
"0.53312236",
"0.533072",
"0.5326427",
"0.5317824",
"0.5316903",
"0.53138155",
"0.5308016",
"0.5292546",
"0.52870846",
"0.5280628",
"0.526787",
"0.52667105",
"0.52661496",
"0.52660036",
"0.5262354",
"0.52584964",
"0.5240956",
"0.52366424",
"0.52355576",
"0.52355194",
"0.52335256",
"0.5232005",
"0.5228426",
"0.52242774",
"0.52235353",
"0.52235353",
"0.5219182",
"0.5218022",
"0.5217933",
"0.5205747",
"0.5201789",
"0.51984113",
"0.5198391",
"0.5193477"
] | 0.8447692 | 0 |
Save settings as json and set the last updated time | public function saveJson(string $name, string $content)
{
$path = $this->getJsonTypeFolder();
file_put_contents($path . DIRECTORY_SEPARATOR . $name . '.json', $content);
$this->setLastUpdated(time(), $name);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function saveSettings()\n {\n if (empty($this->settings)) {\n $this->loadSettings();\n }\n \n $this->saveJSON($this->settings);\n }",
"function saveSettings() {\n\tglobal $settings;\n\n\tfile_put_contents(\"settings.json\",json_encode($settings));\n}",
"public function save_settings()\n {\n if(isset($_POST) && isset($_POST['api_settings'])) {\n $data = $_POST['api_settings'];\n update_option('api_settings', json_encode($data));\n }\n }",
"function save_settings() {\n\t\t$this->update_option( static::SETTINGS_KEY, $this->settings );\n\t}",
"function settings_save_json($path)\n {\n }",
"public function save()\n\t{\n\t\t$json = json_encode($this->config, JSON_PRETTY_PRINT);\n\n\t\tif (!$h = fopen(self::$configPath, 'w'))\n\t\t{\n\t\t\tdie('Could not open file ' . self::$configPath);\n\t\t}\n\n\t\tif (!fwrite($h, $json))\n\t\t{\n\t\t\tdie('Could not write file ' . self::$configPath);\n\t\t}\n\n\t\tfclose($h);\n\t}",
"public function saveSettingAction(){\n $configKey = array('api_key', 'api_secret','include_folders','resize_auto',\n 'resize_image','min_size','max_size','compression_type_pdf','compression_type_png','compression_type_jpg','compression_type_gif', 'saving_auto', 'compress_auto', 'cron_periodicity', 'reindex_init');\n $coreConfig = Mage::getConfig();\n $post = $this->getRequest()->getPost();\n foreach ($configKey as $key) { \n if (isset($post[$key])) { \n $coreConfig->saveConfig(\"mageio_\".$key, Mage::helper('core')->escapeHtml($post[$key]))->cleanCache();\n }\n }\n\t\t$installed_time = Mage::getStoreConfig('mageio_installed_time');\n if(empty($installed_time)) {\n $installed_time = time();\n $coreConfig = Mage::getConfig();\n $coreConfig->saveConfig('mageio_installed_time', Mage::helper('core')->escapeHtml($installed_time))->cleanCache();\n }\n\t\t//Remove error message if set\n\t\t$coreConfig->saveConfig(\"mageio_errormessage\", Mage::helper('core')->escapeHtml(null))->cleanCache();\n\t\t\n\t\t$this->_redirect('imagerecycle/index/index');\n\t}",
"public function saveSettings()\n {\n $this->store->save($this->data);\n }",
"public function save()\n {\n $this->readCache();\n\n file_put_contents($this->filePath, json_encode($this->cacheContents));\n }",
"private function saveData() {\n // Create a new object with relevant information\n $data = new stdClass();\n $data->accessToken = $this->accessToken;\n $data->expirationDate = $this->expirationDate;\n $data->refreshToken = $this->refreshToken;\n\n // And save it to disk (will automatically create the file for us)\n file_put_contents(DATA_FILE, json_encode($data));\n }",
"public function save() {\n $this->lastModified = new \\DateTime();\n parent::save();\n }",
"public function save_settings() {\n\n\t\twoocommerce_update_options( $this->get_settings() );\n\t}",
"function refreshSettings() {\n\tglobal $settings;\n\n\t$settings = json_decode(file_get_contents('settings.json'), true);\n}",
"static public function save_setup_settings() {\n\n $data = WPP_F::parse_str( $_REQUEST[ 'data' ] );\n\n $_setup = array(\n 'api' => WPP_API_URL_STANDARDS,\n 'data' => $data,\n 'schema' => self::get_settings_schema()\n );\n\n $_current_settings = get_option('wpp_settings');\n\n $_modified_settings = WPP_F::extend( $_current_settings, $_setup['schema'] );\n\n //die( '<pre>' . print_r( $_modified_settings['field_alias'], true ) . '</pre>' );\n\n if( is_array( $_modified_settings['property_stats_groups'] ) ) {\n // $_modified_settings['property_stats_groups'] = array_unique( $_modified_settings['property_stats_groups'] );\n }\n\n // @note This kills c.rabbit.ci response via Varnish, perhaps some sort of log output somewhere.\n if( is_array( $_modified_settings['searchable_attributes'] ) ) {\n // $_modified_settings[ 'searchable_attributes' ] = array_unique( $_modified_settings[ 'searchable_attributes' ] );\n }\n\n // preserve field aliases\n $_modified_settings['field_alias'] = $_current_settings['field_alias'];\n\n $_modified_settings['_updated'] = time();\n\n update_option( 'wpp_settings', $_modified_settings );\n\n $posts_array = get_posts( array(\n 'posts_per_page' => 1,\n 'orderby' => 'date',\n 'order' => 'DESC',\n 'post_type' => 'property',\n 'post_status' => 'publish',\n 'suppress_filters' => true\n ) );\n\n $return[ 'props_single' ] = get_permalink( $posts_array[ 0 ]->ID );\n\n $return[ '_settings' ] = $data[ 'wpp_settings' ];\n\n self::flush_cache();\n\n wp_send_json( $return );\n\n }",
"function saveSettings()\n\t\t{\n\t\t\t$this->Init();\n\n\t\t\t$this->saveExternalSettings();\n\t\t\t\n\t\t\t$settings = serialize(array(\"settings\"=>$this->settings));\n\t\n\t\n\t\t\t$stream = mapi_openpropertytostream($this->store, PR_EC_WEBACCESS_SETTINGS, MAPI_CREATE | MAPI_MODIFY);\n\t\t\tmapi_stream_setsize($stream, strlen($settings));\n\t\t\tmapi_stream_seek($stream, 0, STREAM_SEEK_SET);\n\t\t\tmapi_stream_write($stream, $settings);\n\t\t\tmapi_stream_commit($stream);\n\t\n\t\t\tmapi_savechanges($this->store);\n\t\n\t\t\t// reload settings from store...\n\t\t\t$this->retrieveSettings();\n\t\t}",
"private function saveConfig() {\n \tself::$_configInstance = (object)$this->_data; \n file_put_contents($this->_data['cache_config_file'],serialize(self::$_configInstance)); \n }",
"public function save()\n\t{\n\t\t// -> means the file was never loaded because no setting was changed\n\t\t// -> means no need to save\n\t\tif ($this->settings === null) return;\n\t\t\n\t\t$yaml = Spyc::YAMLDump($this->settings);\n\t}",
"public function save_settings()\n\t{\n\t\t// Create settings array.\n\t\t$settings = array();\n\n\t\t// Loop through default settings and check for saved values.\n\t\tforeach (ee()->simple_cloner_settings->_default_settings as $key => $value)\n\t\t{\n\t\t\tif(($settings[$key] = ee()->input->post($key)) == FALSE)\n\t\t\t{\n\t\t\t\t$settings[$key] = $value;\n\t\t\t}\n\t\t}\n\n\t\t// Serialize settings array and update the extensions table.\n\t\tee()->db->where('class', $this->class_name.'_ext');\n\t\tee()->db->update('extensions', array('settings' => serialize($settings)));\n\n\t\t// Create alert when settings are saved and redirect back to settings page.\n\t\tee('CP/Alert')->makeInline('simple-cloner-save')\n\t\t\t->asSuccess()\n\t\t\t->withTitle(lang('message_success'))\n\t\t\t->addToBody(lang('preferences_updated'))\n\t\t\t->defer();\n\n\t\tee()->functions->redirect(ee('CP/URL')->make('addons/settings/simple_cloner'));\n\t}",
"private function storeSchedule()\n\t{\n\t\tfile_put_contents('schedule.json', json_encode(self::$schedule));\n\n\t\t// Sleeping 1/10s to avoid race conditions and reloading the file\n\t\tusleep(100000);\n\t\tself::loadSchedule();\n\t}",
"function save_settings(array $settings)\n {\n //if user is not active do not log changes\n if ($user = user()){\n $logs = [];\n foreach ($settings as $key => $value){\n //changed\n if (!settings($key) || settings($key) != $value){\n $old_val = settings($key);\n $logs[] = \"$user changed setting: '{$key}' from '{$old_val}' to '{$value}'\";\n }\n }\n }\n\n //sync settings and save\n \\Setting::set($settings);\n \\Setting::save();\n\n //log any changes\n if (!empty($logs))\n event(new \\App\\Events\\SettingsChanged($logs, $user));\n\n return $settings;\n }",
"public function afterSave()\n {\n // forget current data\n Cache::forget('julius_multidomain_settings');\n\n // get all records available now\n $cacheableRecords = Setting::generateCacheableRecords();\n\n //save them in cache\n Cache::forever('julius_multidomain_settings', $cacheableRecords);\n }",
"public function save()\n\t\t{\n#DS_Database_Archive::_log(__METHOD__.'()');\n\t\t\tif ( $this->_dirty ) {\n#DS_Database_Archive::_log(__METHOD__.'() data is dirty');\n\t\t\t\tif ( NULL !== $this->option_name ) {\n\t\t\t\t\tset_option( $this->option_name, $this->_options );\n\t\t\t\t} else if ( NULL !== $this->filename ) {\n\t\t\t\t\t// save to filesystem\n#DS_Database_Archive::_log(__METHOD__.'() saving to file ' . $this->filename);\n\t\t\t\t\t$output = json_encode( $this->_options, JSON_PRETTY_PRINT );\n#DS_Database_Archive::_log(__METHOD__.'() contents: ' . $output);\n\t\t\t\t\tfile_put_contents( $this->filename, $output );\n\t\t\t\t}\n\t\t\t\t$this->_dirty = FALSE;\n\t\t\t}\n\t\t}",
"public function save()\n {\n return update_option($this->optionName, $this->settings);\n }",
"public function Save() {\n\t\t\n\t\tglobal $sql;\n\t\tforeach( $this->settings as $option => $value ) {\n\t\t\t\n\t\t\t$this->update_option( $option, $value, $this->username );\n\t\t}\n\t}",
"private function _settings()\n\t{\n\t\tif(Utils::config('timestamps') or Utils::config('t'))\n\t\t\t$this->_timestamps = \"\\tpublic static \\$timestamps = true;\\n\\n\";\n\t}",
"protected static function setSyncLastTime()\n {\n DB::update(\"UPDATE `sync_last_time` SET timestamp = ? WHERE id=?\", [time(), 1]);\n }",
"function save_timestamp() {\n\t\t$this->timestamp = date('Y-m-d', time());\n\t}",
"function jsonSave()\n {\n try {\n file_put_contents($this->fname, json_encode($this->content));\n } catch (Exception $e) {\n echo $e;\n }\n }",
"public static function Save()\r\n {\r\n return update_option(self::OPT_SETTINGS, self::$Data);\r\n }",
"public function save_widget_state() {\n\n\t\tcheck_ajax_referer( 'mi-admin-nonce', 'nonce' );\n\n\t\t$default = self::$default_options;\n\t\t$current_options = $this->get_options();\n\n\t\t$reports = $default['reports'];\n\t\tif ( isset( $_POST['reports'] ) ) {\n\t\t\t$reports = json_decode( sanitize_text_field( wp_unslash( $_POST['reports'] ) ), true );\n\t\t\tforeach ( $reports as $report => $reports_sections ) {\n\t\t\t\t$reports[ $report ] = array_map( 'boolval', $reports_sections );\n\t\t\t}\n\t\t}\n\n\t\t$options = array(\n\t\t\t'width' => ! empty( $_POST['width'] ) ? sanitize_text_field( wp_unslash( $_POST['width'] ) ) : $default['width'],\n\t\t\t'interval' => ! empty( $_POST['interval'] ) ? absint( wp_unslash( $_POST['interval'] ) ) : $default['interval'],\n\t\t\t'compact' => ! empty( $_POST['compact'] ) ? 'true' === sanitize_text_field( wp_unslash( $_POST['compact'] ) ) : $default['compact'],\n\t\t\t'reports' => $reports,\n\t\t\t'notice30day' => $current_options['notice30day'],\n\t\t);\n\n\t\tarray_walk( $options, 'sanitize_text_field' );\n\t\tupdate_user_meta( get_current_user_id(), 'monsterinsights_user_preferences', $options );\n\n\t\twp_send_json_success();\n\n\t}",
"public function save_settings($settings)\n {\n }",
"function saveSettings()\n {\n\t if ( wfReadOnly() ) {\n\t\treturn;\n\t }\n\t if ( 0 == $this->mCedarId ) {\n\t\treturn;\n\t }\n\t \n\t $dbw =& wfGetDB( DB_MASTER );\n\t $dbw->update( 'cedar_user_info',\n\t\t array( /* SET */\n\t\t\t 'user_id' => $this->mId,\n\t\t\t 'organization' => $this->mOrg,\n\t\t\t 'address1' => $this->mAddress1,\n\t\t\t 'address2' => $this->mAddress2,\n\t\t\t 'city' => $this->mCity,\n\t\t\t 'state' => $this->mState,\n\t\t\t 'country' => $this->mCountry,\n\t\t\t 'postal_code' => $this->mPostalCode,\n\t\t\t 'phone' => $this->mPhone,\n\t\t\t 'mobile_phone' => $this->mMobilePhone,\n\t\t\t 'fax' => $this->mFax,\n\t\t\t 'supervisor_name' => $this->mSupervisorName,\n\t\t\t 'supervisor_email' => $this->mSupervisorEmail\n\t\t ), array( /* WHERE */\n\t\t\t 'user_info_id' => $this->mCedarId\n\t\t ), __METHOD__\n\t );\n\t $this->clearSharedCache();\n }",
"public function save_settings_callback() {\r\n $setting_data = $this->ajax_data['setting_data'];\r\n\r\n labb_update_options($setting_data);\r\n\r\n $template = false;\r\n // get new restore global settings panel\r\n if ($this->ajax_data['reset']) {\r\n ob_start();\r\n require_once('views/settings.php');\r\n $template = ob_get_clean();\r\n }\r\n\r\n $response = $this->ajax_response(true, $this->ajax_data['reset'], $template);\r\n return $response;\r\n\r\n }",
"protected function cacheSave() {\n $data = array();\n foreach ($this->properties as $prop) {\n $data[$prop] = $this->$prop;\n }\n //cache_set($this->id, $data, 'cache');\n }",
"public function saveSettings()\n {\n return $this->config->saveFile();\n }",
"function setPasswordUpdatedTime(){\n\t\t$this->setPasswordUpdated(time());\n\t}",
"public function save() {\n $configdata = $this->get('configdata');\n if (!array_key_exists('defaultvalue_editor', $configdata)) {\n $this->field->save();\n return;\n }\n\n if (!$this->get('id')) {\n $this->field->save();\n }\n\n // Store files.\n $textoptions = $this->value_editor_options();\n $tempvalue = (object) ['defaultvalue_editor' => $configdata['defaultvalue_editor']];\n $tempvalue = file_postupdate_standard_editor($tempvalue, 'defaultvalue', $textoptions, $textoptions['context'],\n 'customfield_textarea', 'defaultvalue', $this->get('id'));\n\n $configdata['defaultvalue'] = $tempvalue->defaultvalue;\n $configdata['defaultvalueformat'] = $tempvalue->defaultvalueformat;\n unset($configdata['defaultvalue_editor']);\n $this->field->set('configdata', json_encode($configdata));\n $this->field->save();\n }",
"public function appendTaskSettings(){\n $taskSettingsSerializer=new CloudDriverTaskSettingsSerializer($this->pmml,$this->miner->type);\n $taskSettingsSerializer->task=$this->task;\n $this->pmml=$taskSettingsSerializer->settingsFromJson($this->task->taskSettingsJson);\n }",
"public function save(array $options = [])\n {\n parent::save($options);\n\n // delete cache\n Cache::forget('Klaravel\\Settings\\Setting');\n }",
"function save_all() {\n\n // do not save another demo history if we already have one\n if (isset($this->ale_demo_history['demo_settings_date'])) {\n return;\n }\n\n $local_ale_demo_history = array();\n\n $local_ale_demo_history['page_on_front'] = get_option('page_on_front');\n $local_ale_demo_history['show_on_front'] = get_option('show_on_front');\n $local_ale_demo_history['nav_menu_locations'] = get_theme_mod('nav_menu_locations');\n\n $sidebar_widgets = get_option('sidebars_widgets');\n $local_ale_demo_history['sidebars_widgets'] = $sidebar_widgets;\n\n $used_widgets = $this->get_used_widgets($sidebar_widgets);\n\n\n if (is_array($used_widgets)) {\n foreach ($used_widgets as $used_widget) {\n $local_ale_demo_history['used_widgets'][$used_widget] = get_option('widget_' . $used_widget);\n }\n }\n\n $local_ale_demo_history['theme_options'] = get_option(ALETHEME_THEME_OPTIONS_NAME);\n $local_ale_demo_history['ale_social_networks'] = get_option('ale_social_networks');\n $local_ale_demo_history['demo_settings_date'] = time();\n update_option(ALETHEME_SHORTNAME . '_demo_history', $local_ale_demo_history);\n }",
"private function save() {\n global $config;\n\n //Save Config\n file_put_contents($config[\"usersFile\"],json_encode($this->users,JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT));\n }",
"private function _loadGlobalSettings(){\r\n\r\n $settings = ROOT.DS.'site'.DS.'content'.DS.'global_settings.json';\r\n\r\n if(file_exists($settings)){\r\n $this->globalSettings = json_decode(file_get_contents($settings));\r\n } else {\r\n $globalSettings = new stdClass();\r\n $globalSettings->website_name = '';\r\n $globalSettings->global_script = '';\r\n file_put_contents($settings, json_encode($globalSettings));\r\n }\r\n\r\n }",
"function saveSettings() {\n\t\t//# convert class variables into an array and save using\n\t\t//# Wordpress functions, \"update_option\" or \"add_option\"\n\t\t//#convert class into array...\n\t\t$settings_array = array();\n\t\t$obj = $this;\n\t\tforeach (array_keys(get_class_vars(get_class($obj))) as $k){\n\t\t\tif (is_array($obj->$k)) {\n\t\t\t\t//serialize any arrays within $obj\n\t\t\t\tif (count($obj->$k)>0) {\n\t\t\t\t\t$settings_array[$k] = esc_attr(serialize($obj->$k));\n\t\t\t\t} else {\n\t\t\t\t\t$settings_array[$k] = \"\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$settings_array[$k] = \"{$obj->$k}\";\n\t\t\t}\n\t\t}\n\t\t//#save array to options table...\n\t\t$options_check = get_option('wassup_settings');\n\t\tif (!empty($options_check)) {\n\t\t\tupdate_option('wassup_settings', $settings_array);\n\t\t} else {\n\t\t\tadd_option('wassup_settings', $settings_array, 'Options for WassUp');\n\t\t}\n\t\treturn true;\n\t}",
"public static function save()\n\t{\n\t\tConfigManager::save('discord', self::load(), 'config');\n\t}",
"public function setExecUpdateOnSave()\n {\n Configuration::updateValue('DF_UPDATE_ON_SAVE_LAST_EXEC', date('Y-m-d H:i:s'));\n }",
"public function save()\n {\n update_option($this->optionKey, $this->fields);\n }",
"public static function profile_model_saved($model) {\n\t\t$model->preference('timezone', Arr::get($_POST, 'timezone'));\n\t}",
"public function updateLog () {\n\t\t$this->log = json_encode($this->SYN_Log);\n\t\t$this->save();\n\t}",
"private function syncronize() {\n\t\t$existingsOptions = get_option( $this->getGatewayKey() );\n\n\t\t// Get the saved options in the object\n\t\t$options = $this->getSettings();\n\n\t\t// If options exists we need to merge them with the default ones\n\t\tif ( $existingsOptions ) {\n\t\t\tforeach ( $existingsOptions as $option ) {\n\t\t\t\tif ( isset( $options[ $option->getName() ] ) )\n\t\t\t\t\t$options[ $option->getName() ]->setValue( $option->getValue() );\n\t\t\t}\n\t\t}\n\n\t\t//$this->addSettings( $options );\n\t}",
"public function run()\n {\n DB::table('server_settings')->insert([\n [\n 'settings' => json_encode([\n 'locale' => [\n 'value' => 'en-US'\n ],\n ])\n ]\n ]);\n }",
"public function save()\n {\n $config_content = file_get_contents($this->config_path);\n\n foreach ($this->fields as $configuration => $value) {\n $config_content = str_replace(str_replace('\\\\', '\\\\\\\\', $value['default']), str_replace('\\\\', '\\\\\\\\', $this->configurations[$configuration]), $config_content);\n config([$value['config'] => str_replace('\\\\', '\\\\\\\\', $this->configurations[$configuration])]); //Reset the config value\n }\n\n file_put_contents($this->config_path, $config_content);\n }",
"private function setLastUpdateDate( $date ) {\n Mage::getModel('core/config')->saveConfig('taxjar/config/last_update', $date);\n }",
"public function updateLastPing()\n {\n $this->last_ping = Carbon::now();\n $this->save();\n }",
"public function save_timestamp($timestamp = 0)\n\t{\n\t\tif ($this->_EE->db->get_where('dd_settings', array('key' => 'last_saved'))->num_rows() == 0)\n\t\t{\n\t\t\t// new row\n\t\t\t$this->_EE->db->insert('exp_dd_settings', array('key' => 'last_saved', 'value' => $timestamp)); \n\t\t} else {\n\t\t\t// update row\n\t\t\t$this->_EE->db->where('key', 'last_saved')->update('dd_settings', array('value' => $timestamp));\n\t\t}\n\t}",
"public function save_settings($settings) {\n\t\n\t\tglobal $updraftplus;\n\t\t\n\t\t// Make sure that settings filters are registered\n\t\tUpdraftPlus_Options::admin_init();\n\t\t\n\t\t$more_files_path_updated = false;\n\n\t\tif (isset($settings['updraftplus_version']) && $updraftplus->version == $settings['updraftplus_version']) {\n\n\t\t\t$return_array = array('saved' => true);\n\t\t\t\n\t\t\t$add_to_post_keys = array('updraft_interval', 'updraft_interval_database', 'updraft_interval_increments', 'updraft_starttime_files', 'updraft_starttime_db', 'updraft_startday_files', 'updraft_startday_db');\n\t\t\t\n\t\t\t// If database and files are on same schedule, override the db day/time settings\n\t\t\tif (isset($settings['updraft_interval_database']) && isset($settings['updraft_interval_database']) && $settings['updraft_interval_database'] == $settings['updraft_interval'] && isset($settings['updraft_starttime_files'])) {\n\t\t\t\t$settings['updraft_starttime_db'] = $settings['updraft_starttime_files'];\n\t\t\t\t$settings['updraft_startday_db'] = $settings['updraft_startday_files'];\n\t\t\t}\n\t\t\tforeach ($add_to_post_keys as $key) {\n\t\t\t\t// For add-ons that look at $_POST to find saved settings, add the relevant keys to $_POST so that they find them there\n\t\t\t\tif (isset($settings[$key])) {\n\t\t\t\t\t$_POST[$key] = $settings[$key];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Check if updraft_include_more_path is set, if it is then we need to update the page, if it's not set but there's content already in the database that is cleared down below so again we should update the page.\n\t\t\t$more_files_path_updated = false;\n\n\t\t\t// i.e. If an option has been set, or if it was currently active in the settings\n\t\t\tif (isset($settings['updraft_include_more_path']) || UpdraftPlus_Options::get_updraft_option('updraft_include_more_path')) {\n\t\t\t\t$more_files_path_updated = true;\n\t\t\t}\n\t\t\t\n\t\t\t// Wipe the extra retention rules, as they are not saved correctly if the last one is deleted\n\t\t\tUpdraftPlus_Options::update_updraft_option('updraft_retain_extrarules', array());\n\t\t\tUpdraftPlus_Options::update_updraft_option('updraft_email', array());\n\t\t\tUpdraftPlus_Options::update_updraft_option('updraft_report_warningsonly', array());\n\t\t\tUpdraftPlus_Options::update_updraft_option('updraft_report_wholebackup', array());\n\t\t\tUpdraftPlus_Options::update_updraft_option('updraft_extradbs', array());\n\t\t\tUpdraftPlus_Options::update_updraft_option('updraft_include_more_path', array());\n\t\t\t\n\t\t\t$relevant_keys = $updraftplus->get_settings_keys();\n\n\t\t\tif (isset($settings['updraft_auto_updates']) && in_array('updraft_auto_updates', $relevant_keys)) {\n\t\t\t\t$updraftplus->set_automatic_updates($settings['updraft_auto_updates']);\n\t\t\t\tunset($settings['updraft_auto_updates']); // unset the key and its value to prevent being processed the second time\n\t\t\t}\n\n\t\t\tif (method_exists('UpdraftPlus_Options', 'mass_options_update')) {\n\t\t\t\t$original_settings = $settings;\n\t\t\t\t$settings = UpdraftPlus_Options::mass_options_update($settings);\n\t\t\t\t$mass_updated = true;\n\t\t\t}\n\n\t\t\tforeach ($settings as $key => $value) {\n\n\t\t\t\tif (in_array($key, $relevant_keys)) {\n\t\t\t\t\tif ('updraft_service' == $key && is_array($value)) {\n\t\t\t\t\t\tforeach ($value as $subkey => $subvalue) {\n\t\t\t\t\t\t\tif ('0' == $subvalue) unset($value[$subkey]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// This flag indicates that either the stored database option was changed, or that the supplied option was changed before being stored. It isn't comprehensive - it's only used to update some UI elements with invalid input.\n\t\t\t\t\t$updated = empty($mass_updated) ? (is_string($value) && UpdraftPlus_Options::get_updraft_option($key) != $value) : (is_string($value) && (!isset($original_settings[$key]) || $original_settings[$key] != $value));\n\n\t\t\t\t\tif (empty($mass_updated)) UpdraftPlus_Options::update_updraft_option($key, $value);\n\t\t\t\t\t\n\t\t\t\t\t// Add information on what has changed to array to loop through to update links etc.\n\t\t\t\t\t// Restricting to strings for now, to prevent any unintended leakage (since this is just used for UI updating)\n\t\t\t\t\tif ($updated) {\n\t\t\t\t\t\t$value = UpdraftPlus_Options::get_updraft_option($key);\n\t\t\t\t\t\tif (is_string($value)) $return_array['changed'][$key] = $value;\n\t\t\t\t\t}\n\t\t\t\t// @codingStandardsIgnoreLine\n\t\t\t\t} else {\n\t\t\t\t\t// This section is ignored by CI otherwise it will complain the ELSE is empty.\n\t\t\t\t\t\n\t\t\t\t\t// When last active, it was catching: option_page, action, _wpnonce, _wp_http_referer, updraft_s3_endpoint, updraft_dreamobjects_endpoint. The latter two are empty; probably don't need to be in the page at all.\n\t\t\t\t\t// error_log(\"Non-UD key when saving from POSTed data: \".$key);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$return_array = array('saved' => false, 'error_message' => sprintf(__('UpdraftPlus seems to have been updated to version (%s), which is different to the version running when this settings page was loaded. Please reload the settings page before trying to save settings.', 'updraftplus'), $updraftplus->version));\n\t\t}\n\t\t\n\t\t// Checking for various possible messages\n\t\t$updraft_dir = $updraftplus->backups_dir_location(false);\n\t\t$really_is_writable = UpdraftPlus_Filesystem_Functions::really_is_writable($updraft_dir);\n\t\t$dir_info = $this->really_writable_message($really_is_writable, $updraft_dir);\n\t\t$button_title = esc_attr(__('This button is disabled because your backup directory is not writable (see the settings).', 'updraftplus'));\n\t\t\n\t\t$return_array['backup_now_message'] = $this->backup_now_remote_message();\n\t\t\n\t\t$return_array['backup_dir'] = array('writable' => $really_is_writable, 'message' => $dir_info, 'button_title' => $button_title);\n\n\t\t// Check if $more_files_path_updated is true, is so then there's a change and we should update the backup modal\n\t\tif ($more_files_path_updated) {\n\t\t\t$return_array['updraft_include_more_path'] = $this->files_selector_widgetry('backupnow_files_', false, 'sometimes');\n\t\t}\n\t\t\n\t\t// Because of the single AJAX call, we need to remove the existing UD messages from the 'all_admin_notices' action\n\t\tremove_all_actions('all_admin_notices');\n\t\t\n\t\t// Moving from 2 to 1 ajax call\n\t\tob_start();\n\n\t\t$service = UpdraftPlus_Options::get_updraft_option('updraft_service');\n\t\t\n\t\t$this->setup_all_admin_notices_global($service);\n\t\t$this->setup_all_admin_notices_udonly($service);\n\t\t\n\t\tdo_action('all_admin_notices');\n\t\t\n\t\tif (!$really_is_writable) { // Check if writable\n\t\t\t$this->show_admin_warning_unwritable();\n\t\t}\n\t\t\n\t\tif ($return_array['saved']) { //\n\t\t\t$this->show_admin_warning(__('Your settings have been saved.', 'updraftplus'), 'updated fade');\n\t\t} else {\n\t\t\tif (isset($return_array['error_message'])) {\n\t\t\t\t$this->show_admin_warning($return_array['error_message'], 'error');\n\t\t\t} else {\n\t\t\t\t$this->show_admin_warning(__('Your settings failed to save. Please refresh the settings page and try again', 'updraftplus'), 'error');\n\t\t\t}\n\t\t}\n\t\t\n\t\t$messages_output = ob_get_contents();\n\t\t\n\t\tob_clean();\n\t\t\n\t\t// Backup schedule output\n\t\t$this->next_scheduled_backups_output('line');\n\t\t\n\t\t$scheduled_output = ob_get_clean();\n\t\t\n\t\t$return_array['messages'] = $messages_output;\n\t\t$return_array['scheduled'] = $scheduled_output;\n\t\t$return_array['files_scheduled'] = $this->next_scheduled_files_backups_output(true);\n\t\t$return_array['database_scheduled'] = $this->next_scheduled_database_backups_output(true);\n\t\t\n\t\t\n\t\t// Add the updated options to the return message, so we can update on screen\n\t\treturn $return_array;\n\t\t\n\t}",
"public function save()\n {\n return $this->service->saveTimeEntry($this);\n }",
"private function storeCacheSetting()\n {\n Cache::forever('setting', $this->setting->getKeyValueToStoreCache());\n }",
"protected function save()\n {\n $css = setcooki_path('plugin') . '/var/app.min.css';\n $json = setcooki_path('plugin'). '/var/options.json';\n $options = Option::get('wunderlist_todo_options', array());\n\n if(is_file($css))\n {\n @unlink($css);\n }\n if(is_file($json))\n {\n @chmod($json, 0755);\n }\n @file_put_contents($json, json_encode($options));\n }",
"public function save_settings( $settings ) {\n\t\t$settings['_multiwidget'] = 1;\n\t\tupdate_option( $this->option_name, $settings );\n\t}",
"public function refreshUpdated() {\n $this->setUpdated(new \\DateTime(\"now\"));\n}",
"public function saveSettings() {\n\t\t\tif ( isset( $_POST['muut_settings_save'] )\n\t\t\t\t&& $_POST['muut_settings_save'] == 'true'\n\t\t\t\t&& check_admin_referer( 'muut_settings_save', 'muut_settings_nonce' )\n\t\t\t) {\n\t\t\t\t$this->submittedSettings = $_POST['setting'];\n\n\t\t\t\t$settings = $this->settingsValidate( $this->getSubmittedSettings() );\n\n\t\t\t\t// Save all the options by passing an array into setOption.\n\t\t\t\tif ( muut()->setOption( $settings ) ) {\n\t\t\t\t\tif ( !empty( $this->errorQueue ) ) {\n\t\t\t\t\t\t// Display partial success notice if they were updated or matched the previous settings.\n\t\t\t\t\t\tmuut()->queueAdminNotice( 'updated', __( 'Settings successfully saved, other than the errors listed.', 'muut' ) );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Display success notice if they were updated or matched the previous settings.\n\t\t\t\t\t\tmuut()->queueAdminNotice( 'updated', __( 'Settings successfully saved.', 'muut' ) );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Display error if the settings failed to save.\n\t\t\t\t\tmuut()->queueAdminNotice( 'error', __( 'Failed to save settings.', 'muut' ) );\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"protected function saveConfig() {\n return $this->updateConfigValues(array(\n 'PAYNETEASY_END_POINT',\n 'PAYNETEASY_LOGIN',\n 'PAYNETEASY_SIGNING_KEY',\n 'PAYNETEASY_SANDBOX_GATEWAY',\n 'PAYNETEASY_PRODUCTION_GATEWAY',\n 'PAYNETEASY_GATEWAY_MODE'\n ));\n }",
"public function saveSettingsAjax()\n {\n $formId = absint($_REQUEST['form_id']);\n\n $css = $_REQUEST['custom_css'];\n $js = $_REQUEST['custom_js'];\n $css = wp_strip_all_tags(wp_unslash($css));\n $js = wp_unslash($js);\n\n $this->store($formId, '_custom_form_css', $css);\n $this->store($formId, '_custom_form_js', $js);\n\n wp_send_json_success([\n 'message' => __('Custom CSS and JS successfully updated', 'fluentform')\n ], 200);\n }",
"public function saveSettings()\n\t{\n\t\t$this->ensureAuthed();\n\t\t$input = Input::getInstance();\n\t\t$settings = $input->getInput('settings');\n\t\t$settingsManager = Settings::getInstance();\n\t\t$settingsManager->setSettings($this->username, $settings);\n\t\treturn true;\n\t}",
"private function set_last_updated_at() {\n\n\t\tif ( ! static::get_table() instanceof TimestampedTable ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$dirty = $this->is_dirty();\n\n\t\t$this->set_attribute( static::get_table()->get_updated_at_column(), $this->fresh_timestamp() );\n\n\t\t// If the model is dirty, we don't want to commit our save since the user should already be calling save.\n\t\tif ( ! $dirty ) {\n\t\t\t$this->save();\n\t\t}\n\t}",
"public function syncSettings()\n {\n $zone = $this->getZone();\n if (isset($zone['id'])) {\n $settingsConnection = $this->getSettingConnection();\n $zoneSettings = $settingsConnection->settings($zone['id']);\n\n if (!isset($zoneSettings['result']['errors'])) {\n $result = [];\n foreach ($zoneSettings['result'] as $setting) {\n if (is_array($setting['value'])) {\n $result[$setting['id']] = $this->jsonHelper->jsonEncode($setting['value']);\n } else {\n $result[$setting['id']] = $setting['value'];\n }\n }\n\n $groupForSave = $this->internScope->getThreeScope($result, 'zone_settings');\n $configData = [\n 'section' => $this->internScope->getSection(),\n 'website' => $this->internScope->getCurrentWebsite(),\n 'store' => $this->internScope->getCurrentStore(),\n 'groups' => $groupForSave,\n ];\n\n $configModel = $this->_configFactory->create(['data' => $configData]);\n $configModel->save();\n\n return true;\n }\n }\n\n return false;\n }",
"public function saveExportSetting($settings)\r\n {\r\n\r\n }",
"public function saveSettings(){\n\n $vars = $this->getAllSubmittedVariablesByName();\n\n $vars['email'] = $this->email;\n $vars['firstname'] = $this->firstname;\n $vars['lastname'] = $this->lastname;\n $vars['real_name'] = $this->firstname .' ' .$this->lastname;\n $vars['phone'] = $this->phone;\n\n $vars['name'] = $this->firstname;\n $vars['surname'] = $this->lastname;\n $vars['screen_name'] = $this->firstname;\n\n\n $vars['about_my_artwork'] = $this->getSubmittedVariableByName('about_my_artwork');\n $vars['what_i_like_to_do'] = $this->getSubmittedVariableByName('what_i_like_to_do');\n $vars['experience'] = $this->getSubmittedVariableByName('experience');\n $vars['instructions'] = $this->getSubmittedVariableByName('instructions');\n $vars['aftercare'] = $this->getSubmittedVariableByName('aftercare');\n $vars['apprenticeship'] = $this->getSubmittedVariableByName('apprenticeship');\n\n $this->saveNamedVariables($vars);\n }",
"public function saveConfigOptions() {}",
"protected function updateSettings()\n {\n $this->settings = array();\n $raw_settings = $this->db->fetchAll('SELECT name, value FROM settings');\n\n foreach ($raw_settings as $raw_setting) {\n $this->settings[$raw_setting['name']] = $raw_setting['value'];\n }\n }",
"public function getJsonSettings()\n {\n return Mage::helper('core')->jsonEncode($this->_settings);\n }",
"public function save()\n {\n file_put_contents(\"address.json\", json_encode($this->content));\n }",
"public function updateLastUpdateDateTime() {\n\t\t// open file\n\t\t$lastUpdateStorageFile = fopen($this::LAST_UPDATE_STORAGE_FILE, $this::FILE_READ_WRITE_MODE);\n\t\t\n\t\t// Last update dateTime\n\t\t$date = new \\Datetime();\n\t\n\t\t// write the last update datetime\n\t\t$lastUpdateDateTime = fputs($lastUpdateStorageFile, $date->format('Y-m-d H:i:s'));\n\t\n\t\t// Close the file\n\t\tfclose($lastUpdateStorageFile);\n\t\n\t\treturn $lastUpdateDateTime;\n\t}",
"private function initLastSaves() {\n // Prepare last crawled and last recrawled posts\n $this->lastCrawledPosts = $this->getLastPosts('saved_at', get_option(SettingKey::WPCC_DASHBOARD_COUNT_LAST_CRAWLED_POSTS, 10));\n $this->lastRecrawledPosts = $this->getLastPosts('recrawled_at', get_option(SettingKey::WPCC_DASHBOARD_COUNT_LAST_RECRAWLED_POSTS, 10));\n\n // Prepare last added URLs\n $this->lastUrlsInQueue = $this->getLastAddedUrls(get_option(SettingKey::WPCC_DASHBOARD_COUNT_LAST_URLS, 10));\n\n // Prepare last deleted URLs\n $this->lastUrlsMarkedAsDeleted = $this->getLastDeletedUrls(get_option(SettingKey::WPCC_DASHBOARD_COUNT_LAST_DELETED_URLS, 10));\n }",
"public function settings_save()\n {\n $method = rcube_utils::get_input_value('_method', rcube_utils::INPUT_POST);\n $data = @json_decode(rcube_utils::get_input_value('_data', rcube_utils::INPUT_POST), true);\n\n $rcmail = rcmail::get_instance();\n $storage = $this->get_storage($rcmail->get_user_name());\n $success = false;\n $errors = 0;\n $save_data = array();\n\n if ($driver = $this->get_driver($method)) {\n if ($data === false) {\n if ($this->check_secure_mode()) {\n // remove method from active factors and clear stored settings\n $success = $driver->clear();\n }\n else {\n $errors++;\n }\n }\n else {\n // verify the submitted code before saving\n $verify_code = rcube_utils::get_input_value('_verify_code', rcube_utils::INPUT_POST);\n $timestamp = intval(rcube_utils::get_input_value('_timestamp', rcube_utils::INPUT_POST));\n if (!empty($verify_code)) {\n if (!$driver->verify($verify_code, $timestamp)) {\n $this->api->output->command('plugin.verify_response', array(\n 'id' => $driver->id,\n 'method' => $driver->method,\n 'success' => false,\n 'message' => str_replace('$method', $this->gettext($driver->method), $this->gettext('codeverificationfailed'))\n ));\n $this->api->output->send();\n }\n }\n\n foreach ($data as $prop => $value) {\n if (!$driver->set($prop, $value)) {\n $errors++;\n }\n }\n\n $driver->set('active', true);\n }\n\n // commit changes to the user properties\n if (!$errors) {\n if ($success = $driver->commit()) {\n $save_data = $data !== false ? $this->format_props($driver->props()) : array();\n }\n else {\n $errors++;\n }\n }\n }\n\n if ($success) {\n $this->api->output->show_message($data === false ? $this->gettext('factorremovesuccess') : $this->gettext('factorsavesuccess'), 'confirmation');\n $this->api->output->command('plugin.save_success', array(\n 'method' => $method,\n 'active' => $data !== false,\n 'id' => $driver->id) + $save_data);\n }\n else if ($errors) {\n $this->api->output->show_message($this->gettext('factorsaveerror'), 'error');\n $this->api->output->command('plugin.reset_form', $method);\n }\n\n $this->api->output->send();\n }",
"public function refreshUpdated()\n {\n $this->setUpdated(new \\DateTime());\n }",
"protected function getTimeLastSaved()\n {\n return SiteConfig::current_site_config()->VimeoFeed_LastSaved;\n }",
"private function saveData(): void\n {\n $this->tab_chat_call->call_update = gmdate(\"Y-m-d H:i:s\"); //data e hora UTC\n $result = $this->tab_chat_call->save();\n\n if ($result) {\n $this->Result = true;\n $this->Error = [];\n $this->Error['msg'] = \"Sucesso!\";\n $this->Error['data']['call'] = $this->tab_chat_call->call_id;\n } else {\n $this->Result = false;\n $this->Error = [];\n $this->Error['msg'] = $this->tab_chat_call->fail()->getMessage();\n $this->Error['data'] = null;\n }\n }",
"public function run()\n {\n Settings::create([\n \t'content'=>'{\"zoom\":\"5\",\"center_lat\":\"47.5162\",\"center_lng\":\"14.5501\",\"adds\":null,\"api\":null}',\n \t'logo'=>'uploads/logo.png',\n \t'favicon'=>'uploads/favicon.ico',\n ]);\n }",
"protected static function setSettingData($arSettings)\r\n\t{\r\n\t\treturn (boolean)file_put_contents(__DIR__ . '/settings.json', static::wrapData($arSettings));\r\n\t}",
"function SaveSettings()\n\t{\n\t\t$this->GetDb();\n\n\t\t$tempSettings = $this->Db->Quote(serialize($this->settings));\n\t\t$tempUserID = intval($this->userid);\n\n\t\t$query = \"\n\t\t\tUPDATE [|PREFIX|]users\n\t\t\tSET settings='{$tempSettings}'\n\t\t\tWHERE userid={$tempUserID}\n\t\t\";\n\n\t\t$result = $this->Db->Query($query);\n\t\tif (!$result) {\n\t\t\tlist($error, $level) = $this->Db->GetError();\n\t\t\ttrigger_error($error, $level);\n\t\t\treturn false;\n\t\t}\n\n\t\t$currentUser = IEM::userGetCurrent();\n\t\tif ($currentUser && $currentUser->userid == $this->userid) {\n\t\t\tIEM::userFlushCache();\n\t\t}\n\n\t\treturn true;\n\t}",
"public function setSysLastChanged() {}",
"public function saveJson()\n {\n $ExtensionData = new ExtensionData();\n $ExtensionData->SubmittedByID = Member::currentUserID();\n $result = $this->dataFields($ExtensionData);\n return $result ;\n }",
"public function setLastUpdate()\n {\n Mage::app()->saveCache(time(), 'admin_notifications_lastcheck');\n// $config = Mage::getModel('core/config');\n// /* @var $config Mage_Core_Model_Config */\n// $config->saveConfig(self::XML_LAST_UPDATE_PATH, time());\n return $this;\n }",
"public function loadSettings()\n {\n $this->loadJSON($this->settings);\n }",
"public function config_save() {\n }",
"public function onPreUpdate()\r\n {\r\n $this->updated_at = new \\DateTime(\"now\");\r\n }",
"public function cached_timestamp()\n\t{\n\t\t$query = $this->_EE->db->get_where('dd_settings', array('key' => 'last_saved'));\n\t\treturn ($query->num_rows() > 0) ? $query->row()->value : 0 ;\n\t}",
"public function setUpdatedAtValue()\n {\n $this->updatedAt = new \\DateTime();\n }",
"public function setUpdatedAtValue()\n {\n $this->updatedAt = new \\DateTime();\n }",
"public function setUpdatedAtValue()\n {\n $this->updatedAt = new \\DateTime();\n }",
"public function updateStatus(): void\n {\n $data = json_encode($this->getStatus(), JSON_PRETTY_PRINT);\n File::put(public_path(self::STATUS_FILE_NAME), $data);\n }",
"public function saveCache()\n {\n if($this->isCacheExists()){\n if($this->isUpdateRequired()){\n $this->updateCache();\n }\n } else {\n $this->packData()->writeFile();\n }\n }",
"public function run()\n {\n (new Settings([\n 'key' => 'client_firstLogin',\n 'value' => 'https://www.youtube.com/embed/IHjNcp_4QCs'\n ]))->save();\n (new Settings([\n 'key' => 'client_Home',\n 'value' => 'https://www.youtube.com/embed/IHjNcp_4QCs'\n ]))->save();\n (new Settings([\n 'key' => 'client_ProfileCreate',\n 'value' => 'https://www.youtube.com/embed/IHjNcp_4QCs'\n ]))->save();\n (new Settings([\n 'key' => 'client_Profile',\n 'value' => 'https://www.youtube.com/embed/IHjNcp_4QCs'\n ]))->save();\n (new Settings([\n 'key' => 'vendor_firstLogin',\n 'value' => 'https://www.youtube.com/embed/IHjNcp_4QCs'\n ]))->save();\n (new Settings([\n 'key' => 'vendor_Home',\n 'value' => 'https://www.youtube.com/embed/IHjNcp_4QCs'\n ]))->save();\n (new Settings([\n 'key' => 'vendor_Profile',\n 'value' => 'https://www.youtube.com/embed/IHjNcp_4QCs'\n ]))->save();\n (new Settings([\n 'key' => 'vendor_ProfileCreate',\n 'value' => 'https://www.youtube.com/embed/IHjNcp_4QCs'\n ]))->save();\n (new Settings([\n 'key' => 'vendor_SolutionsHome',\n 'value' => 'https://www.youtube.com/embed/IHjNcp_4QCs'\n ]))->save();\n (new Settings([\n 'key' => 'accenture_Home',\n 'value' => 'https://www.youtube.com/embed/IHjNcp_4QCs'\n ]))->save();\n (new Settings([\n 'key' => 'accenture_NewProjectSetUp',\n 'value' => 'https://www.youtube.com/embed/IHjNcp_4QCs'\n ]))->save();\n (new Settings([\n 'key' => 'accenture_ValueTargeting',\n 'value' => 'https://www.youtube.com/embed/IHjNcp_4QCs'\n ]))->save();\n (new Settings([\n 'key' => 'accenture_Conclusions',\n 'value' => 'https://www.youtube.com/embed/IHjNcp_4QCs'\n ]))->save();\n (new Settings([\n 'key' => 'client_NewProjectSetUp',\n 'value' => 'https://www.youtube.com/embed/IHjNcp_4QCs'\n ]))->save();\n (new Settings([\n 'key' => 'client_Conclusions',\n 'value' => 'https://www.youtube.com/embed/IHjNcp_4QCs'\n ]))->save();\n (new Settings([\n 'key' => 'vendor_NewApplication',\n 'value' => 'https://www.youtube.com/embed/IHjNcp_4QCs'\n ]))->save();\n }",
"public function save_settings() {\n\n if (!isset($_REQUEST['action']) || !isset($_GET['page']))\n return;\n\n if ('swpm-settings' !== $_GET['page'])\n return;\n\n if ('swpm_settings' !== $_REQUEST['action'])\n return;\n\n check_admin_referer('swpm-update-settings');\n\n $data = array();\n\n foreach ($_POST['swpm-settings'] as $key => $val) {\n $data[$key] = esc_html($val);\n }\n\n update_option('swpm-settings', $data);\n }",
"function core_auto_updates_settings()\n {\n }",
"public function assertUpdateDefaults() {\n\t\t\t$this->set('lastModified', 'NOW()', false);\n\t\t\t$this->enclose('lastModified', false);\n\t\t}",
"public function setModifiedValue()\n {\n $this->setModified(new \\DateTime());\n }",
"function notification_user_settings_save() {\n\tglobal $CONFIG;\n\t//@todo Wha??\n\tinclude($CONFIG->path . \"actions/notifications/settings/usersettings/save.php\");\n}",
"public static function update()\n {\n $json = json_encode(self::get());\n $json = Utils::json_pretty_print($json);\n file_put_contents(CACHEDIR . \"filter-keys/filter_keys.json\", $json);\n }",
"public function save_settings() {\n\n\t\tif ( !isset( $_REQUEST['action'] ) || !isset( $_GET['page'] ) )\n\t\t\treturn;\n\n\t\tif ( 'vfb-settings' !== $_GET['page'] )\n\t\t\treturn;\n\n\t\tif ( 'vfb_settings' !== $_REQUEST['action'] )\n\t\t\treturn;\n\n\t\tcheck_admin_referer( 'vfb-update-settings' );\n\n\t\t$data = array();\n\n\t\tforeach ( $_POST['vfb-settings'] as $key => $val ) {\n\t\t\t$data[ $key ] = esc_html( $val );\n\t\t}\n\n\t\tupdate_option( 'vfb-settings', $data );\n\t}"
] | [
"0.7405312",
"0.6793265",
"0.6640655",
"0.65956676",
"0.65198445",
"0.6450654",
"0.6404701",
"0.6340072",
"0.62275654",
"0.6214429",
"0.6209452",
"0.6187868",
"0.6122784",
"0.6117731",
"0.60385954",
"0.6028505",
"0.6024241",
"0.6006386",
"0.59223825",
"0.5914149",
"0.58978826",
"0.5896169",
"0.5895941",
"0.5892547",
"0.5888638",
"0.5886926",
"0.58852327",
"0.5872864",
"0.5866304",
"0.5855779",
"0.5852883",
"0.58215773",
"0.5806017",
"0.5787617",
"0.5744212",
"0.57293534",
"0.5711935",
"0.5698445",
"0.567949",
"0.5673522",
"0.56676835",
"0.5665582",
"0.56583333",
"0.5652703",
"0.5650412",
"0.56219953",
"0.5620412",
"0.5611804",
"0.5601771",
"0.55882025",
"0.5587021",
"0.558689",
"0.5581615",
"0.5579359",
"0.5570728",
"0.55572075",
"0.55522215",
"0.5543352",
"0.5538668",
"0.55196285",
"0.5511406",
"0.55082625",
"0.5503144",
"0.5488615",
"0.5470157",
"0.54516655",
"0.54497963",
"0.54469013",
"0.54413253",
"0.5439265",
"0.5436183",
"0.5429231",
"0.54289764",
"0.54238516",
"0.5420064",
"0.54136485",
"0.5407853",
"0.5402143",
"0.5401806",
"0.53963166",
"0.5395929",
"0.53951824",
"0.53914404",
"0.5384693",
"0.5381755",
"0.537606",
"0.53749007",
"0.5372285",
"0.53697985",
"0.53697985",
"0.53697985",
"0.5366812",
"0.53599113",
"0.5354286",
"0.53512186",
"0.5346718",
"0.53450245",
"0.5339056",
"0.5327874",
"0.5320821",
"0.53165126"
] | 0.0 | -1 |
Read a json file | public function parseJson(string $file)
{
$content = file_get_contents($file);
return \json_decode($content);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function json_read($filename){\n return json_decode(file_get_contents($filename));\n}",
"function readJsonFile($filename) {\n\t$json = json_decode(@file_get_contents($filename),true);\n\tif ( ! is_array($json) ) $json = array();\n\treturn $json;\n}",
"function readJson($filename) {\n \n $text = trim(@file_get_contents($filename));\n if($text === '') return null;\n \n $json = @json_decode($text, true);\n \n return $json;\n \n }",
"function json_read($opt){\n\n if(($raw_json = file_get_contents($opt->in_filename)) === false){\n err(\"Could not read file\",2);\n }\n if (($json_data = json_decode($raw_json,false)) === NULL) {\n err(\"While reading input data\",4);\n }\n if (is_object($json_data) && empty($json_data)) {\n err(\"Could not read file\",2);\n }\n return $json_data;\n }",
"function readJSON($file) {\n //JSON Bib einlesen und zurückgeben\n $Lesesaalampel = json_decode($file, true);\n return $Lesesaalampel;\n}",
"static function readJSON($json_file_url) {\n return json_decode(file_get_contents($json_file_url), true);\n }",
"protected static function read_json_file($file_path)\n {\n }",
"private function readJson($filename)\n {\n if (!is_file($filename)) {\n throw new \\InvalidArgumentException('File not found: ' . $filename);\n }\n\n return json_decode(file_get_contents($filename), true);\n }",
"private function loadJson($file) {\n\n $contents = File::get($file);\n\n if ( !$contents ) {\n return false;\n }\n\n $json = json_decode($contents, true);\n\n return $json;\n\n }",
"function getJson($file)\n {\n //saving the string from the files in the variable\n $contents = file_get_contents($file);\n \n //decoding the json string\n $arr = json_decode($contents, true);\n //returning the decoded array\n return $arr;\n }",
"public function readFile() {\n $content = $this->getFileContents();\n return json_decode($content, 1);\n }",
"public static function parseJson($filename){\n \\Framework\\Logger::debug('json file \"'.$filename.'\" was called', 'jsonHandler\\parse');\n $return = array();\n if(file_exists($filename)){\n \\Framework\\Logger::debug('File \"'.$filename.'\" exists.', 'jsonHandler\\parse');\n \n $filecontent = file_get_contents($filename);\n if($filecontent===false){\n \\Framework\\Logger::error('Error loading file \"'.$filename.'\": file not readable?', 'jsonHandler\\parse');\n throw new \\Exception('Error loading file \"'.$filename.'\": file not readable?');\n } else {\n $return = json_decode($filecontent, true);\n if(!$return){\n \\Framework\\Logger::error('Error decoding json file \"'.$filename.'\": not a valid json file?', 'jsonHandler\\parse');\n throw new \\Exception('Error decoding json file \"'.$filename.'\": not a valid json file?');\n }\n }\n \n } else {\n \\Framework\\Logger::error('Error loading file \"'.$filename.'\": file does not exist?', 'jsonHandler\\parse');\n throw new \\Exception('Error loading file \"'.$filename.'\": file does not exist?');\n }\n \n return $return;\n }",
"function readJson($fileName, $default = null) {\n if(!file_exists($fileName)) {\n return $default;\n }\n $json = file_get_contents($fileName);\n return json_decode($json, true); //(true)-return assoc array\n}",
"private function loadJson(){\n if(file_exists($this->fullPath.$this->jsonFile)) {\n $arCfg = get_object_vars(json_decode(file_get_contents($this->fullPath.$this->jsonFile)));\n $this->loadConfigs($arCfg);\n }\n }",
"function json_get_contents( $path ){\n $result = json_file_to_array( $path );\n \n if( is_array( $result ) ){\n \n return $result;\n \n } else {\n \n // Try something else\n \n }\n}",
"public function read($filename)\n {\n $file = fopen($filename, 'r');\n $json = fread($file, filesize($filename));\n fclose($file);\n $array = (array)json_decode($json);\n foreach ($array as $key => $value) {\n $this[$key] = $value;\n }\n unset($file);\n unset($json);\n unset($array);\n }",
"public function read(): mixed\n {\n return json_decode(file_get_contents($this->path), true, 512, JSON_THROW_ON_ERROR);\n }",
"function get_file($filename){\n\t\t$string=file_get_contents($filename);\n\t\t$json=json_decode($string, true);\n\t\treturn $json;\n\t}",
"function getJSON($file){\n\t$data = file_get_contents($file);\n\t\n\tif($data){\n\t\t$decode = json_decode($data, FILE_USE_INCLUDE_PATH);\n\t}\n\telse{\n\t\t$decode = NULL;\n\t}\n\treturn $decode;\n}",
"public static function loadJSONFile(string $filepath) {\n $basepath = dirname(__FILE__);\n\n $fullpath = $basepath . $filepath;\n $filedata = file_get_contents($fullpath);\n\n return json_decode($filedata, true);\n }",
"public function getJsonConfigfile(){\n $json = file_get_contents( $this->config_base_path.$this->jsonFile);\n //Decode JSON\n $array = json_decode($json,true);\n return $array;\n }",
"public function getJsonConfigfile(){\n $json = file_get_contents( $this->config_base_path.$this->jsonFile);\n //Decode JSON\n $array = json_decode($json,true);\n return $array;\n }",
"function json_load($file)\n{\n $data = [];\n if (file_exists($file)) {\n $data = to_charset(file_get_contents($file));\n $data = json_decode(\n mb_convert_encoding($data, 'UTF-8', \"auto\"), true, 512,\n JSON_OBJECT_AS_ARRAY || JSON_BIGINT_AS_STRING\n );\n }\n if (null === $data) {\n return json_last_error_msg();\n }\n if (is_array($data)) {\n $data = to_charset($data);\n }\n return $data;\n}",
"function getJson($fileName){\n $file = __DIR__ . \"/settings/$fileName.json\";\n if(file_exists($file)){\n return json_decode(file_get_contents($file), true);\n }else{\n return array();\n }\n}",
"static function json($file)\n {\n $content=file_get_contents($file);\n $content=substr($content, strpos($content, '{'));\n $content= json_decode($content, true);\n switch (json_last_error()) {\n case JSON_ERROR_NONE:\n break;\n case JSON_ERROR_DEPTH:\n echo \"$file — Maximum stack depth exceeded\\n\";\n break;\n case JSON_ERROR_STATE_MISMATCH:\n echo \"$file — Underflow or the modes mismatch\\n\";\n break;\n case JSON_ERROR_CTRL_CHAR:\n echo \"$file — Unexpected control character found\\n\";\n break;\n case JSON_ERROR_SYNTAX:\n echo \"$file — Syntax error, malformed JSON\\n\";\n break;\n case JSON_ERROR_UTF8:\n echo \"$file — Malformed UTF-8 characters, possibly incorrectly encoded\\n\";\n break;\n default:\n echo \"$file — Unknown error\\n\";\n break;\n }\n return $content;\n }",
"function load_json($url=\"assets/json/datalist.json\"){\n if(!$raw_file = file_get_contents($url)){\n $error = error_get_last();\n // echo \"HTTP request failed. Error was: \" . $error['message'];\n }\n else{\n return json_decode($raw_file);\n }\n}",
"protected function readDataFile($filename)\n {\n $dataJson = file_get_contents(__DIR__ . '/../data/' . $filename);\n return json_decode($dataJson, true);\n }",
"function getItemsFromFile()\n{\n return json_decode(file_get_contents(__DIR__ . '/' . JSON_DATA_FILE), true);\n}",
"protected function openJson()\n {\n if (!file_exists($this->configPath))\n {\n throw new exceptions\\FileException('The configuration file is corrupted or don\\'t exist' );\n }\n else\n {\n $json = file_get_contents($this->configPath);\n $this->config = json_decode($json, TRUE);\n if ($error = json_last_error_msg())\n {\n throw new exceptions\\JsonException (sprintf(\"Failed to parse json string '%s', error: '%s'\", $this->config, $error));\n }\n }\n }",
"public static function readFromFile()\n {\n $jsonResult = file_get_contents('../data/solutions.json');\n $solutions = json_decode($jsonResult);\n return $solutions;\n }",
"public function loadJson($filename)\n {\n $result = false;\n if (file_exists($filename) && is_file($filename)) {\n $json = file_get_contents($filename);\n $data = json_decode($json, true);\n if (is_array($data)) {\n foreach ($data as $name => $value) {\n $this->__set($name, $value);\n }\n $result = true;\n }\n }\n return $result;\n }",
"protected function getJsonData($file)\n {\n return json_decode(file_get_contents($file));\n }",
"private function getJson(string $filename): array\n {\n TestCase::assertFileExists($filename);\n\n $json = json_decode(file_get_contents($filename), true);\n\n if ($json === null) {\n TestCase::fail(json_last_error_msg());\n }\n\n return $json;\n }",
"public function read()\n {\n $this->content = json_decode(file_get_contents(\"address.json\"), true);\n }",
"public function load()\n {\n if (!file_exists($this->filePath)) {\n throw new FileNotFoundException(\"File '{$this->filePath}' does not exist!\");\n }\n $data = file_get_contents($this->filePath);\n\n $this->result = json_decode($data, true);\n if (json_last_error() !== JSON_ERROR_NONE) {\n throw new JsonDecodeException(\"Error with data: \" . json_last_error_msg());\n }\n\n return $this->result;\n }",
"protected function getJsonContent()\n {\n return file_get_contents($this->jsonFile);\n }",
"function open_json($json_path,$folder,$name){\n\t$dir = $json_path.$folder.'/';\n\tif(!file_exists($dir)){\n\t\treturn 'no folder';\n\t}\n\tif(!file_exists($dir.$name.'.json')){\n\t\treturn 'no json';\n\t}\n\treturn file_get_contents($dir.$name.'.json');\n}",
"protected function read()\n {\n if (file_exists($this->file)) {\n $data = json_decode(file_get_contents($this->file));\n\n static::$epoch = (int)$data->epoch;\n static::$iteration = (int)$data->iteration;\n $this->network = $data->network;\n $this->a = (float)$data->a;\n $this->e = (float)$data->e;\n }\n }",
"public static function readJSON($file, $namespace = \"\") {\n\t\t$json = false;\n\n\t\t$path = DATA . \"/\" . $namespace . \"/\";\n\t\t$path = preg_replace('#/+#', '/', $path);\n\n\t\t$file = pathinfo($file, PATHINFO_FILENAME);\n\n\t\tif (is_readable($path . $file . '.json')) {\n\t\t\t$json = file_get_contents($path . $file . '.json');\n\t\t} elseif (is_readable($path . $file . '.php')) {\n\t\t\t$json = file_get_contents($path . $file . '.php');\n\t\t\t$json = str_replace([\"\\n\\r\", \"\\r\", \"\\n\"], \"\", $json);\n\t\t\t$json = str_replace(\"|*/?>\", \"\", str_replace(\"<?php/*|\", \"\", $json));\n\t\t\tsaveJSON($file . \".json\", json_decode($json, true), $namespace);\n\t\t}\n\n\t\tif (is_file($path . $file . \".json\") && is_file($path . $file . \".php\")) {\n\t\t\tunlink($path . $file . \".php\");\n\t\t}\n\n\t\tif ($json) {\n\t\t\t$json = json_decode($json, true);\n\t\t}\n\t\treturn $json;\n\t}",
"public static function read($jsonFile) {\n $versions = json_decode(file_get_contents($jsonFile), TRUE);\n if (!$versions) {\n throw new \\Exception(\"Failed to read $jsonFile\");\n }\n return self::normalize($versions);\n }",
"public static function read($jsonFile) {\n $versions = json_decode(file_get_contents($jsonFile), TRUE);\n if (!$versions) {\n throw new \\Exception(\"Failed to read $jsonFile\");\n }\n return self::normalize($versions);\n }",
"public function getDataJson( $path_json ){\n \t\t$data = file_get_contents( $path_json );\n \t\t\n \t\t$data = json_decode($data, true);\n\n \t\treturn $data[\"docs\"];\n \t}",
"public function getFromJsonFile($jsonFile)\n {\n if (!is_readable($jsonFile)) {\n throw new \\Exception('Could not read recipes file!');\n }\n\n $recipes = json_decode(file_get_contents($jsonFile), true);\n\n return $recipes;\n }",
"function load($filename){\n\n\t\t//Check if the input is valid\n\t\tif(!\\lib_validation\\validate($filename, LV_STRING))\n\t\t\treturn null;\n\t\t\n\t\t//Escape characters just to be safe \n\t\t$filename = addslashes($filename);\n\t\t\n\t\t//Convert namespace to a file path\n\t\t$filename = \"configs/\" . $filename . \".json\";\n\t\t\n\t\t//Checks if the file exists\n\t\tif(!file_exists($filename))\n\t\t\treturn null;\n\t\t\n\t\t//Load the file\n\t\t$json = file_get_contents($filename);\n\t\t\n\t\t//Parse the file\n\t\t$data = json_decode($json, true);\n\t\t\n\t\t//Return the results (associative array)\n\t\treturn $data;\n\t}",
"public function parser($file_name)\n {\n $str = file_get_contents(public_path('sample-files/' . $file_name));\n $data = json_decode($str, true);\n\n return $data;\n }",
"function jsonParse($fname)\n {\n try {\n $this->fname = $fname;\n $this->content = json_decode(file_get_contents($this->fname));\n } catch (Exception $e) {\n echo $e;\n }\n }",
"function jsonToArray($dir, $file){\n/** Nurodomas kelias iki jsons folderio */ /** __DIR__ - atvaizduoja visa kelia iki failo kuriame naudojamas '__DIR__' pvz:C:\\wamp\\www\\Mindaugas\\2018.09.12 */\n $path = __DIR__ . DIRECTORY_SEPARATOR . $dir . DIRECTORY_SEPARATOR; \n $file = file_get_contents($path . $file , FILE_USE_INCLUDE_PATH); /** $file(kintamasis) Paims info(pagal nurodyta kelia su $path) is jsons folderio */\n $allInfo = json_decode($file, true); /** $allInfo(kintamasis) decodins .json failus i php masyvus*/\n\n return $allInfo; /** Grazinam visa info is .json failu kaip masyvą */\n}",
"private function readRecipeData() {\n $data = file_get_contents(__DIR__ . '/../../../src/app/Recipe/data.json'); \n $arr_data = json_decode($data);\n\n return $arr_data; \n }",
"function get_file($file)\n{\n $data = file_get_contents($file);\n \n if ($data === false) {\n // Default file content - empty JSON object.\n $data = '{}';\n file_put_contents($file, $data);\n }\n\n $result = json_decode($data, true);\n\n // Remove and create file again on JSON parse error.\n if($result === null) {\n unlink($file);\n return get_file($file);\n }\n\n return $result;\n}",
"function load_input_file_into_php_array() {\n#This shows the file the directory of the data info\n$file_string = file_get_contents(\"data/input.json\");\n#Adding true will ensure objects are changed to associative arrays\n$file_array = json_decode($file_string, true);\n #Prints out a message to the command line when function is excecuted\nprint \"Loading...\\n\";\n#Returning the variable will prevent a value of \"null\" showing up\n return $file_array;\n}",
"private function load_json_file($_file)\n {\n // Default _result to FALSE\n $_result = FALSE;\n \n try {\n $_full_config_path = preg_replace(\"@\\/|\\\\\\@\", self::DS, getenv(self::ENV_VAR)) . self::DS . $_file;\n \n $this->add_to_log(__FUNCTION__, \"Load JSON file: $_full_config_path\");\n \n if (file_exists($_full_config_path)) {\n $_json_file = file_get_contents($_full_config_path);\n if ($_json_file) {\n $_json_data = json_decode($_json_file, true);\n \n if ($_json_data && is_array($_json_data)) {\n $this->add_to_log(__FUNCTION__, 'Loaded JSON file successfully');\n $_result = $_json_data;\n }\n }\n }\n } catch (Exception $e) {\n addErrorRecord($e->getMessage(), $_full_config_path, __FUNCTION__);\n }\n \n return $_result;\n }",
"public static function read($url)\n\t{\n\t\treturn json_decode(file_get_contents($url), true);\n\t}",
"public function loadFromJson($json)\n {\n $data = json_decode($json, true);\n $this->setConfig($data['config']);\n /** @var array $entry */\n foreach ($data['entries'] as $entry) {\n $this->setEntry($entry);\n }\n }",
"public function testToGetJsonFileAsArray()\n {\n // given\n $expected = 'departureLocation';\n $expectedCount = 4;\n\n // when\n $actual = $this->tested->getJsonFromFile(DOCUMENT_ROOT . '/data/boarding-card.json');\n\n // then\n $this->assertCount($expectedCount, $actual);\n $this->assertObjectHasAttribute($expected, $actual[0]);\n }",
"protected function fetchData() {\n try {\n $uri = $this->config('uri');\n $response = $this->getContentFromUri($uri);\n }\n catch (\\Exception $e) {\n $this->messenger()->addError('Unable to read JSON');\n $this->logger->error($this->t('Error reading JSON file :error',\n [':error' => $e->getMessage()]));\n $response = NULL;\n }\n\n $data = '{}';\n\n if ($response) {\n if (!$this->dvfHelpers->validateJson($response)) {\n $this->messenger()->addError('Invalid JSON file provided');\n $this->logger->error($this->t('Unable to parse this json file :url',\n [':url' => $uri]));\n }\n $data = $response;\n }\n\n return $data;\n }",
"function readCategories()\n{\n return readJsonFile(CATEGORIES_PATH);\n}",
"public function parseJson($jsonFile)\n {\n $jsonData=file_get_contents($jsonFile);\n $json=json_decode($jsonData,true);\n //return the decoded to php array from json\n return $json;\n }",
"public function testGetFile() {\n\t\t$filename = 'test.json';\r\n\t textus_get_file($filename);\n\t \r\n\t}",
"public function process_json() {\n $file_location = variable_get('sz_test_songs_api_location', NULL); // this is set @ admin/config/sz_test/settings/\n // Check to see if this data is already cached. If is it return it.\n $cache = cache_get('sz_external_data');\n if (isset($cache->data)) {\n return $cache->data;\n }\n\n $file = file_get_contents($file_location);\n\n if (!$file) {\n drupal_set_message(t('Unable to get remote file. ' . $file_location), 'error');\n\n watchdog('Steve Zipfel Test Module',\n 'Unable to get remote file: @file Check settings at: admin/config/sz_test/settings - date: @then',\n array(\n '@then' => date('c', time()),\n '@file' => $file,\n ),\n WATCHDOG_ERROR);\n\n return FALSE;\n }\n\n $data = array();\n $file_data = json_decode($file, true);\n /* covert all keys to be lowercase in case data changes case we don't get anything we don't expect.\n * Change the structure to use the band name as the key in order to make it easier to parse the\n * associated songs\n */\n if(!empty($file_data)) {\n foreach ($file_data as $value) {\n $data[$value['name']] = array_change_key_case($value['songs'], CASE_LOWER);\n }\n } else {\n return FALSE;\n }\n cache_set('sz_external_data', $data); // cache the results.\n return $data;\n }",
"function read_file()\n{\n // $file = \"ftp://\" . FTP_USERNAME . \":\" . FTP_USERPASS . \"@\" . FTP_SERVER . \"/public_html/ftp/data/{$file_name}\";\n // if ( ! $file) { \n // print_r('Cant connect to server');\n // return false;\n // }\n\n //read file using http \n $file = 'http://caychoivang.vn/ftp/data/data.json';\n $contents = file_get_contents($file);\n\n // decode json data to array.\n $contents_array = json_decode($contents);\n return $contents_array;\n}",
"public static function getArrayByJsonFile(string $filename): array {\n return json_decode(file_get_contents($filename), true);\n }",
"public static function json($path)\n {\n $array = [];\n if(File::exists(base_path('vendor/ajifatur/faturhelper/json/'.$path))) {\n $array = json_decode(File::get(base_path('vendor/ajifatur/faturhelper/json/'.$path)), true);\n }\n return $array;\n }",
"function File_Get_Array_From_JSON($FileName, $zip=false) {\n\t// liest eine JSON Datei und erstellt eine Array\n if (! is_file($FileName)) \t{ LOGGING(\"The file $FileName does not exist.\", 3); exit; }\n\t\tif (! is_readable($FileName))\t{ LOGGING(\"The file $FileName could not be loaded.\", 3); exit;}\n if (! $zip) {\n\t\t\t\treturn json_decode(file_get_contents($FileName), true);\n } else {\n\t\t\t\treturn json_decode(gzuncompress(file_get_contents($FileName)), true);\n\t }\n}",
"function get_cabin_data() {\n\n // Get JSON file contents\n $cabinDataString = file_get_contents(\"cabins.json\");\n\n // Convert JSON string to php array\n $cabinDataObj = json_decode($cabinDataString);\n\n return $cabinDataObj;\n}",
"public function load() \n\t{\n\t\tif (is_null ( $this->getDataFile () )) \n\t\t{\n\t\t\tthrow new Exception ( 'Data File is not set' );\n\t\t}\n\t\t\n\t\tif (!file_exists($this->getDataFile()))\n\t\t{\n\t\t\treturn array();\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn json_decode(file_get_contents($this->getDataFile()));\n\t\t}\n\t}",
"public static function parseJsonFromFile($file, $noMinify=false)\n {\n \n //Check if the requested file exists. If it doesn't, return an empty array.\n if(!is_file($file)){\n return [];\n }\n \n //Attempt to parse the JSON.\n $result = @json_decode(($noMinify\n ? file_get_contents($file)\n : json_minify(file_get_contents($file))\n ), true);\n \n //If JSON failed to parse.\n if($result === null){\n throw new CoreException(sprintf(\n 'The file given for JSON parsing at \"%s\" could not be parsed. Error: %s', $file, json_last_error_msg()\n ));\n }\n \n //Return the result.\n return $result;\n \n }",
"public static function loadFile($file)\n {\n return self::create(json_decode(file_get_contents($file)));\n }",
"private function readIngredientsData() {\n $data = file_get_contents(__DIR__ . '/../../../src/app/Ingredient/data.json'); \n $arr_data = json_decode($data);\n\n return $arr_data; \n }",
"function file_to_array($filename) {\n if (file_exists($filename)) {\n $encoded_string = file_get_contents($filename);\n\n if ($encoded_string !== false) {\n return json_decode($encoded_string, true);\n } \n }\n \n return false;\n}",
"function loadFromFile(string $filepath): ?array {//lolo\n $fichier = file_get_contents($filepath);\n\n if ($fichier === false) {\n return null;\n }\n\n $tab = json_decode($fichier, true);\n if ($tab === null) {\n return null;\n }\n return $tab;\n}",
"private function loadJsonFile(string $jsonFile): array\n {\n if (!file_exists($jsonFile)) {\n throw new ComposerException(sprintf('Unable to find \"%s\" JSON file', $jsonFile));\n }\n\n // Get JSON content of composer.json file\n if (($json = json_decode(file_get_contents($jsonFile), true)) === false) {\n throw new ComposerException(sprintf('\"%s\" JSON file is corrupted or not readable', $jsonFile));\n }\n\n return $json;\n }",
"protected function readComposerFile(SplFileInfo $file)\n {\n $json = $file->getContents();\n $data = json_decode($json, true);\n\n return $data;\n }",
"function decodeProvidersJsonFile()\n{\n //Providers JSON File\n $path = storage_path() . env('HOTELS_FILE_PATH');\n\n $jsonRequest = file_get_contents($path);\n //Decoding JSON\n return json_decode($jsonRequest);\n}",
"function json_parse($url) {\n $fileContents = url_get_contents($url);\n $data = json_decode($fileContents,true);\n return $data;\n}",
"function getTestFromJson($file = \"ressources/views/all_test.json\"){\n //$file = $_SERVER['STORAGE_BASE'] . \"/json_files/all_test.json\";\n \t $jsondata = file_get_contents($file);\n \t // converts json data into array\n \t $arr_data = json_decode($jsondata);\n $alltest = array();\n foreach ($arr_data as $test) {\n # code...\n $alltest [$test->id_test] = [\n \"id_test\" => $test->id_test,\n \"id_theme\" => $test->id_theme,\n \"id_rubrique\" => $test->id_rubrique,\n \"statut\" => $test->statut,\n \"titre_test\" => stripslashes((string)$test->titre_test),\n \"unique_result\" => $test->unique_result,\n \"url_image_test\" => $test->url_image_test,\n \"codes_countries\" => $test->codes_countries\n ];\n }\n\n return $alltest;\n }",
"protected function readSchema($file)\n {\n $doc = file_get_contents($file);\n if ($doc === false) {\n throw new FileNotFoundException(\"The schema '$file' could not be found.\");\n }\n\n $schema = json_decode($doc, true);\n if ($schema === null) {\n throw new JsonException(\"The schema '$file' does not contain a valid JSON document. JSON error: \" . json_last_error());\n }\n\n return $schema;\n }",
"public function fromJson($str_json_file)\n {\n if(!file_exists($str_json_file)) {\n throw new \\Exception(\"Could not find file: {$str_json_file}\");\n }\n $obj_json = json_decode(file_get_contents($str_json_file));\n if(!$obj_json) {\n throw new \\Exception(\"Unable to load JSON from file: {$str_json_file}\");\n }\n return $this->build($obj_json);\n }",
"public static function readTranslationFile(string $language_path)\n {\n $content = self::read($language_path);\n\n return JSON::jsonDecode($content);\n }",
"public function jsonFile() \n\t{\t\n\t\tif(isset($GLOBALS['userID']) && isset($_GET['group']) && is_file('src/'.$_GET['group'].'/'.$GLOBALS['userID'].'.json'))\n\t\t{\n\t\t\t//cookie temp Char for possessed chars overrides _COOKIE[Char]\n\t\t\tif(!empty($_COOKIE['tempChar']))\n\t\t\t{\n\t\t\t\t$path = 'src/'.$_GET['group'].'/'.$GLOBALS['userID'].'.json';\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\t$path = 'src/'.$_GET['group'].'/'.$GLOBALS['userID'].'.json';\n\t\t\t}\t\t\t\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$path = 'placeholder.json';\n\t\t}\n\t\t//import json file \n\t\t$jsonFile = file_get_contents($path);\n\t\t$charData = json_decode($jsonFile);\n\t\t$GLOBALS['chardata'] = $charData;\n\t\treturn ($charData);\n\t}",
"function getData($filename) {\n $data = file_get_contents($filename); \n\n //Fix JSON syntax error with decoding: https://stackoverflow.com/questions/17219916/json-decode-returns-json-error-syntax-but-online-formatter-says-the-json-is-ok\n for ($i = 0; $i <= 31; ++$i) { \n $data = str_replace(chr($i), \"\", $data); \n }\n $data = str_replace(chr(127), \"\", $data);\n\n // This is the most common part\n // Some file begins with 'efbbbf' to mark the beginning of the file. (binary level)\n // here we detect it and we remove it, basically it's the first 3 characters \n if (0 === strpos(bin2hex($data), 'efbbbf')) {\n $data = substr($data, 3);\n }\n\n $data = json_decode($data);\n return $data;\n}",
"function settings_load_json($paths)\n {\n }",
"public static function load($file = null)\n {\n if (self::cacheExists()) {\n //return self::getCache();\n }\n\n if (null === $file) {\n $file = static::$dataFile;\n }\n\n $file = Fluid::getBranchStorage() . '/' . $file;\n\n if (file_exists($file)) {\n return json_decode(file_get_contents($file), true);\n }\n\n return array();\n }",
"public function processFromJson(string $filePath): void\n {\n $json = file_get_contents($filePath);\n\n $this->dailyOrders = json_decode($json, true);\n\n foreach ($this->dailyOrders as $day => $orders) {\n try {\n $this->processOrdersForDay($day, $orders);\n } catch (Exception $e) {\n $this->logger->error($e->getMessage());\n }\n }\n }",
"protected function readDataFile($filename)\n {\n $dataJson = file_get_contents(__DIR__ . '/../data/' . $filename);\n return [\n json_decode($dataJson, true),\n ];\n }",
"function parse_file($file) { $buffer='';\n if ( substr($file, -3, 3) == '.gz' ) {\n\t$gz = @gzopen($file, 'rb');\n\n\tif ($gz) {\n\n\t\t# Check to see if we got a report\n \t\t# Check to make sure we have a valid file\n\t\t# Read the file\n\t\twhile (!gzeof($gz)) {\n\t \t$buffer .= gzread($gz, 4096);\n \t}\n \tgzclose($gz);\n \t} \n\telse {\n\t\tdie(\"Could not open gzip file. Exiting...\");\n\t}\n\n\tvar_dump(json_decode($buffer),TRUE);\n }\n else {\n\tdie(\"Wrong file type. Exiting...\");\n }\n}",
"public static function createFromJSON( $filename ) {\n //TODO: Cache config data somehow\n if( ! file_exists( $filename ) )\n throw new BadConfigFileException( $filename . \" does not exist.\" );\n\n $json = file_get_contents( $filename );\n $data = json_decode($json, true);\n\n if( $data == null )\n throw new BadConfigFileException( $filename . \" is malformed json\" );\n\n $config = new Config();\n foreach( $data as $key => $val )\n $config->set($key, $val);\n\n return $config;\n }",
"private function loadJson ($file) {\n // Decode File\n // Insert Contents into table\n $filePath = \"resources/igdb/platforms/\". $file;\n\n $jsonOutput = file_get_contents($filePath);\n $myJson = json_decode($jsonOutput,true);\n\n //echo $myJson['name'] . \" - ID: \" . $myJson['id'] . PHP_EOL;\n\n $myJson['id'] = (!isset($myJson['id'])) ? \"unknown\" : $myJson['id'];\n $myJson['name'] = (!isset($myJson['name'])) ? \"unknown\" : $myJson['name'];\n $myJson['slug'] = (!isset($myJson['slug'])) ? \"unknown\" : $myJson['slug'];\n\n $slug = $myJson['slug'];\n if(array_key_exists($slug,$this->slugUpdates)){$myJson['slug'] = $this->slugUpdates[$slug];}\n\n $myJson['logo']['url'] = (!isset($myJson['logo']['url'])) ? \"unknown\" : $myJson['logo']['url'];\n $myJson['website'] = (!isset($myJson['website'])) ? \"unknown\" : $myJson['website'];\n\n if(isset($myJson['summary'])){\n $myJson['versions'][0]['summary'] = $myJson['summary'];\n } else {\n $myJson['versions'][0]['summary'] = (!isset($myJson['versions'][0]['summary'])) ? \"unknown\" : $myJson['versions'][0]['summary'];\n }\n\n $myJson['generation'] = (!isset($myJson['generation'])) ? \"unknown\" : $myJson['generation'];\n $myJson['alternative_name'] = (!isset($myJson['alternative_name'])) ? \"none\" : $myJson['alternative_name'];\n\n return [\n 'igdb_id' => $myJson['id'],\n 'name' => $myJson['name'],\n 'slug' => $myJson['slug'],\n 'logo' => $myJson['logo']['url'],\n 'website' => $myJson['website'],\n 'summary' => $myJson['versions'][0]['summary'],\n 'alternative_name' => $myJson['alternative_name'],\n 'generation' => $myJson['generation'],\n 'created_at' => \\Carbon\\Carbon::now(),\n 'updated_at' => \\Carbon\\Carbon::now()\n ];\n }",
"public function read($file);",
"protected function readJsonFile($File){\n $Path = fopen($File,\"r\") or die('Cannot open file: '.$File);\n\n // if file found,\n if ($Path) {\n $print = '';\n\n // for each line\n while (($line = fgets($Path)) !== false) {\n $Output = json_decode($line);\n $print .= \"Action: \".$Output->Action.\"<br/>\";\n $print .= \"User: \".$Output->User.\"<br/>\";\n $print .= \"When: \".$Output->Timestamp.\"<br/>\";\n $print .= \"Location: \".$Output->URL.\"<hr>\";\n }\n\n // close file\n fclose($Path);\n } else {\n $print = 'Error, File not found';\n }\n return $print;\n\n // how to use it\n // echo readJsonFile(\"AccessLog.txt\");\n }",
"private function getMetaFromFile(string $filename)\n {\n try {\n if (!file_exists($filename)) {\n throw new \\Exception(\"cache file not exist {$filename}\");\n }\n $fh = fopen($filename, 'r');\n if (!$fh) {\n throw new \\Exception(\"can't open file {$filename}\");\n }\n $line = fgets($fh);\n $result = $line ? json_decode($line, true) : '';\n fclose($fh);\n } catch (\\Exception $e) {\n $result = [];\n }\n\n return $result;\n }",
"function getArrayByName($fileName){\n $file = $fileName.\".json\";\n global $filePath;\n $path = $filePath.$file;\n $string = file_get_contents($path);\n $arrays = json_decode($string,true);\n return $arrays;\n}",
"private function getFile(){\n if($this->checkStatus()){\n chdir('..');\n $filePos = $this->sanitizeInt($this->json->filePos);\n $fileName = $this->sanitizeString($this->json->fileName);\n $fileContents = file_get_contents('aud/'.$fileName);\n $fileMime = mime_content_type('aud/'.$fileName);\n $fileEncode = base64_encode($fileContents);\n $fileArray = array(\n 'fileName' => $fileName,\n 'fileMime' => $fileMime,\n 'fileEncode' => $fileEncode,\n 'filePos' => $filePos\n );\n header('content-type: application/json');\n echo json_encode($fileArray);\n } else {\n $this->notFound404();\n } \n }",
"public static function getJsonConfig()\n {\n return file_get_contents(self::fixtureDir().'/fixture_config.json');\n }",
"public function getJsonArray(){\n return json_decode(file_get_contents($this->jsonFileLink), true); //return [Array]\n }",
"public function isValidJson()\n {\n $config = json_encode(file_get_contents($this->file), true);\n\n if(json_last_error() == JSON_ERROR_NONE) {\n $this->config = $config;\n } else {\n throw new InvalidJsonFormat($this->file);\n }\n }",
"private function LoadConfigFile(){\n $a = file_get_contents($this->RootDIR . 'config/main.json');\n $this->Config = json_decode($a, true);\n }",
"public function testArticleFromJson()\n {\n $articlePath = realpath(__DIR__.'/../fixture/article.json');\n $articleData = json_decode(file_get_contents($articlePath), true);\n $article = Article::fromFile($articlePath);\n $this->assertEquals($articleData, $article->toArray());\n }",
"function json($param = []) {\n echo json_encode((new pharmacies)->get_by_user());\n\n// $file=HOMEDIR.'9398.json';\n//\n// $json= file_get_contents($file);\n// print_rr(json_decode($json));\n }",
"public function getResultsFromJson() {\n $module_handler = \\Drupal::service('module_handler');\n $module_path = $module_handler->getModule('socion')->getPath();\n $json_data_path = $module_path .\"/json/sociotypes_data.json\";\n\n $json_data_path = Json::decode(file_get_contents($json_data_path));\n\n return $json_data_path;\n }",
"public function readData(bool $dataType) : object {\n return json_decode( file_get_contents($this->path));\n }"
] | [
"0.79514337",
"0.7865504",
"0.78247106",
"0.7576073",
"0.7571271",
"0.7434036",
"0.7419001",
"0.7372866",
"0.72928673",
"0.7259306",
"0.7254342",
"0.71200526",
"0.7070055",
"0.70441836",
"0.7031629",
"0.6998458",
"0.6982351",
"0.69753885",
"0.68962073",
"0.6868484",
"0.6835953",
"0.6835953",
"0.6811398",
"0.68037087",
"0.6764746",
"0.6739548",
"0.6736347",
"0.66930234",
"0.6692376",
"0.66761285",
"0.6672421",
"0.665048",
"0.65699416",
"0.65404224",
"0.6535267",
"0.65109175",
"0.6481442",
"0.64678633",
"0.6415366",
"0.6396633",
"0.6396633",
"0.6371928",
"0.63454026",
"0.63331836",
"0.6316979",
"0.6286462",
"0.6259635",
"0.6233185",
"0.62056553",
"0.61836123",
"0.61700946",
"0.6168369",
"0.6158468",
"0.6093956",
"0.60790664",
"0.607344",
"0.6063405",
"0.60623133",
"0.60599947",
"0.60518193",
"0.6015265",
"0.60104454",
"0.5995032",
"0.59914684",
"0.59879684",
"0.5977461",
"0.59368104",
"0.59351087",
"0.59260285",
"0.5919552",
"0.58766174",
"0.5856466",
"0.5841591",
"0.58358866",
"0.5831543",
"0.5823247",
"0.5807397",
"0.58019435",
"0.5792964",
"0.5782355",
"0.5769689",
"0.5762291",
"0.5757853",
"0.57566285",
"0.5715306",
"0.5712788",
"0.57084703",
"0.5708178",
"0.57034665",
"0.57026786",
"0.5679658",
"0.5674138",
"0.5669695",
"0.56343025",
"0.56040496",
"0.5581267",
"0.557699",
"0.5544704",
"0.55387723",
"0.55344707"
] | 0.640348 | 39 |
Collect every json file of a type folder | public function getJsonFiles(): array
{
$path = $this->getJsonTypeFolder();
$jsonFiles = [];
$files = scandir($path);
foreach ($files as $file) {
if (strpos($file, '.json') === false) {
continue;
}
$jsonFiles[] = $path . DIRECTORY_SEPARATOR . $file;
}
return $jsonFiles;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function processJsonFiles(){\n $filesList = $this->getFileList();\n foreach ($filesList as $key => $file) {\n //do this at your will\n if( !preg_match('/.json/', $file['Key'] ) ){\n continue;\n }\n $fileContents = $this->getFile($file['Key']);\n $fileProcessed = $this->processFile($fileContents);\n $this->saveFile($file['Key'], $fileProcessed);\n }\n }",
"public function include_json_folders()\n {\n }",
"function scanFiles($dir){\n $path = __DIR__ . DIRECTORY_SEPARATOR . $dir; /** Nurodomas kelias iki jsons folderio */\n $files = scandir($path); /** Nuskenuoja folderi pagal kelia($path) ir grazina esanciu failu masyva */\n\n return $files;\n}",
"private function readTypes() {\n $files = $this->path->read();\n\n foreach ($files as $file) {\n if ($file->isDirectory()) {\n continue;\n }\n\n $this->readType($file->getName());\n }\n }",
"function acf_get_local_json_files()\n{\n}",
"function scan_students()\n {\n $current_students = [];\n $di = new RecursiveDirectoryIterator('students/');\n foreach (new RecursiveIteratorIterator($di) as $filename => $file) {\n $path_info = pathinfo($filename);\n if($path_info['extension']=='json'){\n array_push($current_students,$path_info['filename']);\n }\n }\n // echo print_r($current_students);\n return $current_students;\n }",
"public function loadFilesProduction()\r\n {\r\n $id = Input::get('ID');\r\n $project = Project::find($id);\r\n $files=[];\r\n if($project!=null)\r\n {\r\n $internalFiles = $project->filesByType(array('vendor','university','designer','writer','attorney','2d'));\r\n foreach($internalFiles as $file)\r\n {\r\n $files[]=['id'=>$file->id,'name'=>$file->fileName,'url'=>$file->url,'date'=>$file->created_at];\r\n }\r\n }\r\n return json_encode($files);\r\n }",
"public function collectComposerJsonFile()\r\n {\r\n\r\n $files_found = $this->findSpecificFile($this->site_root, \"composer.json\");\r\n if($files_found)\r\n $this->file_list = array_merge($this->file_list, $files_found);\r\n }",
"public function scanJsonFiles()\r\n {\r\n $themes = [];\r\n foreach (glob($this->themes_path('*'), GLOB_ONLYDIR) as $themeFolder) {\r\n $themeFolder = realpath($themeFolder);\r\n if (file_exists($jsonFilename = $themeFolder . '/' . 'theme.json')) {\r\n\r\n $folders = explode(DIRECTORY_SEPARATOR, $themeFolder);\r\n $themeName = end($folders);\r\n\r\n // default theme settings\r\n $defaults = [\r\n 'name' => $themeName,\r\n 'asset-path' => $themeName,\r\n 'extends' => null,\r\n ];\r\n\r\n // If theme.json is not an empty file parse json values\r\n $json = file_get_contents($jsonFilename);\r\n if ($json !== \"\") {\r\n $data = json_decode($json, true);\r\n if ($data === null) {\r\n throw new \\Exception(\"Invalid theme.json file at [$themeFolder]\");\r\n }\r\n } else {\r\n $data = [];\r\n }\r\n\r\n // We already know views-path since we have scaned folders.\r\n // we will overide this setting if exists\r\n $data['views-path'] = $themeName;\r\n\r\n $themes[] = array_merge($defaults, $data);\r\n }\r\n }\r\n return $themes;\r\n }",
"function get_all_files($some_folder,$type){\n $rs = [];\n if ($handle = opendir($some_folder)) {\n while (false !== ($entry = readdir($handle))) {\n if ($entry != \".\" && $entry != \"..\") {\n $pathinfo = pathinfo($entry);\n if(!empty($pathinfo['extension'])){\n if($pathinfo['extension']==$type){\n $rs[]=$some_folder.\"/\".$entry;\n }\n }\n }\n }\n \n closedir($handle);\n }\n \n return $rs;\n }",
"private function parseInputFolders()\n {\n $folders = [];\n // Look for json files in the current path\n $finder = new Finder();\n $finder->files()->in($this->inputPath . '/activities');\n if ($finder->count() > 0) {\n foreach ($finder as $json) {\n $activityJson = json_decode(file_get_contents($json));\n $this->itemReferences = $activityJson->data->items;\n if (!empty($this->itemReferences)) {\n foreach ($this->itemReferences as $itemref) {\n $itemref = md5($itemref);\n $folders[] = $this->inputPath . '/items/' . $itemref . '.json';\n }\n } else {\n $this->output->writeln(\"<error>Error converting : No item refrences found in the activity json</error>\");\n }\n }\n } else {\n $finder->files()->in($this->inputPath . '/items');\n foreach ($finder as $json) {\n $folders[] = $this->inputPath . '/items/' . $json->getRelativePathname();\n }\n }\n return $folders;\n }",
"public function gatherJSON($dir=NULL) {\n\n\t\t$dir = $dir !== NULL ? rtrim($dir, '/') : '';\n\n\t\t// TODO: check if glob(...) returns an array first\n\t\t$menuFiles = glob($dir . '/*/menu.json');\n\t\tif(is_array($menuFiles)) {\n\n\t\t\tforeach($menuFiles AS $item) {\n\n\t\t\t\tif(is_file($item)) {\n\n\t\t\t\t\t$content = json_decode(file_get_contents($item), true);\n\t\t\t\t\tif($content != NULL) {\n\t\t\t\t\t\t$content['controller'] = $content['controller'] ? $content['controller'] : basename(dirname($item));\n\t\t\t\t\t\t$this->JSON[] = $content;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t$dirs = glob($dir . '/*', GLOB_ONLYDIR);\n\t\tif(is_array($dirs)) {\n\t\t\tforeach(glob($dir . '/*', GLOB_ONLYDIR) AS $subdirs) {\n\t\t\t\t$this->gatherJSON($subdirs);\n\t\t\t}\n\t\t}\n\n\t\treturn $this;\n\n\t}",
"public function all() {\n $uri = \"folder\";\n $response = $this->client->get($uri);\n return json_decode($response->getBody(), true);\n }",
"function papi_get_all_core_type_files() {\n\treturn papi()->once( __FUNCTION__, function() {\n\t\t$directories = papi_filter_settings_directories();\n\t\t$result = [];\n\n\t\tforeach ( $directories as $directory ) {\n\t\t\t$result = array_merge( $result, papi_get_all_files_in_directory( $directory ) );\n\t\t}\n\n\t\t// Get the last file path from directories.\n\t\t$result = array_map( 'papi_get_core_type_file_path', $result );\n\n\t\t// Only unique path, no duplicated path is allowed.\n\t\treturn array_unique( $result );\n\t} );\n}",
"function jsonToArray($dir, $file){\n/** Nurodomas kelias iki jsons folderio */ /** __DIR__ - atvaizduoja visa kelia iki failo kuriame naudojamas '__DIR__' pvz:C:\\wamp\\www\\Mindaugas\\2018.09.12 */\n $path = __DIR__ . DIRECTORY_SEPARATOR . $dir . DIRECTORY_SEPARATOR; \n $file = file_get_contents($path . $file , FILE_USE_INCLUDE_PATH); /** $file(kintamasis) Paims info(pagal nurodyta kelia su $path) is jsons folderio */\n $allInfo = json_decode($file, true); /** $allInfo(kintamasis) decodins .json failus i php masyvus*/\n\n return $allInfo; /** Grazinam visa info is .json failu kaip masyvą */\n}",
"public function loadFilesLaunch()\r\n {\r\n $id = Input::get('ID');\r\n $project = Project::find($id);\r\n $files=[];\r\n if($project!=null)\r\n {\r\n $internalAndPublicFiles = $project->filesByType(array('public','clientVendor'));\r\n foreach($internalAndPublicFiles as $file)\r\n {\r\n $files[]=['id'=>$file->id,'name'=>$file->fileName,'url'=>$file->url,'projectId'=>$id];\r\n }\r\n }\r\n return json_encode($files);\r\n }",
"public function directoryWithFilesDataProvider(): array\n {\n $multiMap = ['OtherFile' => 'other_file.json', 'JSONFile' => 'j_s_o_n_file.json'];\n $multiDirMap = ['FileFirst' => 'first/file_first.exe', 'FileSecond' => 'first/file_second.exe'];\n $multiDirMap['FileThird'] = 'second/file_third.exe';\n $multiDirMap['SomeExt'] = 'some_ext.exe';\n $singleLoadData = ['OneFile' => ['param1' => 'some_value']];\n $multiLoadData = ['OtherFile' => ['param2' => 'other_value'], 'JSONFile' => ['param3' => 'last_value']];\n $multiDirLoadData = ['FileFirst' => ['param4' => 'no_value'], 'FileSecond' => ['param5' => 'ext_value']];\n $multiDirLoadData['FileThird'] = ['param6' => 'this_value'];\n $multiDirLoadData['SomeExt'] = ['param7' => 'that_value'];\n\n return [\n 'single file' => ['single', '/^.*\\..*$/', ['OneFile' => 'one_file.json'], $singleLoadData],\n 'multiple files with mask' => ['multi', '/^.*\\.json$/', $multiMap, $multiLoadData],\n 'multiple directories' => ['container', '/^.*\\.exe$/', $multiDirMap, $multiDirLoadData],\n ];\n }",
"public function loadFilesAttCS()\r\n {\r\n $id = Input::get('ID');\r\n $project = Project::find($id);\r\n $files=[];\r\n if($project!=null)\r\n {\r\n $internalFiles = $project->filesByType(array('attorney'));\r\n foreach($internalFiles as $file)\r\n {\r\n $created = date('m-d-Y',strtotime(str_replace('-','/',$file->created_at)));\r\n $files[]=['id'=>$file->id,'name'=>$file->fileName,'url'=>$file->url,'created'=>$created];\r\n }\r\n }\r\n return json_encode($files);\r\n }",
"public function getFiles()\n {\n echo json_encode($this->galery->getFiles());\n }",
"function collect_files($folder, &$files) {\n $dir_content = glob(\"$folder/*\");\n foreach ($dir_content as $file) {\n if (is_dir($file) && $file != \".\" && $file != \"..\") {\n collect_files($file, $files);\n } elseif (is_file($file)) {\n $files[] .= $file;\n }\n }\n }",
"public function loadFilesProject()\r\n {\r\n $id = Input::get('ID');\r\n $project = Project::find($id);\r\n $files=[];\r\n if($project!=null)\r\n {\r\n $internalAndPublicFiles = $project->filesByType(array('internal','public'));\r\n foreach($internalAndPublicFiles as $file)\r\n {\r\n $files[]=['id'=>$file->id,'name'=>$file->fileName,'url'=>$file->url,'date'=>$file->created_at];\r\n }\r\n }\r\n return json_encode($files);\r\n }",
"public function loadFilesVendor()\r\n {\r\n $id = Input::get('ID');\r\n $uid = Input::get('UID');\r\n $project = Project::find($id);\r\n $files=[];\r\n if($project!=null)\r\n {\r\n $rol = $this->getRol($uid);\r\n $internalFiles = $project->filesByType(array('vendor',$rol));\r\n foreach($internalFiles as $file)\r\n {\r\n $files[]=['id'=>$file->id,'name'=>$file->fileName,'url'=>$file->url];\r\n }\r\n }\r\n return json_encode($files);\r\n }",
"function collect_classes($folder, &$faecher, $depth=0) {\n $depth++;\n $dir_content = glob(\"$folder/*\");\n foreach ($dir_content as $file) {\n if (is_dir($file) && $file != \".\" && $file != \"..\") {\n $faecher[] .= $file;\n collect_classes($file, $faecher, $depth);\n }\n }\n }",
"public function all()\n {\n $dir = public_path() . '/uploads/temp/' . Session::getId() . '/';\n $data = [];\n $mimetypes = new Mimetype;\n if(file_exists($dir)) {\n foreach(scandir($dir) as $file) {\n if(in_array($file, ['.', '..'])) continue;\n $filedata = [];\n $filedata['name'] = $file;\n $filedata['url'] = url('/uploads/temp/' .Session::getId() . '/' .$file);\n $filedata['size'] = File::size($dir . $file);\n $filedata['type'] = $mimetypes->detectByFileExtension(File::extension($file));\n $data[] = $filedata;\n }\n return $data;\n }\n }",
"public static function GetConvertedFiles()\n\t{\n\t\t$results = array();\n\t\t$jsons = self::StatusConvert();\n\t\tforeach($jsons as $json)\n\t\t\tarray_push($results, array(\n\t\t\t\t\"name\"\t\t=> $json->outputName\n\t\t\t\t,\"size\"\t\t=> $json->outputSize\n\t\t\t\t,\"original\"\t=> $json->name\n\t\t\t\t,\"source\"\t=> self::GetFile($json->outputName)\n\t\t\t));\n\t\treturn $results;\n\t}",
"public function getFiles() {}",
"function __construct(){\n $files = glob('strategies/*.{json}', GLOB_BRACE);\n foreach($files as $file) {\n //do your work here\n $tmp = explode(\"/\",$file);\n $this->strategies[$tmp[count($tmp)-1]] = json_decode(file_get_contents($file),true);\n print_r(json_decode(file_get_contents($file),true));\n \n \n }\n //die();\n $this->activeStrats();\n //print_r($this->strategies);\n }",
"function files_get() {\n $files = data_read(\".files_meta\");\n return json_result(array('files' => $files, 'count' => count($files)), 200);\n}",
"protected function getResourceFilesRecurrent($type, $folder = '') {\r\n\t\t$files = array();\r\n\t\tif($folder == '') {\r\n\t\t\t$folder = \\simtpl\\application::getRootPath() . \"/resources/{$type}/controls\";\r\n\t\t}\r\n\t\t$files_in_folder = glob($folder . \"/*\");\r\n\t\tforeach($files_in_folder as $file_path) {\r\n\t\t\tif(is_dir($file_path)) {\r\n\t\t\t\t$files = array_merge($files, $this->getResourceFilesRecurrent($type, rtrim($file_path, \"\\\\/ \")));\r\n\t\t\t} elseif(preg_match(\"/^.+\\.{$type}$/i\", $file_path)) {\r\n\t\t\t\t$files[] = $file_path;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $files;\r\n\t}",
"public function include_json_folder($path = '')\n {\n }",
"function get_all_info($json_path){\n\t$info = json_decode(get_info($json_path));\n\t$res = new stdClass;\n\tfor($i = 0; $i < count($info); $i++){\n\t\t$json_info = json_decode(get_info($json_path,$info[$i]->name));\n\t\t$name = $info[$i]->name;\n\t\t$res->$name = $json_info;\n\t}\n\treturn json_encode($res);\n}",
"public function getAll(): array\n {\n $response = $this->client->request('GET', $this->resourceUri);\n\n $json = json_decode((string)$response->getBody());\n\n $dirItemCollection = [];\n\n foreach ($json as $starredFile) {\n $dirItemCollection[] = (new DirectoryItem)->fromJson($starredFile);\n }\n\n return $dirItemCollection;\n }",
"public function getAllFiles()\n {\n }",
"public function getFiles();",
"public function getFiles();",
"public function getFiles();",
"function open_folder($json_path,$folder){\n\tif($folder == ''){\n\t\t$dir = $json_path;\n\t} else {\n\t\t$dir = $json_path.$folder.'/';\n\t}\n\tif(!file_exists($dir)){\n\t\treturn 'no exist';\n\t} else {\n\t\t$files = scandir($dir);\n\t\tarray_splice($files,0,2);\n\t\t$result = new stdClass();\n\t\tfor($i = 0; $i < count($files); $i++){\n\t\t\tif(is_dir($dir.$files[$i])){\n\t\t\t\t$subdir = scandir($dir.$files[$i]);\n\t\t\t\tarray_splice($subdir,0,2);\n\t\t\t\t$subdir_res = new stdClass();\n\t\t\t\tfor($j = 0; $j < count($subdir); $j++){\n\t\t\t\t\t$json = file_get_contents($dir.$files[$i].'/'.$subdir[$j]);\n\t\t\t\t\t$array_json = json_decode($json);\n\t\t\t\t\t$name = explode('.',$subdir[$j]);\n\t\t\t\t\t$subdir_res->$name[0] = $array_json;\n\t\t\t\t}\n\t\t\t\t$result->$files[$i] = $subdir_res;\n\t\t\t} else {\n\t\t\t\t$json = file_get_contents($dir.$files[$i]);\n\t\t\t\t$array_json = json_decode($json);\n\t\t\t\t$name = explode('.',$files[$i]);\n\t\t\t\t$result->$name[0] = $array_json;\n\t\t\t}\n\t\t}\n\t\treturn json_encode($result);\n\t}\n}",
"public static function getAllResources($type){\n\t\t$template = themesDB::getThemeName();\n\t\t$folder = TEMPLATES_PATH.$template.'/'.$type.'/';\n\t\t$typePom = explode('_',$type);\n\t\t$files = baseFile::getFilesList($folder,$typePom[0]);\t\n\t\t$finalArr = array();\n\t\tforeach ($files as $file){\n\t\t\tif (preg_match('/main.css/', $file->path) or preg_match('/main.js/', $file->path) or preg_match('/less.css/', $file->path)) {\n\t\t\t\t$main[] = $file->path;\n\t\t\t}else{\n\t\t\t\t$finalArr[] = $file->path;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (is_array($main) and is_array($finalArr)) {\n\t\t\t$finalArr = array_merge($finalArr,$main);\n\t\t}elseif (is_array($main)){\n\t\t\t$finalArr = $main;\n\t\t}\n\n\t\treturn $finalArr;\n\t}",
"public function getFiles ();",
"public function loadFilesILCVendors()\r\n {\r\n $id = Input::get('ID');\r\n $project = Project::find($id);\r\n $files=[];\r\n if($project!=null)\r\n {\r\n $internalFiles = $project->filesByType(array('ilcVendors'));\r\n foreach($internalFiles as $file)\r\n {\r\n $created = date('m-d-Y',strtotime(str_replace('-','/',$file->created_at)));\r\n $files[]=['id'=>$file->id,'name'=>$file->fileName,'url'=>$file->url,'created'=>$created];\r\n }\r\n }\r\n return json_encode($files);\r\n }",
"private function getAllThemeFiles(){\n\t\t$themeFolder = zweb.\"themes/\";\n\t\t$files = scandir($themeFolder.$this->theme);\n\n\t\tif(gettype($files) != \"array\") $files = array();\n\t\tforeach($files as $file){\n\t\t\tif(!is_dir($themeFolder.$file)){\n\t\t\t\t$info = pathinfo($themeFolder.$file);\n\t\t\t\t$this->$info['filename'] = $this->getThemeFile($info['filename'], @$info['extension']);\n\t\t\t}\n\t\t}\n\t}",
"public function directory() {\n $config = \\Drupal::config('webspark_isearch.settings');\n $directory_url = $config->get('directory_path');\n return $this->retriveJsonFromService($directory_url);\n }",
"public function loadFiles()\n\t{\n\t\t$files = array();\n\t\t\n\t\t$searchPath = $this->getLocalFolder().\"/*.*\";\n\t\t$filesArray = glob($searchPath);\n\t\t\n\t\tforeach($filesArray as $file)\n\t\t{\n\t\t\t$files[] = new File($file);\n\t\t}\n\t\t\n\t\treturn $files;\n\t}",
"public function getAll()\n {\n try {\n $response = $this->getClient()->request('GET', $this->url . \"/files\", [\n 'headers' => [\n 'Authorization' => 'Bearer ' . $this->token,\n ],\n ]);\n } catch (\\Exception $e) {\n $response = $e;\n }\n\n return json_decode($response->getBody()->getContents());\n }",
"private function loadMediaTypes()\n {\n return json_decode(file_get_contents(__DIR__ . '/mediatypes.json'), true);\n }",
"public function ajax_get_folder_contents() {\n\n\t\t$path = '#' === rgget( 'path' ) ? '/' : rgget( 'path' );\n\n\t\techo wp_json_encode( $this->get_folder_tree( $path, rgget( 'first_load' ) ) );\n\t\tdie();\n\n\t}",
"function read_dir($system_dir) {\n\t$file_type = 'file';\n\tif (is_dir($system_dir)) {\n\t\tif ($dir = opendir($system_dir)) {\n\t\t\twhile ( ($file = readdir($dir)) !== false ) {\n\t\t\t\tif ($file != \".\" && $file != \"..\") {\n\t\t\t\t\t$dir_name [] = $file;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$data ['data'] = @$dir_name;\n\t\t\treturn json_encode($data);\n\t\t\tclosedir($dir);\n\t\t}\n\t}\n}",
"function DNUI_get_all_dir_or_files($dir, $type) {\r\n if ($type == 0) {\r\n return DNUI_get_dirs(array($dir));\r\n } else if ($type == 1) {\r\n $out = array();\r\n $arrayDirOrFile = DNUI_scan_dir($dir);\r\n foreach ($arrayDirOrFile as $key => $value) {\r\n if (!is_dir($filename)) {\r\n array_push($out, $filename);\r\n }\r\n }\r\n return $out;\r\n }\r\n return array();\r\n}",
"private function loadFiles()\n {\n return $this->loadResourcesFiles()->mapWithKeys(function ($value, $key) {\n return [$this->removeExtension($key) => $value];\n });\n }",
"private static function folders_path(){\n\t\treturn dirname(__DIR__) . '/content/folders.json';\n\t}",
"private function obtainFiles($dir,$type){\n $files = glob($dir.\"/{*.$type}\",GLOB_BRACE);\n $names =\"\";\n foreach ($files as $ima)\n $names[]=array_pop(explode(\"/\",$ima));\n if(!$names) return false;\n return $names;\n }",
"function getItemsFromFile()\n{\n return json_decode(file_get_contents(__DIR__ . '/' . JSON_DATA_FILE), true);\n}",
"public function find_all()\n {\n\n try {\n $this->response = $this->http_client->request('GET',\n \"http://{$_SERVER['REMOTE_ADDR']}:9091/api/file/all.php\",\n [\n 'verify' => false\n ]);\n $this->status_code = $this->response->getStatusCode();\n return json_decode($this->response->getBody());\n\n } catch (Exception $e) {\n // echo \"Exception: \" . $e;\n }\n\n }",
"function directory_contents()\n\t{\n\t\t$this->datatables();\n\n\t\t$dir_id\t= ee()->input->get('directory_id');\n\t\t$dir\t= $this->directory($dir_id, FALSE, TRUE);\n\n\t\t$offset\t= ee()->input->get('offset');\n\t\t$limit\t= ee()->input->get('limit');\n\n\t\t$data = $dir ? call_user_func($this->config['directory_contents_callback'], $dir, $limit, $offset) : array();\n\n\t\tif (count($data) == 0)\n\t\t{\n\t\t\techo '{}';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data['files'] = $this->find_thumbs($dir, $data['files']);\n\n\t\t\tforeach ($data['files'] as &$file)\n\t\t\t{\n\t\t\t\tunset($file['encrypted_path']);\n\t\t\t}\n\n\t\t\t$data['id'] = $dir_id;\n\t\t\techo json_encode($data);\n\t\t}\n\t\texit;\n\t}",
"function _fillFiles()\n\t{\n\t\t// directory from which we import (real path)\n\t\t$importDirectory = ereg_replace(\n\t\t\t\t\"^(.*)/$\", \n\t\t\t\t'\\1', \n\t\t\t\tereg_replace(\"^(.*)/$\", '\\1', $_SERVER[\"DOCUMENT_ROOT\"]) . $this->from);\n\t\t\n\t\t// when running on windows we have to change slashes to backslashes\n\t\tif (runAtWin()) {\n\t\t\t$importDirectory = str_replace(\"/\", \"\\\\\", $importDirectory);\n\t\t}\n\t\t$this->_files = array();\n\t\t$this->_depth = 0;\n\t\t$this->_postProcess = array();\n\t\t$this->_fillDirectories($importDirectory);\n\t\t// sort it so that webEdition files are at the end (that templates know about css and js files)\n\t\t\n\n\t\t$tmp = array();\n\t\tforeach ($this->_files as $e) {\n\t\t\tif ($e[\"contentType\"] == \"folder\") {\n\t\t\t\tarray_push($tmp, $e);\n\t\t\t}\n\t\t}\n\t\tforeach ($this->_files as $e) {\n\t\t\tif ($e[\"contentType\"] != \"folder\" && $e[\"contentType\"] != \"text/webedition\") {\n\t\t\t\tarray_push($tmp, $e);\n\t\t\t}\n\t\t}\n\t\tforeach ($this->_files as $e) {\n\t\t\tif ($e[\"contentType\"] == \"text/webedition\") {\n\t\t\t\tarray_push($tmp, $e);\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->_files = $tmp;\n\t\t\n\t\tforeach ($this->_postProcess as $e) {\n\t\t\tarray_push($this->_files, $e);\n\t\t}\n\t}",
"public static function filelist()\n\t{\n\t\tglobal $g_relative_file_directory;\t// '../../UPLOADS/';\n\t\tglobal $g_relative_root_directory;\t// 'UPLOADS/';\n\n\t\t$actualdirectory = $_POST['actualdir'];\n\t\tif(!$actualdirectory)\n\t\t\t$actualdirectory='';\n\n\t\t$result = [];\n\t\t$result['directory'] = $g_relative_root_directory;\n\t\t$result['actualdir'] = $actualdirectory;\n\n\t\tif(strlen($actualdirectory)>0)\n\t\t\t$actualdirectory.=\"/\";\n\n\t\t$reldir = $g_relative_file_directory.$actualdirectory;\n\t\t$dirs=[];\n\t\tforeach(glob($reldir.'*', GLOB_ONLYDIR) as $d)\n\t\t{\n\t\t\t$fn=str_replace($reldir,'',$d);\n\t\t\t$dirs[] = $fn;\n\t\t}\n\t\t$result['dirs']=$dirs;\n\t\t//$result['reldir']=$reldir;\n\n\t\t$filenames = [];\n\t\tforeach(array_filter(glob($reldir.'*.*'), 'is_file') as $file)\n\t\t{\n\t\t\t$farray = [];\n\t\t\t$fn=str_replace($reldir,'',$file);\n\n\t\t\t$f=filesize($file);\n\t\t\t$fe=\"bytes\";\n\t\t\tif($f/1024 > 1)\n\t\t\t{\n\t\t\t\t$f/=1024;\n\t\t\t\t$fe=\"kb\";\n\t\t\t\tif($f/1024 > 1)\n\t\t\t\t{\n\t\t\t\t\t$f/=1024;\n\t\t\t\t\t$fe=\"Mb\";\n\t\t\t\t\tif($f/1024 > 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$f/=1024;\n\t\t\t\t\t\t$fe=\"GB\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$farray['Filename'] = $fn;\n\t\t\t$farray['Filesize'] = number_format($f,1);\n\t\t\t$farray['FilesizeDeterminant'] = $fe;\n\n\t\t\t$filenames[] = $farray;\n\t\t}\n\t\t$result['files']=$filenames;\n\n\t\theader('Content-Type: application/json');\n\t\techo(json_encode($result));\n\t}",
"private static function makeJSON(string $dir) : array\n\t{\n\t\tstatic $index = 0;\n\n\t\t$aeFiles = \\MarkNotes\\Files::getInstance();\n\t\t$aeEvents = \\MarkNotes\\Events::getInstance();\n\t\t$aeSession = \\MarkNotes\\Session::getInstance();\n\t\t$aeSettings = \\MarkNotes\\Settings::getInstance();\n\n\t\t$root = str_replace('/', DS, $aeSettings->getFolderDocs(true));\n\n\t\t$rootNode = $aeSettings->getFolderDocs(false);\n\n\t\t// Get the list of files and folders for the treeview\n\t\t$arrEntries = self::directoryToArray($dir);\n\n\t\t// Now, prepare the JSON return\n\t\t$sDirectoryText = basename($dir);\n\t\t$sID = str_replace(dirname($root) . DS, '', $dir);\n\t\t$sID = rtrim($sID, DS) . DS;\n\n\t\t// It's a folder node\n\t\t$dataURL = str_replace(DS, '/', str_replace(dirname($root) . DS, '', $dir));\n\t\t$dataURL .= (($root == $dir) ? '' : '/') . 'index.html';\n\n\t\tif (PHP_7_0) {\n\t\t\t// Avoid PHP 7.0.x bug : handle accents\n\t\t\t$arrSettings = $aeSettings->getPlugins('/interface');\n\t\t\t$bConvert = boolval($arrSettings['accent_conversion'] ?? 1);\n\n\t\t\tif ($bConvert) {\n\t\t\t\t$sID = iconv('UTF-8', 'UTF-8//IGNORE', utf8_encode($sID));\n\n\t\t\t\t// accent_conversion in settings.json has\n\t\t\t\t// been initialized to 1 => make the conversion\n\t\t\t\t$sDirectoryText = iconv('UTF-8', 'UTF-8//IGNORE', utf8_encode($sDirectoryText));\n\n\t\t\t\t$dataURL = iconv('UTF-8', 'UTF-8//IGNORE', utf8_encode($dataURL));\n\t\t\t}\n\t\t}\n\n\t\t$listDir = [\n\t\t\t'id' => md5($sID),\n\t\t\t'type' => 'folder',\n\t\t\t'icon' => 'folder',\n\t\t\t'text' => str_replace(DS, '/', $sDirectoryText),\n\t\t\t'state' => [\n\t\t\t\t// Opened only if the top root folder\n\t\t\t\t'opened' => (($root == $dir) ? 1 : 0),\n\t\t\t\t'disabled' => 1\n\t\t\t],\n\t\t\t'data' => [\n\t\t\t\t//'task' => 'display',\n\t\t\t\t// Right clic on the node ?\n\t\t\t\t// Open the_folder/index.html page\n\t\t\t\t'url' => $dataURL,\n\t\t\t\t'path' => str_replace(DS, '/', $sID)\n\t\t\t],\n\t\t\t'children' => []\n\t\t];\n\n\t\t$dirs = [];\n\t\t$files = [];\n\n\t\tforeach ($arrEntries as $entry) {\n\t\t\tif ($entry['type'] == 'file') {\n\t\t\t\t$entry['name'] = str_replace('/', DS, $entry['name']);\n\n\t\t\t\t// We're processing a filename\n\t\t\t\t$index += 1;\n\n\t\t\t\t//Filename but without the extension (and no path)\n\t\t\t\t$filename = str_replace('.md', '', basename($entry['name']));\n\n\t\t\t\t// Relative filename like f.i.\n\t\t\t\t// docs/the_folder/a_note.md\n\t\t\t\t$id = str_replace($root, $rootNode, $entry['name']);\n\n\t\t\t\tif (PHP_7_0) {\n\t\t\t\t\tif ($bConvert) {\n\t\t\t\t\t\t// accent_conversion in settings.json has\n\t\t\t\t\t\t// been initialized to 1 => make the conversion\n\t\t\t\t\t\t$id = iconv('UTF-8', 'UTF-8//IGNORE', utf8_encode($id));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Right-click on a file = open it's HTML version\n\t\t\t\t$dataURL = str_replace($root, '', $entry['name']);\n\n\t\t\t\t// Should be relative to the /docs folder\n\t\t\t\t$dataURL = $aeSettings->getFolderDocs(false) . $dataURL;\n\t\t\t\t$dataURL = str_replace(DS, '/', $dataURL) . '.html';\n\n\t\t\t\t$sFileText = $filename;\n\n\t\t\t\t// If the title is really long, …\n\t\t\t\t// 30 characters in the treeview are enough\n\t\t\t\tif (strlen($sFileText) > TREEVIEW_MAX_FILENAME_LENGTH) {\n\t\t\t\t\t/* We'll truncate the filename to only the first ...\n\t\t\t\t\tthirty ... characters\n\t\t\t\t\tBut, special case, when the filename is truncated,\n\t\t\t\t\tif the very last position is an accentuated char.,\n\t\t\t\t\twe can't truncate exactly at that size because such\n\t\t\t\t\tcharacter is on two bytes. We can only keep the first\n\t\t\t\t\tone otherwise we'll have an encoding problem.\n\t\t\t\t\tSo, in this case, truncate one more char (so keep\n\t\t\t\t\t29 f.i.)\n\t\t\t\t\t*/\n\t\t\t\t\ttry {\n\t\t\t\t\t\t$wLen = TREEVIEW_MAX_FILENAME_LENGTH;\n\t\t\t\t\t\t$tmp = json_encode(substr($sFileText, 0, $wLen));\n\t\t\t\t\t\tif (json_last_error() === JSON_ERROR_UTF8) {\n\t\t\t\t\t\t\t$wLen--;\n\t\t\t\t\t\t\t$tmp = json_encode(substr($sFileText, 0, $wLen));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$sFileText = substr($sFileText, 0, $wLen) . ' …';\n\t\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t\t/*<!-- build:debug -->*/\n\t\t\t\t\t\tdie(\"<pre style='background-color:yellow;'>\" . __FILE__ . ' - ' . __LINE__ . ' ' . print_r($sFileText, true) . '</pre>');\n\t\t\t\t\t\t/*<!-- endbuild -->*/\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$dataBasename = $aeFiles->removeExtension(basename($dataURL));\n\n\t\t\t\t$dataFile = str_replace($root, '', $entry['name']);\n\t\t\t\t$dataFile = str_replace(DS, '/', $dataFile);\n\n\t\t\t\t$default_task = 'task.export.html';\n\n\t\t\t\t// In the list of files, help the jsTree plugin\n\t\t\t\t// to know that the action should be EDIT and not DISPLAY\n\t\t\t\t// when the user click on the note that was just created\n\t\t\t\t$lastAddedNote = trim($aeSession->get('last_added_note', ''));\n\n\t\t\t\tif ($dataBasename === $lastAddedNote) {\n\t\t\t\t\t$default_task = 'task.edit.form';\n\t\t\t\t}\n\n\t\t\t\tif (PHP_7_0) {\n\t\t\t\t\tif ($bConvert) {\n\t\t\t\t\t\t// accent_conversion in settings.json has\n\t\t\t\t\t\t// been initialized to 1 => make the conversion\n\t\t\t\t\t\t$sFileText = iconv('UTF-8', 'UTF-8//IGNORE', utf8_encode($sFileText));\n\n\t\t\t\t\t\t$dataBasename = iconv('UTF-8', 'UTF-8//IGNORE', utf8_encode($dataBasename));\n\n\t\t\t\t\t\t$dataFile = iconv('UTF-8', 'UTF-8//IGNORE', utf8_encode($dataFile));\n\n\t\t\t\t\t\t$dataURL = iconv('UTF-8', 'UTF-8//IGNORE', utf8_encode($dataURL));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$files[] = [\n\t\t\t\t\t'id' => md5($id),\n\t\t\t\t\t'icon' => 'file file-md',\n\t\t\t\t\t'text' => $sFileText,\n\t\t\t\t\t'data' => [\n\t\t\t\t\t\t'basename' => $dataBasename,\n\t\t\t\t\t\t'task' => $default_task,\n\t\t\t\t\t\t'file' => $dataFile,\n\t\t\t\t\t\t'url' => $dataURL\n\t\t\t\t\t],\n\t\t\t\t\t'state' => [\n\t\t\t\t\t\t'opened' => 0,\t// A file isn't opened\n\t\t\t\t\t\t'selected' => 0 // and isn't selected by default\n\t\t\t\t\t]\n\t\t\t\t];\n\t\t\t} elseif ($entry['type'] == 'folder') {\n\t\t\t\t// It's a folder\n\n\t\t\t\t// Derive the folder name\n\t\t\t\t// From c:/sites/marknotes/docs/the_folder, keep /the_folder/\n\t\t\t\t$fname = str_replace($root, '', $entry['name']);\n\t\t\t\t$fname = DS . ltrim(rtrim($fname, DS), DS) . DS;\n\n\t\t\t\t// The folder should start and end with the slash\n\t\t\t\t// so \"/the_folder/\" and not something else.\n\t\t\t\t$tmp = [\n\t\t\t\t\t'folder' => rtrim($root, DS) . $fname,\n\t\t\t\t\t'return' => true\n\t\t\t\t];\n\n\t\t\t\t$args = [&$tmp];\n\n\t\t\t\t// If the task.acls.cansee wasn't fired i.e. when\n\t\t\t\t// there was no folder to protect, the trigger even\n\t\t\t\t// return False. Otherwise, trigger return True :\n\t\t\t\t// the plugin has been fired\n\t\t\t\tif (static::$bACLsLoaded) {\n\t\t\t\t\t$bReturn = $aeEvents->trigger('task.acls.cansee::run', $args);\n\t\t\t\t} else {\n\t\t\t\t\t// ACLs plugin not loaded; every files / folders\n\t\t\t\t\t// can be accessed\n\t\t\t\t\t$args[0]['return'] = 1;\n\t\t\t\t\t$bReturn = true;\n\t\t\t\t}\n\n\t\t\t\t// The canSeeFolder event will initialize the 'return'\n\t\t\t\t// parameter to false when the current user can't see the\n\t\t\t\t// folder i.e. don't have the permission to see it. This\n\t\t\t\t// permission is defined in the acls plugin options\n\t\t\t\t//\n\t\t\t\t// See function run() of\n\t\t\t\t// MarkNotes\\Plugins\\Task\\ACLs\\cansee.php\n\t\t\t\t// for more information\n\t\t\t\t//\n\t\t\t\t// $bReturn === false ==> there was no protected folder.\n\t\t\t\tif (($bReturn === false) || ($args[0]['return'] === 1)) {\n\t\t\t\t\t//$dirs [] = utf8_decode($entry['name']);\n\t\t\t\t\t$dirs[] = $entry['name'];\n\t\t\t\t}\n\t\t\t} // if ($entry['type']=='folder')\n\t\t} // foreach\n\n\t\t// The current folder has been processed, are\n\t\t// there subfolders in it ?\n\t\tif (count($dirs) > 0) {\n\t\t\tforeach ($dirs as $d) {\n\t\t\t\tlist($arrChildren, $tmp) = self::makeJSON($d);\n\t\t\t\t$listDir['children'][] = $arrChildren;\n\t\t\t}\n\t\t}\n\n\t\tforeach ($files as $file) {\n\t\t\t$listDir['children'][] = $file;\n\t\t}\n\n\t\treturn [$listDir, $index];\n\t}",
"private static function collections()\n {\n $files = ['JSON', 'Collection'];\n $folder = static::$root.'Collections'.'/';\n\n self::call($files, $folder);\n }",
"function getAllTestJson2($lang){\n //$file = \"ressources/views/json_files/all_tests/\".$lang.\"_all_test.json\";\n $file = $_SERVER['STORAGE_BASE'] . \"/json_files/all_tests/\" . $lang . \"_all_test.json\";\n\n \t $jsondata = file_get_contents($file);\n \t // converts json data into array\n \t $arr_data = json_decode($jsondata);\n $alltest = array();\n foreach ($arr_data as $test) {\n # code...\n $alltest [$test->id_test] = [\n \"id_test\" => $test->id_test,\n \"id_theme\" => $test->id_theme,\n \"id_rubrique\" => $test->id_rubrique,\n \"statut\" => $test->statut,\n 'permissions' => $test->permissions,\n 'if_additionnal_info' => $test->if_additionnal_info,\n \"if_translated\" => $test->if_translated,\n \"has_treatment\" => $test->has_treatment,\n \"default_lang\" => $test->default_lang,\n \"titre_test\" => stripslashes((string)$test->titre_test),\n \"unique_result\" => $test->unique_result,\n \"url_image_test\" => $test->url_image_test,\n \"codes_countries\" => $test->codes_countries\n ];\n }\n\n return $alltest;\n }",
"protected function getJsonTypeFolder(): string\n {\n $path = self::getJsonFolder();\n return $path . DIRECTORY_SEPARATOR . $this->type;\n }",
"public function read () {\n while ($file = readdir($this->handle)) {\n if (!is_dir($this->path.$file)) {\n $finfo=array();\n $finfo['name']=$file;\n $fname=explode('.',$file);\n if ( !empty ($fname[1]) ) {\n $finfo['type']=$fname[1];\n } else {\n $finfo['type']='???';\n }\n $finfo['size']=filesize($this->path.$file);\n $this->ls[]=$finfo;\n }\n }\n }",
"function getAllCitationJson($lang){\n //$file = \"ressources/views/json_files/all_tests/\".$lang.\"_all_test.json\";\n $file = $_SERVER['STORAGE_BASE'] . \"/json_files/all_quotes/\" . $lang . \"_all_quotes.json\";\n\n $jsondata = file_get_contents($file);\n // converts json data into array\n $arr_data = json_decode($jsondata);\n $allcitation = array();\n foreach ($arr_data as $citation) {\n $allcitation [$citation->id_citation] = [\n \"id_citation\" => $citation->id_citation,\n \"id_rubrique\" => $citation->id_rubrique,\n \"statut\" => $citation->statut,\n \"if_translated\" => $citation->if_translated,\n \"if_personalizable\" => $citation->if_personalizable,\n \"default_lang\" => $citation->default_lang,\n \"titre_citation\" => stripslashes((string)$citation->titre_citation),\n \"url_image_citation\" => $citation->url_image_citation,\n \"url_thumb_img_citation\"=> $citation->url_thumb_img_citation,\n \"codes_countries\" => $citation->codes_countries\n ];\n }\n\n return $allcitation;\n }",
"public function collectInfoFiles()\r\n {\r\n $files_found = $this->findFiles($this->destination_dir, array('md', '1st', 'txt'));\r\n\r\n if($files_found)\r\n $this->file_list = array_merge($this->file_list, $files_found);\r\n }",
"function getLanguageFiles() {\n $directory = \"models/languages/\";\n $languages = glob($directory . \"*.php\");\n //print each file name\n return $languages;\n}",
"function getAllStoriesJson($lang, $get_all = false){\n $file = $_SERVER['STORAGE_BASE'] . \"/json_files/all_stories/\" . $lang . \"_all_stories.json\";\n\n $jsondata = file_get_contents($file, true);\n // converts json data into array\n $arr_data = json_decode($jsondata);\n $allstories = array();\n foreach ($arr_data as $story)\n if($get_all == false )\n if($story->statut == 1)\n $allstories [$story->id_story] = [\n 'id_story' => $story->id_story,\n 'titre_story' => $story->titre_story,\n 'url_image_story' => $story->url_image_story,\n \"default_lang\" => $story->default_lang,\n \"statut\" => $story->statut,\n \"codes_countries\" => $story->codes_countries,\n \"code_story\" => $story->code_story,\n \"id_rubrique\" => $story->id_rubrique,\n ];\n\n return $allstories;\n }",
"public function getFiles(): array;",
"public function collectInstalledComposerJson()\r\n {\r\n $this->collectFiles(\r\n $this->site_root.\"/vendor/composer\",\r\n array(\"json\")\r\n );\r\n }",
"private function findTemplates($path) {\n $dir_iterator = new \\RecursiveDirectoryIterator($path, \\RecursiveDirectoryIterator::FOLLOW_SYMLINKS);\n $iterator = new \\RecursiveIteratorIterator($dir_iterator, \\RecursiveIteratorIterator::SELF_FIRST);\n\n $screens = [];\n $slides = [];\n foreach ($iterator as $info) {\n $pathName = $info->getPathname();\n\n if (pathinfo($pathName, PATHINFO_EXTENSION) == 'json' && strpos($pathName, '/templates/') > -1) {\n if (strpos($pathName, '/slides/') > -1) {\n $slides[] = $pathName;\n }\n else if (strpos($pathName, '/screens/') > -1) {\n $screens[] = $pathName;\n }\n }\n }\n\n return [\n 'screens' => $screens,\n 'slides' => $slides,\n ];\n }",
"public static function get_all_types() {\t\t$types = scandir(str_replace(\"/\", \"\\\\\", dirname(plugin_dir_path( __FILE__ )) . \"\\\\ESWP\\\\MyTypes\"));\r\n\t\t$size = count($types);\r\n\t\t$_types = array();\r\n\t\t\r\n\t\t//Feed in the extra types\r\n\t\t$extra_types = array();\r\n\t\tif(has_filter(\"es_include_types\")) {\r\n\t\t\t$extra_types = apply_filters(\"es_include_types\", $extra_types);\r\n\t\t\t\r\n\t\t\t$size += count($extra_types);\r\n\t\t\t\r\n\t\t\tforeach ($extra_types as $type) {\r\n\t\t\t\t$order = $size;\r\n\t\t\t\t\r\n\t\t\t\tif (method_exists($type, \"get_order\")) {\r\n\t\t\t\t\t$order = $type->get_order();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tarray_push($_types, array(\r\n\t\t\t\t\t\"order\" => $order,\r\n\t\t\t\t\t\"type\" => $type\r\n\t\t\t\t));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Add the included types\r\n\t\tforeach ($types as $type) {\r\n\t\t\tif ($type !== \"BaseType.php\" && trim($type, \".\") !== \"\") {\r\n\t\t\t\t$order = $size + 10;\r\n\t\t\t\t$_type = \"\\\\ESWP\\\\MyTypes\\\\\". explode(\".\", $type)[0];\r\n\t\t\t\t\r\n\t\t\t\tif (class_exists($_type)) {\r\n\t\t\t\t\t$_type_obj = new $_type();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (method_exists($_type, \"get_order\")) {\r\n\t\t\t\t\t\t$order = $_type_obj->get_order();\r\n\t\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\t\tarray_push($_types, array(\r\n\t\t\t\t\t\t\"order\" => $order,\r\n\t\t\t\t\t\t\"type\" => $_type_obj\r\n\t\t\t\t\t));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $_types;\r\n\t}",
"function m2m_get_cpts($names){\n $cpt_files = array(); // array of CPT configs loaded from files\n //$m2m_cpt_dir = new DirectoryIterator(M2M_CPT_CONFIG);\n $m2m_specs_mask = M2M_CPT_CONFIG .\"cpt_%s_specs.json\";\n foreach ($names as $value) { //load the specs from the files\n $file = sprintf($m2m_specs_mask, $value);\n if (file_exists($file)) {\n $rFile = json_decode(file_get_contents($file), true);\n $cpt_files = array_merge($cpt_files, $rFile);\n } else {\n error_log('no JSON file: \"' . $file . '\"');\n $cpt_files[$value] = '';\n }\n }\n return $cpt_files;\n}",
"function loadFiles($folder){\n $files = scandir($folder);\n foreach ($files as $filename)\n {\n if($filename != \".\" && $filename != \"..\") {\n if (is_dir($filename)) {\n //handle nesting\n loadFiles($filename);\n } else {\n if (strpos($filename, '.php') !== false) {\n require $folder.\"/\".$filename;\n }\n }\n }\n\n }\n}",
"private function parseContent()\n {\n $results = [];\n $jsonFiles = $this->parseInputFolders();\n \n $finalManifest = $this->getJobManifestTemplate();\n $this->output->writeln(\"<info>\" . static::INFO_OUTPUT_PREFIX . \"Processing JSON directory: {$this->inputPath} </info>\");\n\n foreach ($jsonFiles as $file) {\n if (file_exists($file)) {\n $results[] = $this->convertLearnosityInDirectory($file);\n } else {\n $this->output->writeln(\"<info>\" . static::INFO_OUTPUT_PREFIX . \"Learnosity JSON file \".basename($file). \" Not found in: {$this->inputPath}/items </info>\");\n }\n }\n $resourceInfo = $this->updateJobManifest($finalManifest, $results);\n $finalManifest->setResources($resourceInfo);\n $this->persistResultsFile($results, realpath($this->outputPath) . '/' . $this->rawPath . '/');\n $this->flushJobManifest($finalManifest, $results);\n CopyDirectoreyHelper::copyFiles(realpath($this->inputPath) . '/assets', realpath($this->outputPath) . '/' . $this->rawPath . '/assets');\n $this->createIMSContntPackage(realpath($this->outputPath) . '/' . $this->rawPath . '/');\n }",
"public function files() {\n\t\t$files = $this->ApiFile->fileList($this->path);\n\t\t$this->set('files', $files);\n\t}",
"public function findFiles();",
"public function get_content_file_video(){\r\n\t\t$path = storage_path().'/data_video/';\r\n\t\t$dir = scandir($path);\r\n\t\tforeach ($dir as $key => $value) {\r\n\t\t\tif(preg_match(\"/\\.json$/\",$value)){\r\n\t\t\t\t$data = (json_decode(file_get_contents($path.$value)));\r\n\t\t\t\tforeach ($data as $key2 => $value2) {\r\n\t\t\t\t\tforeach ($value2->items as $key3 => $value3) {\r\n\t\t\t\t\t\t$params[$key3][\"videoId\"] = $value3->snippet->resourceId->videoId;\r\n\t\t\t\t\t\t$params[$key3][\"title\"] = $value3->snippet->title;\r\n\t\t\t\t\t\t$params[$key3][\"description\"] = $value3->snippet->description;\r\n\t\t\t\t\t\t$params[\"keywords\"] = str_replace(\".json\", \"\", $value);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$this->save_video_by_array($params);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static function scan()\n {\n if (!FS_ACCESS && Config::get('available_themes')) {\n return Config::get('available_themes');\n }\n $dir = \"themes/\";\n $scanned = scandir($dir);\n $_packages = [];\n foreach ($scanned as $folder) {\n if ($folder[0] != '.') {\n $json = $dir.$folder.'/package.json';\n if (file_exists($json)) {\n $data = json_decode(file_get_contents($json));\n if (!FS_ACCESS && isset($data->mainsite) && $data->mainsite===true) {\n continue;\n }\n @$data->title = @$data->title?? @$data->name;\n $data->package = $folder;\n $data->url = @$data->homepage?? (@$data->url?? '');\n $_packages[$folder] = $data;\n }\n }\n }\n return $_packages;\n }",
"function getTemplates( $cwd = '.' ) {\n\n // New list\n $templates = array();\n\n // Use cache\n if ( !is_file( \"{$cwd}/tmp/cache/templates.cache\" ) ) {\n\n // Handle themes here\n $list = browse( \"{$cwd}/templates/\", false, true, false );\n\n // Loop\n foreach ( $list as $dir ) {\n\n // Definitions?\n if ( is_file( \"{$cwd}/templates/{$dir}/manifest.json\" ) ) {\n\n // Get json\n $loadedFile = json_decode( file_get_contents( \"{$cwd}/templates/{$dir}/manifest.json\" ), true );\n\n // Verify List - Do not append unless manifest is correct\n if ( !empty( $loadedFile[ 'name' ] ) && is_file( \"{$cwd}/templates/{$dir}/{$loadedFile['template']}\" ) ) {\n\n // This is JSON from the template\n $templates[ $dir ] = $loadedFile;\n\n // Add full path to the variable\n $templates[ $dir ][ 'path' ] = \"/templates/{$dir}\";\n\n }\n\n }\n\n }\n\n // Sort them ascending\n asort( $templates );\n\n // Store cache\n file_put_contents( \"{$cwd}/tmp/cache/templates.cache\", json_encode( $templates ) );\n\n } else {\n\n return json_decode( file_get_contents( \"{$cwd}/tmp/cache/templates.cache\" ), true );\n\n }\n\n return $templates;\n\n }",
"public static function load()\n {\n if (!is_dir(dirname(static::path()))) {\n mkdir(dirname(static::path()), 0755, true);\n }\n\n if (file_exists(static::path())) {\n return json_decode(file_get_contents(static::path()), true);\n }\n\n return [];\n }",
"function monk_json_load( $paths ) {\n\t\t\tunset($paths[0]);\n\t\t\t\n\t\t\t\n\t\t\t// append path\n\t\t\t$paths[] = get_stylesheet_directory() . '/acf-json';\n\t\t\t\n\t\t\t\n\t\t\t// return\n\t\t\treturn $paths;\n\t\t\t\n\t}",
"public function get_files()\n {\n }",
"private function loadFiles()\n {\n $finder = new Finder();\n\n foreach (Config::get('routing_dirs') as $directory) {\n $finder\n ->files()\n ->name('*.yml')\n ->in($directory)\n ;\n\n foreach ($finder as $file) {\n $resource = $file->getRealPath();\n $this->routes = array_merge($this->routes, Yaml::parse(file_get_contents($resource)));\n }\n }\n }",
"public function loadFilesAdmin()\r\n {\r\n $id = Input::get('ID');\r\n $project = Project::find($id);\r\n $files=[];\r\n if($project!=null){\r\n $files = $project->files;\r\n }\r\n return json_encode($files);\r\n }",
"function getAllTestJson($lang, $get_all = false){\n //$file = \"ressources/views/json_files/all_tests/\".$lang.\"_all_test.json\";\n $file = $_SERVER['STORAGE_BASE'] . \"/json_files/all_tests/\" . $lang . \"_all_test_2.json\";\n\n $jsondata = file_get_contents($file);\n // converts json data into array\n $arr_data = json_decode($jsondata);\n $alltest = array();\n foreach ($arr_data as $test) {\n if($get_all == false ){\n if($test->statut == 1)\n $alltest [$test->id_test] = [\n \"id_test\" => $test->id_test,\n \"id_theme\" => $test->id_theme,\n \"id_rubrique\" => $test->id_rubrique,\n \"statut\" => $test->statut,\n 'permissions' => $test->permissions,\n 'if_additionnal_info' => $test->if_additionnal_info,\n 'test_description' => $test->test_description,\n \"if_translated\" => $test->if_translated,\n \"has_treatment\" => $test->has_treatment,\n \"default_lang\" => $test->default_lang,\n \"titre_test\" => stripslashes((string)$test->titre_test),\n \"unique_result\" => $test->unique_result,\n \"url_image_test\" => $test->url_image_test,\n \"codes_countries\" => $test->codes_countries\n ];\n }\n else\n $alltest [$test->id_test] = [\n \"id_test\" => $test->id_test,\n \"id_theme\" => $test->id_theme,\n \"id_rubrique\" => $test->id_rubrique,\n \"statut\" => $test->statut,\n 'permissions' => $test->permissions,\n 'if_additionnal_info' => $test->if_additionnal_info,\n 'test_description' => $test->test_description,\n \"if_translated\" => $test->if_translated,\n \"has_treatment\" => $test->has_treatment,\n \"default_lang\" => $test->default_lang,\n \"titre_test\" => stripslashes((string)$test->titre_test),\n \"unique_result\" => $test->unique_result,\n \"url_image_test\" => $test->url_image_test,\n \"codes_countries\" => $test->codes_countries\n ];\n }\n\n return $alltest;\n }",
"public function listFiles(string $directory): Collection;",
"function MyMod_Data_Groups_Files_GetFiles($singular)\n {\n return $this->ExistentPathsFiles\n (\n $this->MyMod_Data_Groups_Files_Paths($singular),\n $this->MyMod_Data_Groups_Files_Files($singular)\n );\n }",
"private function loadJson(){\n if(file_exists($this->fullPath.$this->jsonFile)) {\n $arCfg = get_object_vars(json_decode(file_get_contents($this->fullPath.$this->jsonFile)));\n $this->loadConfigs($arCfg);\n }\n }",
"function getTemplateFiles() {\n $directory = \"models/site-templates/\";\n $languages = glob($directory . \"*.css\");\n //print each file name\n return $languages;\n}",
"public function Get(){\n\n // TODO: this is horrible - try to use glob or RecursiveIteratorIterator - no time\n $fileList = [];\n\n if (!is_dir($this->currentPath)) {\n return $fileList;\n }\n\n $files = $this->scanFolder($this->currentPath);\n\n // up one level link\n if ($this->currentPath != $this->rootPath) {\n $fileList[] = array(\n 'file_name' => \"↑\",\n 'directory' => true,\n 'extension' => '',\n 'size' => \"\",\n 'link' => $this->oneLevelUp(),\n );\n }\n\n foreach ($files as $file) {\n if($file == \".\" || $file == \"..\"){\n continue;\n }\n\n if ($this->isDir($file)) {\n $fileList[] = array(\n 'file_name' => $file,\n 'directory' => true,\n 'extension' => 'folder',\n 'size' => \"\",\n 'link' => $this->currentPath . $file,\n );\n } else {\n // filter on the fly\n $ext = $this->fileExtension($file);\n if(!empty($this->extensionFilter)){\n if(!in_array($ext, $this->extensionFilter)){\n continue;\n }\n }\n $fileList[] = [\n 'file_name' => $file,\n 'directory' => false,\n 'extension' => $ext,\n 'size' => $this->fileSize($file),\n 'link' => \"\",\n ];\n\n }\n }\n\n return $fileList;\n }",
"public function loadFilesManufacturer()\r\n {\r\n $mid = Input::get('MID');\r\n $manufacturer = Manufacturer::find($mid);\r\n $files=[];\r\n if($manufacturer!=null)\r\n {\r\n $filesLoaded = $manufacturer->getManufacturerFiles();\r\n foreach($filesLoaded as $file)\r\n {\r\n $created = date('m-d-Y',strtotime(str_replace('-','/',$file->created_at)));\r\n $files[]=['id'=>$file->id,'name'=>$file->fileName,'url'=>$file->url,'created'=>$created];\r\n }\r\n }\r\n return json_encode(array($files));\r\n }",
"public function parseFiles()\n {\n $this->files->each(function ($file) {\n $this->store[] = $this->getTree($this->parseFile($file), $file);\n });\n }",
"public function collectYamlFiles()\r\n {\r\n $folder = array($this->app_root.'/config');\r\n $files_found = $this->findFiles(\r\n $folder,\r\n array(\"yml\"),\r\n array(\"parameters.yml\")\r\n );\r\n\r\n if($files_found)\r\n $this->file_list = array_merge($this->file_list, $files_found);\r\n }",
"public function loadAll()\n {\n $this->setAll(array());\n $d = dir($this->getPath());\n $this->load($d);\n $d->close();\n }",
"function getLanguageFiles()\r\n{\r\n\t$directory = \"models/languages/\";\r\n\t$languages = glob($directory . \"*.php\");\r\n\t//print each file name\r\n\treturn $languages;\r\n}",
"function cemhub_get_generated_flat_files() {\n return file_scan_directory(cemhub_get_files_repository_path(TRUE), '/.*\\.txt|.pgp$/');\n}",
"function _generateFilesList() {\n return array();\n }",
"public function getFiles(DirectoryInterface $directory): array;",
"public function files();",
"public function files();",
"public function files();",
"function json_builder($directories)\n{\n global $totalcount;\n $output = [];\n $output[\"cameras\"] = camera_mapper($directories);\n $output[\"stats\"] = [\"videos\" => $totalcount, \"directories\" => count($directories), \"generated\" => time()];\n $output = json_encode($output, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT);\n file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . \"cached.json\", $output);\n return $output;\n}"
] | [
"0.7034094",
"0.6906213",
"0.6539305",
"0.6511431",
"0.65092164",
"0.64476544",
"0.64411676",
"0.63871026",
"0.6383563",
"0.6319127",
"0.6294584",
"0.62943304",
"0.6272639",
"0.62444866",
"0.62372977",
"0.6188171",
"0.6174124",
"0.6110392",
"0.60559785",
"0.6037714",
"0.60178643",
"0.5988735",
"0.5981795",
"0.5977424",
"0.59772646",
"0.5970222",
"0.5947117",
"0.5910194",
"0.59077245",
"0.589053",
"0.58789927",
"0.5864863",
"0.58641464",
"0.58552486",
"0.58552486",
"0.58552486",
"0.5843361",
"0.58055604",
"0.5803278",
"0.5802636",
"0.5790386",
"0.57876176",
"0.5785863",
"0.5771371",
"0.5752047",
"0.5728112",
"0.5711008",
"0.5707399",
"0.56825364",
"0.5678933",
"0.5667695",
"0.56429404",
"0.56377435",
"0.56368136",
"0.5614943",
"0.5610349",
"0.5610202",
"0.5579854",
"0.5575398",
"0.55717146",
"0.55229324",
"0.5522152",
"0.5520068",
"0.5508227",
"0.5507643",
"0.55025953",
"0.5500706",
"0.5497542",
"0.54871523",
"0.54780734",
"0.5476739",
"0.54755443",
"0.54720724",
"0.54662055",
"0.54660225",
"0.5461973",
"0.54507804",
"0.5446578",
"0.5444943",
"0.5434252",
"0.54251176",
"0.5425101",
"0.54174393",
"0.5401939",
"0.5399566",
"0.5395082",
"0.53687125",
"0.535828",
"0.5357814",
"0.53574866",
"0.5351739",
"0.5346055",
"0.5341138",
"0.5331698",
"0.53286874",
"0.53277934",
"0.5322453",
"0.5322453",
"0.5322453",
"0.5318366"
] | 0.6962261 | 1 |
Tests the builder creating all the parameters available to set and verify them | public function testBuilder()
{
$dto = $this->builder
->create()
->setMaxResults(GetInboxMessagesRequestBuilderTest::MAX_RESULTS)
->build();
$this->assertInstanceOf('HP\Bundle\EmailApiBundle\Request\DTO\GetInboxMessagesRequestDTO', $dto);
$this->assertEquals(GetInboxMessagesRequestBuilderTest::MAX_RESULTS, $dto->maxResults);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testSetParams(): void\n {\n $set = $this->class->setParams([$this->value]);\n\n self::assertTrue($set instanceof Command);\n }",
"protected function setUp()\n {\n// $this->validOptions = array(\n// 'checksum' => true,\n// 'delete'\n// );\n }",
"public function setUp()\n {\n $this->object = new BindParamBuilder();\n }",
"public function testConstructor()\n\t{\n\t\t$modes = [false,\n\t\t true];\n\t\t$types = [\n\t\t\tBuilder::TYPE_COMPANY,\n\t\t\tBuilder::TYPE_COMPANY,\n\t\t];\n\t\tforeach ($modes as $mode) {\n\t\t\tforeach ($types as $type) {\n\t\t\t\t$builder = new Builder($type, $mode);\n\t\t\t\t$this->assertEquals($type, $this->getProtectedMember($builder, 'recipient_type'));\n\t\t\t\t$this->assertEquals($mode, $this->getProtectedMember($builder, 'strict_mode'));\n\t\t\t}\n\t\t}\n\t}",
"protected function setUp()\n {\n parent::setUp();\n\n // test data to use\n $params = [\n 'test1' => '${wow1}',\n 'test2' => [\n 'test3' => 'wow3'\n ],\n 'wow1' => '${test2.test3}',\n 'wow3' => 'xxx'\n ];\n $this->object = new Parameter($params);\n }",
"public function testGetParams(): void\n {\n $this->class->setParams([$this->value]);\n\n self::assertSame([$this->value], $this->class->getParams());\n }",
"public function testSetValues()\n {\n $this->todo('stub');\n }",
"public function testBuilderHandling()\n {\n $sut = new ConstraintBuilder();\n $dummyBuilder = new DummyBuilderA();\n $sut->addConstraintBuilder($dummyBuilder);\n\n $constraints = [];\n $constraints[0] = new \\stdClass();\n $constraints[0]->name = 'DummyA';\n $constraints[0]->options = [];\n $constraints[0]->options[0] = new \\stdClass();\n $constraints[0]->options[0]->name = 'someOption';\n $constraints[0]->options[0]->value = 'someValue';\n\n $property = new Schema();\n $modelMock = $this->getMockBuilder('Graviton\\RestBundle\\Model\\DocumentModel')\n ->disableOriginalConstructor()\n ->getMock();\n $modelMock\n ->expects($this->once())\n ->method('getConstraints')\n ->with($this->equalTo('hans'))\n ->will($this->returnValue($constraints));\n\n $changedProperty = $sut->addConstraints('hans', $property, $modelMock);\n\n $this->assertEquals('THIS WAS SET BY DUMMY-A', $changedProperty->getTitle());\n $this->assertEquals($constraints[0]->options, $dummyBuilder->options);\n }",
"protected function setUp()\n {\n parent::setUp();\n\n $this->parameters = new EncodingParameters(\n $paths = ['some.path'],\n $fieldsets = ['type' => ['field1', 'field2']]\n );\n\n $this->container = Mockery::mock(ContainerInterface::class);\n }",
"public function testOoCanSetGetParameters()\n {\n $mainCommand = 'ls';\n $parameters = [new Command\\Parameter('/usr/local/bin'), new Command\\Parameter('../')];\n $command = $this->createInstance($mainCommand);\n foreach ($parameters as $_parameter) {\n $command->addParameter($_parameter);\n }\n $this->assertEquals($parameters, $command->getParameters(), 'Must be able to get and set multiple parameter objects');\n }",
"public function testAdditionalGettersAndSetters()\n {\n $this->assertSame($this->request->setCurrency('RUB'), $this->request);\n $this->assertEquals($this->request->getCurrency(), 'RUB');\n\n $this->assertSame($this->request->setFailUrl('http://test.test/error'), $this->request);\n $this->assertEquals($this->request->getFailUrl(), 'http://test.test/error');\n\n $this->assertSame($this->request->setDescription('Order Description'), $this->request);\n $this->assertEquals($this->request->getDescription(), 'Order Description');\n\n $this->assertSame($this->request->setLanguage('ru'), $this->request);\n $this->assertEquals($this->request->getLanguage(), 'ru');\n\n $this->assertSame($this->request->setPageView('DESKTOP'), $this->request);\n $this->assertEquals($this->request->getPageView(), 'DESKTOP');\n\n $this->assertSame($this->request->setClientId(123456), $this->request);\n $this->assertEquals($this->request->getClientId(), 123456);\n\n $this->assertSame($this->request->setMerchantLogin('test_login'), $this->request);\n $this->assertEquals($this->request->getMerchantLogin(), 'test_login');\n\n $this->assertSame($this->request->setJsonParams('{\"param\":\"value\"}'), $this->request);\n $this->assertEquals($this->request->getJsonParams(), '{\"param\":\"value\"}');\n\n $this->assertSame($this->request->setSessionTimeoutSecs(1800), $this->request);\n $this->assertEquals($this->request->getSessionTimeoutSecs(), 1800);\n\n $this->assertSame($this->request->setExpirationDate('2017-12-12T12:12:12'), $this->request);\n $this->assertEquals($this->request->getExpirationDate(), '2017-12-12T12:12:12');\n\n $this->assertSame($this->request->setBindingId(654321), $this->request);\n $this->assertEquals($this->request->getBindingId(), 654321);\n }",
"public function test_build_call_setter_with_multiple_primitive_args() {\n\t\t\t$instanceName = \"leafStub\";\n\t\t\t$value = \"aae\\\\\\\\std\\\\\\\\LeafStub\";\n\t\t\t$json = \"{\\\"$instanceName\\\": {\\\"class\\\": \\\"$value\\\",\\\"setters\\\":[{\\\"setValue\\\":[5,10]}]}}\";\n\t\t\t$obj = new DIFactory(json_decode($json, true));\n\t\t\n\t\t\t# When build is called\n\t\t\t$instance = $obj->build($instanceName);\n\t\t\t\n\t\t\t# Then an instance with all dependencies\n\t\t\t# declared in the configuration object is created\n\t\t\t$this->assertEquals(5, $instance->val1);\n\t\t\t$this->assertEquals(10, $instance->val2);\n\t\t}",
"public function testSettingRequest()\n {\n $this->apiRequest->setApiKey('testKey')->setAvailable(true)->resolve();\n\n // check http method\n $this->assertEquals('GET', $this->apiRequest->getHttpMethod());\n // check uri\n $this->assertEquals('/v1/games?available=true', $this->apiRequest->getUri());\n // check headers\n $this->assertEquals(['Authorization' => 'Bearer testKey'], $this->apiRequest->getHeaders());\n // check data\n $this->assertNull($this->apiRequest->getData());\n }",
"public function testGetAndSetMethods()\n {\n $attribs = ['class' => 'gravatar', 'title' => 'avatar', 'id' => 'gravatar-1'];\n $this->_object->setDefaultImg('monsterid')\n ->setImgSize(150)\n ->setSecure(true)\n ->setEmail(\"[email protected]\")\n ->setAttribs($attribs)\n ->setRating('pg');\n $this->assertEquals(\"monsterid\", $this->_object->getDefaultImg());\n $this->assertEquals(\"pg\", $this->_object->getRating());\n $this->assertEquals(\"[email protected]\", $this->_object->getEmail());\n $this->assertEquals($attribs, $this->_object->getAttribs());\n $this->assertEquals(150, $this->_object->getImgSize());\n $this->assertTrue($this->_object->getSecure());\n }",
"public function test_calledCreateMethod_withValidParameters_argumentsHasBeenSetted()\n {\n $dataContainerMock = $this->getDataConteinerMock();\n\n $sut = DataWrapper::create(\n 200,\n \"Ok\",\n \"copyright\",\n \"attribution text\",\n \"attribution HTML\",\n $dataContainerMock,\n \"etag\"\n );\n\n $this->assertEquals(200, $sut->getCode());\n $this->assertEquals(\"Ok\", $sut->getStatus());\n $this->assertEquals(\"copyright\", $sut->getCopyright());\n $this->assertEquals(\"attribution text\", $sut->getAttributionText());\n $this->assertEquals(\"attribution HTML\", $sut->getAttributionHTML());\n $this->assertEquals(\"etag\", $sut->getEtag());\n }",
"public function youCanUseABuilderAsData()\n {\n // Arrange...\n $fruit = $this->createTestModel()->newQuery();\n\n // Act...\n $response = $this->responder->success( $fruit );\n\n // Assert...\n $this->assertEquals( $response->getData( true ), [\n 'status' => 200,\n 'success' => true,\n 'data' => [\n [\n 'name' => 'Mango',\n 'price' => 10,\n 'isRotten' => false\n ]\n ]\n ] );\n }",
"protected function setUp()\n {\n $configurationFactory = new \\Yana\\ConfigurationFactory();\n $configuration = $configurationFactory->loadConfiguration(CWD . 'resources/system.config.xml');\n $configuration->configdrive = YANA_INSTALL_DIR . 'config/system.drive.xml';\n $configuration['default']['user_requirements'] = array('level' => '1');\n $this->container = new \\Yana\\Core\\Dependencies\\Container($configuration);\n $schemaFactory = new \\Yana\\Db\\SchemaFactory();\n $this->schema = $schemaFactory->createSchema('check');\n $this->form = $this->_buildForm($this->schema);\n $this->object = new \\Yana\\Forms\\Setups\\Builder($this->form, $this->container);\n }",
"protected function setUp()\n {\n $this->fixture = new Parameter();\n }",
"public function setTestValues()\r\n {\r\n $fname = array(\"Jesper\", \"Nicolai\", \"Alex\", \"Stefan\", \"Helmut\", \"Elvis\");\r\n $lname = array(\"Gødvad\", \"Lundgaard\", \"Killing\", \"Meyer\", \"Schottmüller\", \"Presly\");\r\n $city = array(\"Copenhagen\", \"Århus\", \"Collonge\", \"Bremen\", \"SecretPlace\" );\r\n $country = array(\"Denmark\", \"Germany\", \"France\", \"Ümlaudia\", \"Graceland\");\r\n $road = array(\" Straße\", \" Road\", \"vej\", \" Boulevard\");\r\n \r\n $this->number = rand(1000,1010);\r\n $this->name = $fname[rand(0,5)] . \" \" . $lname[rand(0,5)];\r\n $this->email = \"[email protected]\";\r\n $this->address= \"Ilias\" . $road[rand(0,3)] .\" \" . rand(1,100);\r\n $this->postalcode = rand(2000,7000);\r\n $this->city = $city[rand(0,3)];\r\n $this->country = $country[rand(0,4)];\r\n $this->phone = \"+\" . rand(1,45) . \" \" . rand(100,999) . \" \" . rand(1000, 9999);\r\n $this->ean = 0;\r\n $this->website = ilERPDebtor::website; \r\n }",
"public function setUp()\n {\n $this->paramErrors = new ParamErrors();\n }",
"public function testSetValue()\n {\n $this->todo('stub');\n }",
"protected function setUp(): void\n {\n // O parametro 'true' é passado para o constructor da classe Validator para informar que é o PHPUnit que esta sendo executado\n // Isso serve para que a funcion que valida blacklist não faça uma requisição á API, pois o PHPUnit não permite requisições externas\n $this->_validator = new Validator(true);\n $this->_data_send = new DataSend();\n }",
"public function testCanSetGetParameters()\n {\n $mainCommand = 'ls';\n $parameters = ['/var/log', './'];\n $command = $this->createInstance($mainCommand);\n foreach ($parameters as $_parameter) {\n $command->addParameter($_parameter);\n }\n $this->assertEquals($parameters, $command->getParameters(), 'Must be able to get and set multiple parameters');\n }",
"public function testInitialSet()\n {\n $method = $this->builder_reflection->getMethod('sql_set');\n $method->setAccessible(TRUE);\n\n $property = $this->builder_reflection->getProperty('set');\n $property->setAccessible(TRUE);\n\n $method->invokeArgs($this->builder, array( array('column1' => 'value1')));\n\n $string = 'SET column1 = value1';\n\n $this->assertEquals($string, $property->getValue($this->builder));\n }",
"public function testBuildForm(): void\n {\n $formBuilderMock = $this->createMock(FormBuilderInterface::class);\n\n // Tests number of calls to add method\n $formBuilderMock->expects($this->exactly(4))->method('add')->willReturnSelf()->withConsecutive(\n [$this->equalTo('picture'), $this->equalTo(PictureFormType::class)],\n [$this->equalTo('username'), $this->equalTo(TextType::class)],\n [$this->equalTo('email'), $this->equalTo(EmailType::class)],\n [$this->equalTo('plainPassword'), $this->equalTo(RepeatedType::class)]\n );\n\n // Passing the mock as a parameter and an empty array as options as I don't test its use\n $this->systemUnderTest->buildForm($formBuilderMock, []);\n }",
"private function validateBuilder(): void\n {\n if (empty($this->apiUrl)) {\n throw new BuilderException('apiUrl must not be empty', ['apiUrl']);\n }\n\n if (empty($this->authenticator) && empty($this->requestTransformer)) {\n throw new BuilderException(\n 'Authenticator or RequestTransformer must be present',\n ['authenticator', 'requestTransformer']\n );\n }\n }",
"public function testConstructMethod()\n {\n $grid = new Grid($this->getContainer());\n $stub = new FormBuilder($grid);\n\n $refl = new \\ReflectionObject($stub);\n $name = $refl->getProperty('name');\n $grid = $refl->getProperty('grid');\n\n $name->setAccessible(true);\n $grid->setAccessible(true);\n\n $this->assertInstanceOf('\\Antares\\Html\\Form\\FormBuilder', $stub);\n $this->assertInstanceOf('\\Antares\\Html\\Builder', $stub);\n $this->assertInstanceOf('\\Illuminate\\Contracts\\Support\\Renderable', $stub);\n\n $this->assertNull($name->getValue($stub));\n $this->assertNull($stub->name);\n $this->assertInstanceOf('\\Antares\\Html\\Form\\Grid', $grid->getValue($stub));\n $this->assertInstanceOf('\\Antares\\Html\\Form\\Grid', $stub->grid);\n }",
"protected function setUp()\n {\n $this->object = new HttpParams();\n\n }",
"public function testParams()\n\t{\n\t\t$this->view->set(array(\n\t\t\t'language' => \"PHP\"\n\t\t));\n\n\t\t$this->assertEquals(\"Dave\", $this->view->name);\n\t\t$this->assertEquals(\"PHP\", $this->view->language);\n\t}",
"public function setUp()\n {\n $this->config = array(\n 's1' => 'string',\n 's2' => 'str',\n 'i1' => 'integer',\n 'i2' => 'int',\n 'i3' => '+integer',\n 'i4' => '+int',\n 'i5' => '-integer',\n 'i6' => '-int',\n 'f1' => 'float',\n 'f2' => '+float',\n 'f3' => '-float',\n 'b' => 'boolean',\n 'a' => 'array',\n 'm' => array(true, 'false'),\n 'r' => '/^member/',\n );\n $this->helper = new ConfigValidator($this->config);\n }",
"public function testIsSettersSetData()\r\n {\r\n $this->assertInstanceOf(Operator::class, $this->operator->setId(12));\r\n $this->assertInstanceOf(Operator::class, $this->operator->setName('test name'));\r\n\r\n $this->assertEquals(12, $this->operator->getId());\r\n $this->assertEquals('test name', $this->operator->getName());\r\n }",
"public function test_build_call_setter_with_one_primitive_arg() {\n\t\t\t$instanceName = \"leafStub\";\n\t\t\t$value = \"aae\\\\\\\\std\\\\\\\\LeafStub\";\n\t\t\t$json = \"{\\\"$instanceName\\\": {\\\"class\\\": \\\"$value\\\",\\\"setters\\\":[{\\\"setValue\\\":5}]}}\";\n\t\t\t$obj = new DIFactory(json_decode($json, true));\n\t\t\n\t\t\t# When build is called\n\t\t\t$instance = $obj->build($instanceName);\n\t\t\t\n\t\t\t# Then an instance with all dependencies\n\t\t\t# declared in the configuration object is created\n\t\t\t$this->assertEquals(5, $instance->val1);\n\t\t}",
"public function testSetType()\n {\n $this->todo('stub');\n }",
"public function testConfigureOptions()\n {\n $multiLanguagesManager = $this->multiLanguagesManager;\n $resolverMock = Phake::mock('Symfony\\Component\\OptionsResolver\\OptionsResolver');\n\n $this->form->configureOptions($resolverMock);\n\n Phake::verify($resolverMock)->setDefaults(array(\n 'embedded' => true,\n 'class' => $this->statusClass,\n 'choice_label' => function ($choice) use ($multiLanguagesManager) {\n return $multiLanguagesManager->choose($choice->getLabels());\n },\n ));\n }",
"public function testConstruct()\n {\n $this->assertAttributeSame($this->clientMock, 'client', $this->indexer);\n $this->assertAttributeSame('test_index', 'indexName', $this->indexer);\n $this->assertAttributeSame($this->eventDispatcherMock, 'eventDispatcher', $this->indexer);\n }",
"protected function setUp() {\n $this->object = new HttpRequestBuilder();\n }",
"public function setUp()\n {\n $this->refParamFunction = new ReflectionParameter('stubbles\\lang\\\\reflect\\test_function', 'param');\n $this->refParamMethod1 = new ReflectionParameter(['stubbles\\lang\\\\reflect\\ParamTestHelper',\n 'paramTest'\n ],\n 'param'\n );\n $this->refParamMethod2 = new ReflectionParameter(['stubbles\\lang\\\\reflect\\ParamTestHelper2',\n 'paramTest'\n ],\n 'param'\n );\n $this->refParamMethod3 = new ReflectionParameter(['stubbles\\lang\\\\reflect\\ParamTestHelper2',\n 'paramTest2'\n ],\n 'param2'\n );\n $this->refParamMethod4 = new ReflectionParameter(['stubbles\\lang\\\\reflect\\ParamTestHelper2',\n 'paramTest3'\n ],\n 'param2'\n );\n }",
"public function testSetType() {\n\n $obj = new ParamEtiquettes();\n\n $obj->setType(\"type\");\n $this->assertEquals(\"type\", $obj->getType());\n }",
"public function test_build_call_setter_with_dependency_and_other_args() {\n\t\t\t$depName = \"aDependency\";\n\t\t\t$depValue = 5;\n\t\t\t$instanceName = \"leafStub\";\n\t\t\t$value = \"aae\\\\\\\\std\\\\\\\\LeafStub\";\n\t\t\t$json = \"{\\\"$depName\\\": \\\"$depValue\\\",\\\"$instanceName\\\": {\\\"class\\\": \\\"$value\\\",\\\"setters\\\":[{\\\"setValue\\\":[{\\\"dep\\\":\\\"$depName\\\"},10]}]}}\";\n\t\t\t$obj = new DIFactory(json_decode($json, true));\n\t\t\n\t\t\t# When build is called\n\t\t\t$instance = $obj->build($instanceName);\n\t\t\t\n\t\t\t# Then an instance with all dependencies\n\t\t\t# declared in the configuration object is created\n\t\t\t$this->assertEquals(5, $instance->val1);\n\t\t\t$this->assertEquals(10, $instance->val2);\n\t\t}",
"protected function setUp(): void\n {\n $this->object = new Options('testuser', 'testpass', 'testauthzid', 'testservice', 'testhost');\n }",
"public function testGetSetValues()\n {\n $options = [];\n $options[] = ['id' => 1, 'label' => 'label1'];\n $options[] = ['id' => 2, 'label' => 'label2'];\n $options[] = ['id' => 3, 'label' => 'label3'];\n\n $form = new RawForm();\n $fieldset = $form->createFieldSet();\n\n $fieldset->createFormControl('text', 'name1');\n $fieldset->createFormControl('text', 'name2');\n\n $control = $fieldset->createFormControl('checkboxes', 'options');\n $control->setOptions($options, 'id', 'label');\n\n $values['name1'] = 'name1';\n $values['name2'] = 'name2';\n $values['options'][1] = true;\n $values['options'][2] = false;\n $values['options'][3] = true;\n\n // Set the form control values.\n $form->setValues($values);\n\n $current = $form->getSetValues();\n\n $this->assertEquals('name1', $current['name1']);\n $this->assertEquals('name2', $current['name2']);\n $this->assertTrue($current['options'][1]);\n $this->assertFalse($current['options'][2]);\n $this->assertTrue($current['options'][3]);\n }",
"public function test___construct ( )\n {\n $subject = $this->getBuiltMock('Rx_Form_Abstract', array(\n 'setStandardDecorators', 'addPrefixPath', 'addElementPrefixPath'\n ));\n\n $subject->expects($this->once())->method('setStandardDecorators');\n $subject->expects($this->exactly(2))->method('addPrefixPath');\n $subject->expects($this->once())->method('addElementPrefixPath');\n\n $subject->__construct();\n\n }",
"public function setUp()\n {\n $this->builder = Phake::mock('Symfony\\Component\\Form\\FormBuilder');\n $this->transformer = Phake::mock('OpenOrchestra\\ModelBundle\\Form\\DataTransformer\\EmbedStatusToStatusTransformer');\n $this->multiLanguagesManager = Phake::mock('OpenOrchestra\\ModelInterface\\Manager\\MultiLanguagesChoiceManagerInterface');\n\n $this->form = new StatusChoiceType($this->transformer, $this->statusClass, $this->multiLanguagesManager);\n }",
"public function testValidation()\n\t{\n\n\t\t// $this->assertInstanceOf('Model', $depot);\n\n\t\t// $this->specify('\\'depot_id and\\' \\'factory_type_id\\' is required', function() {\n\t\t// \t$factory->depot_id = null;\n\t\t// \t$factory->factory_type_id = null;\n // verify($factory->validate(['depot_id', 'factory_type_id'])->false());\n\t\t// });\n\n\t\t// $this->specify('factory', function() {\n\t\t// \t$factory->depot_id = $this->depot->depot_id;\n\t\t// \t$factory->factory_type_id = $this->factoryType->factory_type_id;\n\t\t// \tverify($factory->validate()->true());\n\t\t// });\n\t}",
"public function test_create__set_options_for_element()\n {\n $options = [\n uniqid() => uniqid(),\n ];\n $elementSpec = [\n 'attributes' => [\n 'type' => 'text',\n 'name' => 'foo',\n ],\n 'options' => $options\n ];\n\n $elements = (new ElementFactory())->create($elementSpec);\n\n static::assertEquals($options, $elements->options());\n }",
"public function setUp()\n {\n $this->amount = 500;\n $this->currency = 'RUB';\n $this->sector = 222;\n $this->password = 'qwprc1';\n $this->id = 400;\n\n parent::setUp();\n }",
"public static function setters();",
"public function testSetAndGetParams()\n {\n $page = new Zym_Navigation_Page_Mvc(array(\n 'label' => 'foo',\n 'action' => 'index',\n 'controller' => 'index'\n ));\n \n $params = array('foo' => 'bar', 'baz' => 'bat');\n \n $page->setParams($params);\n $this->assertEquals($params, $page->getParams());\n \n $page->setParams();\n $this->assertEquals(array(), $page->getParams());\n \n $page->setParams($params);\n $this->assertEquals($params, $page->getParams());\n \n $page->setParams(array());\n $this->assertEquals(array(), $page->getParams());\n }",
"public function setUp() {\n\t\t$this->mockObjectManager = $this->getMock('F3\\FLOW3\\Object\\ObjectManagerInterface');\n\t\t$this->mockObjectFactory = $this->getMock('F3\\FLOW3\\Object\\ObjectFactoryInterface');\n\t\t$this->mockReflectionService = $this->getMock('F3\\FLOW3\\Reflection\\ReflectionService');\n\t\t$this->mockReflectionService->expects($this->any())->method('getPropertyNamesByTag')->will($this->returnValue(array()));\n\n\t\t$this->objectBuilder = new \\F3\\FLOW3\\Object\\ObjectBuilder();\n\t\t$this->objectBuilder->injectObjectManager($this->mockObjectManager);\n\t\t$this->objectBuilder->injectObjectFactory($this->mockObjectFactory);\n\t\t$this->objectBuilder->injectReflectionService($this->mockReflectionService);\n\t}",
"public function test__construct() {\n\n\t\t$objBuilder = new LeftRightTreeTraversal\\TreeBuilder();\n\n\t\t$this\n\t\t\t->object($objBuilder)\n\t\t\t->isNotNull($objBuilder)\n\t\t\t->isInstanceOf('LeftRightTreeTraversal\\TreeBuilder')\n\t\t;\n\n\t\t/*\n\t\t * Same test, with a custom config\n\t\t */\n\t\t$hashConfig = array(\n\t\t\t'key_left' \t\t=>\t'custom_left',\n\t\t\t'key_right'\t\t=>\t'custom_right',\n\t\t\t'key_id'\t\t=>\t'custom_id',\n\t\t\t'key_parent'\t=>\t'custom_parent'\n\t\t);\n\t\t$objBuilder = new LeftRightTreeTraversal\\TreeBuilder($hashConfig);\n\n\t\t$this\n\t\t\t->object($objBuilder)\n\t\t\t->isNotNull($objBuilder)\n\t\t\t->isInstanceOf('LeftRightTreeTraversal\\TreeBuilder')\n\t\t;\n\t}",
"protected function setUp(): void\n {\n $this->builderMock = $this->prophesize(ProjectDescriptorBuilder::class);\n $this->builderMock->buildDescriptor(Argument::any(), Argument::any())->shouldBeCalled()->willReturn(null);\n\n $this->fixture = new PropertyAssembler();\n $this->fixture->setBuilder($this->builderMock->reveal());\n }",
"public function testSetAttribs()\n {\n $this->todo('stub');\n }",
"public function testSetAllUserAttributes()\n {\n }",
"public function testCanSetGetArguments()\n {\n $arguments = ['--human-readable', '--all'];\n $command = $this->createInstance();\n foreach ($arguments as $_argument) {\n $command->addArgument($_argument);\n }\n $this->assertSame($arguments, $command->getArguments(), 'Must be able to get and set multiple arguments');\n }",
"public function testOrgApacheSlingEngineParameters()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/org.apache.sling.engine.parameters';\n\n $crawler = $client->request('POST', $path);\n }",
"protected function setUp() {\n\n //test live_id\n try {\n $this->objectMissSet = new Live(\"er\");\n } catch (InvalidArgumentException $e) {\n $this->assertEquals(\"Parameter live_id is not numeric in Live object Constructor.\", $e->getMessage());\n }\n //test online\n try {\n $this->objectMissSet = new Live(0, \"\", \"\", \"\", \"vsxf\");\n } catch (InvalidArgumentException $e) {\n $this->assertEquals(\"Parameter online can only take two value (0 = online or 1 = online) in Live object Constructor.\", $e->getMessage());\n }\n\n\n //test stream type\n try {\n $this->objectMissSet = new Live(0, \"\", \"\", \"\", 0, \"34g5\");\n } catch (InvalidArgumentException $e) {\n $this->assertEquals(\"Parameter stream_type can only take two value (1 = live or 3 = radio)in Live object Constructor.\", $e->getMessage());\n }\n\n //test stream category\n try {\n\n $this->objectMissSet = new Live(0, \"\", \"\", \"\", 0, 1, \"rdgh\");\n } catch (InvalidArgumentException $e) {\n $this->assertEquals(\"Parameter stream_category is not numeric in Live object Constructor.\", $e->getMessage());\n }\n // test user_id\n try {\n $this->objectMissSet = new Live(0, \"\", \"\", \"\", 0, 1, 20, 0, \"gsen\");\n } catch (InvalidArgumentException $e) {\n $this->assertEquals(\"Parameter user_id is not numeric in Live object Constructor.\", $e->getMessage());\n }\n //test activechat\n try {\n $this->objectMissSet = new Live(0, \"\", \"\", \"\", 0, 1, 20, \"bdh\");\n } catch (InvalidArgumentException $e) {\n $this->assertEquals(\"Parameter activateChat can only take two value (0 or 1)in Live object Constructor.\", $e->getMessage());\n }\n\n //test autoplay\n try {\n $this->objectMissSet = new Live(0, \"\", \"\", \"\", 0, 3, 20, 0, 0, 1);\n } catch (InvalidArgumentException $e) {\n $this->assertEquals(\"Parameter autoplay can only take two value (0 or 1)in Live object Constructor.\", $e->getMessage());\n }\n //init default Live\n $this->object = new Live;\n $this->object->set_currentRate(new Rate);\n $this->object->set_currentCoupon(new Coupon);\n }",
"public function setUp()\n {\n $this->constraint = Phake::mock('OpenOrchestra\\ModelBundle\\Validator\\Constraints\\IdAuthorizedCharacter');\n $this->context = Phake::mock('Symfony\\Component\\Validator\\Context\\ExecutionContextInterface');\n $this->constraintViolationBuilder = Phake::mock('Symfony\\Component\\Validator\\Violation\\ConstraintViolationBuilderInterface');\n\n Phake::when($this->context)->buildViolation(Phake::anyParameters())->thenReturn($this->constraintViolationBuilder);\n Phake::when($this->constraintViolationBuilder)->atPath(Phake::anyParameters())->thenReturn($this->constraintViolationBuilder);\n\n $this->validator = new IdAuthorizedCharacterValidator();\n $this->validator->initialize($this->context);\n }",
"public function testPassedValues()\n {\n /* As we need to pass arguments to the constructor, we can't use the\n * default application instance. */\n $app = new BaseApplication(['foo' => 'bar']);\n $this->assertEquals($app['foo'], 'bar');\n }",
"public function testGetValues()\n {\n $this->todo('stub');\n }",
"public function testOverrideParameters(): void\n {\n $process = $this->phpbench(\n 'run --dump --progress=none --parameters=\\'{\"length\": 333}\\' benchmarks/set1/BenchmarkBench.php'\n );\n $this->assertExitCode(0, $process);\n $output = $process->getOutput();\n $this->assertXPathCount(3, $output, '//parameter[@value=333]');\n }",
"public function checkRequiredParamsSet() : bool {\n }",
"public function testGetSettings()\n {\n $client = $this->getDefaultClient();\n $engineName = $this->getDefaultEngineName();\n\n $searchSettings = $client->getSearchSettings($engineName);\n\n $this->assertArrayHasKey('search_fields', $searchSettings);\n $this->assertNotEmpty($searchSettings['search_fields']);\n $this->assertArrayHasKey('id', $searchSettings['search_fields']);\n $this->assertEquals(1, $searchSettings['search_fields']['id']['weight']);\n\n $this->assertArrayHasKey('boosts', $searchSettings);\n $this->assertEmpty($searchSettings['boosts']);\n }",
"public function testModelProperty($tester)\n {\n expect($tester->sector_solicitado)->equals('Ingresar valor de pruebas para el campo sector_solicitado de tipo varchar');\n expect($tester->institucion_solicitante)->equals('Ingresar valor de pruebas para el campo institucion_solicitante de tipo varchar');\n expect($tester->solicitante)->equals('Ingresar valor de pruebas para el campo solicitante de tipo varchar');\n expect($tester->fuente_solicitada)->equals('Ingresar valor de pruebas para el campo fuente_solicitada de tipo varchar');\n expect($tester->q_solicitado)->equals('Ingresar valor de pruebas para el campo q_solicitado de tipo numeric');\n expect($tester->tiempo_years)->equals('Ingresar valor de pruebas para el campo tiempo_years de tipo int4');\n expect($tester->id_tfuente)->equals('Ingresar valor de pruebas para el campo id_tfuente de tipo int4');\n expect($tester->id_subtfuente)->equals('Ingresar valor de pruebas para el campo id_subtfuente de tipo int4');\n expect($tester->id_caracteristica)->equals('Ingresar valor de pruebas para el campo id_caracteristica de tipo int4');\n expect($tester->id_treporte)->equals('Ingresar valor de pruebas para el campo id_treporte de tipo int4');\n expect($tester->id_destino)->equals('Ingresar valor de pruebas para el campo id_destino de tipo int4');\n expect($tester->id_uso_solicitado)->equals('Ingresar valor de pruebas para el campo id_uso_solicitado de tipo int4');\n expect($tester->id_ubicacion)->equals('Ingresar valor de pruebas para el campo id_ubicacion de tipo int4');\n expect($tester->id_reporte_informacion)->equals('Ingresar valor de pruebas para el campo id_reporte_informacion de tipo int4');\n expect($tester->abscisa)->equals('Ingresar valor de pruebas para el campo abscisa de tipo numeric');\n expect($tester->id_cda)->equals('Ingresar valor de pruebas para el campo id_cda de tipo int4');\n expect($tester->observaciones)->equals('Ingresar valor de pruebas para el campo observaciones de tipo varchar');\n expect($tester->proba_excedencia_obtenida)->equals('Ingresar valor de pruebas para el campo proba_excedencia_obtenida de tipo numeric');\n expect($tester->proba_excedencia_certificado)->equals('Ingresar valor de pruebas para el campo proba_excedencia_certificado de tipo numeric');\n expect($tester->decision)->equals('Ingresar valor de pruebas para el campo decision de tipo varchar');\n expect($tester->observaciones_decision)->equals('Ingresar valor de pruebas para el campo observaciones_decision de tipo varchar');\n expect($tester->id_actividad)->equals('Ingresar valor de pruebas para el campo id_actividad de tipo int4');\n expect($tester->id_cactividad_proceso)->equals('Ingresar valor de pruebas para el campo id_cactividad_proceso de tipo int4');\n }",
"public function set($params) {}",
"public function testGetBuilder()\n\t{\n\t\t$entry = $this->entryDeleteGeneratorFactory();\n\t\t$this->assertTrue(is_a($entry->getBuilder(), MySqlBuilder::class));\n\n\t\t$entryValues = $this->entryValuesDeleteGeneratorFactory();\n\t\t$this->assertTrue(is_a($entryValues->getBuilder(), MySqlBuilder::class));\n\t}",
"public function testGettersAndSetters()\n {\n $this->phone->setType('phone');\n $this->assertEquals('phone', $this->phone->getType());\n\n $this->phone->setValue('059 70 22 85');\n $this->assertEquals('059 70 22 85', $this->phone->getValue());\n }",
"public function setUp() {\n parent::setUp();\n $this->user = factory(\\App\\User::class)->create();\n $this->client = factory(\\App\\Client::class)->create(['user_id' => $this->user->id]);\n $this->bill = factory(\\App\\Bill::class)->create([\n 'user_id' => $this->user->id,\n 'client_id' => $this->client->id,\n 'other_details' => str_repeat('random string', rand(5, 10))\n ]);\n $this->simpleBill = factory(\\App\\Bill::class)->create([\n 'user_id' => $this->user->id,\n 'client_id' => $this->client->id,\n 'other_details' => ''\n ]);\n }",
"public function testParameters1()\n{\n\n // Traversed conditions\n // if (isset($this->parameters)) == true (line 379)\n\n $actual = $this->route->parameters();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}",
"public function testGetAndSetSetting()\n {\n $this->assertEquals(0, $this->fixture->getSetting('foo'));\n\n $this->fixture->setSetting('foo', 'bar');\n\n $this->assertEquals('bar', $this->fixture->getSetting('foo'));\n }",
"public function setUp(): void\n {\n $this->validator = new WithdrawnDate();\n }",
"public function test__construct() {\n\n $obj = new ParamEtiquettes();\n\n $this->assertNull($obj->getAvecCodeBarre());\n $this->assertNull($obj->getAvecPrixVente());\n $this->assertNull($obj->getCodeModele());\n $this->assertNull($obj->getEtiqDeFront());\n $this->assertNull($obj->getEtiqMasque());\n $this->assertNull($obj->getEtiqPlus());\n $this->assertNull($obj->getImprimante());\n $this->assertNull($obj->getInitChamp());\n $this->assertNull($obj->getInitTable());\n $this->assertNull($obj->getInitValeur());\n $this->assertNull($obj->getLgZone());\n $this->assertNull($obj->getLibZone());\n $this->assertNull($obj->getLibelle());\n $this->assertNull($obj->getNumeroLigne());\n $this->assertNull($obj->getQteEnt());\n $this->assertNull($obj->getType());\n }",
"public function testGetUserOptions()\n\t{\n\t}",
"public function setUp()\n {\n // We set the height & width directly.\n }",
"public function setUp(): void\n {\n parent::setUp();\n\n $this->buildRequestMock();\n }",
"public function test_form_submit_emptyname()\n {\n Livewire::test(ConfiguratorForm::class)\n ->set(\"name\",\"\")\n ->set(\"onPullrequest\", true)\n ->call('submitForm')\n ->assertHasErrors('name');\n }",
"public function testBuild()\n {\n $platformData = ['abc' => 'def', 'match' => 'test*', 'lite' => true, 'standard' => true];\n $json = [];\n $platformName = 'Test';\n\n $deviceData = ['Device_Name' => 'TestDevice'];\n\n $deviceMock = $this->getMockBuilder(\\Browscap\\Data\\Device::class)\n ->disableOriginalConstructor()\n ->setMethods(['getProperties'])\n ->getMock();\n\n $deviceMock->expects(self::any())\n ->method('getProperties')\n ->will(self::returnValue($deviceData));\n\n $collection = $this->getMockBuilder(\\Browscap\\Data\\DataCollection::class)\n ->disableOriginalConstructor()\n ->setMethods(['getDevice'])\n ->getMock();\n\n $collection->expects(self::any())\n ->method('getDevice')\n ->will(self::returnValue($deviceMock));\n\n self::assertInstanceOf(\n '\\Browscap\\Data\\Platform',\n $this->object->build($platformData, $json, $platformName, $collection)\n );\n }",
"public function test_build_call_setter_with_no_arg() {\n\t\t\t$instanceName = \"leafStub\";\n\t\t\t$value = \"aae\\\\\\\\std\\\\\\\\LeafStub\";\n\t\t\t$json = \"{\\\"$instanceName\\\": {\\\"class\\\": \\\"$value\\\",\\\"setters\\\":[\\\"setWasCalled\\\"]}}\";\n\t\t\t$obj = new DIFactory(json_decode($json, true));\n\t\t\n\t\t\t# When build is called\n\t\t\t$instance = $obj->build($instanceName);\n\t\t\t\n\t\t\t# Then an instance with all dependencies\n\t\t\t# declared in the configuration object is created\n\t\t\t$this->assertEquals(true, $instance->wasCalled);\n\t\t}",
"public function testLocationCreationValidParameters()\n {\n $user = User::all()->random();\n\n $this->actingAs($user, 'api')\n ->post(\"api/location\", [\n 'branch' => 'Twofold Asperger-Academy',\n 'room' => '431',\n 'shelf' => '3',\n 'compartment' => '4',\n 'description' => 'This is a description where the location is.'\n ]);\n $this->seeStatusCode(200);\n }",
"public function test_set_called_returnCorrectly()\r\n\t{\r\n\t\t$docTest = new stdClass();\r\n\t\t$docTest->id = \"123123\";\r\n\t\t$docTest->author = \"aDummyAuthor\";\r\n\t\t$docTest->description = \"aDummyDescription\";\r\n\t\t$docTest->origin = \"OverDrive\";\r\n\t\t$docTest->mysqlid = \"aDummyMysqlId\";\r\n\t\t$docTest->title = array(\"aDummyTitle\");\r\n\t\t$docTest->issn = array(\"aDummyISSN\");\r\n\t\t$docTest->isbn = array(\"aDummyISBN\");\r\n\t\t$docTest->publishDate=array(\"aDummyPublishDate\");\r\n\t\t\r\n\t\t$this->service->set($docTest);\r\n\t\t\r\n\t\t$this->assertEquals($this->service->getId(), \"123123\");\r\n\t\t$this->assertEquals($this->service->getAuthor(), \"aDummyAuthor\");\r\n\t\t$this->assertEquals($this->service->getDescription(), \"aDummyDescription\");\r\n\t\t$this->assertEquals($this->service->getOrigin(), \"OverDrive\");\r\n\t\t$this->assertEquals($this->service->getMysqlId(), \"aDummyMysqlId\");\r\n\t\t$this->assertEquals($this->service->getTitle(), \"aDummyTitle\");\r\n\t\t$this->assertEquals($this->service->getISSN(), \"aDummyISSN\");\r\n\t\t$this->assertEquals($this->service->getISBN(), \"aDummyISBN\");\r\n\t\t$this->assertEquals($this->service->getPublishDate(), \"aDummyPublishDate\");\r\n\t\t\r\n\t}",
"private function _setParams ()\n {\n $endpoint = $this->_endpoint->getData();\n if (count($endpoint) > 0) {\n \n $method = $this->_endpoint->getUrl();\n $methodname = 'setParameter' . ucfirst($method['method']);\n \n $this->_httpclient->{$methodname}('access_token', \n $this->_accesstoken);\n $this->_httpclient->{$methodname}('api_secret', $this->_apisecret);\n \n foreach ($endpoint as $param => $value) {\n $this->_httpclient->{$methodname}($param, $value);\n }\n }\n }",
"function testValidationParams() {\n\t\t$TestModel =& new ValidationTest();\n\t\t$TestModel->validate['title'] = array('rule' => 'customValidatorWithParams', 'required' => true);\n\t\t$TestModel->create(array('title' => 'foo'));\n\t\t$TestModel->invalidFields();\n\n\t\t$expected = array(\n\t\t\t'data' => array('title' => 'foo'),\n\t\t\t'validator' => array(\n\t\t\t\t'rule' => 'customValidatorWithParams', 'on' => null,\n\t\t\t\t'last' => false, 'allowEmpty' => false, 'required' => true\n\t\t\t),\n\t\t\t'or' => true,\n\t\t\t'ignore_on_same' => 'id'\n\t\t);\n\t\t$this->assertEqual($TestModel->validatorParams, $expected);\n\n\t\t$TestModel->validate['title'] = array('rule' => 'customValidatorWithMessage', 'required' => true);\n\t\t$expected = array('title' => 'This field will *never* validate! Muhahaha!');\n\t\t$this->assertEqual($TestModel->invalidFields(), $expected);\n\t}",
"public function set_up(): void {\n\t\tparent::set_up();\n\n\t\t$this->story_model = $this->createMock( Story::class );\n\t\t$this->story_model->load_from_post( self::$story_id );\n\n\t\t$this->story_query = $this->createMock( Story_Query::class );\n\t\t$this->story_query->method( 'get_story_attributes' )->willReturn(\n\t\t\t[\n\t\t\t\t'view_type' => 'grid',\n\t\t\t\t'show_title' => true,\n\t\t\t\t'show_excerpt' => false,\n\t\t\t\t'show_author' => false,\n\t\t\t\t'show_date' => false,\n\t\t\t\t'number_of_columns' => 3,\n\t\t\t]\n\t\t);\n\t}",
"protected function setUp()\n {\n \n\t$this->object = new Request(array(),array());\n }",
"protected function setUp()\n {\n // create request\n $this->request = new Request([\n 'sEcho' => 13,\n 'iDisplayStart' => 11,\n 'iDisplayLength' => 103,\n 'iColumns' => 1, // will be ignored, the column number is already set on the server side\n 'sSearch' => 'fooBar',\n 'bRegex' => true,\n 'bSearchable_1' => true, // will be ignored, the configuration is already set on the server side\n 'sSearch_0' => 'fooBar_1',\n 'bRegex_0' => true, // will be ignored, the configuration is already set on the server side\n 'bSortable_0' => true, // will be ignored, the configuration is already set on the server side\n 'iSortingCols' => 1,\n 'iSortCol_0' => 0,\n 'sSortDir_0' => 'desc',\n ]);\n\n $this->parser = new Datatable19QueryParser();\n }",
"protected function setUp()\n {\n parent::setUp();\n $this->reader = $this->getMock(Filesystem::class, ['read'], [], '', false);\n $this->formConfig = new Form($this->reader, 'config', []);\n $this->source = $this->getSourceConfig();\n\n $this->reader->method('read')->willReturn($this->source);\n }",
"abstract protected function _setRequestServiceBuilder();",
"function setUp() {\n \n\t\t$this->wid = 1;\n $this->buildDatabases();\n \n $this->localName = \"testNameLocal\";\n $this->localValue = \"testValueLocal\";\n\t\t$this->testType = \"submit\";\n\t $this->globalValueForLocal = \"testGlobalValueForLocalSetting\";\n\t\t$this->localType = \"Text\";\n\t\t$this->localPossibleValues = null;\n\t\t$this->globalName = \"testNameGlobal\";\n $this->globalValue = \"testValueGlobal\";\n\t\t$this->globalType = \"text\";\n\t\t$this->globalPossibleValues = null;\n\t\t$this->testPossibleValues = array(\"val1\",\"val2\");\n\t\t$this->notExistingName = \"iDoNotExist\";\n\t\t$this->testValue = \"differentTestValue\";\n\t\t$this->testValue2 = \"yetAnotherTestValue\";\n\t\t$this->globalDescription = \"This is the description of the global setting\";\n\t\t$this->globalLongName = \"Long name of global setting\";\n Settings::setGLobal('admin_language',1,$this->wid); \n $vpdo = VPDO::getVDO(DB_PREFIX.$this->wid);\n\t\t$sql = \"INSERT INTO settings(name,value) VALUES (\".\n\t\t\t$vpdo->quote($this->localName).\",\".\n\t\t\t$vpdo->quote($this->localValue).\")\";\n\t\t\n $num = $vpdo->exec($sql);\n if($num != 1) {\n exit(1);\n }\n $vpdo = VPDO::getVDO(DB_METADATA);\n\t\t$sql = \"INSERT INTO settings(name,value,public,possible_values) VALUES (\".\n\t\t\t$vpdo->quote($this->globalName).\",\".\n\t\t\t$vpdo->quote($this->globalValue).\",\".\n\t\t\t$vpdo->quote(0).\",\".\n\t\t\t$vpdo->quote($this->globalPossibleValues).\")\";\n\t\t\n $num = $vpdo->exec($sql);\n if($num != 1) {\n exit(1);\n }\n $id = $vpdo->fetchOne('select id from settings where name = ?', array($this->globalName));\n $sql = \"INSERT INTO settings_descriptions(lang_id, settings_id, description, long_name) VALUES (\".\n $vpdo->quote(1).\",\".\n $vpdo->quote($id).\",\".\n \n $vpdo->quote($this->globalDescription).\",\".\n $vpdo->quote($this->globalLongName).\")\";\n \n $num = $vpdo->exec($sql);\n if($num != 1) {\n exit(1);\n }\n\t\t$sql = \"INSERT INTO settings(name,value,public,possible_values) VALUES (\".\n\t\t\t$vpdo->quote($this->localName).\",\".\n\t\t\t$vpdo->quote($this->globalValueForLocal).\",\".\n\t\t\t$vpdo->quote(1).\",\".\n\t\t\t$vpdo->quote($this->localPossibleValues).\")\";\n\t\t\n $num = $vpdo->exec($sql);\n if($num != 1) {\n exit(1);\n }\n $this->vpdo = $vpdo;\n $this->buildShopDatabase(3);\n }",
"protected function setUp() {\n $this->object = new wordArrayBuilder;\n }",
"public function setUp(): void\n {\n parent::setUp();\n\n $this->config = Config::get('json-response');\n $this->options = new Option($this->config);\n }",
"public function testParameterNames1()\n{\n\n // Traversed conditions\n // if (isset($this->parameterNames)) == true (line 405)\n\n $actual = $this->route->parameterNames();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}",
"public function testGetters()\n {\n $subject = new ClientInitializationCompilerPass();\n\n $this->assertInstanceOf(DefinitionBuilder::class, $subject->getDefinitionBuilder());\n $this->assertInstanceOf(EventListenerFilter::class, $subject->getEventListenerFilter());\n $this->assertInstanceOf(MiddlewareFilter::class, $subject->getMiddlewareFilter());\n }",
"protected function setUp()\n {\n $this->object = new Request('','','');\n }",
"public function test_form_keygenerate_tests()\n {\n Livewire::test(ConfiguratorForm::class)\n ->set(\"name\", \"Test\")\n ->set(\"stepGenerateKey\", true)\n ->call('submitForm')\n ->assertSee(file_get_contents(base_path(self::DIR_MOCK . \"generate-key.yaml\")));\n\n\n Livewire::test(ConfiguratorForm::class)\n ->set(\"name\", \"Test\")\n ->set(\"stepGenerateKey\", false)\n ->call('submitForm')\n ->assertDontSee(\"run: php artisan key:generate\");\n\n }",
"public function setUp()\n {\n $this->urlGenerator = new UrlGenerator(new RouteCollection(), Request::create('/foo', 'GET'));\n $this->htmlBuilder = new HtmlBuilder($this->urlGenerator);\n $this->siteKey = 'my-site-key';\n $this->recaptchaBuilder = new RecaptchaBuilder($this->siteKey, $this->htmlBuilder);\n }",
"public function testInitialize()\n {\n $this->assertAttributeInstanceOf('phpDocumentor\\Descriptor\\Collection', 'parents', $this->fixture);\n $this->assertAttributeInstanceOf('phpDocumentor\\Descriptor\\Collection', 'constants', $this->fixture);\n $this->assertAttributeInstanceOf('phpDocumentor\\Descriptor\\Collection', 'methods', $this->fixture);\n }",
"public function testIsValidException()\n\t{\n\t\t$data = $this->getMock('Blackbox_Data', array());\n\t\t$data->expects($this->never())->method('__set');\n\t\t$data->expects($this->never())->method('__unset');\n\n\t\t$this->target->isValid($data, $this->state_data);\n\t}",
"public function checkRequiredParamsAreSet()\n {\n $validator = new Validator($this->params);\n $validator->rule('required', $this->requiredParams, true);\n\n if (!$validator->validate()) {\n throw new ParamNotSetException(key($validator->errors()));\n }\n }",
"public function testParameters(): array;",
"public function testGetSettings()\n {\n }",
"public function testSetUserAttributes()\n {\n }"
] | [
"0.6451623",
"0.63933223",
"0.63632905",
"0.63543475",
"0.6306916",
"0.6305736",
"0.62479925",
"0.6213294",
"0.61614794",
"0.6138142",
"0.61379224",
"0.6134183",
"0.6093074",
"0.6072034",
"0.60620826",
"0.60272306",
"0.59982973",
"0.59797126",
"0.597678",
"0.59641635",
"0.59607065",
"0.5949945",
"0.5940906",
"0.59075946",
"0.5889165",
"0.58852816",
"0.5878134",
"0.58678687",
"0.58659685",
"0.5858094",
"0.58542246",
"0.5812868",
"0.579484",
"0.57912993",
"0.5768926",
"0.5766723",
"0.5759331",
"0.57483566",
"0.57460237",
"0.5742478",
"0.5737938",
"0.5714897",
"0.57129216",
"0.57086533",
"0.5696484",
"0.5676352",
"0.5660424",
"0.5658168",
"0.56436265",
"0.564281",
"0.56420076",
"0.56303936",
"0.5629995",
"0.562483",
"0.56243664",
"0.56118727",
"0.56092083",
"0.5605026",
"0.5601847",
"0.55997264",
"0.55967706",
"0.5596288",
"0.55956256",
"0.5595131",
"0.5591361",
"0.5580857",
"0.5571528",
"0.5568501",
"0.5568132",
"0.55645645",
"0.5563506",
"0.5560515",
"0.55566",
"0.5555804",
"0.55480254",
"0.552392",
"0.55228543",
"0.5522134",
"0.5518597",
"0.5516516",
"0.55100524",
"0.5508776",
"0.550849",
"0.5507819",
"0.54958683",
"0.5489413",
"0.5487952",
"0.54871774",
"0.54859054",
"0.548352",
"0.54794323",
"0.54725206",
"0.5463757",
"0.54627514",
"0.54582775",
"0.5458264",
"0.54489726",
"0.54489213",
"0.54423445",
"0.5439899"
] | 0.55412626 | 75 |
Display a listing of the resource. | public function index($id)
{
//dd($id);
$jadwal = DB::table('jadwal')
->select(
'dosen.nama as namadosen',
'mata_kuliah.nama_mata_kuliah as matkul',
'hari as day'
)
->join('dosen', 'jadwal.dosen_id', '=', 'dosen.id')
->join('mata_kuliah', 'jadwal.mata_kuliah_id', '=', 'mata_kuliah.id')
->where('jadwal.dosen_id', $id)
->get();
//dd($jadwal->namadosen);
return view('data.listjadwal',compact(['jadwal']));
//, compact(['jadwal']));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }",
"public function listing();",
"function index() {\n\t\t$this->show_list();\n\t}",
"public function actionList() {\n $this->_getList();\n }",
"public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }",
"public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }",
"public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }",
"function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}",
"public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }",
"public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }",
"public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}",
"function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}",
"public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }",
"public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}",
"public function actionRestList() {\n\t $this->doRestList();\n\t}",
"public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}",
"public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }",
"public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }",
"public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}",
"public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}",
"public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }",
"public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }",
"public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }",
"public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }",
"public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}",
"public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }",
"public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}",
"public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }",
"public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }",
"public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }",
"public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}",
"public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }",
"public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }",
"public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }",
"public function index()\n {\n return Resources::collection(Checking::paginate());\n }",
"public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }",
"public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }",
"public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }",
"public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }",
"public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }",
"public function view(){\n\t\t$this->buildListing();\n\t}",
"public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }",
"public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }",
"public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }",
"public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }",
"public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }",
"public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }",
"public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }",
"public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }",
"public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }",
"public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}",
"public function listAction() {}",
"public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }",
"public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }",
"public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }",
"public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }",
"public function executeList()\n {\n $this->setTemplate('list');\n }",
"public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }",
"function listing() {\r\n\r\n }",
"public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }",
"public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }",
"public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}",
"public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }",
"public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }",
"public function _index(){\n\t $this->_list();\n\t}",
"public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}",
"function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}",
"public function index()\n {\n $this->booklist();\n }",
"public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }",
"public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }",
"public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }",
"public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }",
"public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }",
"public function indexAction() {\n $this->_forward('list');\n }",
"public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }",
"public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }",
"public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}",
"public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }",
"public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }",
"public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }",
"public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }",
"public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }",
"public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}",
"public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }",
"public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }",
"public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }",
"public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}",
"public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }",
"public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }",
"public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }",
"public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }",
"public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }",
"public function index()\n {\n return view('admin.resources.index');\n }",
"public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}"
] | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.6830523",
"0.6802689",
"0.6797",
"0.67957735",
"0.67871135",
"0.6760129",
"0.67427456",
"0.6730486",
"0.67272323",
"0.67255723",
"0.67255723",
"0.67255723",
"0.67177945",
"0.6707866",
"0.6706713",
"0.6704375",
"0.6664782",
"0.6662871",
"0.6660302",
"0.6659404",
"0.6656656",
"0.6653517",
"0.6647965",
"0.6620322",
"0.66185474",
"0.6618499",
"0.6606105",
"0.6600617",
"0.65996987",
"0.6594775",
"0.6587389",
"0.6585109",
"0.6581641",
"0.6581017",
"0.6577157",
"0.65747666",
"0.6572513",
"0.65721947",
"0.6570553",
"0.65646994",
"0.6563556",
"0.6554194",
"0.65529937",
"0.65460825",
"0.65368485",
"0.653429",
"0.65328294",
"0.6526759",
"0.6526695",
"0.6526284",
"0.65191334",
"0.65183175",
"0.65174305",
"0.651703",
"0.65141153",
"0.6507088",
"0.65061647",
"0.6504046",
"0.64942145",
"0.6491893",
"0.64883405",
"0.6486392",
"0.6485077",
"0.64846045",
"0.6478858",
"0.64756656",
"0.64726377",
"0.6471126",
"0.64701074",
"0.6467418",
"0.6462195",
"0.64618355",
"0.6459199",
"0.6457831",
"0.6454631",
"0.64533997",
"0.6451915",
"0.6450861",
"0.6449301",
"0.64492667",
"0.64469045"
] | 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view('resource.create');\n }",
"public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}",
"public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }",
"public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }",
"public function create()\n {\n return view ('forms.create');\n }",
"public function create ()\n {\n return view('forms.create');\n }",
"public function create()\n\t{\n\t\treturn view('faith.form');\n\t}",
"public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }",
"public function create()\n {\n return view(\"request_form.form\");\n }",
"public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }",
"public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle école'\n\t\t) ) );\n\t}",
"public function create()\n {\n return view($this->forms . '.create');\n }",
"public function create()\n {\n return view('restful.add');\n }",
"public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }",
"public function create()\n {\n return view('admin.createform');\n }",
"public function create()\n {\n return view('admin.forms.create');\n }",
"public function create()\n {\n return view('backend.student.form');\n }",
"public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function create()\n {\n return view('client.form');\n }",
"public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }",
"public function create()\n {\n return view('Form');\n }",
"public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }",
"public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}",
"public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }",
"public function create()\n {\n return view('backend.schoolboard.addform');\n }",
"public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}",
"public function create()\n {\n //\n return view('form');\n }",
"public function create()\n {\n return view('rests.create');\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return view(\"Add\");\n }",
"public function create(){\n return view('form.create');\n }",
"public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }",
"public function create()\n {\n\n return view('control panel.student.add');\n\n }",
"public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}",
"public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }",
"public function create()\n {\n return $this->cView(\"form\");\n }",
"public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }",
"public function create()\n {\n return view(\"dresses.form\");\n }",
"public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}",
"public function createAction()\n {\n// $this->view->form = $form;\n }",
"public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }",
"public function create()\n {\n return view('fish.form');\n }",
"public function create()\n {\n return view('users.forms.create');\n }",
"public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }",
"public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}",
"public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }",
"public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }",
"public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }",
"public function create()\n {\n return view('essentials::create');\n }",
"public function create()\n {\n return view('student.add');\n }",
"public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}",
"public function create()\n {\n return view('url.form');\n }",
"public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }",
"public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}",
"public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view('crud/add'); }",
"public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}",
"public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view(\"List.form\");\n }",
"public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}",
"public function create()\n {\n //load create form\n return view('products.create');\n }",
"public function create()\n {\n return view('article.addform');\n }",
"public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }",
"public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}",
"public function create()\n {\n return view('saldo.form');\n }",
"public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}",
"public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }",
"public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }",
"public function create()\n {\n return view('admin.inverty.add');\n }",
"public function create()\n {\n return view('Libro.create');\n }",
"public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }",
"public function create()\n {\n return view(\"familiasPrograma.create\");\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}",
"public function create()\n {\n return view(\"create\");\n }",
"public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}",
"public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n return view('forming');\n }",
"public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }",
"public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }",
"public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }",
"public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }",
"public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }",
"public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}",
"public function create()\n {\n return view('student::students.student.create');\n }",
"public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}"
] | [
"0.75948673",
"0.75948673",
"0.75863165",
"0.7577412",
"0.75727344",
"0.7500887",
"0.7434847",
"0.7433956",
"0.73892003",
"0.73531085",
"0.73364776",
"0.73125",
"0.7296102",
"0.7281891",
"0.72741455",
"0.72424185",
"0.7229325",
"0.7226713",
"0.7187349",
"0.7179176",
"0.7174283",
"0.7150356",
"0.71444064",
"0.71442676",
"0.713498",
"0.71283126",
"0.7123691",
"0.71158516",
"0.71158516",
"0.71158516",
"0.7112176",
"0.7094388",
"0.7085711",
"0.708025",
"0.70800644",
"0.70571953",
"0.70571953",
"0.70556754",
"0.70396435",
"0.7039549",
"0.7036275",
"0.703468",
"0.70305896",
"0.7027638",
"0.70265305",
"0.70199823",
"0.7018007",
"0.7004984",
"0.7003889",
"0.7000935",
"0.69973785",
"0.6994679",
"0.6993764",
"0.6989918",
"0.6986989",
"0.6966502",
"0.69656384",
"0.69564354",
"0.69518244",
"0.6951109",
"0.6947306",
"0.69444615",
"0.69423944",
"0.6941156",
"0.6937871",
"0.6937871",
"0.6936686",
"0.69345254",
"0.69318026",
"0.692827",
"0.69263744",
"0.69242257",
"0.6918349",
"0.6915889",
"0.6912884",
"0.691146",
"0.69103104",
"0.69085974",
"0.69040126",
"0.69014287",
"0.69012105",
"0.6900397",
"0.68951064",
"0.6893521",
"0.68932164",
"0.6891899",
"0.6891616",
"0.6891616",
"0.6889246",
"0.68880934",
"0.6887128",
"0.6884732",
"0.68822503",
"0.68809193",
"0.6875949",
"0.68739206",
"0.68739134",
"0.6870358",
"0.6869779",
"0.68696856",
"0.686877"
] | 0.0 | -1 |
Store a newly created resource in storage. | public function store(Request $request)
{
$data = $request->all();
if(count($request->matkul) > 0){
foreach($request->jadwalmatkul as $jadwal=>$j){
$data2=array(
'hari'=>$request->jadwalmatkul[$jadwal],
'mata_kuliah_id'=>$request->matkul[$jadwal],
'dosen_id'=>$request->iddosen
);
jadwal::insert($data2);
}
}
return redirect('/dosen');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store($data, Resource $resource);",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }",
"public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }",
"public function createStorage();",
"public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"function storeAndNew() {\n $this->store();\n }",
"public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }",
"public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }",
"public function store()\n\t{\n\t\t\n\t\t//\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}"
] | [
"0.72865677",
"0.7145327",
"0.71325725",
"0.6640912",
"0.66209733",
"0.65685713",
"0.652643",
"0.65095705",
"0.64490104",
"0.637569",
"0.63736665",
"0.63657933",
"0.63657933",
"0.63657933",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437"
] | 0.0 | -1 |
Display the specified resource. | public function show($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }",
"private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }",
"function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}",
"public function show(ResourceSubject $resourceSubject)\n {\n //\n }",
"public function show(ResourceManagement $resourcesManagement)\n {\n //\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function retrieve(Resource $resource);",
"public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }",
"public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function show(Dispenser $dispenser)\n {\n //\n }",
"public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }",
"public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}",
"public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }",
"function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}",
"public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }",
"public function get(Resource $resource);",
"public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }",
"public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }",
"function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}",
"public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }",
"public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }",
"function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}",
"public function edit(Resource $resource)\n {\n //\n }",
"public function show(rc $rc)\n {\n //\n }",
"public function show(Resolucion $resolucion)\n {\n //\n }",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }",
"public function show(Resena $resena)\n {\n }",
"public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}",
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }",
"public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }",
"public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }",
"public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }",
"public function display()\n\t{\n\t\tparent::display();\n\t}",
"public function show()\n\t{\n\t\t\n\t}",
"public function get_resource();",
"function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}",
"public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }",
"public function display($title = null)\n {\n echo $this->fetch($title);\n }",
"public function display(){}",
"public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}",
"public function display() {\n echo $this->render();\n }",
"public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }",
"#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}",
"public function show($id)\n\t{\n\t//\n\t}",
"public function show($id)\n\t{\n\t//\n\t}",
"function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }",
"public function show($id)\n {\n //\n $this->_show($id);\n }",
"public function show()\n\t{\n\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {}",
"static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}",
"public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}",
"public abstract function display();",
"public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }",
"public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"abstract public function resource($resource);",
"public function show(Response $response)\n {\n //\n }",
"public function show()\n {\n return auth()->user()->getResource();\n }",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}"
] | [
"0.8233183",
"0.81894475",
"0.6830127",
"0.6498529",
"0.6496276",
"0.6469191",
"0.64627224",
"0.63619924",
"0.6308743",
"0.62809277",
"0.6218707",
"0.61915004",
"0.617914",
"0.6172935",
"0.6137578",
"0.6118736",
"0.6107122",
"0.6106576",
"0.60931313",
"0.60798067",
"0.6046669",
"0.60386544",
"0.60193497",
"0.59882426",
"0.5963477",
"0.59618807",
"0.5952755",
"0.5929829",
"0.59192723",
"0.59065384",
"0.59065384",
"0.59065384",
"0.590592",
"0.58923435",
"0.5870325",
"0.5868533",
"0.58685124",
"0.5851443",
"0.5815833",
"0.58149886",
"0.58143586",
"0.580419",
"0.58004224",
"0.5793256",
"0.57887405",
"0.57840455",
"0.5782294",
"0.5760476",
"0.5757928",
"0.57578564",
"0.57453394",
"0.5745187",
"0.5741311",
"0.5738201",
"0.5738201",
"0.5730195",
"0.5727921",
"0.5727622",
"0.5724217",
"0.5724217",
"0.5724217",
"0.5724217",
"0.5724217",
"0.5724217",
"0.5724217",
"0.5724217",
"0.5724217",
"0.5724217",
"0.5720258",
"0.5714068",
"0.57106924",
"0.5709095",
"0.57058644",
"0.57057875",
"0.5704414",
"0.5704414",
"0.57021624",
"0.56991994",
"0.5692151",
"0.5686576",
"0.5686576",
"0.5686576",
"0.5686576",
"0.5686576",
"0.5686576",
"0.5686576",
"0.5686576",
"0.5686576",
"0.5686576",
"0.5686576",
"0.5686576",
"0.5686576",
"0.5686576",
"0.5686576",
"0.5686576",
"0.5686576",
"0.5686576",
"0.5686576",
"0.5686576",
"0.5686576",
"0.5686576"
] | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function edit()\n {\n return view('hirmvc::edit');\n }",
"public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}",
"public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }",
"public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}",
"public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }",
"public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }",
"private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }",
"public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }",
"public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}",
"public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }",
"public function edit($model, $form);",
"function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}",
"public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}",
"public function edit()\n { \n return view('admin.control.edit');\n }",
"public function edit(Form $form)\n {\n //\n }",
"public function edit()\n {\n return view('common::edit');\n }",
"public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\r\n {\r\n return view('petro::edit');\r\n }",
"public function edit($id)\n {\n // show form edit user info\n }",
"public function edit()\n {\n return view('escrow::edit');\n }",
"public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }",
"public function edit()\n {\n return view('commonmodule::edit');\n }",
"public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit(form $form)\n {\n //\n }",
"public function actionEdit($id) { }",
"public function edit()\n {\n return view('admincp::edit');\n }",
"public function edit()\n {\n return view('scaffold::edit');\n }",
"public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }",
"public function edit()\n {\n return view('Person.edit');\n }",
"public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }",
"public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}",
"public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }",
"public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}",
"public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }",
"public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }",
"public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }",
"function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}",
"public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"protected function _edit(){\n\t\treturn $this->_editForm();\n\t}",
"public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }",
"public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }",
"public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}",
"public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}",
"public function edit($id)\n {\n return view('models::edit');\n }",
"public function edit()\n {\n return view('home::edit');\n }",
"public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }",
"public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }",
"public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }",
"public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('consultas::edit');\n }",
"public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }",
"public function edit()\n {\n return view('dashboard::edit');\n }",
"public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }",
"public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }",
"public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }",
"public function edit() {\n return view('routes::edit');\n }",
"public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }",
"public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('cataloguemodule::edit');\n }",
"public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }",
"public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }",
"public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }",
"public function edit()\n {\n return view('website::edit');\n }",
"public function edit()\n {\n return view('inventory::edit');\n }",
"public function edit()\n {\n return view('initializer::edit');\n }",
"public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }",
"public function edit($id)\n {\n return view('backend::edit');\n }",
"public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }",
"public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }",
"public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}",
"public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }",
"public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }",
"public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }",
"public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }",
"public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}"
] | [
"0.78550774",
"0.7692893",
"0.7273195",
"0.7242132",
"0.7170847",
"0.70622855",
"0.7053459",
"0.6982539",
"0.69467914",
"0.6945275",
"0.6941114",
"0.6928077",
"0.69019294",
"0.68976134",
"0.68976134",
"0.6877213",
"0.68636996",
"0.68592185",
"0.68566656",
"0.6844697",
"0.68336326",
"0.6811471",
"0.68060875",
"0.68047357",
"0.68018645",
"0.6795623",
"0.6791791",
"0.6791791",
"0.6787701",
"0.67837197",
"0.67791027",
"0.677645",
"0.6768301",
"0.6760122",
"0.67458534",
"0.67458534",
"0.67443407",
"0.67425704",
"0.6739898",
"0.6735328",
"0.6725465",
"0.6712817",
"0.6693891",
"0.6692419",
"0.6688581",
"0.66879624",
"0.6687282",
"0.6684741",
"0.6682786",
"0.6668777",
"0.6668427",
"0.6665287",
"0.6665287",
"0.66610634",
"0.6660843",
"0.66589665",
"0.66567147",
"0.66545695",
"0.66527975",
"0.6642529",
"0.6633056",
"0.6630304",
"0.6627662",
"0.6627662",
"0.66192114",
"0.6619003",
"0.66153085",
"0.6614968",
"0.6609744",
"0.66086483",
"0.66060555",
"0.6596137",
"0.65950733",
"0.6594648",
"0.65902114",
"0.6589043",
"0.6587102",
"0.65799844",
"0.65799403",
"0.65799177",
"0.657708",
"0.65760696",
"0.65739626",
"0.656931",
"0.6567826",
"0.65663105",
"0.65660435",
"0.65615267",
"0.6561447",
"0.6561447",
"0.65576506",
"0.655686",
"0.6556527",
"0.6555543",
"0.6555445",
"0.65552044",
"0.65543956",
"0.65543705",
"0.6548264",
"0.65475875",
"0.65447706"
] | 0.0 | -1 |
Update the specified resource in storage. | public function update(Request $request, $id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }",
"public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }",
"public function update(Request $request, Resource $resource)\n {\n //\n }",
"public function updateStream($resource);",
"public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }",
"protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }",
"public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }",
"public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}",
"public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }",
"public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }",
"protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }",
"public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }",
"public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }",
"public function update($path);",
"public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }",
"public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }",
"public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}",
"public function updateStream($path, $resource, Config $config)\n {\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }",
"public function update($data) {}",
"public function update($data) {}",
"public function putStream($resource);",
"public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function update($entity);",
"public function update($entity);",
"public function setResource($resource);",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }",
"public function isUpdateResource();",
"public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }",
"public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }",
"public function store($data, Resource $resource);",
"public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }",
"public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }",
"public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }",
"public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }",
"public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }",
"public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }",
"public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }",
"public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }",
"public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }",
"public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }",
"public function update(Qstore $request, $id)\n {\n //\n }",
"public function update(IEntity $entity);",
"protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }",
"public function update($request, $id);",
"function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}",
"public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }",
"public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }",
"protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }",
"abstract public function put($data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function testUpdateSupplierUsingPUT()\n {\n }",
"public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }",
"public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }",
"public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }",
"public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }",
"public abstract function update($object);",
"public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }",
"public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }",
"public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }",
"public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }",
"public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }",
"public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }",
"public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }",
"public function update($entity)\n {\n \n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }",
"public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }",
"public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }",
"public function update($id, $input);",
"public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }",
"public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}",
"public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }",
"public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }",
"public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }",
"public function update($id);",
"public function update($id);",
"private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }",
"public function put($path, $data = null);",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }",
"public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }",
"public function update(Entity $entity);",
"public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }",
"public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}",
"public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }",
"public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }",
"public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }"
] | [
"0.7425105",
"0.70612276",
"0.70558053",
"0.6896673",
"0.6582159",
"0.64491373",
"0.6346954",
"0.62114537",
"0.6145042",
"0.6119944",
"0.61128503",
"0.6099993",
"0.6087866",
"0.6052593",
"0.6018941",
"0.60060275",
"0.59715486",
"0.5946516",
"0.59400934",
"0.59377414",
"0.5890722",
"0.5860816",
"0.5855127",
"0.5855127",
"0.58513457",
"0.5815068",
"0.5806887",
"0.57525045",
"0.57525045",
"0.57337505",
"0.5723295",
"0.5714311",
"0.5694472",
"0.5691319",
"0.56879413",
"0.5669989",
"0.56565005",
"0.56505877",
"0.5646085",
"0.5636683",
"0.5633498",
"0.5633378",
"0.5632906",
"0.5628826",
"0.56196684",
"0.5609126",
"0.5601397",
"0.55944353",
"0.5582592",
"0.5581908",
"0.55813426",
"0.5575312",
"0.55717176",
"0.55661047",
"0.55624634",
"0.55614686",
"0.55608666",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55573726",
"0.5556878",
"0.5554201",
"0.5553069",
"0.55530256",
"0.5543788",
"0.55435944",
"0.55412996",
"0.55393505",
"0.55368495",
"0.5535236",
"0.5534954",
"0.55237365",
"0.5520468",
"0.55163723",
"0.55125296",
"0.5511168",
"0.5508345",
"0.55072427",
"0.5502385",
"0.5502337",
"0.5501029",
"0.54995877",
"0.54979175",
"0.54949397",
"0.54949397",
"0.54946727",
"0.5494196",
"0.54941916",
"0.54925025",
"0.5491807",
"0.5483321",
"0.5479606",
"0.5479408",
"0.5478678",
"0.54667485",
"0.5463411",
"0.5460588",
"0.5458525"
] | 0.0 | -1 |
Remove the specified resource from storage. | public function destroy($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }",
"public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }",
"public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }",
"public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }",
"protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }",
"public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }",
"public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }",
"public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}",
"public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}",
"public function delete(): void\n {\n unlink($this->getPath());\n }",
"public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }",
"public function remove($path);",
"function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}",
"public function delete(): void\n {\n unlink($this->path);\n }",
"private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }",
"public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function remove() {}",
"public function remove() {}",
"public function remove();",
"public function remove();",
"public function remove();",
"public function remove();",
"function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}",
"public function deleteImage(){\n\n\n Storage::delete($this->image);\n }",
"public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }",
"public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}",
"public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }",
"public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }",
"public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}",
"public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }",
"public function deleteImage(){\n \tStorage::delete($this->image);\n }",
"public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }",
"public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }",
"public function destroy($id)\n {\n Myfile::find($id)->delete();\n }",
"public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }",
"public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }",
"public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }",
"public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }",
"public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }",
"public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }",
"public function delete($path);",
"public function delete($path);",
"public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }",
"public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }",
"public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }",
"public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }",
"public function delete($path, $data = null);",
"public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }",
"public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }",
"public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }",
"public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }",
"public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }",
"public function del($path){\n\t\treturn $this->remove($path);\n\t}",
"public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }",
"public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}",
"public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }",
"public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }",
"public function revoke($resource, $permission = null);",
"public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }",
"function delete($path);",
"public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}",
"public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }",
"public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }",
"public function remove($filePath){\n return Storage::delete($filePath);\n }",
"public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }",
"public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }",
"public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }",
"public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }",
"function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }",
"public function remove($id);",
"public function remove($id);",
"public function deleted(Storage $storage)\n {\n //\n }",
"public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }",
"public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }",
"public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }",
"public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }",
"function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}",
"public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }",
"public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}",
"public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }",
"public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }"
] | [
"0.6672584",
"0.6659381",
"0.6635911",
"0.6632799",
"0.6626075",
"0.65424126",
"0.65416265",
"0.64648265",
"0.62882507",
"0.6175931",
"0.6129922",
"0.60893893",
"0.6054415",
"0.60428125",
"0.60064924",
"0.59337646",
"0.5930772",
"0.59199584",
"0.5919811",
"0.5904504",
"0.5897263",
"0.58962846",
"0.58951396",
"0.58951396",
"0.58951396",
"0.58951396",
"0.5880124",
"0.58690923",
"0.5863659",
"0.5809161",
"0.57735413",
"0.5760811",
"0.5753559",
"0.57492644",
"0.5741712",
"0.57334286",
"0.5726379",
"0.57144034",
"0.57096",
"0.5707689",
"0.5705895",
"0.5705634",
"0.5703902",
"0.5696585",
"0.5684331",
"0.5684331",
"0.56780374",
"0.5677111",
"0.5657287",
"0.5648262",
"0.5648085",
"0.5648012",
"0.5640759",
"0.5637738",
"0.5629985",
"0.5619264",
"0.56167465",
"0.5606877",
"0.56021434",
"0.5601949",
"0.55992156",
"0.5598557",
"0.55897516",
"0.5581397",
"0.5566926",
"0.5566796",
"0.55642897",
"0.55641",
"0.5556583",
"0.5556536",
"0.5550097",
"0.5543172",
"0.55422723",
"0.5540013",
"0.5540013",
"0.55371785",
"0.55365825",
"0.55300397",
"0.552969",
"0.55275744",
"0.55272335",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.5525997",
"0.5525624",
"0.5523911",
"0.5521122",
"0.5517412"
] | 0.0 | -1 |
Display a listing of the resource. | public function index()
{
$products = Cart::all();
return view('cart')
->with('cart',$products);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }",
"public function listing();",
"function index() {\n\t\t$this->show_list();\n\t}",
"public function actionList() {\n $this->_getList();\n }",
"public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }",
"public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }",
"public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }",
"function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}",
"public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }",
"public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }",
"public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}",
"function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}",
"public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }",
"public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}",
"public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}",
"public function actionRestList() {\n\t $this->doRestList();\n\t}",
"public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }",
"public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }",
"public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}",
"public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}",
"public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }",
"public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }",
"public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }",
"public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }",
"public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}",
"public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }",
"public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}",
"public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }",
"public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }",
"public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }",
"public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}",
"public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }",
"public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }",
"public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }",
"public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }",
"public function index()\n {\n return Resources::collection(Checking::paginate());\n }",
"public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }",
"public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }",
"public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }",
"public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }",
"public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }",
"public function view(){\n\t\t$this->buildListing();\n\t}",
"public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }",
"public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }",
"public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }",
"public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }",
"public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }",
"public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }",
"public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }",
"public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }",
"public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}",
"public function listAction() {}",
"public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }",
"public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }",
"public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }",
"public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }",
"public function executeList()\n {\n $this->setTemplate('list');\n }",
"public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }",
"function listing() {\r\n\r\n }",
"public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }",
"public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }",
"public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }",
"public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}",
"public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }",
"public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}",
"public function _index(){\n\t $this->_list();\n\t}",
"public function index()\n {\n $this->booklist();\n }",
"function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}",
"public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }",
"public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }",
"public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }",
"public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }",
"public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }",
"public function indexAction() {\n $this->_forward('list');\n }",
"public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }",
"public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }",
"public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}",
"public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }",
"public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }",
"public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }",
"public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }",
"public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }",
"public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}",
"public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }",
"public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }",
"public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }",
"public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}",
"public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }",
"public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }",
"public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }",
"public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }",
"public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }",
"public function index()\n {\n return view('admin.resources.index');\n }",
"public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}"
] | [
"0.7447426",
"0.73628515",
"0.73007894",
"0.7249563",
"0.7164474",
"0.7148467",
"0.71320325",
"0.7104678",
"0.7103152",
"0.7100512",
"0.7048493",
"0.6994995",
"0.69899315",
"0.6935843",
"0.6899995",
"0.68999326",
"0.6892163",
"0.6887924",
"0.6867505",
"0.6851258",
"0.6831236",
"0.68033123",
"0.6797587",
"0.6795274",
"0.67868614",
"0.67610204",
"0.67426085",
"0.67303514",
"0.6727031",
"0.67257243",
"0.67257243",
"0.67257243",
"0.67195046",
"0.67067856",
"0.67063624",
"0.67045796",
"0.66655326",
"0.666383",
"0.66611767",
"0.66604036",
"0.66582054",
"0.6654805",
"0.6649084",
"0.6620993",
"0.66197145",
"0.6616024",
"0.66077465",
"0.6602853",
"0.6601494",
"0.6593894",
"0.65878326",
"0.6586189",
"0.6584675",
"0.65813804",
"0.65766823",
"0.65754175",
"0.657203",
"0.657202",
"0.65713936",
"0.65642136",
"0.6563951",
"0.6553249",
"0.6552584",
"0.6546312",
"0.6536654",
"0.6534106",
"0.6532539",
"0.6527516",
"0.6526785",
"0.6526042",
"0.65191233",
"0.6518727",
"0.6517732",
"0.6517689",
"0.65155584",
"0.6507816",
"0.65048593",
"0.6503226",
"0.6495243",
"0.6492096",
"0.6486592",
"0.64862204",
"0.6485348",
"0.6483991",
"0.64789015",
"0.6478804",
"0.64708763",
"0.6470304",
"0.64699143",
"0.6467142",
"0.646402",
"0.6463102",
"0.6460929",
"0.6458856",
"0.6454334",
"0.6453653",
"0.645357",
"0.6450551",
"0.64498454",
"0.64480853",
"0.64453584"
] | 0.0 | -1 |
Show the form for creating a new resource. | public function create($request) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view('resource.create');\n }",
"public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}",
"public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }",
"public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }",
"public function create()\n {\n return view ('forms.create');\n }",
"public function create ()\n {\n return view('forms.create');\n }",
"public function create()\n\t{\n\t\treturn view('faith.form');\n\t}",
"public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }",
"public function create()\n {\n return view(\"request_form.form\");\n }",
"public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }",
"public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle école'\n\t\t) ) );\n\t}",
"public function create()\n {\n return view($this->forms . '.create');\n }",
"public function create()\n {\n return view('restful.add');\n }",
"public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }",
"public function create()\n {\n return view('admin.createform');\n }",
"public function create()\n {\n return view('admin.forms.create');\n }",
"public function create()\n {\n return view('backend.student.form');\n }",
"public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function create()\n {\n return view('client.form');\n }",
"public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }",
"public function create()\n {\n return view('Form');\n }",
"public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }",
"public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}",
"public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }",
"public function create()\n {\n return view('backend.schoolboard.addform');\n }",
"public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}",
"public function create()\n {\n //\n return view('form');\n }",
"public function create()\n {\n return view('rests.create');\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return view(\"Add\");\n }",
"public function create(){\n return view('form.create');\n }",
"public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }",
"public function create()\n {\n\n return view('control panel.student.add');\n\n }",
"public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}",
"public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }",
"public function create()\n {\n return $this->cView(\"form\");\n }",
"public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }",
"public function create()\n {\n return view(\"dresses.form\");\n }",
"public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}",
"public function createAction()\n {\n// $this->view->form = $form;\n }",
"public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }",
"public function create()\n {\n return view('fish.form');\n }",
"public function create()\n {\n return view('users.forms.create');\n }",
"public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }",
"public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}",
"public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }",
"public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }",
"public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }",
"public function create()\n {\n return view('essentials::create');\n }",
"public function create()\n {\n return view('student.add');\n }",
"public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}",
"public function create()\n {\n return view('url.form');\n }",
"public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }",
"public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}",
"public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view('crud/add'); }",
"public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}",
"public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view(\"List.form\");\n }",
"public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}",
"public function create()\n {\n //load create form\n return view('products.create');\n }",
"public function create()\n {\n return view('article.addform');\n }",
"public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }",
"public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}",
"public function create()\n {\n return view('saldo.form');\n }",
"public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}",
"public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }",
"public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }",
"public function create()\n {\n return view('admin.inverty.add');\n }",
"public function create()\n {\n return view('Libro.create');\n }",
"public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }",
"public function create()\n {\n return view(\"familiasPrograma.create\");\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}",
"public function create()\n {\n return view(\"create\");\n }",
"public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}",
"public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n return view('forming');\n }",
"public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }",
"public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }",
"public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }",
"public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }",
"public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }",
"public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}",
"public function create()\n {\n return view('student::students.student.create');\n }",
"public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}"
] | [
"0.75948673",
"0.75948673",
"0.75863165",
"0.7577412",
"0.75727344",
"0.7500887",
"0.7434847",
"0.7433956",
"0.73892003",
"0.73531085",
"0.73364776",
"0.73125",
"0.7296102",
"0.7281891",
"0.72741455",
"0.72424185",
"0.7229325",
"0.7226713",
"0.7187349",
"0.7179176",
"0.7174283",
"0.7150356",
"0.71444064",
"0.71442676",
"0.713498",
"0.71283126",
"0.7123691",
"0.71158516",
"0.71158516",
"0.71158516",
"0.7112176",
"0.7094388",
"0.7085711",
"0.708025",
"0.70800644",
"0.70571953",
"0.70571953",
"0.70556754",
"0.70396435",
"0.7039549",
"0.7036275",
"0.703468",
"0.70305896",
"0.7027638",
"0.70265305",
"0.70199823",
"0.7018007",
"0.7004984",
"0.7003889",
"0.7000935",
"0.69973785",
"0.6994679",
"0.6993764",
"0.6989918",
"0.6986989",
"0.6966502",
"0.69656384",
"0.69564354",
"0.69518244",
"0.6951109",
"0.6947306",
"0.69444615",
"0.69423944",
"0.6941156",
"0.6937871",
"0.6937871",
"0.6936686",
"0.69345254",
"0.69318026",
"0.692827",
"0.69263744",
"0.69242257",
"0.6918349",
"0.6915889",
"0.6912884",
"0.691146",
"0.69103104",
"0.69085974",
"0.69040126",
"0.69014287",
"0.69012105",
"0.6900397",
"0.68951064",
"0.6893521",
"0.68932164",
"0.6891899",
"0.6891616",
"0.6891616",
"0.6889246",
"0.68880934",
"0.6887128",
"0.6884732",
"0.68822503",
"0.68809193",
"0.6875949",
"0.68739206",
"0.68739134",
"0.6870358",
"0.6869779",
"0.68696856",
"0.686877"
] | 0.0 | -1 |
Run the database seeds. | public function run()
{
$Brand_Categories=[
[
'brand_id'=>'1',
'category_id'=>'1'
],
[
'brand_id'=>'2',
'category_id'=>'1'
],
[
'brand_id'=>'3',
'category_id'=>'1'
],
[
'brand_id'=>'4',
'category_id'=>'2'
],
[
'brand_id'=>'5',
'category_id'=>'2'
],
[
'brand_id'=>'6',
'category_id'=>'2'
],
[
'brand_id'=>'7',
'category_id'=>'2'
],
[
'brand_id'=>'8',
'category_id'=>'2'
],
[
'brand_id'=>'9',
'category_id'=>'2'
],
[
'brand_id'=>'10',
'category_id'=>'3'
],
[
'brand_id'=>'11',
'category_id'=>'3'
],
[
'brand_id'=>'12',
'category_id'=>'4'
],
[
'brand_id'=>'13',
'category_id'=>'4'
],
[
'brand_id'=>'14',
'category_id'=>'4'
],
[
'brand_id'=>'15',
'category_id'=>'8'
],
[
'brand_id'=>'16',
'category_id'=>'6'
],
[
'brand_id'=>'17',
'category_id'=>'6'
],
[
'brand_id'=>'18',
'category_id'=>'6'
],
[
'brand_id'=>'19',
'category_id'=>'6'
],
[
'brand_id'=>'20',
'category_id'=>'6'
],
[
'brand_id'=>'21',
'category_id'=>'7'
],
[
'brand_id'=>'22',
'category_id'=>'7'
],
[
'brand_id'=>'23',
'category_id'=>'7'
],
[
'brand_id'=>'24',
'category_id'=>'7'
],
[
'brand_id'=>'25',
'category_id'=>'7'
],
[
'brand_id'=>'26',
'category_id'=>'7'
],
[
'brand_id'=>'27',
'category_id'=>'7'
],
[
'brand_id'=>'28',
'category_id'=>'8'
],
[
'brand_id'=>'29',
'category_id'=>'9'
]
];
foreach($Brand_Categories as $Brand_Category){
Brand_Category::create($Brand_Category);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }",
"public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }",
"public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }",
"public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }",
"public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }",
"public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }",
"public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }",
"public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }",
"public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }",
"public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }",
"public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }",
"public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }",
"public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }",
"public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }",
"public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }",
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }",
"public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }",
"public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }",
"public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }",
"public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }",
"public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }",
"public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }",
"public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}",
"public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }",
"public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}",
"public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }",
"public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }",
"public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }",
"public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }",
"public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }",
"public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }",
"public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}",
"public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }",
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }",
"public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }",
"public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }",
"public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }",
"public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }",
"public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }",
"public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }",
"public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }",
"public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }",
"public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }",
"public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }",
"public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }",
"public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }",
"public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }",
"public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }",
"public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}",
"public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }",
"public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }",
"public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }",
"public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }",
"public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }",
"public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }",
"public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }",
"public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }",
"public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }"
] | [
"0.8013876",
"0.79804534",
"0.7976992",
"0.79542726",
"0.79511505",
"0.7949612",
"0.794459",
"0.7942486",
"0.7938189",
"0.79368967",
"0.79337025",
"0.78924936",
"0.78811055",
"0.78790957",
"0.78787595",
"0.787547",
"0.7871811",
"0.78701615",
"0.7851422",
"0.7850352",
"0.7841468",
"0.7834583",
"0.7827792",
"0.7819104",
"0.78088796",
"0.7802872",
"0.7802348",
"0.78006834",
"0.77989215",
"0.7795819",
"0.77903426",
"0.77884805",
"0.77862066",
"0.7778816",
"0.7777486",
"0.7765202",
"0.7762492",
"0.77623445",
"0.77621746",
"0.7761383",
"0.77606887",
"0.77596676",
"0.7757001",
"0.7753607",
"0.7749522",
"0.7749292",
"0.77466977",
"0.7729947",
"0.77289546",
"0.772796",
"0.77167094",
"0.7714503",
"0.77140456",
"0.77132195",
"0.771243",
"0.77122366",
"0.7711113",
"0.77109736",
"0.7710777",
"0.7710086",
"0.7705484",
"0.770464",
"0.7704354",
"0.7704061",
"0.77027386",
"0.77020216",
"0.77008796",
"0.7698617",
"0.76985973",
"0.76973504",
"0.7696405",
"0.7694293",
"0.7692694",
"0.7691264",
"0.7690576",
"0.76882726",
"0.7687433",
"0.7686844",
"0.7686498",
"0.7685065",
"0.7683827",
"0.7679184",
"0.7678287",
"0.76776296",
"0.76767945",
"0.76726556",
"0.76708084",
"0.76690495",
"0.766872",
"0.76686716",
"0.7666299",
"0.76625943",
"0.7662227",
"0.76613766",
"0.7659881",
"0.7656644",
"0.76539344",
"0.76535016",
"0.7652375",
"0.7652313",
"0.7652022"
] | 0.0 | -1 |
Register a new relationship | public function register($labels, int $index)
{
if (\is_array($labels)) {
$labelsArr = $labels;
$labelsStr = \implode('.', $labels);
} else {
$labelsArr = \explode('.', $labels);
$labelsStr = (string) $labels;
}
if (!isset($this->labels[$labelsStr]) || $index < $this->labels[$labelsStr]) {
$this->labels[$labelsStr] = $index;
}
$this->indexes[$index] = $labelsArr;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addRelationship(string $name, $relationship);",
"public function isAddToRelationship();",
"public function createRelationship() {\n\t\tthrow new CmisNotImplementedException(\"createRelationship\");\n\t}",
"function register_aliment_brand_relationship() {\n\t\\IA\\One_To_Many_Post_Relationship::register_relationship( 'ia_aliment_brand', 'company', 'post' );\n}",
"public function store(Requests\\RelationshipRequest $request)\n\t{\n\t\t//\n\t\tRelationship::create($request->all());\n\t\treturn redirect('relationships');\n\t}",
"protected function addRelation()\n {\n $fromTable = $this->ask('Enter the name of the parent table');\n $this->checkInput($fromTable);\n $toTable = $this->ask('Enter the name of the child table');\n $this->checkInput($toTable);\n $relationColumn = $this->ask('Enter the column which is going to be referenced (default is \\'id\\')', 'id');\n $action = $this->choice('Action to be taken for column (default is \\'cascade\\')', ['cascade', 'restrict', 'set null'], 'cascade');\n $this->service->addRelation($fromTable, $toTable, $relationColumn, $action);\n }",
"private function createRelation()\n {\n $this->createBuilder();\n }",
"public function addRelation(RelationInterface $relation);",
"public function attachRelationship(Request $request, object $model, string $fieldName): bool;",
"public function __construct(Relationship $relationship)\n {\n $this->relationship = $relationship;\n }",
"public function associate($entity)\n {\n // The Mapper will retrieve this association within the object model, we won't be using\n // the foreign key attribute inside the parent Entity.\n //\n //$this->parent->setEntityAttribute($this->foreignKey, $entity->getEntityAttribute($this->otherKey));\n //\n // Instead, we'll just add the object to the Entity's attribute\n\n $this->parent->setEntityAttribute($this->relation, $entity->getEntityObject());\n }",
"public function CreateRelationship($type = self::RT_OFFICE_DOCUMENT, $target = 'document.xml') {\n\t\t$el = $this->createElement('Relationship');\n\t\t$this->_Relationships[] = $el;\n\t\t$el->setAttribute('Id', \"rId\".count($this->_Relationships));\n\t\t$el->setIdAttribute('Id', true);\n\t\t$el->setAttribute('Type', $type);\n\t\t$el->setAttribute('Target', $target);\n\t\t$this->_DocumentRoot->appendChild($el);\n\t}",
"public function setupAssociations() \n {\n \n }",
"protected function addRelation($field)\n {\n $this->owner->relationsKeeper->addRelation($field);\n }",
"public function testAddRelationshipWithInvalidName()\n {\n $this->document->addToData($parent = $this->schemaFactory->createResourceObject($this->getSchema(\n 'people',\n '123',\n ['firstName' => 'John', 'lastName' => 'Dow'],\n new Link('peopleSelfUrl/'), // self url\n [], // links for resource\n null // meta\n ), new stdClass(), false));\n\n $link = $this->schemaFactory->createRelationshipObject(\n 'self', // <-- 'self' is a reserved word and cannot be used as a name\n new stdClass(),\n [], // links\n ['some' => 'relationship meta'], // relationship meta\n true, // show data\n false // is root\n );\n\n $this->document->addEmptyRelationshipToData($parent, $link);\n }",
"protected function withRelationships()\n {\n if ($this->resource instanceof Model) {\n $this->attachRelations($this->resource);\n }\n }",
"function add ($relationship)\n {\n parent::add ( $relationship ) ;\n $this->addFieldsToUndeployedLayouts ( $relationship ) ; // must come after parent::add as we need the relationship_name in the relationships getFieldsToLayouts() which is called by addFieldsToUndeployedLayouts() \n }",
"public function SaveRelationship(object $data)\n {\n return $this->model->push($data);\n }",
"public function setRelations() {}",
"public function relationship(){\n return $this->hasOne('App\\Relationship','id','relationship_id');\n }",
"public function run()\n {\n factory('App\\Relationship', 3)->create();\n }",
"public function relationship($class, $type, $name, array $options = [])\n {\n }",
"protected function addRelationship(AbstractEntity $entity)\n {\n // attach item\n $attach = $this->resourceService()->attach($this->getId(), $entity->get('resource_type'), [\n 'type' => $entity->get('resource_type'),\n 'id' => $entity->get('id')\n ]);\n // add to relationships\n $this->relationships->get($entity->get('resource_type'))->push($entity->get('id'));\n // update cache\n $this->cacheSelf();\n }",
"public function addRelation($name,$config)\n\t{\n\t\tif(isset($config[0],$config[1],$config[2])) // relation class, AR class, FK\n\t\t\t$this->relations[$name]=new $config[0]($name,$config[1],$config[2],array_slice($config,3));\n\t\telse\n\t\t\tthrow new DbException(Benben::t('benben','Active record \"{class}\" has an invalid configuration for relation \"{relation}\". It must specify the relation type, the related active record class and the foreign key.', array('{class}'=>get_class($this->_model),'{relation}'=>$name)));\n\t}",
"protected function addRelationship($oRelationship, $alias)\n {\n // FIXME: we need to throw an exception if this alias\n // is already in use\n $this->aRelationships[$alias] = $oRelationship;\n }",
"public function storeRelationship(StoreRelationshipRequest $request)\n {\n if (!$this->hasStoredRelationship($request->get('wordId'), $request->get('linkedWordId'), $request->get('type')))\n {\n $success = $this->storeRelationshipInDatabase($request->get('wordId'), $request->get('linkedWordId'), $request->get('type'));\n }\n else\n {\n $success = $this->updateRelationshipInDatabase($request->get('wordId'), $request->get('linkedWordId'), $request->get('type'));\n }\n\n if ($success)\n {\n return response()->json(array('status' => 'success'));\n }\n\n return response()->json(array('error' => 'Could not save into database'), 500);\n }",
"public function addRelationShip($id, $dependentId, $oBegin, $oEnd, $dBegin, $dEnd, $relation, $text)\n {\n $this->relationships[] = new Relationship($id, $dependentId, $oBegin, $oEnd, $dBegin, $dEnd, $relation, $text);\n }",
"private function relationshipWasCreated()\n {\n $this->info(\"The relationship \\\"{$this->type}\\\" was created\");\n }",
"public function register()\n {\n Relation::morphMap([\n 'student' => Student::class,\n 'teacher' => Teacher::class,\n 'member' => Member::class,\n 'activity' => Activity::class,\n 'news' => News::class,\n 'committee' => Committee::class,\n 'page' => Page::class\n ]);\n }",
"public function addReferrer(Relation $relation)\n {\n $this->referrers[] = $relation;\n }",
"public function testAddRelationViaObject()\n {\n $resource = new Entry($this->createFakeNode());\n $resource->setEntityType('Foo');\n $resource->addLink('FooSet(123)', 'self');\n\n $entry = new Entry($this->createFakeNode());\n $entry->addRelation($resource);\n\n static::assertEquals(\n '<entry>' .\n '<link type=\"application/atom+xml;type=entry\" ' .\n 'href=\"FooSet(123)\" ' .\n 'rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Foo\" ' .\n 'title=\"Foo\"/>' .\n '</entry>',\n $this->getXML($entry)\n );\n }",
"public function link($from,$to)\n {\n //\n $relation = new Relation;\n\t$relation->from = $from;\n $relation->to = $to;\n\t$relation->save();\n\t\n }",
"public function requireRelationshipDefined()\n {\n if ($this->relationship === null)\n {\n throw new Exception();\n }\n }",
"public function __construct()\n {\n $this->relationships = array();\n }",
"private function addPolymorphicToRelation()\n {\n $path = app_path(\"{$this->polymorphicName}.php\");\n\n File::append($path,\n $this->replacePolymorphicRelationNames()\n );\n }",
"function _save_relation($object)\r\n\t{\r\n\t\tif ( ! empty($object->model) && ! empty($this->id) && ! empty($object->id))\r\n\t\t{\r\n\t\t\t// Determine relationship table name\r\n\t\t\t$relationship_table = $this->_get_relationship_table($object->prefix, $object->table, $object->model);\r\n\r\n\t\t\t$data = array($this->model . '_id' => $this->id, $object->model . '_id' => $object->id);\r\n\r\n\t\t\t// Check if relation already exists\r\n\t\t\t$query = $this->db->get_where($relationship_table, $data, NULL, NULL);\r\n\r\n\t\t\tif ($query->num_rows() == 0)\r\n\t\t\t{\r\n\t\t\t\t// If this object has a \"has many\" relationship with the other object\r\n\t\t\t\tif (in_array($object->model, $this->has_many))\r\n\t\t\t\t{\r\n\t\t\t\t\t// If the other object has a \"has one\" relationship with this object\r\n\t\t\t\t\tif (in_array($this->model, $object->has_one))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// And it has an existing relation\r\n\t\t\t\t\t\t$query = $this->db->get_where($relationship_table, array($object->model . '_id' => $object->id), 1, 0);\r\n\r\n\t\t\t\t\t\tif ($query->num_rows() > 0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// Find and update the other objects existing relation to relate with this object\r\n\t\t\t\t\t\t\t$this->db->where($object->model . '_id', $object->id);\r\n\t\t\t\t\t\t\t$this->db->update($relationship_table, $data);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// Add the relation since one doesn't exist\r\n\t\t\t\t\t\t\t$this->db->insert($relationship_table, $data);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\treturn TRUE;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (in_array($this->model, $object->has_many))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// We can add the relation since this specific relation doesn't exist, and a \"has many\" to \"has many\" relationship exists between the objects\r\n\t\t\t\t\t\t$this->db->insert($relationship_table, $data);\r\n\r\n\t\t\t\t\t\treturn TRUE;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// If this object has a \"has one\" relationship with the other object\r\n\t\t\t\telse if (in_array($object->model, $this->has_one))\r\n\t\t\t\t{\r\n\t\t\t\t\t// And it has an existing relation\r\n\t\t\t\t\t$query = $this->db->get_where($relationship_table, array($this->model . '_id' => $this->id), 1, 0);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif ($query->num_rows() > 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Find and update the other objects existing relation to relate with this object\r\n\t\t\t\t\t\t$this->db->where($this->model . '_id', $this->id);\r\n\t\t\t\t\t\t$this->db->update($relationship_table, $data);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Add the relation since one doesn't exist\r\n\t\t\t\t\t\t$this->db->insert($relationship_table, $data);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn TRUE;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// Relationship already exists\r\n\t\t\t\treturn TRUE;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn FALSE;\r\n\t}",
"public function registration()\n {\n return $this->hasOne('App\\Registration');\n }",
"public function isRelationship($name);",
"function save ()\n {\n parent::_save ( $this->relationships, $this->basepath ) ;\n }",
"public function addRelatedModel($relationshipName) {\n\t\t$model = $this->model;\n\t\t$relationship = $model::metaGetRelationship($relationshipName);\n\n\t\t// Related model\n\t\t$relatedModel = $relationship[\"model\"];\n\n\t\t// Adding related model to related model list\n\t\t$this->relatedModels[] = $relatedModel;\n\t\t\n\t\t// Adding related model table to related table list\n\t\t$this->relatedTables[] = $relatedModel::getTableName();\n\t\t\n\t\t// Adding relationship $relationshipName of $relatedModel\n\t\t// to the relationship list\n\t\t$this->relationships[$relationshipName] = [\n\t\t\t\"model\" => $relatedModel,\n\t\t\t\"table\" => $relatedModel::getTableName(),\n\t\t\t\"name\" => $relationshipName,\n\t\t\t\"attributes\" => $relationship\n\t\t];\n\n\t\t$this->relationships[$relationshipName][\"attributes\"][\"table\"] = $relatedModel::getTableName();\n\t}",
"function create_fam_relation($eParent, $personRec, $tag)\n\t{\n\t\t//throw new exception(\"create fam rel - this function is not implemented\");\n\t}",
"protected function createRelationHandlerInstance() {}",
"public function store(Request $request)\n {\n return $this->rels->add($request);\n }",
"protected\tfunction\tsetRelations() {}",
"protected\tfunction\tsetRelations() {}",
"public function isReplaceRelationship();",
"public function store()\r\n\t{\r\n $relative = new Relationship;\r\n\t\t\t$relative->abusedChild_id = Input::get('abusedChild_id');\r\n if (intval(Input::get('person_id')) == 0){\r\n $person = new Person;\r\n $person->first = Input::get('first');\r\n $person->middle = Input::get('middle');\r\n $person->last = Input::get('last');\r\n $person->dob = Input::get('dob');\r\n $person->gender = Input::get('gender');\r\n $person->save();\r\n $relative->person_id = $person->id;\r\n }else {\r\n $relative->person_id = Input::get('person_id');\r\n }\r\n\t\t\t$relative->relationType_id = Input::get('relationType_id');\r\n\t\t\t$relative->custodian = Input::get('custodian',false);\r\n $relative->sameHouse = Input::get('sameHouse',false);\r\n $relative->alias = Input::get('alias');\r\n $relative->center_id = Auth::User()->center_id;\r\n\t\t\t$relative->save();\r\n \r\n if (Input::get('allegedOffender', false)){\r\n $allegedOffender = new AllegedOffender;\r\n $allegedOffender->person_id = $relative->person_id;\r\n $allegedOffender->case_id = Input::get('case_id');\r\n $allegedOffender->county_id = Input::get('county_id');\r\n $allegedOffender->save();\r\n }\r\n if ($relative->sameHouse){\r\n $person->household_id = $relative->child->personalInfo->household_id;\r\n $person->save();\r\n }\r\n\r\n\t\t\t// redirect\r\n\t\t\tSession::flash('message', 'Successfully stored Relationship info!');\r\n\t\t\treturn Redirect::to(Session::get('from'));\r\n\t}",
"public function register()\n {\n Schema::defaultStringLength(191);\n\n Relation::morphMap([\n 'taxClass' => TaxClass::class,\n 'countryTaxDeductionClass' => CountryTaxDeductionClass::class,\n 'countryTaxReliefClass' => CountryTaxReliefClass::class,\n ]);\n }",
"public function store(Request $request)\n {\n try {\n $requester_id = Auth::user()->id;\n $responder_id = $request->responder_id;\n $relationship_id = 5;\n\n DB::insert('INSERT INTO relationships_users(requester_id, responder_id, relationship_id, accepted, created_at, updated_at) VALUES(?, ?, ?, ?, now(), now())', [$requester_id, $responder_id, $relationship_id, 0]);\n if($request->ajax()) {\n return response()->json(array('status'=>'success'));\n }\n return redirect()->back()->with('success', 'Successfully sent relationship request.');\n\n } catch(Exception $e) {\n if($request->ajax()) {\n return response()->json(array('status'=>'error'));\n }\n return redirect()->back()->with('error', 'Error sending relationship request, please try again later.');\n }\n }",
"public function register(Request $request)\n {\n $validator = $this->validator($request->all());\n\n if ($validator->fails()) {\n $this->throwValidationException($request, $validator);\n }\n // new User or new Referrer-User\n $user = $this->create($request->all());\n // if User registered via referral link - create relation in `referrals` table\n if ($referrerId = $request->get('referrer_id')) {\n $referrerId = \\Crypt::decrypt($referrerId);\n // check if Referrer still exists\n if (User::find($referrerId)) {\n Referral::create(['referrer_id' => $referrerId, 'referral_id' => $user->id]);\n } \n }\n\n Auth::guard($this->getGuard())->login($user);\n\n return redirect($this->redirectPath());\n }",
"final public function register() : void {\n\t\tregister_rest_field(\n\t\t\t$this->obj_type,\n\t\t\t$this->field_name,\n\t\t\t[\n\t\t\t\t'get_callback' => [ $this, 'get_callback' ],\n\t\t\t\t'update_callback' => method_exists( $this, 'update_callback' )\n\t\t\t\t\t? [ $this, 'update_callback' ]\n\t\t\t\t\t: null,\n\t\t\t\t'schema' => $this->schema,\n\t\t\t]\n\t\t);\n\t}",
"public function addRelation(\\RubenSteeb\\TestModelRelations\\Domain\\Model\\RelationClass $relation)\n\t{\n\t\t$this->relations->attach($relation);\n\t}",
"public function addHasOne( $name, $clazz, $relName = NULL )\n {\n if (!is_subclass_of( $clazz, 'PersistentObject')) throw new Exception(\"La clase $clazz del atributo $name debe ser subclase de PersistentObject\");\n \n // TEST:\n // El nombre de la relacion relName se usa cuando hay multiples hasMany declarados hacia la\n // misma clase, si esa clase tiene relaciones con esta (o sea bidireccional).\n // Asi se puede saber que rol de una clase correponde al rol en la clase asociada, porque\n // se tiene el mimo nombre de relacion codificado en el rol.\n if ($relName != NULL) $name .= '__'.$relName; // rol__relName\n \n // TODO: habria que verificar que en la clase asociada hay una relacion con el mismo nombre declarada con clase this->getClass.\n \n \n $this->hasOne[$name] = $clazz;\n $this->attributeValues[$name] = self::NOT_LOADED_ASSOC; // Se inicializa como no cargada, luego en el constructor se le puede setear un valor.\n }",
"private function register(): void\n {\n $user = User::factory()->create();\n $this->actingAs($user);\n }",
"public function register()\n {\n //\n Relation::morphMap([\n 'menu'=>Menu::class,\n 'perfil'=>Perfil::class\n ]);\n\n }",
"public function addRelationedTerm(Term $term)\n {\n array_push($this->relations, $term);\n }",
"public function relationship(string $name, callable|string $callback): self\n {\n $this->customRelations[$name] = $callback;\n\n return $this;\n }",
"public function createWith($name, $email, $avatar, $relations, $email_verified = false, $blocked = false);",
"public function onPreCreate(ResourceEventInterface $event): void\n {\n $member = $this->getMemberFromEvent($event);\n\n $this->getGateway($member->getAudience()->getGateway(), GatewayInterface::INSERT_MEMBER);\n }",
"public function addRelationHook($callback): void\n {\n $this->relationHooks[] = $callback;\n }",
"public function addRelation($data)\n {\n if ($data instanceof Relation) {\n $relation = $data;\n $relation->setEntity($this);\n $this->relations[] = $relation;\n\n if (!in_array($relation->getForeignEntityName(), $this->foreignEntityNames)) {\n $this->foreignEntityNames[] = $relation->getForeignEntityName();\n }\n\n return $relation;\n }\n\n $relation = new Relation();\n $relation->setEntity($this);\n $relation->loadMapping($data);\n\n return $this->addRelation($relation);\n }",
"public function initialize()\n {\n $this->hasMany('groep_id', 'Gebruikers', 'groep_id', array('alias' => 'Gebruikers'));\n $this->hasMany('groep_id', 'Groep_permissies', 'groep_id', array('alias' => 'Groep_permissies'));\n }",
"public function action_register() {\n\t\t\t$this->data[] = 0; // record_id - default for increment\n\t\t\t$this->prepareMainData();\n\t\t\t$model = Model::factory($this->modelName)->registerRecord($this->data);\n\t\t\tif ($model) $this->request->redirect($this->redirectURL);\n\t\t\n\t}",
"public function createWithSocialProvider($name, $email, $avatar, $profile, $relation);",
"public function register(){\n $this->registration->execute([], $this);\n }",
"public function testAddRelatedBirthdayToPerson3SaveSuccess()\n {\n $person = $this->session->load( \"RelationTestPerson\", 3 );\n \n $birthday = new RelationTestBirthday();\n $birthday->setState( array(\n \"birthday\" => 1161019786,\n ) );\n\n $this->session->addRelatedObject( $person, $birthday );\n \n $this->session->save( $birthday );\n\n \n $res = RelationTestBirthday::__set_state( array( \n 'person' => '3',\n 'birthday' => 1161019786,\n ));\n\n $this->assertEquals(\n $res,\n $birthday,\n \"Relation not established correctly\"\n );\n }",
"function eZEnhancedObjectRelationType()\n {\n $this->eZDataType( EZ_DATATYPESTRING_ENHANCED_OBJECT_RELATION, ezi18n( 'kernel/classes/datatypes', \"Enhanced Object relation\", 'Datatype name' ),\n array( 'serialize_supported' => true ) );\n }",
"public function push() {\n\t\t$this->save();\n\n\t\t// To sync all of the relationships to the database, we will simply spin through\n\t\t// the relationships, calling the \"push\" method on each of the models in that\n\t\t// given relationship, this should ensure that each model is saved.\n\t\tforeach ($this->relationships as $name => $models) {\n\t\t\tif ( ! is_array($models)) {\n\t\t\t\t$models = array($models);\n\t\t\t}\n\n\t\t\tforeach ($models as $model) {\n\t\t\t\t$model->push();\n\t\t\t}\n\t\t}\n\t}",
"public function getRelationship($name);",
"function roles_dashboard_create_relationship($event, $type, $relationship) {\n\n\tif ($relationship->relationship !== 'has_role') {\n\t\treturn;\n\t}\n\n\t$user = get_entity($relationship->guid_one);\n\t$role = get_entity($relationship->guid_two);\n\tif (!$role instanceof ElggRole || !$user instanceof ElggUser) {\n\t\treturn;\n\t}\n\n\t$ia = elgg_set_ignore_access(true);\n\n\t// check if role-specific dashboard exists\n\t$dashboards = elgg_get_entities_from_relationship(array(\n\t\t'types' => 'object',\n\t\t'subtypes' => MultiDashboard::SUBTYPE,\n\t\t'owner_guid' => $user->guid,\n\t\t'relationship' => 'dashboard_for',\n\t\t'relationship_guid' => $role->guid,\n\t\t'inverse_relationship' => true,\n\t\t'count' => true,\n\t));\n\n\tif (!$dashboards) {\n\t\t$dashboard = new ElggObject();\n\t\t$dashboard->subtype = MultiDashboard::SUBTYPE; // not using MultiDashboard instantiation due to problems with save() overwriting values\n\t\t$dashboard->owner_guid = $user->guid;\n\t\t$dashboard->container_guid = $user->guid;\n\t\t$dashboard->title = $role->getDisplayName();\n\t\t$dashboard->name = $role->name;\n\t\t$dashboard->roles_context = \"role::{$role->name}\";\n\t\t$dashboard->dashboard_type = 'widgets';\n\t\t$dashboard->num_columns = ROLES_DASHBOARD_NUM_COLUMNS;\n\t\tif ($dashboard->save()) {\n\t\t\tadd_entity_relationship($dashboard->guid, 'dashboard_for', $role->guid);\n\t\t}\n\t}\n\n\telgg_set_ignore_access($ia);\n}",
"public function register(){}",
"public function create(): void\n {\n $this->register();\n }",
"public function register(Request $request)\n {\n $this->validator($request->all())->validate();\n\n $author_found = true;\n $registered = false;\n\n if ($request->author === \"true\") {\n $author = Author::find($request->author_id);\n if (!$author) {\n $author_found = false;\n }\n }\n\n if ($author_found) {\n event(new Registered($user = $this->create($request->all())));\n $registered = true;\n }\n\n if ($registered && $request->author === \"true\") {\n $author->user_id = $user->user_id;\n $author->save();\n }\n\n if ($registered && $author_found) {\n \\Session::flash('success', 'User created.');\n } elseif (!$registered && $author_found) {\n \\Session::flash('error', 'User could not be created.');\n } elseif (!$registered && !$author_found) {\n \\Session::flash('error',\n 'Author \"' . $request->author_id . '\" not found');\n }\n\n return redirect($this->redirectPath());\n }",
"function addRelation($page, $value, $relationField)\n{\n try {\n $fieldData = YAML::decode(page($page)->$relationField()->value());\n } catch (Throwable $e) {\n throw new Exception('Many to Many Field Plugin: related page or relatation field is faulty or missing. '.$e->getMessage());\n }\n\n // Getting Length of relations field before insert\n $fieldLengthBefore = count($fieldData);\n\n // Writing to relations field\n array_push($fieldData, $value);\n\n // Making array unique to filter out duplicates\n $fieldData = array_unique($fieldData, SORT_REGULAR);\n\n // Getting Length of relations field after insert\n $fieldLengthAfter = count($fieldData);\n \n // If fieldLengthAfter is same as fieldLengthBefore, nothing was added so we skip updating to avoid cascading\n if ($fieldLengthBefore !== $fieldLengthAfter) {\n try {\n page($page)->update([$relationField => YAML::encode($fieldData)]);\n\n return true;\n } catch (Exception $e) {\n return $e->getMessage();\n }\n }\n}",
"public function test_model_relation_handler_create()\n {\n $this->assertNull(Member::where('phonenumber', '407-925-1076')->where('email', '[email protected]')->get()->first());\n // First we insert the individual model to the database\n $model = Individual::create([\n 'firstname' => 'David',\n 'lastname' => 'P. Thompson',\n 'address' => '1237 McDonald Avenue',\n 'sex' => 'M',\n ]);\n $model = QueryableRelations::new($model)->create(['member'], [\n 'firstname' => 'David',\n 'lastname' => 'P. Thompson',\n 'address' => '1237 McDonald Avenue',\n 'sex' => 'M',\n 'member' => [\n 'phonenumber' => '407-925-1076',\n 'email' => '[email protected]',\n ],\n ]);\n $this->assertNotNull(Member::where('phonenumber', '407-925-1076')->where('email', '[email protected]')->get()->first());\n $this->assertNotNull(Individual::where('firstname', 'David')->where('address', '1237 McDonald Avenue')->get()->first());\n }",
"public function initialize()\n {\n $this->setDefaultSchema();\n $this->setSource(\"invite\");\n\n $this->hasMany('id', 'Meetingg\\Models\\User', 'invite_id', ['alias' => 'User']);\n $this->belongsTo('user_id', 'Meetingg\\Models\\User', 'id', ['alias' => 'User']);\n\n $this->belongsTo('meeting_id', 'Meetingg\\Models\\Meeting', 'id', ['alias' => 'Meeting']);\n\n $this->hasMany('id', 'Meetingg\\Models\\Meeting\\User', 'invite_id', ['alias' => 'MeetingUsers']);\n $this->hasMany('id', 'Meetingg\\Models\\Discussion\\User', 'invite_id', ['alias' => 'DiscussionUsers']);\n }",
"private function addRelation(Stack $stack, $from, $relation, $to)\n {\n $stack->push('MATCH (a:test {roId: \"'.$from.'\"}) MATCH (b:test {roId: \"'.$to.'\"}) MERGE (a)-[:'.$relation.']->(b)', [\n 'from' => $from,\n 'to' => $to,\n 'relation' => $relation\n ]);\n return $stack;\n }",
"public function isRelationshipData();",
"public function initialize()\n {\n $this->hasMany('informacion_id', 'Informacionadicional', 'informacion_id', array('alias' => 'Informacionadicional'));\n $this->belongsTo('informacion_adicionalId', 'Adicional', 'adicional_id', array('alias' => 'Adicional'));\n }",
"public function addRelation($name, $type, $foreignModelName = null, $localKey = null, $foreignKey = null, $pivotTable = null, $pivotLocalKey = null, $pivotForeignKey = null)\n\t{\n\t\tif (!isset(static::$relationTypes[$type]))\n\t\t{\n\t\t\tthrow new DataModel\\Relation\\Exception\\RelationTypeNotFound(\"Relation type '$type' not found\");\n\t\t}\n\n\t\t// Guess the foreign model class if necessary\n\t\tif (empty($foreignModelName))\n\t\t{\n\t\t\t$foreignModelName = ucfirst($name);\n\t\t}\n\n\t\t$className = static::$relationTypes[$type];\n\n\t\t/** @var Relation $relation */\n\t\t$relation = new $className($this->parentModel, $foreignModelName, $localKey, $foreignKey,\n\t\t\t$pivotTable, $pivotLocalKey, $pivotForeignKey);\n\n\t\t$this->relations[$name] = $relation;\n\n\t\treturn $this->parentModel;\n\t}",
"function setup(){\n if(!class_exists('Relationship')){\n\n }\n\n $rel = new Relationship();\n if(!empty($this->vardef['relationship'])){\n \t$rel->retrieve_by_name($this->vardef['relationship']);\n }\n if($rel->relationship_type == 'many-to-many'){\n if($rel->lhs_module == $this->module_dir){\n $this->related_module = $rel->rhs_module;\n $module_dir = $rel->lhs_module;\n }else {\n if($rel->rhs_module == $this->module_dir){\n $this->related_module = $rel->lhs_module;\n $module_dir = $rel->rhs_module;\n }else{\n die(\"this field has no relationships mapped with this module\");\n }\n }\n if($module_dir != $this->module_dir){\n die('These modules do not match : '. $this->module_dir . ' and ' . $module_dir);\n }\n if(isset($GLOBALS['beanList'][$this->module_dir])){\n $class = $GLOBALS['beanList'][$this->module_dir];\n if(file_exists($GLOBALS['beanFiles'][$class])){\n $this->bean = loadBean($this->module_dir);\n $this->bean->retrieve($_REQUEST['bean_id']);\n if($this->bean->load_relationship($this->vardef['name'])){\n $this->check_id();\n $this->retrieve_values();\n }else{\n die('failed to load the relationship');\n }\n }else{\n die('class file do not exist');\n }\n }else{\n die($this->module_dir . ' is not in the beanList.');\n }\n }\n else{\n die(\"the relationship is not a many-to-many\");\n }\n }",
"abstract public function register();",
"abstract public function register();",
"abstract public function register();",
"protected static function _relations() {\n\n\t}",
"public function initialize()\n {\n $this->belongsTo('id_actaconteo_persona', 'CobActaconteoPersonaExcusa', 'id_actaconteo_persona', array(\n 'reusable' => true\n ));\n $this->belongsTo('id_actaconteo_persona', 'CobActaconteoPersonaFacturacion', 'id_actaconteo_persona', array(\n 'reusable' => true\n ));\n $this->belongsTo('id_actaconteo', 'CobActaconteo', 'id_actaconteo', array(\n 'reusable' => true\n ));\n }",
"public function testAddMultipleRelationshipItemsToData()\n {\n $this->document->addToData($parent = $this->schemaFactory->createResourceObject($this->getSchema(\n 'people',\n '123',\n ['firstName' => 'John', 'lastName' => 'Dow'],\n new Link('selfUrl/'), // self url\n [], // links for resource\n null // meta\n ), new stdClass(), false));\n\n $resource = $this->schemaFactory->createResourceObject($this->getSchema(\n 'comments',\n '321',\n null, // attributes\n new Link('selfUrlWillBeHidden/'),\n [LinkInterface::SELF => new Link('selfUrlWillBeHidden/')], // links for resource\n ['this meta' => 'wont be shown'], // meta when resource is primary\n [], // links for included resource\n false, // show relationships in 'included'\n ['this meta' => 'wont be shown'], // meta when resource within 'included'\n ['some' => 'comment meta'] // meta when resource is in relationship\n ), new stdClass(), true);\n\n $link = $this->schemaFactory->createRelationshipObject(\n 'comments-relationship',\n new stdClass(), // in reality it will be a Comment class instance where $resource properties were taken from\n [], // links\n null, // relationship meta\n true, // show data\n false // is root\n );\n $this->document->addRelationshipToData($parent, $link, $resource);\n $this->document->addRelationshipToData($parent, $link, $resource);\n $this->document->setResourceCompleted($parent);\n\n $expected = <<<EOL\n {\n \"data\" : {\n \"type\" : \"people\",\n \"id\" : \"123\",\n \"attributes\" : {\n \"firstName\" : \"John\",\n \"lastName\" : \"Dow\"\n },\n \"relationships\" : {\n \"comments-relationship\" : {\n \"data\" : [\n { \"type\" : \"comments\", \"id\" : \"321\", \"meta\" : {\"some\" : \"comment meta\"} },\n { \"type\" : \"comments\", \"id\" : \"321\", \"meta\" : {\"some\" : \"comment meta\"} }\n ]\n }\n }\n }\n }\nEOL;\n $this->check($expected);\n }",
"public function testDefaultRelationEntityCreatedIfRelationshipIsProvided(): void\n {\n $entityFactoryManager = $this->getEntityFactoryManager([\n 'Tests\\EoneoPay\\Externals\\ORM\\Stubs\\Factories\\\\' => 'Tests\\EoneoPay\\Externals\\ORM\\Stubs'\n ]);\n\n $parent = new ParentEntityStub();\n $child = $entityFactoryManager->create(ChildEntityStub::class, ['parent' => $parent]);\n\n /** @noinspection UnnecessaryAssertionInspection Returns EntityInterface */\n self::assertInstanceOf(ChildEntityStub::class, $child);\n /** @var \\Tests\\EoneoPay\\Externals\\ORM\\Stubs\\ChildEntityStub $child */\n self::assertInstanceOf(ParentEntityStub::class, $child->getParent());\n }",
"public function buildRelations()\n {\n $this->addRelation('Pregunta', '\\\\Pregunta', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':preg_t_pregunta',\n 1 => ':tpre_tipo',\n ),\n), null, 'CASCADE', 'Preguntas', false);\n }",
"protected function registerClassificationTaxonRelationshipProvider()\n {\n $this->app['classification.taxonRelationship'] = $this->app->share(function($app)\n {\n $model = null; //$app['config']['bloggy::classification.models.taxonomy'];\n return new TaxonRelationshipProvider($model);\n });\n }",
"public function create()\n\t{\n\t\t//\n\t\treturn view('relationships.create', compact('warehouse'));\n\t}",
"function addContentObjectRelation( $FromObjectID, $FromObjectVersion, $ContentClassAttributeID, $ToObjectID )\n\t{\n\t\t$db =& eZDB::instance();\n\t\t\n\t\t//prevent sql injection\n $FromObjectID=(int) $FromObjectID;\n $ContentClassAttributeID=(int) $ContentClassAttributeID;\n $FromObjectVersion=(int) $FromObjectVersion;\n\t\t$ToObjectID=(int) $ToObjectID;\n\n\t\t$db->query( \"INSERT INTO ezcontentobject_link ( from_contentobject_id, from_contentobject_version, contentclassattribute_id, to_contentobject_id )\t\tVALUES ( '$FromObjectID', '$FromObjectVersion', '$ContentClassAttributeID', '$ToObjectID' )\" );\n\t}",
"public function register_post_relationships() {\n\n\t\t/*\n\t\t * Functions to functions, methods and hooks\n\t\t */\n\t\tp2p_register_connection_type( array(\n\t\t\t'name' => 'functions_to_functions',\n\t\t\t'from' => 'wp-parser-function',\n\t\t\t'to' => 'wp-parser-function',\n\t\t\t'self_connections' => 'true',\n\t\t\t'title' => array( 'from' => 'Uses Functions', 'to' => 'Used by Functions' ),\n\t\t) );\n\n\t\tp2p_register_connection_type( array(\n\t\t\t'name' => 'functions_to_methods',\n\t\t\t'from' => 'wp-parser-function',\n\t\t\t'to' => 'wp-parser-method',\n\t\t\t'title' => array( 'from' => 'Uses Methods', 'to' => 'Used by Functions' ),\n\t\t) );\n\n\t\tp2p_register_connection_type( array(\n\t\t\t'name' => 'functions_to_hooks',\n\t\t\t'from' => 'wp-parser-function',\n\t\t\t'to' => 'wp-parser-hook',\n\t\t\t'title' => array( 'from' => 'Uses Hooks', 'to' => 'Used by Functions' ),\n\t\t) );\n\n\t\t/*\n\t\t * Methods to functions, methods and hooks\n\t\t */\n\t\tp2p_register_connection_type( array(\n\t\t\t'name' => 'methods_to_functions',\n\t\t\t'from' => 'wp-parser-method',\n\t\t\t'to' => 'wp-parser-function',\n\t\t\t'title' => array( 'from' => 'Uses Functions', 'to' => 'Used by Methods' ),\n\t\t) );\n\n\t\tp2p_register_connection_type( array(\n\t\t\t'name' => 'methods_to_methods',\n\t\t\t'from' => 'wp-parser-method',\n\t\t\t'to' => 'wp-parser-method',\n\t\t\t'self_connections' => 'true',\n\t\t\t'title' => array( 'from' => 'Uses Methods', 'to' => 'Used by Methods' ),\n\t\t) );\n\n\t\tp2p_register_connection_type( array(\n\t\t\t'name' => 'methods_to_hooks',\n\t\t\t'from' => 'wp-parser-method',\n\t\t\t'to' => 'wp-parser-hook',\n\t\t\t'title' => array( 'from' => 'Used by Methods', 'to' => 'Uses Hooks' ),\n\t\t) );\n\t}",
"function _add_relationship_if_not_exists($object, $relationship, $value, $namespace) {\n $rels = $object->relationships->get($namespace, $relationship);\n $existed = FALSE;\n foreach ($rels as $rel) {\n $existed |= (isset($rel['object']['value']) && $rel['object']['value'] == $value);\n }\n if (!$existed) {\n $object->relationships->add($namespace, $relationship, $value);\n }\n if ($relationship == 'isMemberOfSite') {\n $object->relationships->remove($namespace, 'isMemberOfSite', 'info:fedora/' . $value);\n }\n}",
"public function initialize()\n {\n $this->hasMany('id', 'app\\common\\models\\base\\UserProfile', 'user_id', array('alias' => 'UserProfile'));\n $this->hasMany('id', 'app\\common\\models\\base\\UserRoles', 'user_id', array('alias' => 'UserRoles'));\n $this->belongsTo('type_id', 'app\\common\\models\\base\\UserType', 'id', array('alias' => 'UserType'));\n }",
"public function initialize()\n {\n $this->setSchema(\"realworlddb\");\n $this->belongsTo('followerId', User::class, 'id', ['alias' => 'User']);\n $this->belongsTo('followedId', User::class, 'id', ['alias' => 'User']);\n }",
"public function register()\n {\n $this->registration->execute([],$this);\n }",
"public function created(User $user)\n {\n $user->createUserRelationships();\n }",
"public function register(): void\n {\n $response = $this->signedPostRequest('acme/new-acct', [\n 'termsOfServiceAgreed' => true,\n ], true);\n $this->kid = $response->getHeader('Location')[0];\n }",
"public function register(): void;",
"abstract protected function addForeignKeys(&$script);"
] | [
"0.7269738",
"0.70772254",
"0.6527763",
"0.6421987",
"0.63602823",
"0.6162585",
"0.6123356",
"0.6080433",
"0.5935522",
"0.58537376",
"0.57991076",
"0.57363915",
"0.5720337",
"0.57182944",
"0.57116055",
"0.5698241",
"0.5680822",
"0.5676737",
"0.5676613",
"0.56480694",
"0.56465137",
"0.5597069",
"0.55581015",
"0.5530727",
"0.55267584",
"0.55192786",
"0.5509544",
"0.5505176",
"0.5482444",
"0.5471169",
"0.5447068",
"0.5436886",
"0.5436344",
"0.5398239",
"0.5376301",
"0.5367305",
"0.53570956",
"0.53298867",
"0.5328725",
"0.53286326",
"0.5313535",
"0.53001475",
"0.52714777",
"0.52706116",
"0.52706116",
"0.52660143",
"0.52589244",
"0.5242618",
"0.52331674",
"0.5223944",
"0.5223789",
"0.5219853",
"0.5218369",
"0.52170604",
"0.52057236",
"0.5184607",
"0.5183209",
"0.51816976",
"0.5173479",
"0.51638764",
"0.51628554",
"0.51523614",
"0.51441073",
"0.51382494",
"0.51273686",
"0.5108995",
"0.5103703",
"0.5103688",
"0.5080517",
"0.50722605",
"0.5069705",
"0.5031867",
"0.50195587",
"0.5018461",
"0.50071156",
"0.5006918",
"0.5001037",
"0.49965146",
"0.4986701",
"0.49863595",
"0.49842718",
"0.49837762",
"0.49837762",
"0.49837762",
"0.4982496",
"0.49774116",
"0.49701077",
"0.49674708",
"0.49572757",
"0.49512917",
"0.49470764",
"0.49444982",
"0.49441576",
"0.4936719",
"0.4934857",
"0.49340764",
"0.49314532",
"0.49295157",
"0.49269968",
"0.4926878",
"0.49261624"
] | 0.0 | -1 |
Lookup the index of a label | public function lookupIndex(string $label)
{
return $this->labels[$label] ?? null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function lookupLabel(int $index)\n {\n return $this->indexes[$index] ?? null;\n }",
"public function GetLabel();",
"function getIndex() ;",
"public function get_label();",
"public function get_label();",
"public function getLabel();",
"public function getLabel();",
"public function getLabel();",
"public function getLabel();",
"public function getLabel();",
"public function getLabel();",
"public function getLabel();",
"public function getLabel();",
"public function getLabel();",
"public function getLabel();",
"public function getLabel();",
"public function getLabel();",
"public function getLabel();",
"public function getLabel();",
"public function getLabel();",
"abstract public function getLabel();",
"public function getLabel() {}",
"public function getLabel() {}",
"public function label();",
"public function label();",
"public function label();",
"public function label();",
"public function label();",
"public function label();",
"public function label();",
"public function label();",
"function getLabel(): string;",
"public abstract function label();",
"public static function getIdxFileLabel($id) {\n\t\tif (!intval($id)) return false;\n\t\treturn self::_getDao()->get(intval($id));\n\t}",
"public function indexInTag() {\n if ($this->_m_indexInTag !== null)\n return $this->_m_indexInTag;\n $this->_m_indexInTag = ($this->tag() - 32);\n return $this->_m_indexInTag;\n }",
"abstract protected function getIndex();",
"function get_value_by_label( $form, $entry, $label ) {\n \n\tforeach ( $form['fields'] as $field ) {\n $lead_key = $field->label;\n\t\tif ( strToLower( $lead_key ) == strToLower( $label ) ) {\n\t\t\treturn $entry[$field->id];\n\t\t}\n\t}\n\treturn false;\n}",
"public function getRowIdFromLabel($label)\n {\n $this->rebuildIndexContinuously = true;\n if ($this->indexNotUpToDate) {\n $this->rebuildIndex();\n }\n\n if ($label === self::LABEL_SUMMARY_ROW\n && !is_null($this->summaryRow)\n ) {\n return $this->summaryRow;\n }\n\n $label = (string)$label;\n if (!isset($this->rowsIndexByLabel[$label])) {\n return false;\n }\n return $this->rowsIndexByLabel[$label];\n }",
"function linear_search($list, $key ) {\n\tfor($i = 0; $i < count($list); $i++) {\n\t\tif($list[$i] == $key) {\n\t\t\treturn $i;\n\t\t}\n\t}\n\treturn -1; \n}",
"public function getLabel($name);",
"public function getLabel(): string;",
"public function getLabel(): string;",
"public function byLabel($name);",
"function getKey() \n {\n return $this->getValueByFieldName( 'label_key' );\n }",
"function label2id($label, $details=null)\n{\n\tglobal $db;\n\tstatic $labels = array();\n\tstatic $select = null;\n\tstatic $insert = null;\n\tstatic $update = null;\n\n\t$id =& $labels[$label];\n\tif (!isset($id))\n\t{\n\t\tif (!isset($select)) $select = $db->prepare('SELECT id,details FROM labels WHERE label=:label');\n\t\tif ($select->execute(array(\n\t\t\t'label' => $label,\n\t\t)))\n\t\t{\n\t\t\t$id = $select->fetchColumn();\n\t\t\t// are new details are given --> update them (probably only applying to scripts)\n\t\t\tif (isset($details) && $details !== (string)$select->fetchColumn(1))\n\t\t\t{\n\t\t\t\tif (!isset($update)) $update = $db->prepare('UPDATE labels SET details=:details WHERE id=:id');\n\t\t\t\t$update->execute(array(\n\t\t\t\t\t'id' => $id,\n\t\t\t\t\t'details' => (string)$details !== '' ? $details : null,\n\t\t\t\t));\n\t\t\t}\n\t\t}\n\t\tif (!isset($id) || !($id > 0))\n\t\t{\n\t\t\tif (!isset($insert)) $insert = $db->prepare('INSERT INTO labels (label,details) VALUES (:label,:details)');\n\t\t\tif ($insert->execute(array(\n\t\t\t\t'label' => $label,\n\t\t\t\t'details' => (string)$details !== '' ? $details : null,\n\t\t\t)))\n\t\t\t{\n\t\t\t\t$id = $db->lastInsertId('id');\n\t\t\t}\n\t\t}\n\t\tif (!isset($id) || !($id > 0))\n\t\t{\n\t\t\tthrow new Exception (\"Could not get an ID for label '$label'!\");\n\t\t}\n\t}\n\treturn $id;\n}",
"public function getCarLabelNumber(){\r\n\t\t$this->car_label_number = getValue(\"SELECT label_number FROM tbl_car WHERE car_id=\".$this->car_id);\r\n\t\treturn $this->car_label_number;\r\n\t}",
"public function indexOf($thing)\n {\n $key = array_search($thing, $this->hash, true);\n return $key === false ? None() : Some($key);\n }",
"function get_label($labelitem)\n{\n\tglobal $labelMenu; #from the included labels file\n\t\n\t$label = $labelitem;\n\tif (isset($labelMenu[$labelitem]))\n\t{\n\t\t$label = $labelMenu[$labelitem];\n\t\tif ($label == '[EMPTY]')\n\t\t{\n\t\t\t$label = $labelitem;\n\t\t}\n\t}\n\t\n\t$num_args = func_num_args() - 1;\n\tif ($num_args <= 0)\n\t{\n\t\treturn $label;\n\t}\n\t\n\t$parsed_label = '';\n\t$end = 0;\n\twhile (($beg = strpos($label, '[', $end)) !== false)\n\t{\n\t\t$parsed_label .= substr($label, $end, $beg - $end);\n\t\t++$beg;\n\t\t\n\t\t$end = strpos($label, ']', $beg);\n\t\tif ($end === false)\n\t\t{\n\t\t\t$parsed_label .= substr($label, $beg - 1);\n\t\t\treturn $parsed_label;\n\t\t}\n\t\t\n\t\t$index = substr($label, $beg, $end - $beg);\n\t\tif (is_numeric($index) && $index < $num_args && $index >= 0)\n\t\t{\n\t\t\t$parsed_label .= func_get_arg($index + 1);\n\t\t\t++$end;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$parsed_label .= '[';\n\t\t\t$end = $beg;\n\t\t}\n\t}\n\t$parsed_label .= substr($label, $end);\n\t\n\treturn $parsed_label;\n}",
"public function getIdx()\n {\n return $this->get(self::_IDX);\n }",
"abstract protected function label(): string;",
"public function field_index($result, $field_name){\r\n $field_count = $this->num_fields($result);\r\n $i=0;\r\n for($i=0;$i<$field_count;$i++){\r\n if($field_name == $this->field_name($result, $i))\r\n return $i; \r\n } \r\n return -1;\r\n }",
"public function getIndex();",
"public function getIndex();",
"public function getIndex();",
"public function label() { }",
"public function getIndex($name)\n {\n $result = null;\n $array = $this->getDatanamesArray();\n foreach($array as $key=>$row)\n {\n if($result == null && $row==$name) $result = $key;\n }\n return $result;\n\n }",
"public function getLabel(): \\Magento\\Framework\\Phrase;",
"public function getPositionLabel($positionId)\r\n {\r\n $positions = $this->getPositions();\r\n foreach ($positions as $pos) {\r\n if ($pos['value'] == $positionId) {\r\n return $pos['label'];\r\n break;\r\n }\r\n }\r\n }",
"protected function _getLabel($inputName) {\n return (array_key_exists($inputName, $this->_inputLabels)) ? $this->_inputLabels[$inputName] : $inputName;\n }",
"public function indexOf($value);",
"public function getLabelField() {}",
"abstract function labels();",
"protected static function labelLookup($label, $type, array $bundles = array()) {\n $ids = array();\n\n $entity_info = entity_get_info($type);\n if (!empty($entity_info['entity keys']['label'])) {\n $label_property = $entity_info['entity keys']['label'];\n\n $query = new EntityFieldQuery();\n $query->entityCondition('entity_type', $type);\n if (!empty($bundles)) {\n $query->entityCondition('bundle', $bundles, 'IN');\n }\n $query->propertyCondition($label_property, $label, '=');\n\n $results = $query->execute();\n\n if (isset($results[$type])) {\n $ids = array_keys($results[$type]);\n }\n }\n\n return $ids;\n }",
"public function get_label(){ return $this->label; }",
"public function getLabel( $name )\n\t{\n\t\treturn $this->labels[ $name ];\n\t}",
"public function getLabels();",
"public function getLabels();",
"public function getLabels();",
"public function getManId(string $name, string $label, ?int $default = null): int;",
"static function getIdOf ($name)\n {\n return array_search ($name, self::$NAMES);\n }",
"public function getLabel(): Label\n {\n return $this->label;\n }",
"function get_index($arr, $selected)\n{\n $ret = false; // return false if not found\n foreach ($arr as $key => $val) {\n if (strtolower(substr($val, 0, strlen($selected))) == strtolower($selected)) {\n $ret = $key;\n break;\n }\n }\n\n return $ret;\n}",
"public static function getIndex(): int\n {\n return static::$index;\n }",
"protected function getPlayerIndexMarker(): int\n {\n $ind = 0;\n\n foreach ($this->players as $key => $player) {\n if ($player->marker) {\n $ind = $key;\n\n break;\n }\n }\n\n return $ind;\n }",
"function _getIndexOfValues($values, $name)\n\t{\n\t\tfor ($i = 0; $i < count($values); $i++) {\n\t\t\tif ($values[$i][\"name\"] == $name) {\n\t\t\t\treturn $i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}",
"public function getLabel()\n {\n }",
"public function getLabel()\n {\n }",
"public function getLabel() {\n\t}",
"public function getRowFromLabel($label)\n {\n $rowId = $this->getRowIdFromLabel($label);\n if ($rowId instanceof Piwik_DataTable_Row) {\n return $rowId;\n }\n if (is_int($rowId) && isset($this->rows[$rowId])) {\n return $this->rows[$rowId];\n }\n return false;\n }",
"public function getIndex($name, $id) {\n foreach ($this->view->result as $item) {\n if ($item->$name == $id) {\n return $item->index;\n }\n }\n return FALSE;\n }",
"function key()\n\t{\n\t\treturn $this->index;\n\t}",
"function ST_index($ST_key) {\n\t$this->ST_head = $this->ST_indexR($this->ST_head, $ST_key, 0);\n\treturn $this->ST_val;\n\t}",
"public function key()\n\t{\n\t\treturn $this->index;\n\t}",
"public function key()\n\t{\n\t\treturn $this->index;\n\t}",
"public function getLabelResult()\n {\n return $this->readOneof(41);\n }",
"protected function _lookupAttribute($attr)\n {\n if (preg_match('/^[0-9]+$/', $attr)) {\n $attr = (int)$attr;\n } else {\n $textLabels = $this->_getTextLabels();\n foreach ($textLabels as $index => $label) {\n $labels = array($label);\n $func = create_function('$c', 'return strtoupper($c[1]);');\n $camelCase = preg_replace_callback('/_([a-z])/', $func, $label);\n $labels[] = $camelCase;\n\n if (in_array($attr, $labels)) {\n $attr = $index;\n break;\n }\n }\n }\n\n return $attr;\n }",
"public function getLabel()\n\t{\t\t\t\n\t\treturn $this->label;\n\t}",
"function getLabel($data, $neighbors)\n{\n $results = array();\n $neighbors = array_keys($neighbors);\n print_r($neighbors);\n foreach ($neighbors as $neighbor) {\n $results[] = $data[$neighbor][2];\n }\n $values = array_count_values($results);\n $values = array_flip($values);\n ksort($values);\n return array_pop($values);\n}",
"public function key(): int\n {\n return $this->index;\n }",
"public static function linearSearch($collection, $value)\n {\n for ($i = 0; $i < sizeof($collection); $i++) {\n if ($collection[$i] == $value) {\n return $i;\n }\n }\n return -1;\n }",
"public function getIndexToLocFormat() {}",
"private function findOrCreateLabel($label)\n {\n $labels = $this->client->api('repo')->labels()->all($this->user, $this->repository);\n\n if (!$this->containsLabel($label, $labels)) {\n $response = $this->client->api('repo')->labels()->create($this->user, $this->repository, $label);\n\n return $response['name'];\n } else {\n return $label['name'];\n }\n }",
"public function get_label() {\n\t\treturn $this->label;\n\t}",
"public function getLabel($label, $default_only=false) {\n\t\t\tglobal $db, $site;\n\t\t\tif ($_SESSION['treeline_language']) $lang = $_SESSION['treeline_language'];\n\t\t\telse if ($_SESSION['treeline_user_language']) $lang = $_SESSION['treeline_user_language'];\n\t\t\t\n\t\t\tif ($lang && $label) {\n\t\t\t\tif ($row = $db->get_row(\"SELECT id, longname FROM labels WHERE shortname='$label'\")) {\n\t\t\t\t\t$label_id = $row->id;\n\t\t\t\t\t$english = $row->longname;\n\t\t\t\t\t$query = \"SELECT longname FROM labels_default WHERE label_id = $label_id AND lang = '$lang'\";\n\t\t\t\t\t//print \"$query<br>\\n\";\n\t\t\t\t\t$default = $db->get_var($query);\n\t\t\t\t\tif (!$default_only) {\n\t\t\t\t\t\t$query = \"SELECT longname FROM labels_translations WHERE label_id = $label_id AND msv=\".$site->id;\n\t\t\t\t\t\t//print \"$query<br>\\n\";\n\t\t\t\t\t\t$sitelabel = $db->get_var($query);\n\t\t\t\t\t}\n\t\t\t\t\t$r = $sitelabel?$sitelabel:($default?$default:($english?$english:$label));\n\t\t\t\t\t//print \"return $r<br>\\n\";\n\t\t\t\t\treturn $r;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn 0;\n\t\t}",
"public function getLabel() {\n return $this->label;\n }",
"public function getLabel() {\n return $this->label;\n }",
"function field_views_field_label($field_name) {\n $label_counter = array();\n $all_labels = array();\n // Count the amount of instances per label per field.\n $instances = field_info_instances();\n foreach ($instances as $entity_name => $entity_type) {\n foreach ($entity_type as $bundle) {\n if (isset($bundle[$field_name])) {\n $label_counter[$bundle[$field_name]['label']] = isset($label_counter[$bundle[$field_name]['label']]) ? ++$label_counter[$bundle[$field_name]['label']] : 1;\n $all_labels[$entity_name][$bundle[$field_name]['label']] = TRUE;\n }\n }\n }\n if (empty($label_counter)) {\n return array($field_name, $all_labels);\n }\n // Sort the field lables by it most used label and return the most used one.\n arsort($label_counter);\n $label_counter = array_keys($label_counter);\n return array($label_counter[0], $all_labels);\n}",
"function lookup( $state, $la ){\n\t\tif( ! isset($this->table[$state][$la]) ){\n\t\t\treturn null;\n\t\t}\t\n\t\telse {\n\t\t\treturn $this->table[$state][$la];\n\t\t}\n\t}",
"public function label()\n {\n return $this->label;\n }",
"public function key(): int\n {\n return $this->_index;\n }"
] | [
"0.72276825",
"0.6454806",
"0.636854",
"0.62853074",
"0.62853074",
"0.6223959",
"0.6223959",
"0.6223959",
"0.6223959",
"0.6223959",
"0.6223959",
"0.6223959",
"0.6223959",
"0.6223959",
"0.6223959",
"0.6223959",
"0.6223959",
"0.6223959",
"0.6223959",
"0.6223959",
"0.6198113",
"0.60739356",
"0.60739356",
"0.6047621",
"0.6047621",
"0.6047621",
"0.6047621",
"0.6047621",
"0.6047621",
"0.6047621",
"0.6047621",
"0.6038208",
"0.60022646",
"0.59272164",
"0.5870155",
"0.5842793",
"0.5831938",
"0.57916945",
"0.57860726",
"0.57846165",
"0.5761742",
"0.5761742",
"0.568644",
"0.56801826",
"0.56467295",
"0.5630595",
"0.56226903",
"0.56009835",
"0.55908996",
"0.5582822",
"0.5567446",
"0.55216265",
"0.55216265",
"0.55216265",
"0.5514112",
"0.551357",
"0.5483472",
"0.5447751",
"0.54387474",
"0.5434257",
"0.54214275",
"0.5416621",
"0.5413475",
"0.54126376",
"0.5411485",
"0.54002166",
"0.54002166",
"0.54002166",
"0.5384607",
"0.53838736",
"0.5380503",
"0.5379703",
"0.53750473",
"0.53696394",
"0.53691286",
"0.53670925",
"0.53670925",
"0.5365666",
"0.5359845",
"0.5356566",
"0.5349691",
"0.53457445",
"0.5341168",
"0.5341168",
"0.53279966",
"0.5319127",
"0.5304136",
"0.530309",
"0.53010213",
"0.52991253",
"0.5294909",
"0.5282",
"0.5281021",
"0.5272506",
"0.5268846",
"0.5268846",
"0.52682877",
"0.5265278",
"0.52649724",
"0.52615917"
] | 0.7951311 | 0 |
Lookup the label at an index | public function lookupLabel(int $index)
{
return $this->indexes[$index] ?? null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function lookupIndex(string $label)\n {\n return $this->labels[$label] ?? null;\n }",
"public function GetLabel();",
"abstract public function getLabel();",
"public function getLabel();",
"public function getLabel();",
"public function getLabel();",
"public function getLabel();",
"public function getLabel();",
"public function getLabel();",
"public function getLabel();",
"public function getLabel();",
"public function getLabel();",
"public function getLabel();",
"public function getLabel();",
"public function getLabel();",
"public function getLabel();",
"public function getLabel();",
"public function getLabel();",
"public function getLabel($name);",
"public function get_label();",
"public function get_label();",
"public function getLabel() {}",
"public function getLabel() {}",
"public function byLabel($name);",
"public abstract function label();",
"function getIndex() ;",
"function getLabel(): string;",
"public function label();",
"public function label();",
"public function label();",
"public function label();",
"public function label();",
"public function label();",
"public function label();",
"public function label();",
"function get_value_by_label( $form, $entry, $label ) {\n \n\tforeach ( $form['fields'] as $field ) {\n $lead_key = $field->label;\n\t\tif ( strToLower( $lead_key ) == strToLower( $label ) ) {\n\t\t\treturn $entry[$field->id];\n\t\t}\n\t}\n\treturn false;\n}",
"public function getLabel( $name )\n\t{\n\t\treturn $this->labels[ $name ];\n\t}",
"public function getLabel(): string;",
"public function getLabel(): string;",
"abstract protected function getIndex();",
"function lookup( $state, $la ){\n\t\tif( ! isset($this->table[$state][$la]) ){\n\t\t\treturn null;\n\t\t}\t\n\t\telse {\n\t\t\treturn $this->table[$state][$la];\n\t\t}\n\t}",
"function get_label($labelitem)\n{\n\tglobal $labelMenu; #from the included labels file\n\t\n\t$label = $labelitem;\n\tif (isset($labelMenu[$labelitem]))\n\t{\n\t\t$label = $labelMenu[$labelitem];\n\t\tif ($label == '[EMPTY]')\n\t\t{\n\t\t\t$label = $labelitem;\n\t\t}\n\t}\n\t\n\t$num_args = func_num_args() - 1;\n\tif ($num_args <= 0)\n\t{\n\t\treturn $label;\n\t}\n\t\n\t$parsed_label = '';\n\t$end = 0;\n\twhile (($beg = strpos($label, '[', $end)) !== false)\n\t{\n\t\t$parsed_label .= substr($label, $end, $beg - $end);\n\t\t++$beg;\n\t\t\n\t\t$end = strpos($label, ']', $beg);\n\t\tif ($end === false)\n\t\t{\n\t\t\t$parsed_label .= substr($label, $beg - 1);\n\t\t\treturn $parsed_label;\n\t\t}\n\t\t\n\t\t$index = substr($label, $beg, $end - $beg);\n\t\tif (is_numeric($index) && $index < $num_args && $index >= 0)\n\t\t{\n\t\t\t$parsed_label .= func_get_arg($index + 1);\n\t\t\t++$end;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$parsed_label .= '[';\n\t\t\t$end = $beg;\n\t\t}\n\t}\n\t$parsed_label .= substr($label, $end);\n\t\n\treturn $parsed_label;\n}",
"abstract protected function label(): string;",
"static function rLabel($key) {\n\n\t\t$_u = self::uInstance();\n\t\treturn $_u->data_key[$key]['label'];\n\t}",
"public function getLabel(): \\Magento\\Framework\\Phrase;",
"protected function _getLabel($inputName) {\n return (array_key_exists($inputName, $this->_inputLabels)) ? $this->_inputLabels[$inputName] : $inputName;\n }",
"public function getLabel() {\n\t}",
"public function getLabel($label, $default_only=false) {\n\t\t\tglobal $db, $site;\n\t\t\tif ($_SESSION['treeline_language']) $lang = $_SESSION['treeline_language'];\n\t\t\telse if ($_SESSION['treeline_user_language']) $lang = $_SESSION['treeline_user_language'];\n\t\t\t\n\t\t\tif ($lang && $label) {\n\t\t\t\tif ($row = $db->get_row(\"SELECT id, longname FROM labels WHERE shortname='$label'\")) {\n\t\t\t\t\t$label_id = $row->id;\n\t\t\t\t\t$english = $row->longname;\n\t\t\t\t\t$query = \"SELECT longname FROM labels_default WHERE label_id = $label_id AND lang = '$lang'\";\n\t\t\t\t\t//print \"$query<br>\\n\";\n\t\t\t\t\t$default = $db->get_var($query);\n\t\t\t\t\tif (!$default_only) {\n\t\t\t\t\t\t$query = \"SELECT longname FROM labels_translations WHERE label_id = $label_id AND msv=\".$site->id;\n\t\t\t\t\t\t//print \"$query<br>\\n\";\n\t\t\t\t\t\t$sitelabel = $db->get_var($query);\n\t\t\t\t\t}\n\t\t\t\t\t$r = $sitelabel?$sitelabel:($default?$default:($english?$english:$label));\n\t\t\t\t\t//print \"return $r<br>\\n\";\n\t\t\t\t\treturn $r;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn 0;\n\t\t}",
"abstract function labels();",
"function getLabel($key, $languageID='') \n {\n $labelData = '';\n \n // if language ID is not provided, then use class default.\n if ($languageID == '' ) {\n $languageID = $this->languageID;\n }\n\n\n // if desired [KEY] exists then\n if ( array_key_exists($key, $this->labels) ) {\n\n // if desired [LANGUAGEID] exists \n if (array_key_exists($languageID, $this->labels[ $key ] ) ) {\n \n // return label\n $labelData = $this->labels[ $key ][ $languageID ];\n \n } else {\n // else \n \n // return label in 1st avaialble language\n $labelData = current( $this->labels[ $key ] );\n \n } // end if\n \n } else {\n // else\n \n //return key\n $labelData = $key;\n \n } // end if\n\n return $labelData;\n \n }",
"public function getLabel($label=null)\n {\n if ($label != null && is_array($this->entity) && count($this->entity)!=0) {\n $table_name = strtolower(get_class($this));\n $query = \"SELECT * FROM $table_name WHERE label = ?\";\n $req = Manager::bdd()->prepare($query);\n $req->execute([$label]);\n $data = \"\";\n if ($data = $req->fetchAll(PDO::FETCH_ASSOC)) {\n$d=$data[0];\n$this->setId_entity($d['id_entity']);\n$this->setLabel($d['label']);\n$this->setDomaine($d['domaine']);\n$this->setEmail($d['email']);\n$this->setPhone_number($d['phone_number']);\n$this->setBp($d['bp']);\n$this->setLocalisation($d['localisation']);\n$this->setVille($d['ville']);\n$this->setUniqueId($d['uniqueId']);\n$this->setCreated_at($d['created_at']);\n$this->setCreated_by($d['created_by']);\n$this->setUpdate_at($d['update_at']);\n$this->setUpdate_by($d['update_by']);\n$this->entity =$data; \n return $this;\n }\n \n } else {\n return $this->label;\n }\n \n }",
"public function getLabelField() {}",
"public function label() { }",
"public static function getIdxFileLabel($id) {\n\t\tif (!intval($id)) return false;\n\t\treturn self::_getDao()->get(intval($id));\n\t}",
"public function getLabels();",
"public function getLabels();",
"public function getLabels();",
"public function get(int $index);",
"public function get(int $index);",
"public function getLabel()\n {\n }",
"public function getLabel()\n {\n }",
"public function getFieldMapLabels($label,$value,$returnArr='')\n\t{\n\t\treturn FieldMap::getFieldlabel($label,$value,$returnArr);\n\t}",
"public function get_label(){ return $this->label; }",
"public function getValue($index) {}",
"function getKey() \n {\n return $this->getValueByFieldName( 'label_key' );\n }",
"public function _getLabel($name) {\n\t$lbl = $this->_client->makeLabel($name);\n\treturn $lbl;\n }",
"abstract function add_label();",
"function label2id($label, $details=null)\n{\n\tglobal $db;\n\tstatic $labels = array();\n\tstatic $select = null;\n\tstatic $insert = null;\n\tstatic $update = null;\n\n\t$id =& $labels[$label];\n\tif (!isset($id))\n\t{\n\t\tif (!isset($select)) $select = $db->prepare('SELECT id,details FROM labels WHERE label=:label');\n\t\tif ($select->execute(array(\n\t\t\t'label' => $label,\n\t\t)))\n\t\t{\n\t\t\t$id = $select->fetchColumn();\n\t\t\t// are new details are given --> update them (probably only applying to scripts)\n\t\t\tif (isset($details) && $details !== (string)$select->fetchColumn(1))\n\t\t\t{\n\t\t\t\tif (!isset($update)) $update = $db->prepare('UPDATE labels SET details=:details WHERE id=:id');\n\t\t\t\t$update->execute(array(\n\t\t\t\t\t'id' => $id,\n\t\t\t\t\t'details' => (string)$details !== '' ? $details : null,\n\t\t\t\t));\n\t\t\t}\n\t\t}\n\t\tif (!isset($id) || !($id > 0))\n\t\t{\n\t\t\tif (!isset($insert)) $insert = $db->prepare('INSERT INTO labels (label,details) VALUES (:label,:details)');\n\t\t\tif ($insert->execute(array(\n\t\t\t\t'label' => $label,\n\t\t\t\t'details' => (string)$details !== '' ? $details : null,\n\t\t\t)))\n\t\t\t{\n\t\t\t\t$id = $db->lastInsertId('id');\n\t\t\t}\n\t\t}\n\t\tif (!isset($id) || !($id > 0))\n\t\t{\n\t\t\tthrow new Exception (\"Could not get an ID for label '$label'!\");\n\t\t}\n\t}\n\treturn $id;\n}",
"public function lookup($src);",
"public function __get($label) {\n return $this->get($label);\n }",
"public function getIndex();",
"public function getIndex();",
"public function getIndex();",
"public function getLabel(): ?string;",
"function ign_udef_index(&$name, $index, $default = \"\")\r\n{\r\n if (isset($name[$index]))\r\n {\r\n return $name[$index];\r\n }\r\n else\r\n {\r\n return $default;\r\n }\r\n}",
"public function getPositionLabel($positionId)\r\n {\r\n $positions = $this->getPositions();\r\n foreach ($positions as $pos) {\r\n if ($pos['value'] == $positionId) {\r\n return $pos['label'];\r\n break;\r\n }\r\n }\r\n }",
"private static function getRegisterNameFromTargetIndex($index) {\r\n\r\n switch ($index) {\r\n case 8:\r\n return 'R0';\r\n case 9:\r\n return 'R1';\r\n case 10:\r\n return 'PC';\r\n case 11:\r\n return 'AR1';\r\n case 15:\r\n return 'R2';\r\n case 16:\r\n return 'R3';\r\n case 17:\r\n return 'R4';\r\n case 18:\r\n return 'AR2';\r\n case 24:\r\n return 'MDR';\r\n case 27:\r\n return 'MAR';\r\n case 28:\r\n return 'IR';\r\n default:\r\n throw new ProgramException(\"Invalid target Index: $index\");\r\n }\r\n }",
"public static function getByID ($_id) {\n\t$label_arr = self::getLabel(\"id\",$_id);\n\treturn $label_arr[0];\n }",
"function getLookup($lkpName)\n{\n\tglobal $pclib;\n if ($pclib->app) $appflt = \"AND (APP='\".$pclib->app->name.\"' or APP is null)\";\n $sql = sprintf(\n\t \"select ifnull(id,guid), label from %s\n\t where cname='%s' %s order by position,label\",\n\t $this->LOOKUP_TAB, $lkpName, $appflt);\n\t\n\t$items = $this->selectPair($sql);\n\n/*\n\tif ($this->mls) {\n\t\t$langid = $lkpname;\n\t\t$mls_items = $this->mls->getpage('L_'.$langid);\n\t\tforeach((array)$mls_items as $iid => $label) $items[$iid] = $label;\n\n\t\tif ($this->mls->autoupdate)\n\t\t\t$this->mls->set_page_db($this->mls->defaultlang, 'L_'.$langid, $items);\n\t}\n*/\n\n\treturn $items;\n}",
"public function getIndexToLocFormat() {}",
"private function findOrCreateLabel($label)\n {\n $labels = $this->client->api('repo')->labels()->all($this->user, $this->repository);\n\n if (!$this->containsLabel($label, $labels)) {\n $response = $this->client->api('repo')->labels()->create($this->user, $this->repository, $label);\n\n return $response['name'];\n } else {\n return $label['name'];\n }\n }",
"public function getLabel($field){\n\t\treturn $this->labels()[$field] ?? $field;\n\t}",
"static function getFieldLabel($form, $key)\n { \n // The field really exists?\n if (isset($form[$key])) {\n // A label was define?\n if (!$label = $form->getWidget($key)->getLabel()) {\n $label = $form->getWidgetSchema()->getFormFormatter()->generateLabelName($key);\n }\n\n // Here, take this label\n return $label;\n }\n\n // we could not find the field. humm...\n return null;\n }",
"function domain_label_get($key){\n if(is_string($key)) return def($this->domain_labels,$key,$key);\n if(!is_array($key)) return NULL;\n $res = array();\n foreach($key as $ck) $res[$ck] = def($this->domain_labels,$ck,$ck);\n return $res;\n }",
"public function getLabelResult()\n {\n return $this->readOneof(41);\n }",
"protected function _lookupAttribute($attr)\n {\n if (preg_match('/^[0-9]+$/', $attr)) {\n $attr = (int)$attr;\n } else {\n $textLabels = $this->_getTextLabels();\n foreach ($textLabels as $index => $label) {\n $labels = array($label);\n $func = create_function('$c', 'return strtoupper($c[1]);');\n $camelCase = preg_replace_callback('/_([a-z])/', $func, $label);\n $labels[] = $camelCase;\n\n if (in_array($attr, $labels)) {\n $attr = $index;\n break;\n }\n }\n }\n\n return $attr;\n }",
"private function get_event ($idx) {\n\t\tif (isset($idx)) {\n\n\t\t\t# try index as key\n\t\t\tif (array_key_exists($idx, $this->data))\n\t\t\t\treturn $this->data[$idx];\n\n\t\t\t# try integer index translation\n\t\t\telse {\n\t\t\t\t$keys = array_keys ($this->data);\n\n\t\t\t\tif (array_key_exists($idx,$keys)) {\n\t\t\t\t\t$key = $keys[$idx];\n\n\t\t\t\t\tif (array_key_exists($key, $this->data))\n\t\t\t\t\t\treturn $this->data[$key];\n\t\t\t\t\telse\n\t\t\t\t\t\treturn False;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\treturn False;\n\t\t\t}\n\t\t}\n\t}",
"function getReferrerTypeLabel($label)\n{\n $indexTranslation = '';\n switch ($label) {\n case Common::REFERRER_TYPE_DIRECT_ENTRY:\n $indexTranslation = 'Referrers_DirectEntry';\n break;\n case Common::REFERRER_TYPE_SEARCH_ENGINE:\n $indexTranslation = 'Referrers_SearchEngines';\n break;\n case Common::REFERRER_TYPE_WEBSITE:\n $indexTranslation = 'Referrers_Websites';\n break;\n case Common::REFERRER_TYPE_CAMPAIGN:\n $indexTranslation = 'Referrers_Campaigns';\n break;\n default:\n // case of newsletter, partners, before Piwik 0.2.25\n $indexTranslation = 'General_Others';\n break;\n }\n return Piwik::translate($indexTranslation);\n}",
"public function getFrontendLabel();",
"public function getLabel(): Label\n {\n return $this->label;\n }",
"function linear_search($list, $key ) {\n\tfor($i = 0; $i < count($list); $i++) {\n\t\tif($list[$i] == $key) {\n\t\t\treturn $i;\n\t\t}\n\t}\n\treturn -1; \n}",
"protected static function labelLookup($label, $type, array $bundles = array()) {\n $ids = array();\n\n $entity_info = entity_get_info($type);\n if (!empty($entity_info['entity keys']['label'])) {\n $label_property = $entity_info['entity keys']['label'];\n\n $query = new EntityFieldQuery();\n $query->entityCondition('entity_type', $type);\n if (!empty($bundles)) {\n $query->entityCondition('bundle', $bundles, 'IN');\n }\n $query->propertyCondition($label_property, $label, '=');\n\n $results = $query->execute();\n\n if (isset($results[$type])) {\n $ids = array_keys($results[$type]);\n }\n }\n\n return $ids;\n }",
"function field_views_field_label($field_name) {\n $label_counter = array();\n $all_labels = array();\n // Count the amount of instances per label per field.\n $instances = field_info_instances();\n foreach ($instances as $entity_name => $entity_type) {\n foreach ($entity_type as $bundle) {\n if (isset($bundle[$field_name])) {\n $label_counter[$bundle[$field_name]['label']] = isset($label_counter[$bundle[$field_name]['label']]) ? ++$label_counter[$bundle[$field_name]['label']] : 1;\n $all_labels[$entity_name][$bundle[$field_name]['label']] = TRUE;\n }\n }\n }\n if (empty($label_counter)) {\n return array($field_name, $all_labels);\n }\n // Sort the field lables by it most used label and return the most used one.\n arsort($label_counter);\n $label_counter = array_keys($label_counter);\n return array($label_counter[0], $all_labels);\n}",
"public function get_label($key, $default = FALSE) {\n\n\t\t// return default if requests\n\t\tif ($default === TRUE) {\n\t\t\tif (array_key_exists($key, $this->label_defaults)) {\n\t\t\t\treturn $this->label_defaults[$key];\n\t\t\t}\n\t\t\treturn FALSE;\n\t\t} else if (is_numeric($default)) {\n\t\t\t$accountID = $default;\n\t\t}\n\n\t\t// loop up in cache and return if exists\n\t\tif (array_key_exists($key, $this->label_cache)) {\n\t\t\treturn $this->label_cache[$key];\n\t\t}\n\n\t\tif (!isset($accountID)) {\n\t\t\t$accountID = $this->CI->auth->user->accountID;\n\t\t}\n\n\t\t// look up account\n\t\t$where = array(\n\t\t\t'accountID' => $accountID,\n\t\t\t'active' => 1\n\t\t);\n\t\t$query = $this->CI->db->from('accounts')->where($where)->limit(1)->get();\n\n\t\t// check for result\n\t\tif ($query->num_rows() == 1) {\n\t\t\t// get account info\n\t\t\tforeach ($query->result() as $row) {\n\t\t\t\t// look up\n\t\t\t\t$where = array(\n\t\t\t\t\t'planID' => $row->planID\n\t\t\t\t);\n\t\t\t\t$query = $this->CI->db->from('accounts_plans')->where($where)->limit(1)->get();\n\n\t\t\t\t// check for result\n\t\t\t\tif ($query->num_rows() == 1) {\n\t\t\t\t\tforeach ($query->result() as $row) {\n\t\t\t\t\t\t$field = 'label_' . $key;\n\t\t\t\t\t\tif ($this->CI->db->field_exists($field, 'accounts_plans') && !empty($row->$field)) {\n\t\t\t\t\t\t\t// store in cache\n\t\t\t\t\t\t\t$this->label_cache[$key] = $row->$field;\n\t\t\t\t\t\t\treturn $row->$field;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// return default if empty or not found\n\t\tif (array_key_exists($key, $this->label_defaults)) {\n\t\t\treturn $this->label_defaults[$key];\n\t\t}\n\t\treturn FALSE;\n\t}",
"public function generateLabels();",
"public function getLabel(NodeInterface $node);",
"public function getLabel()\n\t{\t\t\t\n\t\treturn $this->label;\n\t}",
"function acl_label($type)\r\n{\r\n\tglobal $db, $lang, $template, $fields, $action;\r\n\t\r\n\t$acl_label = '';\r\n\t\r\n\t$sql = 'SELECT * FROM ' . ACL_LABEL . ' WHERE label_type = \"' . $type . '\" ORDER BY label_order ASC';\r\n\tif ( !($result = $db->sql_query($sql)) )\r\n\t{\r\n\t\tmessage(GENERAL_ERROR, 'SQL Error', '', __LINE__, __FILE__, $sql);\r\n\t}\r\n\r\n\twhile ( $row = $db->sql_fetchrow($result) )\r\n\t{\r\n\t\t$acl_label[$row['label_id']] = $row;\r\n\t}\r\n\t$db->sql_freeresult($result);\r\n\t\r\n\treturn $acl_label;\r\n}",
"function getLabel(){\r\n\t\treturn $this->label;\r\n\t}",
"public function getValue($name, $index) {\n return $this->view->result[$index]->$name;\n }"
] | [
"0.7476152",
"0.6379196",
"0.63355064",
"0.6267846",
"0.6267846",
"0.6267846",
"0.6267846",
"0.6267846",
"0.6267846",
"0.6267846",
"0.6267846",
"0.6267846",
"0.6267846",
"0.6267846",
"0.6267846",
"0.6267846",
"0.6267846",
"0.6267846",
"0.62435514",
"0.62346274",
"0.62346274",
"0.6146185",
"0.6146185",
"0.6040926",
"0.59964186",
"0.5962482",
"0.59189606",
"0.5887072",
"0.5887072",
"0.5887072",
"0.5887072",
"0.5887072",
"0.5887072",
"0.5887072",
"0.5887072",
"0.5778897",
"0.56708395",
"0.5637366",
"0.5637366",
"0.56299657",
"0.55979",
"0.55975825",
"0.5533552",
"0.5524959",
"0.5510085",
"0.55060554",
"0.5481735",
"0.5478992",
"0.5475283",
"0.54670316",
"0.54583067",
"0.5449325",
"0.54375297",
"0.5413639",
"0.5410619",
"0.5410619",
"0.5410619",
"0.5400362",
"0.5400362",
"0.5391751",
"0.5391751",
"0.53822654",
"0.53651637",
"0.53648436",
"0.5344961",
"0.53244954",
"0.53233093",
"0.5317618",
"0.531709",
"0.5303737",
"0.5300781",
"0.5300781",
"0.5300781",
"0.52976716",
"0.5297656",
"0.5282148",
"0.5278561",
"0.5275225",
"0.5271425",
"0.5268895",
"0.5249657",
"0.5248504",
"0.52432835",
"0.522991",
"0.5227017",
"0.52267325",
"0.5206391",
"0.519755",
"0.51871514",
"0.5186686",
"0.5184107",
"0.5171399",
"0.51560503",
"0.5148158",
"0.5141655",
"0.51416063",
"0.5136926",
"0.5135898",
"0.5134887",
"0.5131962"
] | 0.7881136 | 0 |
Function that register blog masonry gallery template | function fiorello_mikado_register_blog_masonry_gallery_template_file( $templates ) {
$templates['blog-masonry-gallery'] = esc_html__( 'Blog: Masonry Gallery', 'fiorello' );
return $templates;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function neobeat_enqueue_masonry_scripts_for_templates() {\n\t\t$post_type = apply_filters( 'neobeat_filter_allowed_post_type_to_enqueue_masonry_scripts', '' );\n\t\t\n\t\tif ( ! empty( $post_type ) && is_singular( $post_type ) ) {\n\t\t\tneobeat_include_masonry_scripts();\n\t\t}\n\t}",
"function theme_add_masonry() {\n\n wp_enqueue_script( 'masonry-js', get_template_directory_uri() . '/library/js/masonry.pkgd.min.js', array(), '3.0.0', true );\n wp_enqueue_script( 'imagesLoaded-js', get_template_directory_uri() . '/library/js/imagesloaded.pkgd.js', array(), '3.0.0', true );\n\n}",
"function gallery_init() {\n $labels = array(\n 'name' => 'Imágenes de la galería',\n 'singular_name' => 'Imagen de la galería',\n 'add_new_item' => 'New Image de la galería',\n 'edit_item' => 'Editar Imagen de la galería',\n 'new_item' => 'Nueva Imagen de la galería',\n 'view_item' => 'Ver Imagen de la galería',\n 'search_items' => 'Buscar Imágenes de la galería',\n 'not_found' => 'Imágenes de la galería noencontradas',\n 'not_found_in_trash' => 'Ninguna Imagen de la galería en la papelera'\n );\n $args = array(\n 'labels' => $labels,\n 'public' => false,\n 'show_ui' => true,\n 'supports' => array('thumbnail')\n );\n\n register_post_type( 'gallery', $args );\n}",
"function df_gallery_post_format() {\n\n\tif (! post_password_required() ) :\n\t\t$df_bg_mode_lay = get_post_meta( get_the_ID(), 'df_metabox_ftr_img_background', true );\n\n\t\tif ( $df_bg_mode_lay == '1' ) { return false; }\n\n\t\t$gallery \t\t= get_post_gallery( get_the_ID() );\n\t\tif ( is_home() ) {\n\t\t\t$df_blog_layout = df_options( 'blog_layout', dahz_get_default( 'blog_layout' ) );\n\t\t\t$df_grid_type = df_options( 'blog_content_grid', dahz_get_default( 'blog_content_grid' ) );\n\t\t\t$conditional = ( is_home() && $df_grid_type == 'masonry' );\n\t\t} elseif ( is_archive() ) {\n\t\t\t $df_blog_layout = df_options( 'archive_layout', dahz_get_default( 'archive_layout' ) );\n\t\t\t $df_grid_type = df_options( 'arch_content_grid', dahz_get_default( 'arch_content_grid' ) );\n\t\t\t $conditional = ( is_archive() && $df_grid_type == 'masonry' );\n\t\t}\n\n\t\t\tif( $df_blog_layout == 'list' || $conditional ) :\n\t\t echo \"<div class='df-gallery-grid'>\";\n\t\t echo $gallery;\n\t\t echo \"</div>\";\n\t endif;\n\n\tendif;\n\n}",
"function wtr_create_gallery() {\r\n\r\n\tglobal $WTR_Opt, $wtr_custom_posts_type;\r\n\t$wtr_custom_posts_type[]\t= 'gallery';\r\n\r\n\t$labels= array(\r\n\t\t'name' \t\t\t\t\t=> __( 'Gallery', 'wtr_ct_framework' ),\r\n\t\t'all_items'\t\t\t\t=> __( 'All Gallery', 'wtr_ct_framework' ),\r\n\t\t'singular_name' \t\t=> __( 'Gallery', 'wtr_ct_framework' ),\r\n\t\t'add_new' \t\t\t\t=> __( 'Add New', 'wtr_ct_framework' ),\r\n\t\t'add_new_item' \t\t\t=> __( 'Add New Gallery', 'wtr_ct_framework' ),\r\n\t\t'edit_item' \t\t\t=> __( 'Edit Gallery', 'wtr_ct_framework' ),\r\n\t\t'new_item' \t\t\t\t=> __( 'New Gallery', 'wtr_ct_framework' ),\r\n\t\t'view_item' \t\t\t=> __( 'View Gallery', 'wtr_ct_framework' ),\r\n\t\t'search_items' \t\t\t=> __( 'Search Gallery', 'wtr_ct_framework' ),\r\n\t\t'not_found' \t\t\t=> __( 'No Gallery found', 'wtr_ct_framework' ),\r\n\t\t'not_found_in_trash'\t=> __( 'No Gallery found in Trash', 'wtr_ct_framework' )\r\n\t);\r\n\r\n\t$args = array(\r\n\t\t'labels' \t\t\t\t=> $labels,\r\n\t\t'public' \t\t\t\t=> false,\r\n\t\t'publicly_queryable'\t=> false,\r\n\t\t'show_ui' \t\t\t\t=> true,\r\n\t\t'query_var' \t\t\t=> false,\r\n\t\t'capability_type' \t\t=> 'post',\r\n\t\t'hierarchical' \t\t\t=> false,\r\n\t\t'menu_position' \t\t=> null,\r\n\t\t'rewrite' \t\t\t\t=> true,\r\n\t\t'supports' \t\t\t\t=> array( 'title', 'thumbnail' ,'page-attributes' ),\r\n\t\t\"show_in_nav_menus\" \t=> false,\r\n\t\t'exclude_from_search'\t=> true,\r\n\t);\r\n\tregister_post_type( 'gallery', $args );\r\n}",
"function kstHelpWordpressBlogPosts_galleryPostsThumbnailGallery() {\n ?>\n <p>\n If you want to share a lot of pictures in a post sometimes you don't want them\n all to appear \"full size\" creating a <em>very</em> long post. Instead you can\n turn the post into a gallery of thumbnails that will show all the pictures you\n uploaded for that post in rows 3 thumbnails across. This is done with the [gallery] shortcode.\n </p>\n <p>\n <strong>How to use the \"gallery\" shortcode:</strong>\n </p>\n <p><em>Note that you can compose a normal post with text and images as well as use the [gallery] shortcode.</em></p>\n <p>\n In \"Visual\" mode:<br />\n Place the cursor where you would like the gallery thumbnails to appear.\n Above the buttons above the editor you will see \"Upload/Insert\" and four icons representing the different media you can upload.\n Click the first button that looks like a photo. In the popup that appears on the first \"tab\" labeled \"From your computer\"\n upload all the images for that post.\n When you are done click the \"tab\" labeled \"Gallery\", scroll to the bottom and click the \"Insert Gallery\" button.\n The popup will close and a large image icon will appear in your post indicating where the thumbnails will appear.\n </p>\n <p>\n In \"html\" mode:<br />\n Place the cursor where you would like the gallery thumbnails to appear.\n Type [gallery] on it's own line.\n </p>\n <?php\n}",
"function gallery() {\n $labels = array(\n 'name' => _x( 'galleries', 'Post Type General Name', 'sage' ),\n 'singular_name' => _x( 'gallery', 'Post Type Singular Name', 'sage' ),\n 'menu_name' => __( 'Галлерея', 'sage' ),\n 'name_admin_bar' => __( 'Галлереи', 'sage' ),\n 'archives' => __( 'Архив', 'sage' ),\n 'attributes' => __( 'Атрибуты', 'sage' ),\n 'parent_item_colon' => __( 'Родительская галерея:', 'sage' ),\n 'all_items' => __( 'Все галлереи', 'sage' ),\n 'add_new_item' => __( 'Добавить новую галерею', 'sage' ),\n 'add_new' => __( 'Добавить новую галерею', 'sage' ),\n 'new_item' => __( 'Новая галерея', 'sage' ),\n 'edit_item' => __( 'Редактировать галерею', 'sage' ),\n 'update_item' => __( 'Обновить галерею', 'sage' ),\n 'view_item' => __( 'Посмотреть галерею', 'sage' ),\n 'view_items' => __( 'Посмотреть галереи', 'sage' ),\n 'search_items' => __( 'Поиск галереи', 'sage' ),\n 'not_found' => __( 'Галерея не найдена', 'sage' ),\n 'not_found_in_trash' => __( 'Not found in Trash', 'sage' ),\n 'featured_image' => __( 'Featured Image', 'sage' ),\n 'set_featured_image' => __( 'Set featured image', 'sage' ),\n 'remove_featured_image' => __( 'Remove featured image', 'sage' ),\n 'use_featured_image' => __( 'Use as featured image', 'sage' ),\n 'insert_into_item' => __( 'Insert into Gallery', 'sage' ),\n 'uploaded_to_this_item' => __( 'Uploaded to this Gallery', 'sage' ),\n 'items_list' => __( 'Galleries list', 'sage' ),\n 'items_list_navigation' => __( 'Galleries list navigation', 'sage' ),\n 'filter_items_list' => __( 'Filter Galleries list', 'sage' ),\n );\n $args = array(\n 'label' => __( 'gallery', 'sage' ),\n 'description' => __( 'gallery pages', 'sage' ),\n 'labels' => $labels,\n 'supports' => array( 'editor' ),\n 'taxonomies' => array( 'category', 'post_tag' ),\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'menu_position' => 5,\n 'menu_icon' => 'dashicons-format-gallery',\n 'show_in_admin_bar' => true,\n 'show_in_nav_menus' => true,\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'page',\n );\n register_post_type( 'gallery', $args );\n\n }",
"public function locatedTemplate() {\r\n wp_enqueue_script(\r\n 'mvvwb-gallery',\r\n MVVWB_GALLERY_TEMPLATE_BASE . 'index.js',\r\n [],\r\n MVVWB_GALLERY_TEMPLATE_VERSION\r\n );\r\n\r\n foogallery_enqueue_style(\r\n 'mvvwb-gallery',\r\n MVVWB_GALLERY_TEMPLATE_BASE . 'style.css',\r\n [],\r\n MVVWB_GALLERY_TEMPLATE_VERSION\r\n );\r\n }",
"function theme_gallery_shortcode($attr) {\n\t\n\twp_enqueue_style('flexslider');\n wp_enqueue_script( 'flexslider-js' );\n wp_enqueue_script( 'gallery-script' );\n\t\n\t$post = get_post();\n\n\tstatic $instance = 0;\n\t$instance++;\n\n\tif ( ! empty( $attr['ids'] ) ) {\n\t\t// 'ids' is explicitly ordered, unless you specify otherwise.\n\t\tif ( empty( $attr['orderby'] ) )\n\t\t\t$attr['orderby'] = 'post__in';\n\t\t$attr['include'] = $attr['ids'];\n\t}\n\n\t// Allow plugins/themes to override the default gallery template.\n\t$output = apply_filters('post_gallery', '', $attr);\n\tif ( $output != '' )\n\t\treturn $output;\n\n\t// We're trusting author input, so let's at least make sure it looks like a valid orderby statement\n\tif ( isset( $attr['orderby'] ) ) {\n\t\t$attr['orderby'] = sanitize_sql_orderby( $attr['orderby'] );\n\t\tif ( !$attr['orderby'] )\n\t\t\tunset( $attr['orderby'] );\n\t}\n\n\textract(shortcode_atts(array(\n\t\t'order' => 'ASC',\n\t\t'orderby' => 'menu_order ID',\n\t\t'id' => $post->ID,\n\t\t'itemtag' => 'li',\n\t\t'columns' => 3,\n\t\t'size' => 'large',\n\t\t'include' => '',\n\t\t'exclude' => ''\n\t), $attr));\n\n\t$id = intval($id);\n\tif ( 'RAND' == $order )\n\t\t$orderby = 'none';\n\n\tif ( !empty($include) ) {\n\t\t$_attachments = get_posts( array('include' => $include, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) );\n\n\t\t$attachments = array();\n\t\tforeach ( $_attachments as $key => $val ) {\n\t\t\t$attachments[$val->ID] = $_attachments[$key];\n\t\t}\n\t} elseif ( !empty($exclude) ) {\n\t\t$attachments = get_children( array('post_parent' => $id, 'exclude' => $exclude, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) );\n\t} else {\n\t\t$attachments = get_children( array('post_parent' => $id, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) );\n\t}\n\n\tif ( empty($attachments) )\n\t\treturn '';\n\n\tif ( is_feed() ) {\n\t\t$output = \"\\n\";\n\t\tforeach ( $attachments as $att_id => $attachment )\n\t\t\t$output .= wp_get_attachment_link($att_id, $size, true) . \"\\n\";\n\t\treturn $output;\n\t}\n\n\t$itemtag = tag_escape($itemtag);\n\t$columns = intval($columns);\n\t$itemwidth = $columns > 0 ? floor(100/$columns) : 100;\n\t$float = is_rtl() ? 'right' : 'left';\n\n\t$selector = \"gallery-{$instance}\";\n\n\t$gallery_style = $gallery_div = '';\n\t\t\n\t$size_class = sanitize_html_class( $size );\n\t$gallery_div = '<section class=\"gallery-container\"><div id=\"'. $selector .'\" class=\"flexslider gallery-slider\"><ul class=\"slides\">';\n\t$output = apply_filters( 'gallery_style', $gallery_style . \"\\n\\t\\t\" . $gallery_div );\n\n\t$i = 0;\n\tforeach ( $attachments as $id => $attachment ) {\t\t\n\t\tadd_filter('wp_get_attachment_image_attributes', 'unset', 10, 2);\t\n\t\n\t\t$url = wp_get_attachment_url( $attachment->ID );\n\t\t$text = '';\n\t\tif ( trim( $text ) == '' )\n\t\t\t$text = $attachment->post_title;\n\t\t\n\t\t$crop = true; //resize but retain proportions\n $single = true; //return array\n \t\t\n if(!empty($url)){\n $url_resize = aq_resize($url, 817, 400, $crop, $single);\n if(!$url_resize){\n \t$url_resize = $url;\n }\n\t\t}\n\t\t$link = \"$url_resize\";\n\n\t\t$output .= \"<{$itemtag}>\";\n\t\t$output .= '<img src=\"'. $link .'\">';\n\t\t$output .= \"</{$itemtag}>\";\n\t\tif ( $columns > 0 && ++$i % $columns == 0 )\n\t\t\t$output .= '';\n\t}\n\t$output .= '</ul></div>';\n\t$output .= '<div class=\"carousel flexslider\"><ul class=\"slides\">';\n\tforeach ( $attachments as $id => $attachment ) {\n\t\tadd_filter('wp_get_attachment_image_attributes', 'unsets', 10, 2);\t\n\t\n\t\t$url = wp_get_attachment_url( $attachment->ID );\n\t\tif ( trim( $text ) == '' )\n\t\t\t$text = $attachment->post_title;\n\t\t\n\t\t$crop = true; //resize but retain proportions\n $single = true; //return array\n \t\t\n if(!empty($url)){\n $url_resize = aq_resize($url, 140, 100, $crop, $single);\n if(!$url_resize){\n \t$url_resize = $url;\n }\n\t\t}\n\t\t$link = \"$url_resize\";\n\n\t\t$output .= \"<{$itemtag}>\";\n\t\t$output .= '<img src=\"'. $link .'\">';\n\t\t$output .= \"</{$itemtag}>\";\n\t\tif ( $columns > 0 && ++$i % $columns == 0 )\n\t\t\t$output .= '';\n\t}\n\n\t$output .= '</ul></div><div class=\"sep\"></div></section>';\n\n\treturn $output;\n}",
"function get_post_galleries_images($post = 0)\n {\n }",
"function get_post_gallery_images($post = 0)\n {\n }",
"function get_post_gallery($post = 0, $html = \\true)\n {\n }",
"private function registerPostType() {\n\t global $superfood_elated_global_Framework;\n\n\t $menuPosition = 5;\n\t $menuIcon = 'dashicons-admin-post';\n\n\t if(eltd_core_theme_installed()) {\n\t\t $menuPosition = $superfood_elated_global_Framework->getSkin()->getMenuItemPosition('masonry-gallery');\n\t\t $menuIcon = $superfood_elated_global_Framework->getSkin()->getMenuIcon('masonry-gallery');\n\t }\n\n register_post_type($this->base,\n array(\n 'labels' \t\t=> array(\n 'name' \t\t\t\t=> esc_html__('Masonry Gallery', 'eltdf-core' ),\n 'all_items'\t\t\t=> esc_html__('Masonry Gallery Items', 'eltdf-core'),\n 'singular_name' \t=> esc_html__('Masonry Gallery Item', 'eltdf-core' ),\n 'add_item'\t\t\t=> esc_html__('New Masonry Gallery Item', 'eltdf-core'),\n 'add_new_item' \t\t=> esc_html__('Add New Masonry Gallery Item', 'eltdf-core'),\n 'edit_item' \t\t=> esc_html__('Edit Masonry Gallery Item', 'eltdf-core')\n ),\n 'public'\t\t=>\tfalse,\n 'show_in_menu'\t=>\ttrue,\n 'rewrite' \t\t=> \tarray('slug' => 'masonry-gallery'),\n\t\t\t\t'menu_position' => \t$menuPosition,\n 'show_ui'\t\t=>\ttrue,\n 'has_archive'\t=>\tfalse,\n 'hierarchical'\t=>\tfalse,\n 'supports'\t\t=>\tarray('title', 'thumbnail'),\n\t\t\t\t'menu_icon' => $menuIcon\n )\n );\n }",
"static function gallery_slideshow($current_post, $template = null) {\n\t\tif ($template === null) {\n\n\t\t\t$image_scale_mode = get_post_meta($current_post->ID, wpgrade::prefix() . 'post_image_scale_mode', true);\n\t\t\t$slider_visiblenearby = get_post_meta($current_post->ID, wpgrade::prefix() . 'post_slider_visiblenearby', true);\n\t\t\t$slider_transition = get_post_meta($current_post->ID, wpgrade::prefix() . 'post_slider_transition', true);\n\t\t\t$slider_autoplay = get_post_meta($current_post->ID, wpgrade::prefix() . 'post_slider_autoplay', true);\n\t\t\tif($slider_autoplay) {\n\t\t\t\t$slider_delay = get_post_meta($current_post->ID, wpgrade::prefix() . 'post_slider_delay', true);\n\t\t\t}\n\t\t\t// Force transition to move if nearby images are visible\n\t\t\t// because fade transition is incompatible with nearby images\n\t\t\tif( 'true' === $slider_visiblenearby ) $slider_transition = 'move';\n\n\t\t\t$template = '<div class=\"wp-gallery\" data-royalslider data-customarrows data-sliderpauseonhover data-slidertransition=\"' . $slider_transition . '\" ';\n\t\t\t$template .= ' data-imagescale=\"' . $image_scale_mode . '\" ';\n\n//\t\t\tvar_dump($slider_visiblenearby); die();\n\t\t\tif ( \"true\" === $slider_visiblenearby ) {\n\t\t\t\t$template .= ' data-visiblenearby ';\n\t\t\t}\n\t\t\tif($slider_autoplay){\n\t\t\t\t$template .= ' data-sliderautoplay=\"\" ';\n\t\t\t\t$template .= ' data-sliderdelay=\"' . $slider_delay . '\" ';\n\t\t\t}\n\t\t\t$template .= ' data-imagealigncenter ';\n\t\t\tif (pixelgrade_option('show_title_caption_popup') ) {\n\t\t\t\t$template .= ' data-enable_caption=\"\"';\n\t\t\t}\n\t\t\t$template .= '>:gallery</div>';\n\t\t}\n\n\t\t// first check if we have a meta with a gallery\n\t\t$gallery_ids = array();\n\t\t$gallery_ids = get_post_meta( $current_post->ID, wpgrade::prefix() . 'main_gallery', true );\n\n\t\tif ( ! empty($gallery_ids)) {\n\t\t\t//recreate the gallery shortcode\n\t\t\t$gallery = '[gallery ids=\"'.$gallery_ids.'\"]';\n\n\t\t\tif (strpos($gallery, 'style') === false) {\n\t\t\t\t$gallery = str_replace(\"]\", \" style='big_thumb' size='blog-big' link='file']\", $gallery);\n\t\t\t}\n\n\t\t\t$shrtcode = do_shortcode($gallery);\n//\t\t\t$shrtcode = preg_replace('/(<dd class=\"wp-caption-text gallery-caption\">.+?)+(<\\/dd>)/i', '', $shrtcode);\n\t\t\tif (!empty($shrtcode)) {\n\n\t\t\t\treturn strtr($template, array(':gallery' => $shrtcode));\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\telse { // empty gallery_ids\n\t\t\t// search for the first gallery shortcode\n\t\t\t$gallery_matches = null;\n\t\t\tpreg_match(\"!\\[gallery.+?\\]!\", $current_post->post_content, $gallery_matches);\n\n\t\t\tif ( ! empty($gallery_matches)) {\n\t\t\t\t$gallery = $gallery_matches[0];\n\n\t\t\t\tif (strpos($gallery, 'style') === false) {\n\t\t\t\t\t$gallery = str_replace(\"]\", \" style='big_thumb' size='blog-big' link='file']\", $gallery);\n\t\t\t\t}\n\t\t\t\t$shrtcode = do_shortcode($gallery);\n\t\t\t\tif (!empty($shrtcode)) {\n\t\t\t\t\treturn strtr($template, array(':gallery' => $shrtcode));\n\t\t\t\t} else {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse { // gallery_matches is empty\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t}",
"function gallery($gallery_name=\"eugenio-02\",$page_num=5,$title='Missing Title')\n\t{\n //data must give the template we want things shown\n //this is defined by the seecond segement\n // @gallery=gallery template\n // @page =page template\n // @sitemap=sitemap template\n $this->load->library('pagebuilder');\n \n\t $data['title'] = $gallery_name;\n\t $data['heading'] = \"My Real Heading\";\n\t $data['gallery']=$gallery_name;\n\t $data['page_num']=$page_num;\n\t $this->load->view('photographer_gallery',$data);\n \n\t}",
"function voyage_mikado_is_masonry_template() {\n\n $page_id = voyage_mikado_get_page_id();\n $page_template = get_page_template_slug($page_id);\n $page_options_template = voyage_mikado_options()->getOptionValue('blog_list_type');\n\n if(!is_archive()) {\n if($page_template == 'blog-masonry.php' || $page_template == 'blog-masonry-full-width.php') {\n return true;\n }\n } elseif(is_archive() || is_home()) {\n if($page_options_template == 'masonry' || $page_options_template == 'masonry-full-width') {\n return true;\n }\n } else {\n return false;\n }\n }",
"function dfcg_help_gallery() {\n?>\n\t<h3><?php _e( 'Dynamic Content Gallery - Quick Help - Gallery Method', DFCG_DOMAIN ); ?></h3>\n\t\n\t<p><?php _e( 'For many users the best option is One Category. It is great as a \"set and forget\" option, because it will always pull in the latest posts from your chosen category. The Custom Post option works in a similar way to the One Category method and is, obviously, the best option for pulling in posts from one Custom Post type. In server performance terms, these two methods are probably the most efficient ones to use.', DFCG_DOMAIN ); ?></p>\n\t\n\t<p><?php _e( 'The Multi-Option method is perfect for when you want to mix posts from different categories, for example if you want to feature the latest post from a number of different categories.', DFCG_DOMAIN ); ?></p>\n\t\n\t<p><?php _e( 'The ID Method is the most flexible because you can pull in any type of post (normal of Custom) and Pages, and mix them in any order you wish using the Sort Order field in the DCG metabox.', DFCG_DOMAIN ); ?></p>\n\n<?php\n}",
"function medigroup_mikado_is_masonry_template() {\n\n $page_id = medigroup_mikado_get_page_id();\n $page_template = get_page_template_slug($page_id);\n $page_options_template = medigroup_mikado_options()->getOptionValue('blog_list_type');\n\n if(!is_archive()) {\n if($page_template == 'blog-masonry.php' || $page_template == 'blog-masonry-full-width.php') {\n return true;\n }\n } elseif(is_archive() || is_home()) {\n if($page_options_template == 'masonry' || $page_options_template == 'masonry-full-width') {\n return true;\n }\n } else {\n return false;\n }\n }",
"public function print_media_templates_handler() {\n\n // define backbone template;\n // the \"tmpl-\" prefix is required,\n // and the input field should have a data-setting attribute\n // matching the shortcode name\n $gallery_defaults = self::get_gallery_defaults();\n\n ?>\n <script type=\"text/html\" id=\"tmpl-gallery-layout-setting\">\n <h2 style=\"display: inline-block;\">Torque Custom Settings</h2>\n <label class=\"setting\">\n <span>Torque Gallery Layout</span>\n <select data-setting=\"<?php echo self::$data_setting_slug; ?>\">\n <option value=\"0\">No Custom Layout</option>\n <option value=\"6|4\">6|4</option>\n <option value=\"4|6\">4|6</option>\n <option value=\"10\">10 (Full Width)</option>\n </select>\n </label>\n </script>\n\n <script>\n\n jQuery(document).ready(function(){\n\n // add shortcode attribute and its default value to the\n // gallery settings list;\n //\n // we set some other default values here for the default wordpress gallery atts\n $.extend(wp.media.gallery.defaults, {\n torque_layout: '<?php echo $gallery_defaults[self::$data_setting_slug]; ?>',\n link: '<?php echo $gallery_defaults['link']; ?>',\n size: '<?php echo $gallery_defaults['size']; ?>',\n columns: '<?php echo $gallery_defaults['columns']; ?>'\n });\n\n // merge default gallery settings template with yours\n wp.media.view.Settings.Gallery = wp.media.view.Settings.Gallery.extend({\n template: function(view){\n /*\n if you want to get back the default wordpress settings, use this return\n\n return wp.media.template('gallery-settings')(view)\n + wp.media.template('gallery-layout-setting')(view);\n */\n\n // return our own settings in place of wordpress default\n return wp.media.template('gallery-layout-setting')(view);\n }\n });\n\n });\n\n </script>\n\n <?php\n }",
"function neobeat_register_masonry_scripts_for_list_shortcodes( $scripts ) {\n\t\t\n\t\t$scripts['isotope'] = array(\n\t\t\t'registered' => true\n\t\t);\n\t\t$scripts['packery'] = array(\n\t\t\t'registered' => true\n\t\t);\n\t\t\n\t\treturn $scripts;\n\t}",
"function print_blog_grid( $item_class, $item_size, $item_index, $num_excerpt ){\r\r\n\r\r\n\t\twhile( have_posts() ){\r\r\n\t\t\tthe_post();\r\r\n\r\r\n\t\t\techo '<div class=\"blog-item' . $item_index . ' gdl-divider ' . $item_class . ' mt0\">'; \r\r\n\r\r\n\t\t\tprint_blog_thumbnail( get_the_ID(), $item_size );\r\r\n\t\t\t\r\r\n\t\t\techo '<div class=\"blog-thumbnail-context\">';\r\r\n\t\t\techo '<h2 class=\"blog-thumbnail-title post-widget-title-color gdl-title\"><a href=\"' . get_permalink() . '\">' . get_the_title() . '</a></h2>';\r\r\n\t\t\techo '<div class=\"blog-thumbnail-content\">' . mb_substr( get_the_excerpt(), 0, $num_excerpt ) . '</div>';\t\r\r\n\r\r\n\t\t\techo '<div class=\"blog-thumbnail-info post-info-color gdl-divider\">';\r\r\n\t\t\techo '<div class=\"blog-thumbnail-date\">' . get_the_time( GDL_DATE_FORMAT ) . '</div>';\r\r\n\t\t\techo '<div class=\"blog-thumbnail-author\"> ' . __('by','gdl_front_end') . ' ' . get_the_author_link() . '</div>';\r\r\n\t\t\techo '<div class=\"blog-thumbnail-comment\">';\r\r\n\t\t\tcomments_popup_link( __('0 Comment','gdl_front_end'),\r\r\n\t\t\t\t__('1 Comment','gdl_front_end'),\r\r\n\t\t\t\t__('% Comments','gdl_front_end'), '',\r\r\n\t\t\t\t__('Comments are off','gdl_front_end') );\r\r\n\t\t\techo '</div>';\r\r\n\t\t\tthe_tags('<div class=\"blog-thumbnail-tag\">', ', ', '</div>');\t\t\t\r\r\n\t\t\techo '<div class=\"clear\"></div>';\r\r\n\t\t\techo '</div>';\t\t\t\r\r\n\t\t\t\r\r\n\t\t\techo '</div>'; // blog-thumbnail-context\r\r\n\t\t\t\r\r\n\t\t\techo '</div>'; // blog-item\r\r\n\t\t\r\r\n\t\t}\r\r\n\t\t\t\r\r\n\t}",
"function neobeat_register_masonry_scripts() {\n\t\twp_register_script( 'isotope', NEOBEAT_INC_ROOT . '/masonry/assets/js/plugins/isotope.pkgd.min.js', array( 'jquery' ), false, true );\n\t\twp_register_script( 'packery', NEOBEAT_INC_ROOT . '/masonry/assets/js/plugins/packery-mode.pkgd.min.js', array( 'jquery' ), false, true );\n\t}",
"function enqueue_masonry() {\n\tif( is_front_page() || is_category() ) {\n\t\twp_enqueue_script('masonry', get_stylesheet_directory_uri() . '/js/masonry/masonry.pkgd.min.js', array('jquery'), '', true );\n\t\twp_enqueue_script('images-loaded', get_stylesheet_directory_uri() . '/js/masonry/imagesloaded.pkgd.min.js', array('jquery'), '', true );\n\t}\n}",
"function gallery_after_setup() {\n add_theme_support( 'post-thumbnails' );\n set_post_thumbnail_size(250, 250, true);\n}",
"function anomous_gallery_post() {\n\n\t$labels = array(\n\t\t'name' => __( 'Gallery', 'autonomous' ),\n\t\t'singular_name' => __( 'Gallery', 'autonomous' ),\n\t\t'add_new' => _x( 'Add New Gallery', 'autonomous', 'autonomous' ),\n\t\t'add_new_item' => __( 'Add New Gallery', 'autonomous' ),\n\t\t'edit_item' => __( 'Edit Gallery', 'autonomous' ),\n\t\t'new_item' => __( 'New Gallery', 'autonomous' ),\n\t\t'view_item' => __( 'View Gallery', 'autonomous' ),\n\t\t'search_items' => __( 'Search Gallery', 'autonomous' ),\n\t\t'not_found' => __( 'No Gallery found', 'autonomous' ),\n\t\t'not_found_in_trash' => __( 'No Gallery found in Trash', 'autonomous' ),\n\t\t'menu_name' => __( 'Gallery', 'autonomous' ),\n\t);\n\n\t$args = array(\n\t\t'labels' => $labels,\n\t\t'description' => 'Gallery For Each Department and Festivels',\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_nav_menus' => false,\n\t\t'publicly_queryable' => true,\n\t\t'exclude_from_search' => false,\n\t\t'has_archive' => true,\n\t\t'rewrite' => array( 'slug' => 'gallery','with_front' => false ),\n\t\t'capability_type' => 'post',\n\t\t'supports' => array(\n\t\t\t'title',\n\t\t\t'thumbnail',\n\t\t\t'editor',\n\t\t),\n\t\t'capabilities' => array(\n\t\t\t'edit_post' => 'hod_priv',\n\t\t\t'read_post' => 'hod_priv',\n\t\t\t'delete_post' => 'hod_priv',\n\t\t\t'edit_posts' => 'hod_priv',\n\t\t\t'edit_others_posts' => 'hod_priv',\n\t\t\t'delete_posts' => 'hod_priv',\n\t\t\t'publish_posts' => 'hod_priv',\n\t\t\t'read_private_posts' => 'hod_priv'\n\t\t),\n\t);\n\n\tregister_post_type( 'gallery_anomous', $args );\n}",
"function register_block_core_gallery()\n {\n }",
"function fiorello_mikado_set_blog_masonry_gallery_type_global_option( $options ) {\n\t\t$options['masonry-gallery'] = esc_html__( 'Blog: Masonry Gallery', 'fiorello' );\n\t\t\n\t\treturn $options;\n\t}",
"function neobeat_enqueue_masonry_scripts_for_shortcodes( $atts ) {\n\t\t\n\t\tif ( isset( $atts['behavior'] ) && $atts['behavior'] == 'masonry' ) {\n\t\t\tneobeat_include_masonry_scripts();\n\t\t}\n\t}",
"function register_block_core_gallery() {\n\tregister_block_type_from_metadata(\n\t\t__DIR__ . '/gallery',\n\t\tarray(\n\t\t\t'render_callback' => function ( $attributes, $content ) {\n\t\t\t\treturn $content;\n\t\t\t},\n\t\t)\n\t);\n}",
"public function meta_box_gallery_callback( $post ) {\n\n // Load view\n $this->base->load_admin_partial( 'metabox-gallery-type', array(\n 'post' => $post,\n 'types' => $this->get_envira_types( $post ),\n 'instance' => $this,\n ) ); \n\n }",
"function ag_cat_galleries_code($fnc_cat = false) {\t\n\tinclude_once(AG_DIR . '/functions.php');\n\t$cat = $fnc_cat;\n\t$code = '';\n\t\n\t// if is not called directly\n\tif(!$cat) {\n\t\tif(!isset($_POST['gallery_cat'])) {die('missing data');}\n\t\t$cat = $_POST['gallery_cat'];\n\t}\n\n\t$post_list = ag_cat_galleries($cat);\t\n\tif(!$post_list) {return false;}\n\t\n\tforeach($post_list as $post) {\n\t\t$code .= '\n\t\t<li style=\"background-image: url('.ag_thumb_src($post['img'], 200, 170, 70).');\" rel=\"'.$post['id'].'\" title=\"'. __('add to collection', 'ag_ml') .'\" ag-cats=\"'.$post['cats'].'\" ag-img=\"'.ag_thumb_src($post['img'], 500, 500, 70).'\">\n\t\t\t<div title=\"'.$post['title'].'\">'.$post['title'].'</div>\n\t\t</li>';\n\t}\n\n\t\n\tif($fnc_cat == false) {die( $code );}\n\telse {return $code;}\n}",
"function gallery1_callback() {\n\n\t$post = new WP_Query( array(\n\t\t'posts_per_page' => 4,\n 'post_type' => 'gallery',\n 'orderby' => 'menu_order',\n 'order' => 'ASC',\n\t));\n\n\tif( !$post->have_posts() ) {\n\t\treturn false;\n\t}\n\n\twhile( $post->have_posts() ) {\n\t\t$post ->the_post();\n\t\t\n\t\t// Get the repeater field\n\t\t$repeater = get_field('gallery2');\n\t\t\n\n\t\t// Get random rows. Change the second parameter in array_rand() to the number of rows desired.\n\t\t$random_rows = array_rand( $repeater, 4);\n\n\t\tfunction random_replacements( $repeater ) {\n\t\t\t$random_replacements = array_rand( $repeater, 1);\n\t\t\treturn $random_replacements;\n\t\t}\n\n\t\t$random_replacements = random_replacements( $repeater );\n\n\t\t\n\n\t\tfunction reload(){\n\t\t\t// <div class =\"gallery-image',$i,'\" style=\"display: none; background-image: url(', $repeater[$random_row]['gallery-image'],');\">\n\n\t\t\t$i = 1;\n\n\t\t\t// Get repeater\n\t\t\t$repeater = get_field('gallery2');\n\n\t\t\t// Get number of images/rows in repeater\n\t\t\t$ImageCount = count( get_field( 'gallery2' ) );\n\n\t\t\t// Get images/rows\n\t\t\t$random_rows = array_rand( $repeater, $ImageCount);\n\n\t\t\t// Display images/rows\n\t\t\techo '<div class=\"gallery\">';\n\n\t\t\tif( is_array( $random_rows )) {\n\n\t\t\t\tforeach( $random_rows as $random_row) {\n\n\t\t\t\t\t// Output data here.\n\t\t\t\t\techo '\n\t\t \t\t\t\t\t\n\t\t \t\t\t\t<a href=',$repeater[$random_row]['gallery-image'],' class=\"gallery-image',$i,'\" data-rel=\"lightbox\" style=\"display: none; background-image: url(', $repeater[$random_row]['gallery-image'],');\"></a>';\n\n\t\t \t\t\t$i++;\n\t\t\t\t}\n\t\t\t}\n\t\t\techo '</div>';\n\t\t}\n\t\treload();\n\t}\n}",
"function blog_thumbnail_style($atts, $current)\n{\n global $post, $mk_options;\n extract($atts);\n $image_height = $grid_image_height;\n\n if ($thumbnail_align == 'left'){\n $align_class = ' content-align-right';\n }else{\n $align_class = ' content-align-left';\n }\n\n if ($layout == 'full') {\n $image_width = $grid_width - 40;\n } else {\n $image_width = (($content_width / 100) * $grid_width) - 40;\n }\n $output = $has_image = '';\n $post_type = get_post_meta($post->ID, '_single_post_type', true);\n\n /*\n * Image Width : 600px\n * Image Height : 460px\n */\n\n $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);\n $image_output_src = bfi_thumb($image_src_array[0], array(\n 'width' => '600',\n 'height' => '460'\n ));\n\n if ($post_type == '') {\n $post_type = 'image';\n }\n\n $output .= '<article id=\"' . get_the_ID() . '\" class=\"mk-blog-thumbnail-item thumbnail-'.$item_id.' mk-isotop-item ' . $post_type . '-post-type'.$align_class.'\">' . \"\\n\";\n\n if (has_post_thumbnail()) {\n\n /*\n Altered - Steven Jackson - 4 August 2015\n $output .= '<div class=\"featured-image\" ><a href=\"' . get_permalink() . '\" title=\"' . get_the_title() . '\">';\n $output .= ' <img alt=\"' . get_the_title() . '\" title=\"' . get_the_title() . '\" src=\"' . $image_output_src . '\" itemprop=\"image\" />';\n $output .= ' <div class=\"image-hover-overlay\"></div>';\n $output .= ' <div class=\"post-type-badge\" href=\"' . get_permalink() . '\"><i class=\"mk-li-' . $post_type . '\"></i></div>';\n $output .= '</a></div>';\n */\n\n $output .= '<div class=\"featured-image\" >';\n $output .= ' <img alt=\"' . get_the_title() . '\" title=\"' . get_the_title() . '\" src=\"' . $image_output_src . '\" itemprop=\"image\" />';\n $output .= ' <div class=\"post-type-badge\" href=\"' . get_permalink() . '\"><i class=\"mk-li-' . $post_type . '\"></i></div>';\n $output .= '</div>';\n }\n\n $output .= '<div class=\"mk-thumbnail-content-container\">';\n\n/* \nRemoved - Steven Jackson - 4 August 2015 \n\n\n $output .= ' <div class=\"mk-blog-meta\">';\n $output .= ' <div class=\"mk-blog-author\">';\n ob_start();\n the_author_posts_link();\n $output .= ob_get_contents() . '</div>';\n ob_get_clean();\n $output .= ' <span class=\"mk-categories\"> / ' . __('', 'mk_framework') . ' ' . get_the_category_list(', ') . ' </span> /\n <time datetime=\"' . get_the_date() . '\">\n <a href=\"' . get_month_link(get_the_time(\"Y\"), get_the_time(\"m\")) . '\">' . get_the_date() . '</a>\n </time>';\n $output .= ' <h3 class=\"the-title\"><a href=\"' . get_permalink() . '\">' . get_the_title() . '</a></h3>';\n*/\n\n $output .= ' <h3 class=\"the-title\">' . get_the_title() . '</h3>';\n if($excerpt_length != 0) {\n ob_start();\n the_excerpt_max_charlength(2000);\n $output .= '<div class=\"the-excerpt\"><p>' . ob_get_clean() . '</p></div>';\n }\n\n/* \nRemoved - Steven Jackson - 4 August 2015 \n $output .= ' <div class=\"mk-teader-button\">'.\n do_shortcode( '[mk_button dimension=\"outline\" corner_style=\"pointed\" outline_skin=\"custom\" outline_active_color=\"#000000\" outline_hover_color=\"#fff\" margin_bottom=\"0\" size=\"medium\" align=\"left\" url=\"'.get_permalink().'\"]'.__('READ MORE', 'mk_framework').'[/mk_button]' ).'\n </div>';\n $output .= ' </div>';\n\n*/\n\n\n $output .= ' </div>';\n\n $output .= '<div class=\"clearboth\"></div>';\n $output .= '</article>' . \"\\n\\n\\n\";\n return $output;\n}",
"function get_post_galleries($post, $html = \\true)\n {\n }",
"function thirdtheme_blog_slider()\n {\n add_theme_support('post-thumbnails');\n add_image_size('small',102,102);\n $args = array(\n 'labels' => array('name' =>__('blog slider'),\n 'add_new' =>__('add new blog')),\n \n 'public' => true,\n 'menu_icon' =>'dashicons-buddicons-buddypress-logo',\n 'show_in_menu' => true,\n 'has_archive' => true,\n 'supports' => array( 'title', 'editor','thumbnail',)); \n register_post_type('blogslider',$args);\n }",
"function enqueue_masonry(){\n\n\t\t\twp_enqueue_script( 'masonry' ); // Wordpress Masonry\n\n\t\t\twp_enqueue_script(\n\t\t\t\tLAYERS_THEME_SLUG . '-layers-masonry-js' ,\n\t\t\t\tLAYERS_TEMPLATE_URI . 'assets/admin/js/layers.masonry.js',\n\t\t\t\tarray(\n\t\t\t\t\t'jquery'\n\t\t\t\t),\n\t\t\t\tLAYERS_VERSION\n\t\t\t); // Layers Masonry Function\n\t\t}",
"function voyage_mikado_blog_templates() {\n\n $templates = array();\n $grid_templates = voyage_mikado_blog_grid_types();\n $full_templates = voyage_mikado_blog_full_width_types();\n foreach($grid_templates as $grid_template) {\n array_push($templates, 'blog-'.$grid_template);\n }\n foreach($full_templates as $full_template) {\n array_push($templates, 'blog-'.$full_template);\n }\n\n return $templates;\n\n }",
"public static function make_gallery_container( $html ) {\n global $post;\n\n if ( isset( $post ) ) {\n $blog_id = (int) get_current_blog_id();\n\n $extra_data = array(\n 'data-carousel-extra' => array(\n 'blog_id' => $blog_id,\n 'permalink' => get_permalink( $post->ID ),\n )\n );\n foreach ( (array) $extra_data as $data_key => $data_values ) {\n $html = str_replace( '<div ', '<div ' . esc_attr( $data_key ) . \"='\" . json_encode( $data_values ) . \"' \", $html );\n }\n }\n\n return $html;\n }",
"function create_gallery($dir) {\n echo '<div class=\"row\">';\n\n $num_files = glob($dir . \"*.{JPG,jpg,gif,png,bmp}\", GLOB_BRACE);\n $folder = opendir($dir);\n if ($num_files > 0) {\n while(false !== ($file = readdir($folder))) {\n $fullpath = $dir . $file;\n $fullpath_thumb = $dir . 'thumbnails/' . $file;\n $extension = strtolower(pathinfo($file, PATHINFO_EXTENSION));\n if($extension == 'jpg' || $extension == 'png' || $extension == 'gif' || $extension == 'bmp') {\n // insert thumbnail image as link which when clicked opens lightbox to full size version\n echo '<div class=\"hidden-xs col-sm-6 col-md-4 col-lg-3\">';\n echo '<a class=\"thumbnail\" rel=\"lightbox[group]\" href=\"' . $fullpath . '\">';\n echo '<img src=\"' . $fullpath_thumb . '\" class=\"img-responsive group1\"></a></div>';\n\n // disable lightbox on mobile\n echo '<div class=\"text-center col-xs-12 hidden-sm hidden-md hidden-lg hidden-xl\">';\n echo '<a class=\"thumbnail\" href=\"' . $fullpath . '\">';\n echo '<img src=\"' . $fullpath_thumb . '\" class=\"img-responsive\"></a></div>';\n }\n }\n } else {\n return \"<div><em>ERROR:</em> <span style='font-style:italic;'>No files found in specified folder, gallery not generated.</span></div>\";\n }\n closedir($folder);\n\n echo '</div>';\n}",
"function medigroup_mikado_blog_templates() {\n\n $templates = array();\n $grid_templates = medigroup_mikado_blog_grid_types();\n $full_templates = medigroup_mikado_blog_full_width_types();\n foreach($grid_templates as $grid_template) {\n array_push($templates, 'blog-'.$grid_template);\n }\n foreach($full_templates as $full_template) {\n array_push($templates, 'blog-'.$full_template);\n }\n\n return $templates;\n\n }",
"function tempgrid($totalimages,$columns=8) {\n\n /* use like:\n <div id=\"tempgrid\" class=\" \">\n <div style=\"overflow:hidden;background:#333333;\">\n <?php \n echo tempgrid(32,8);\n ?>\n </div>\n </div>\n */\n $rows = $totalimages/$columns;\n $height = 640/$rows;\n $width = 100/$columns;\n $i=1;\n $output = '<style>.home .page-header > div {border: 5px solid #f2f3f1;min-height: 620px;}ul.tempgrid,ul.tempgrid li{padding:0px;margin:0px;list-style-type:none;-webkit-filter:grayscale(100%);filter: grayscale(100%);opacity:.5;}</style>';\n $output .= '<ul class=\"tempgrid\">';\n while ($i <= $totalimages) {\n $output .= '<li style=\"height:'.$height.'px;width:'.$width.'%;margin:0px;float:left;padding:0px;background:url('.get_stylesheet_directory_uri().'/assets/images/grid-'.$i.'.jpg) no-repeat center center;background-size:cover;\">\n <a class=\"member\" href=\"/community\"></a></li>';\n $i++;\n }\n return $output . '</ul>';\n}",
"function ucf_post_list_display_gallery_before($content, $posts, $atts)\n{\n ob_start();\n ?>\n <div class=\"ucf-post-list card-layout\" id=\"post-list-<?php echo $atts['list_id']; ?>\">\n <?php\n return ob_get_clean();\n}",
"function TS_VCSC_Add_Posts_Image_Lean() {\r\n\t\t\t\tvc_lean_map('TS_VCSC_Posts_Image_Grid_Standalone',\t\t\tarray($this, 'TS_VCSC_Add_Posts_Image_Elements'), null);\r\n\t\t\t}",
"function cs_enqueue_masonry_style_script(){\n \twp_enqueue_script('jquery.masonry_js', get_template_directory_uri() . '/scripts/frontend/jquery.masonry.min.js', '', '', true);\n}",
"function register_shortcodes() {\n\tadd_shortcode('gallery1', 'gallery1_callback');\n}",
"public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n $galleryHTML = '\n <section id=\"default-wrapper\">\n <div class=\"container\">\n <div class=\"custom-gallery\">\n <div id=\"lightgallery\" class=\"list-unstyled justified-gallery\" style=\"height: 520px;\">\n <a data-pinterest-text=\"Pin it\" data-tweet-text=\"share it on twitter\" class=\"jg-entry\" href=\"images/gallery/1.jpg\" data-sub-html=\"sdsdsd\">\n <img class=\"img-responsive\" src=\"'.\\URL::to('/').'/theme/artemissalt/images/gallery/1.jpg\">\n <div class=\"custom-gallery-poster\">\n <img src=\"'.\\URL::to('/').'/theme/artemissalt/images/gallery/zoom.png\">\n </div>\n \n </a>\n <a data-pinterest-text=\"Pin it\" data-tweet-text=\"share it on twitter\" class=\"jg-entry\" href=\"images/gallery/2.jpg\" data-sub-html=\"sdsdsd\">\n <img class=\"img-responsive\" src=\"'.\\URL::to('/').'/theme/artemissalt/images/gallery/2.jpg\">\n <div class=\"custom-gallery-poster\">\n <img src=\"'.\\URL::to('/').'/theme/artemissalt/images/gallery/zoom.png\">\n </div>\n \n </a>\n <a data-pinterest-text=\"Pin it\" data-tweet-text=\"share it on twitter\" class=\"jg-entry\" href=\"images/gallery/3.jpg\">\n <img class=\"img-responsive\" src=\"'.\\URL::to('/').'/theme/artemissalt/images/gallery/3.jpg\">\n <div class=\"custom-gallery-poster\">\n <img src=\"'.\\URL::to('/').'/theme/artemissalt/images/gallery/zoom.png\">\n </div>\n \n </a>\n <a data-pinterest-text=\"Pin it\" data-tweet-text=\"share it on twitter\" class=\"jg-entry\" href=\"images/gallery/4.jpg\">\n <img class=\"img-responsive\" src=\"'.\\URL::to('/').'/theme/artemissalt/images/gallery/4.jpg\">\n <div class=\"custom-gallery-poster\">\n <img src=\"'.\\URL::to('/').'/theme/artemissalt/images/gallery/zoom.png\">\n </div>\n \n </a>\n <a data-pinterest-text=\"Pin it\" data-tweet-text=\"share it on twitter\" class=\"jg-entry\" href=\"images/gallery/5.jpg\">\n <img class=\"img-responsive\" src=\"'.\\URL::to('/').'/theme/artemissalt/images/gallery/5.jpg\">\n <div class=\"custom-gallery-poster\">\n <img src=\"'.\\URL::to('/').'/theme/artemissalt/images/gallery/zoom.png\">\n </div>\n \n </a>\n <a data-pinterest-text=\"Pin it\" data-tweet-text=\"share it on twitter\" class=\"jg-entry\" href=\"images/gallery/6.jpg\">\n <img class=\"img-responsive\" src=\"'.\\URL::to('/').'/theme/artemissalt/images/gallery/6.jpg\">\n <div class=\"custom-gallery-poster\">\n <img src=\"'.\\URL::to('/').'/theme/artemissalt/images/gallery/zoom.png\">\n </div>\n \n </a>\n <a data-pinterest-text=\"Pin it\" data-tweet-text=\"share it on twitter\" class=\"jg-entry\" href=\"images/gallery/7.jpg\">\n <img class=\"img-responsive\" src=\"'.\\URL::to('/').'/theme/artemissalt/images/gallery/7.jpg\">\n <div class=\"custom-gallery-poster\">\n <img src=\"'.\\URL::to('/').'/theme/artemissalt/images/gallery/zoom.png\">\n </div>\n \n </a>\n <!-- <a data-pinterest-text=\"Pin it\" data-tweet-text=\"share it on twitter\" class=\"jg-entry\" href=\"../static/img/8.jpg\"\n style=\"width: 187px; height: 126.144px; top: 133.144px; left: 382px; opacity: 1;\">\n \n <img class=\"img-responsive\" src=\"../static/img/thumb-8.jpg\"\n style=\"width: 187px; height: 127px; margin-left: -93.5px; margin-top: -63.5px;\">\n <div class=\"custom-gallery-poster\">\n <img src=\"images/gallery/zoom.png\">\n </div>\n \n </a>\n <a data-pinterest-text=\"Pin it\" data-tweet-text=\"share it on twitter\" class=\"jg-entry\" href=\"../static/img/9.jpg\"\n data-sub-html=\"sdsdsd\" style=\"width: 187px; height: 126.144px; top: 133.144px; left: 570px; opacity: 1;\">\n \n <img class=\"img-responsive\" src=\"../static/img/thumb-9.jpg\"\n style=\"width: 187px; height: 127px; margin-left: -93.5px; margin-top: -63.5px;\">\n <div class=\"custom-gallery-poster\">\n <img src=\"images/gallery/zoom.png\">\n </div>\n \n </a>\n <a data-pinterest-text=\"Pin it\" data-tweet-text=\"share it on twitter\" class=\"jg-entry\" href=\"../static/img/10.jpg\"\n style=\"width: 186px; height: 126.144px; top: 133.144px; left: 758px; opacity: 1;\">\n \n <img class=\"img-responsive\" src=\"../static/img/thumb-10.jpg\"\n style=\"width: 186px; height: 127px; margin-left: -93px; margin-top: -63.5px;\">\n <div class=\"custom-gallery-poster\">\n <img src=\"images/gallery/zoom.png\">\n </div>\n \n </a>\n <a data-pinterest-text=\"Pin it\" data-tweet-text=\"share it on twitter\" class=\"jg-entry\" href=\"../static/img/11.jpg\"\n data-sub-html=\"sdsdsd\" style=\"width: 187px; height: 126.144px; top: 260.287px; left: 6px; opacity: 1;\">\n \n <img class=\"img-responsive\" src=\"../static/img/thumb-11.jpg\"\n style=\"width: 187px; height: 127px; margin-left: -93.5px; margin-top: -63.5px;\">\n <div class=\"custom-gallery-poster\">\n <img src=\"images/gallery/zoom.png\">\n </div>\n \n </a>\n <a data-pinterest-text=\"Pin it\" data-tweet-text=\"share it on twitter\" class=\"jg-entry\" href=\"../static/img/12.jpg\"\n style=\"width: 187px; height: 126.144px; top: 260.287px; left: 194px; opacity: 1;\">\n \n <img class=\"img-responsive\" src=\"../static/img/thumb-12.jpg\"\n style=\"width: 187px; height: 127px; margin-left: -93.5px; margin-top: -63.5px;\">\n <div class=\"custom-gallery-poster\">\n <img src=\"images/gallery/zoom.png\">\n </div>\n \n </a>\n <a data-pinterest-text=\"Pin it\" data-tweet-text=\"share it on twitter\" class=\"jg-entry\" href=\"../static/img/13.jpg\"\n style=\"width: 187px; height: 126.144px; top: 260.287px; left: 382px; opacity: 1;\">\n \n <img class=\"img-responsive\" src=\"../static/img/thumb-13.jpg\"\n style=\"width: 187px; height: 127px; margin-left: -93.5px; margin-top: -63.5px;\">\n <div class=\"custom-gallery-poster\">\n <img src=\"images/gallery/zoom.png\">\n </div>\n \n </a>\n <a data-pinterest-text=\"Pin it\" data-tweet-text=\"share it on twitter\" class=\"jg-entry\" href=\"../static/img/14.jpg\"\n style=\"width: 187px; height: 126.144px; top: 260.287px; left: 570px; opacity: 1;\">\n \n <img class=\"img-responsive\" src=\"../static/img/thumb-14.jpg\"\n style=\"width: 187px; height: 127px; margin-left: -93.5px; margin-top: -63.5px;\">\n <div class=\"custom-gallery-poster\">\n <img src=\"images/gallery/zoom.png\">\n </div>\n \n </a>\n <a data-pinterest-text=\"Pin it\" data-tweet-text=\"share it on twitter\" class=\"jg-entry\" href=\"../static/img/15.jpg\"\n data-sub-html=\"sdsdsd\" style=\"width: 186px; height: 126.144px; top: 260.287px; left: 758px; opacity: 1;\">\n \n <img class=\"img-responsive\" src=\"../static/img/thumb-15.jpg\"\n style=\"width: 186px; height: 127px; margin-left: -93px; margin-top: -63.5px;\">\n <div class=\"custom-gallery-poster\">\n <img src=\"images/gallery/zoom.png\">\n </div>\n \n </a>\n <a data-pinterest-text=\"Pin it\" data-tweet-text=\"share it on twitter\" class=\"jg-entry\" href=\"../static/img/16.jpg\"\n style=\"width: 187px; height: 126.144px; top: 387.431px; left: 6px; opacity: 1;\">\n \n <img class=\"img-responsive\" src=\"../static/img/thumb-16.jpg\"\n style=\"width: 187px; height: 127px; margin-left: -93.5px; margin-top: -63.5px;\">\n <div class=\"custom-gallery-poster\">\n <img src=\"images/gallery/zoom.png\">\n </div>\n \n </a>\n <a data-pinterest-text=\"Pin it\" data-tweet-text=\"share it on twitter\" class=\"jg-entry\" href=\"../static/img/17.jpg\"\n style=\"width: 187px; height: 126.144px; top: 387.431px; left: 194px; opacity: 1;\">\n \n <img class=\"img-responsive\" src=\"../static/img/thumb-17.jpg\"\n style=\"width: 187px; height: 127px; margin-left: -93.5px; margin-top: -63.5px;\">\n <div class=\"custom-gallery-poster\">\n <img src=\"images/gallery/zoom.png\">\n </div>\n \n </a>\n <a data-pinterest-text=\"Pin it\" data-tweet-text=\"share it on twitter\" class=\"jg-entry\" href=\"../static/img/18.jpg\"\n style=\"width: 187px; height: 126.144px; top: 387.431px; left: 382px; opacity: 1;\">\n \n <img class=\"img-responsive\" src=\"../static/img/thumb-18.jpg\"\n style=\"width: 187px; height: 127px; margin-left: -93.5px; margin-top: -63.5px;\">\n <div class=\"custom-gallery-poster\">\n <img src=\"images/gallery/zoom.png\">\n </div>\n \n </a>\n <a data-pinterest-text=\"Pin it\" data-tweet-text=\"share it on twitter\" class=\"jg-entry\" href=\"../static/img/19.jpg\"\n data-sub-html=\"sdsdsd\" style=\"width: 187px; height: 126.144px; top: 387.431px; left: 570px; opacity: 1;\">\n \n <img class=\"img-responsive\" src=\"../static/img/thumb-19.jpg\"\n style=\"width: 187px; height: 127px; margin-left: -93.5px; margin-top: -63.5px;\">\n <div class=\"custom-gallery-poster\">\n <img src=\"images/gallery/zoom.png\">\n </div>\n \n </a>\n <a data-pinterest-text=\"Pin it\" data-tweet-text=\"share it on twitter\" class=\"jg-entry\" href=\"../static/img/20.jpg\"\n style=\"width: 186px; height: 126.144px; top: 387.431px; left: 758px; opacity: 1;\">\n \n <img class=\"img-responsive\" src=\"../static/img/thumb-20.jpg\"\n style=\"width: 186px; height: 127px; margin-left: -93px; margin-top: -63.5px;\">\n <div class=\"custom-gallery-poster\">\n <img src=\"images/gallery/zoom.png\">\n </div>\n \n </a> -->\n </div>\n </div>\n </div>\n </section>\n ';\n\n $homeHTML = '\n <section id=\"home-one\">\n <div class=\"container\">\n <h6 class=\"text-center\">Who We Are</h6>\n <h2 class=\"heading-decorated\">Welcome to Artemis Salt</h2>\n <div class=\"gap-20\"></div>\n <p class=\"text-center\">Lorem ipsum dolor sit amet consectetur adipisicing elit. Nobis laudantium deleniti pariatur culpa sed illo molestiae architecto aperiam repudiandae similique. Sed exercitationem veritatis temporibus excepturi minima eos quaerat suscipit assumenda.</p>\n\n <div class=\"gap-20\"></div>\n\n <div class=\"row\">\n <div class=\"col-lg-4\">\n <div class=\"service-card\">\n <span class=\"service-icon\"><img src=\"'.\\URL::to('/').'/theme/artemissalt/images/misc/icon1.png\"></span>\n <div class=\"media-body\">\n <h3 class=\"service-title\">\n <a href=\"#\">Water Softener Application</a>\n </h3>\n <p>Lorem ipsum dolor sit amet, consectuerter adipiscing elit diam, sed diam nonummy nibh euismod tincidunt.</p>\n </div>\n </div>\n </div>\n <div class=\"col-lg-4\">\n <div class=\"service-card\">\n <span class=\"service-icon\"><img src=\"'.\\URL::to('/').'/theme/artemissalt/images/misc/icon1.png\"></span>\n <div class=\"media-body\">\n <h3 class=\"service-title\">\n <a href=\"#\">Food Application</a>\n </h3>\n <p>Lorem ipsum dolor sit amet, consectuerter adipiscing elit diam, sed diam nonummy nibh euismod tincidunt.</p>\n </div>\n </div>\n </div>\n <div class=\"col-lg-4\">\n <div class=\"service-card\">\n <span class=\"service-icon\"><img src=\"'.\\URL::to('/').'/theme/artemissalt/images/misc/icon1.png\"></span>\n <div class=\"media-body\">\n <h3 class=\"service-title\">\n <a href=\"#\">Bakery Application</a>\n </h3>\n <p>Lorem ipsum dolor sit amet, consectuerter adipiscing elit diam, sed diam nonummy nibh euismod tincidunt.</p>\n </div>\n </div>\n </div>\n <div class=\"col-lg-4\">\n <div class=\"service-card\">\n <span class=\"service-icon\"><img src=\"'.\\URL::to('/').'/theme/artemissalt/images/misc/icon1.png\"></span>\n <div class=\"media-body\">\n <h3 class=\"service-title\">\n <a href=\"#\">Feed Application</a>\n </h3>\n <p>Lorem ipsum dolor sit amet, consectuerter adipiscing elit diam, sed diam nonummy nibh euismod tincidunt.</p>\n </div>\n </div>\n </div>\n <div class=\"col-lg-4\">\n <div class=\"service-card\">\n <span class=\"service-icon\"><img src=\"'.\\URL::to('/').'/theme/artemissalt/images/misc/icon1.png\"></span>\n <div class=\"media-body\">\n <h3 class=\"service-title\">\n <a href=\"#\">Chemical and Fertilizer Application</a>\n </h3>\n <p>Lorem ipsum dolor sit amet, consectuerter adipiscing elit diam, sed diam nonummy nibh euismod tincidunt.</p>\n </div>\n </div>\n </div>\n <div class=\"col-lg-4\">\n <div class=\"service-card\">\n <span class=\"service-icon\"><img src=\"'.\\URL::to('/').'/theme/artemissalt/images/misc/icon1.png\"></span>\n <div class=\"media-body\">\n <h3 class=\"service-title\">\n <a href=\"#\">Health & Advocacy</a>\n </h3>\n <p>Lorem ipsum dolor sit amet, consectuerter adipiscing elit diam, sed diam nonummy nibh euismod tincidunt.</p>\n </div>\n </div>\n </div>\n </div>\n </div>\n </section>\n\n <section id=\"home-two\">\n <div class=\"container-fluid p-0\">\n <div class=\"row no-gutters\">\n <div class=\"col-lg-6\">\n <div class=\"bg-wrapper\" style=\"background-image:url('.\\URL::to('/').'/theme/artemissalt/images/misc/bakery.jpg)\"></div>\n </div>\n <div class=\"col-lg-6\">\n <div class=\"two-wrapper\">\n <div class=\"two-wrap\">\n <h6 class=\"text-center\">Special Offers</h6>\n <h2>GET 30% OFF</h2>\n <p class=\"text-center\"><strong>YOUR ORDER OF $100 OR MORE</strong></p>\n <div class=\"gap-40\"></div>\n <ul id=\"countdown\" class=\"countdown\" data-date-time=\"Sep 30, 2020 00:00:00\">\n <li><span id=\"days\"></span>Days</li>\n <li><span id=\"hours\"></span>Hours</li>\n <li><span id=\"minutes\"></span>Minutes</li>\n <li><span id=\"seconds\"></span>Seconds</li>\n </ul>\n </div>\n </div>\n </div>\n </div>\n </div>\n </section>\n\n <section id=\"home-three\">\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-lg-4\">\n <div class=\"special-card\">\n <div class=\"special-image\">\n <img src=\"'.\\URL::to('/').'/theme/artemissalt/images/misc/img01.jpg\">\n <div class=\"special-icon\"><img src=\"'.\\URL::to('/').'/theme/artemissalt/images/misc/icon1.png\"></div>\n </div>\n <div class=\"special-content\">\n <h4>Local Farmers</h4>\n <div class=\"gap-10\"></div>\n <p>Donec nec justo eget felis facilisis ferme ntum. Aliquam porttitor mauris sit amet orci. Aenean dignissim pellentesque\n felis. Morbi in sem quis dui placerat ornare.</p>\n </div>\n </div>\n </div>\n <div class=\"col-lg-4\">\n <div class=\"special-card\">\n <div class=\"special-image\">\n <img src=\"'.\\URL::to('/').'/theme/artemissalt/images/misc/img01.jpg\">\n <div class=\"special-icon\"><img src=\"'.\\URL::to('/').'/theme/artemissalt/images/misc/icon1.png\"></div>\n </div>\n <div class=\"special-content\">\n <h4>Local Industries</h4>\n <div class=\"gap-10\"></div>\n <p>Donec nec justo eget felis facilisis ferme ntum. Aliquam porttitor mauris sit amet orci. Aenean dignissim\n pellentesque\n felis. Morbi in sem quis dui placerat ornare.</p>\n </div>\n </div>\n </div>\n <div class=\"col-lg-4\">\n <div class=\"special-card\">\n <div class=\"special-image\">\n <img src=\"'.\\URL::to('/').'/theme/artemissalt/images/misc/img01.jpg\">\n <div class=\"special-icon\"><img src=\"'.\\URL::to('/').'/theme/artemissalt/images/misc/icon1.png\"></div>\n </div>\n <div class=\"special-content\">\n <h4>Local Health Concerns</h4>\n <div class=\"gap-10\"></div>\n <p>Donec nec justo eget felis facilisis ferme ntum. Aliquam porttitor mauris sit amet orci. Aenean dignissim\n pellentesque\n felis. Morbi in sem quis dui placerat ornare.</p>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"gap-80\"></div>\n <h6 class=\"text-center\">All News Around Us</h6>\n <h2 class=\"heading-decorated\">Our Blog</h2>\n <div class=\"gap-40\"></div>\n <div class=\"row\">\n <div class=\"col-lg-4\">\n <div class=\"news-layout\">\n <div class=\"item-img\">\n <figure>\n <img src=\"'.\\URL::to('/').'/theme/artemissalt/images/misc/news1.jpg\" class=\"img-fluid\" alt=\"blog\">\n </figure>\n </div>\n <div class=\"item-content\">\n <span class=\"published-date\">Posted on February 27, 2020</span>\n <h3 class=\"news-title\">\n <a href=\"article.htm\">Were divided land his creature which have evening subdue</a>\n </h3>\n <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin tincidunt nunc lorem, nec faucibus mi facilisis eget.\n Mauris laoreet, nisl id faucibus pellentesque, mi mi tempor enim, sit amet interdum felis nibh a leo.</p>\n <div class=\"gap-30\"></div>\n <a class=\"btn btn-md primary-btn mr-2\" href=\"#\">Read More</a>\n </div>\n </div>\n </div>\n <div class=\"col-lg-4\">\n <div class=\"news-layout\">\n <div class=\"item-img\">\n <figure>\n <img src=\"'.\\URL::to('/').'/theme/artemissalt/images/misc/news2.jpg\" class=\"img-fluid\" alt=\"blog\">\n </figure>\n </div>\n <div class=\"item-content\">\n <span class=\"published-date\">Posted on February 27, 2020</span>\n <h3 class=\"news-title\">\n <a href=\"article.htm\">Were divided land his creature which have evening subdue</a>\n </h3>\n <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin tincidunt nunc lorem, nec faucibus mi facilisis\n eget.\n Mauris laoreet, nisl id faucibus pellentesque, mi mi tempor enim, sit amet interdum felis nibh a leo.</p>\n <div class=\"gap-30\"></div>\n <a class=\"btn btn-md primary-btn mr-2\" href=\"#\">Read More</a>\n </div>\n </div>\n </div>\n <div class=\"col-lg-4\">\n <div class=\"news-layout\">\n <div class=\"item-img\">\n <figure>\n <img src=\"'.\\URL::to('/').'/theme/artemissalt/images/misc/news3.jpg\" class=\"img-fluid\" alt=\"blog\">\n </figure>\n </div>\n <div class=\"item-content\">\n <span class=\"published-date\">Posted on February 27, 2020</span>\n <h3 class=\"news-title\">\n <a href=\"article.htm\">Were divided land his creature which have evening subdue</a>\n </h3>\n <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin tincidunt nunc lorem, nec faucibus mi facilisis\n eget.\n Mauris laoreet, nisl id faucibus pellentesque, mi mi tempor enim, sit amet interdum felis nibh a leo.</p>\n <div class=\"gap-30\"></div>\n <a class=\"btn btn-md primary-btn mr-2\" href=\"#\">Read More</a>\n </div>\n </div>\n </div>\n </div>\n </div>\n </section>\n\n <section id=\"home-four\">\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-lg-6\">\n <h6>Want to know more?</h6>\n <h2 class=\"text-left\">Send a Quote!</h2>\n <div class=\"gap-20\"></div>\n\n <form action=\"\">\n <div class=\"form-group\">\n <label for=\"name\">Your Name (required)</label>\n <div class=\"form-control-wrap\">\n <input type=\"text\" class=\"form-control\" id=\"name\" required autocomplete>\n </div>\n </div>\n <div class=\"form-group\">\n <label for=\"email\">Your Email (required)</label>\n <div class=\"form-control-wrap\">\n <input type=\"email\" class=\"form-control\" id=\"email\" required autocomplete>\n </div>\n </div>\n <div class=\"form-group\">\n <label for=\"phone\">Your Phone (required)</label>\n <div class=\"form-control-wrap\">\n <input type=\"number\" class=\"form-control\" id=\"phone\" required autocomplete>\n </div>\n </div>\n <div class=\"form-group\">\n <label for=\"subject\">Subject</label>\n <div class=\"form-control-wrap\">\n <input type=\"text\" class=\"form-control\" id=\"subject\" autocomplete>\n </div>\n </div>\n <div class=\"form-group\">\n <label for=\"message\">Your Message (required)</label>\n <div class=\"form-control-wrap\">\n <textarea class=\"form-control\" id=\"message\" rows=\"3\"></textarea>\n </div>\n </div>\n <button type=\"submit\" class=\"btn btn-md primary-btn\">Submit</button>\n </form>\n </div>\n </div>\n </div>\n </section>\n\n <section id=\"home-five\">\n <div class=\"container\">\n <h6 class=\"text-center\">Testimonials</h6>\n <h2 class=\"heading-decorated\">Clients words</h2>\n <div id=\"testimonial-slider\" class=\"slick-slider\">\n <div class=\"testimonial-card\">\n <div class=\"testimonial-quote\">\n <blockquote>\n <q>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam at ultrices ante. Nunc eu ex turpis. Vestibulum\n imperdiet fermentum velit ac laoreet. Fusce imperdiet ac nisi aliquam rhoncus. Ut ac dui eu massa pretium posuere in in\n velit. Nulla id odio fermentum.</q>\n </blockquote>\n </div>\n <div class=\"testimonial-author\">\n <cite>Pearl R. <small>School Teacher</small></cite>\n </div>\n </div>\n <div class=\"testimonial-card\">\n <div class=\"testimonial-quote\">\n <blockquote>\n <q>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam at ultrices ante. Nunc eu ex turpis. Vestibulum\n imperdiet fermentum velit ac laoreet. Fusce imperdiet ac nisi aliquam rhoncus. Ut ac dui eu massa pretium\n posuere in in\n velit. Nulla id odio fermentum.</q>\n </blockquote>\n </div>\n <div class=\"testimonial-author\">\n <cite>John Augustus A. <small>School Teacher</small></cite>\n </div>\n </div>\n </div>\n </div>\n </section>\n\n <section id=\"home-six\">\n <div class=\"container\">\n <h6 class=\"text-center text-white\">The Ultimate Retreat</h6>\n <h2 class=\"text-white heading-decorated\">Benefit of Sea Salt</h2>\n </div>\n </section>\n\n <section id=\"home-seven\">\n <div class=\"container-fluid p-0\">\n <div class=\"portfolio-grid\">\n <div class=\"grid-sizer\"></div>\n\n <a class=\"grid-item civic-muni large\" href=\"\">\n <div class=\"grid-item-inner\"\n style=\"background: url(https://images.unsplash.com/photo-1453929203062-5b1b9cb4cb94?dpr=1&auto=format&fit=crop&w=1500&h=2256&q=80&cs=tinysrgb&crop=&bg=); background-size: cover; background-position: center center;\">\n <h3>Keeps you hydrated</h3>\n <div class=\"overlay\"></div>\n </div>\n </a>\n\n <a class=\"grid-item k-12\" href=\"\">\n <div class=\"grid-item-inner\"\n style=\"background: url(https://images.unsplash.com/photo-1484882918957-e9f6567be3c8?dpr=1&auto=format&fit=crop&w=1500&h=1875&q=80&cs=tinysrgb&crop=&bg=); background-size: cover; background-position: center center;\">\n <h3>Reduces fluid retention</h3>\n <div class=\"overlay\"></div>\n </div>\n </a>\n\n <a class=\"grid-item higher-edu\" href=\"\">\n <div class=\"grid-item-inner\"\n style=\"background: url(https://images.unsplash.com/photo-1489878950755-bbe8f9b8672c?dpr=1&auto=format&fit=crop&w=1500&h=844&q=80&cs=tinysrgb&crop=&bg=); background-size: cover; background-position: center center;\">\n <h3>A great source of minerals</h3>\n <div class=\"overlay\"></div>\n </div>\n </a>\n\n\n <a class=\"grid-item medical\" href=\"\">\n <div class=\"grid-item-inner\"\n style=\"background: url(https://images.unsplash.com/photo-1419406692015-ddbc1dd91e54?dpr=1&auto=format&fit=crop&w=1500&h=1636&q=80&cs=tinysrgb&crop=&bg=); background-size: cover; background-position: center center;\">\n <h3>Balances electrolytes</h3>\n <div class=\"overlay\"></div>\n </div>\n </a>\n\n <a class=\"grid-item civic-muni medium\" href=\"\">\n <div class=\"grid-item-inner\"\n style=\"background: url(https://images.unsplash.com/photo-1450740199001-78e928502994?dpr=1&auto=format&fit=crop&w=1500&h=994&q=80&cs=tinysrgb&crop=&bg=); background-size: cover; background-position: center center;\">\n <h3>Prevents muscle cramps</h3>\n <div class=\"overlay\"></div>\n </div>\n </a>\n\n <a class=\"grid-item civic-muni\" href=\"\">\n <div class=\"grid-item-inner\"\n style=\"background: url(https://images.unsplash.com/photo-1457630509638-7a7543f31f75?dpr=1&auto=format&fit=crop&w=1500&h=1000&q=80&cs=tinysrgb&crop=&bg=); background-size: cover; background-position: center center\">\n <h3>Great for skin health</h3>\n <div class=\"overlay\"></div>\n </div>\n </a>\n\n <a class=\"grid-item k-12\" href=\"\">\n <div class=\"grid-item-inner\"\n style=\"background: url(https://images.unsplash.com/photo-1470075801209-17f9ec0cada6?dpr=1&auto=format&fit=crop&w=1500&h=2250&q=80&cs=tinysrgb&crop=&bg=); background-size: cover; background-position: center center;\">\n <h3>Improves digestion</h3>\n <div class=\"overlay\"></div>\n </div>\n </a>\n\n <a class=\"grid-item retail-commercial medium\" href=\"\">\n <div class=\"grid-item-inner\"\n style=\"background: url(https://images.unsplash.com/photo-1478025101087-7f1ce4c83156?dpr=1&auto=format&fit=crop&w=1500&h=1000&q=80&cs=tinysrgb&crop=&bg=); background-size: cover; background-position: center center;\">\n <h3>Nourishes the adrenal glands</h3>\n <div class=\"overlay\"></div>\n </div>\n </a>\n\n <a class=\"grid-item church-theater medium\" href=\"\">\n <div class=\"grid-item-inner\"\n style=\"background: url(https://images.unsplash.com/photo-1477525105990-60a9f6610642?dpr=1&auto=format&fit=crop&w=1500&h=1000&q=80&cs=tinysrgb&crop=&bg=); background-size: cover; background-position: center center;\">\n <h3>Regulates blood pressure</h3>\n <div class=\"overlay\"></div>\n </div>\n </a>\n\n </div>\n </div>\n </section>\n ';\n\n $aboutHTML = '\n <section id=\"default-wrapper\">\n <div class=\"container\">\n <div class=\"row default-row\">\n <div class=\"col-lg-3\">\n <h3>Quick Links</h3>\n <div class=\"gap-20\"></div>\n <div class=\"side-menu\">\n <ul>\n <li>\n <a href=\"#\">Lorem ipsum dolor</a>\n <ul>\n <li><a href=\"#\">History</a></li>\n <li><a href=\"#\">Company Profile</a></li>\n <li><a href=\"#\">Mission & Vision</a></li>\n <li><a href=\"#\">Our Team</a></li>\n </ul>\n </li>\n <li><a href=\"#\">Nulla sequi, sint</a></li>\n <li><a href=\"#\">Corporis, quos, sit</a></li>\n </ul>\n </div>\n </div>\n <div class=\"col-lg-9\">\n <div class=\"article-content\">\n <h3>Company Profile</h3>\n <p> </p>\n <p>\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do\n eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut\n enim ad minim veniam, quis nostrud exercitation ullamco laboris\n nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor\n in reprehenderit in voluptate velit esse cillum dolore eu fugiat\n nulla pariatur. Excepteur sint occaecat cupidatat non proident,\n sunt in culpa qui officia deserunt mollit anim id est laborum.\n </p>\n <p> </p>\n <img src=\"images/misc/about-img.jpg\" alt=\"\" />\n <p> </p>\n <p>\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do\n eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut\n enim ad minim veniam, quis nostrud exercitation ullamco laboris\n nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor\n in reprehenderit in voluptate velit esse cillum dolore eu fugiat\n nulla pariatur. Excepteur sint occaecat cupidatat non proident,\n sunt in culpa qui officia deserunt mollit anim id est laborum.\n </p>\n <p> </p>\n <p>\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do\n eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut\n enim ad minim veniam, quis nostrud exercitation ullamco laboris\n nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor\n in reprehenderit in voluptate velit esse cillum dolore eu fugiat\n nulla pariatur. Excepteur sint occaecat cupidatat non proident,\n sunt in culpa qui officia deserunt mollit anim id est laborum.\n </p>\n <p> </p>\n <p>\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do\n eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut\n enim ad minim veniam, quis nostrud exercitation ullamco laboris\n nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor\n in reprehenderit in voluptate velit esse cillum dolore eu fugiat\n nulla pariatur. Excepteur sint occaecat cupidatat non proident,\n sunt in culpa qui officia deserunt mollit anim id est laborum.\n </p>\n </div>\n </div>\n </div>\n </div>\n </section>\n ';\n\n\n\n $contact_us = '<h3>Contact Details</h3>\n <iframe class=\"mt-2 mb-4\"\n src=\"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d14917.830083111654!2d-73.65783255789836!3d45.465301998048886!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x4cc917153ba67f8f%3A0xa508f1e92565d250!2s5544+Avenue+Rosedale%2C+C%C3%B4te+Saint-Luc%2C+QC+H4V+2J1%2C+Canada!5e0!3m2!1sen!2sph!4v1564111296278!5m2!1sen!2sph\"\n width=\"100%\" height=\"300\" frameborder=\"0\" style=\"border:0\" allowfullscreen></iframe>\n <div class=\"row\">\n <div class=\"col-md-6\">\n <p>\n <strong>Office Location</strong><br />5544 Avenue\n Rosedale, Cöte Saint-Luc<br />QC H4V 2J1\n </p>\n <div class=\"gap-20\"></div>\n </div>\n <div class=\"col-md-6\">\n <p>\n <strong>Office Location</strong><br />5544 Avenue\n Rosedale, Cöte Saint-Luc<br />QC H4V 2J1\n </p>\n <div class=\"gap-20\"></div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-6\">\n <p>\n <strong>Telephone</strong><br />+63 (2) 706-6144<br />+63\n (2) 706-5796<br />+63 (2) 511-0528\n </p>\n <div class=\"gap-20\"></div>\n </div>\n <div class=\"col-md-6\">\n <p>\n <strong>Follow Us</strong><br />For more updates, follow\n us on our social media accounts.\n </p>\n <div class=\"gap-80\"></div>\n </div>\n </div>';\n\n $footerHTML = '<div class=\"pre-footer\">\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-lg-4 col-md-6\">\n <div class=\"footer-info\">\n <h6 class=\"footer-title\">Customer Care</h6>\n <ul class=\"quick-link\">\n <li><a href=\"\">Email: [email protected]</a></li>\n <li><a href=\"\">Mobile: +639191234567</a></li>\n <li><a href=\"\">Tel: +63(02)1234567</a></li>\n <li><a href=\"\">Fax: +63(02)9876543</a></li>\n </ul>\n <div class=\"gap-20\"></div>\n </div>\n </div>\n\n <div class=\"col-lg-1 col-md-12\">\n </div>\n \n <div class=\"col-lg-7 col-md-12\">\n <div class=\"footer-info\">\n <a href=\"/\" class=\"footer-logo\">\n <img src=\"'.\\URL::to('/').'/images/misc/logo-header-white.png\" alt=\"Artemis Salt\" />\n </a>\n <p>SYSU International Inc.<br>\n 145 Panay Ave. Quezon City 1008, Philippines</p>\n <div class=\"gap-20\"></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"post-footer\">\n <div class=\"container p-0\">\n <p>\n Copyright © 2020 <a href=\"\">SYSU International Inc.</a> <span class=\"white-spc\">All rights reserved.</span>\n </p>\n </div>\n </div>';\n\n \n $pages = [\n [\n 'parent_page_id' => 0,\n 'album_id' => 1,\n 'slug' => 'home',\n 'name' => 'Home',\n 'label' => 'Home',\n 'contents' => $homeHTML,\n 'status' => 'PUBLISHED',\n 'page_type' => 'default',\n 'image_url' => '',\n 'meta_title' => 'Home',\n 'meta_keyword' => 'home',\n 'meta_description' => 'Home page',\n 'user_id' => 1,\n 'template' => 'home',\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\")\n ],\n [\n 'parent_page_id' => 0,\n 'album_id' => 0,\n 'slug' => 'about-us',\n 'name' => 'About Us',\n 'label' => 'About Us',\n 'contents' => $aboutHTML,\n 'status' => 'PUBLISHED',\n 'page_type' => 'standard',\n 'image_url' => \\URL::to('/').'/theme/artemissalt/images/banners/sub/image1.jpg',\n 'meta_title' => 'About Us',\n 'meta_keyword' => 'About Us',\n 'meta_description' => 'About Us page',\n 'user_id' => 1,\n 'template' => '',\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\")\n ],\n\n [\n 'parent_page_id' => 0,\n 'album_id' => 0,\n 'slug' => 'contact-us',\n 'name' => 'Contact Us',\n 'label' => 'Contact Us',\n 'contents' => $contact_us,\n 'status' => 'PUBLISHED',\n 'page_type' => 'standard',\n 'image_url' => \\URL::to('/').'/theme/artemissalt/images/banners/sub/image1.jpg',\n 'meta_title' => 'Contact Us',\n 'meta_keyword' => 'Contact Us',\n 'meta_description' => 'Contact Us page',\n 'user_id' => 1,\n 'template' => 'contact-us',\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\")\n ],\n [\n 'parent_page_id' => 0,\n 'album_id' => 0,\n 'slug' => 'news',\n 'name' => 'News',\n 'label' => 'News',\n 'contents' => '',\n 'status' => 'PUBLISHED',\n 'page_type' => 'customize',\n 'image_url' => '',\n 'meta_title' => 'News',\n 'meta_keyword' => 'news',\n 'meta_description' => 'News page',\n 'user_id' => 1,\n 'template' => 'news',\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\")\n ],\n [\n 'parent_page_id' => 0,\n 'album_id' => 0,\n 'slug' => 'footer',\n 'name' => 'Footer',\n 'label' => 'footer',\n 'contents' => $footerHTML,\n 'status' => 'PUBLISHED',\n 'page_type' => 'default',\n 'image_url' => '',\n 'meta_title' => '',\n 'meta_keyword' => '',\n 'meta_description' => '',\n 'user_id' => 1,\n 'template' => '',\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\")\n ]\n ];\n\n DB::table('pages')->insert($pages);\n }",
"public function mm_gallery_shortcode($attr) {\n $options = $this->options;\n $post = get_post();\n\n static $instance = 0;\n $instance++;\n\n if ( ! empty( $attr['ids'] ) ) {\n // 'ids' is explicitly ordered, unless you specify otherwise.\n if ( empty( $attr['orderby'] ) )\n $attr['orderby'] = 'post__in';\n $attr['include'] = $attr['ids'];\n }\n\n // Allow plugins/themes to override the default gallery template.\n $output = apply_filters('post_gallery', '', $attr);\n if ( $output != '' )\n return $output;\n\n // We're trusting author input, so let's at least make sure it looks like a valid orderby statement\n if ( isset( $attr['orderby'] ) ) {\n $attr['orderby'] = sanitize_sql_orderby( $attr['orderby'] );\n if ( !$attr['orderby'] )\n unset( $attr['orderby'] );\n }\n\n extract(shortcode_atts(array(\n 'order' => 'ASC',\n 'orderby' => 'menu_order ID',\n 'id' => $post->ID,\n 'itemtag' => $options['itemtag'],\n 'icontag' => $options['icontag'],\n 'captiontag' => $options['captiontag'],\n 'columns' => $options['columns'],\n 'size' => $options['size'],\n 'include' => '',\n 'exclude' => ''\n ), $attr));\n\n $id = intval($id);\n if ( 'RAND' == $order )\n $orderby = 'none';\n\n if ( !empty($include) ) {\n $_attachments = get_posts( array('include' => $include, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) );\n\n $attachments = array();\n foreach ( $_attachments as $key => $val ) {\n $attachments[$val->ID] = $_attachments[$key];\n }\n } elseif ( !empty($exclude) ) {\n $attachments = get_children( array('post_parent' => $id, 'exclude' => $exclude, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) );\n } else {\n $attachments = get_children( array('post_parent' => $id, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) );\n }\n\n if ( empty($attachments) )\n return '';\n\n if ( is_feed() ) {\n $output = \"\\n\";\n foreach ( $attachments as $att_id => $attachment )\n $output .= wp_get_attachment_link($att_id, $size, true) . \"\\n\";\n return $output;\n }\n\n $itemtag = tag_escape($itemtag);\n $captiontag = tag_escape($captiontag);\n $icontag = tag_escape($icontag);\n $valid_tags = wp_kses_allowed_html( 'post' );\n if ( ! isset( $valid_tags[ $itemtag ] ) )\n $itemtag = 'figure';\n if ( ! isset( $valid_tags[ $captiontag ] ) )\n $captiontag = 'figcaption';\n if ( ! isset( $valid_tags[ $icontag ] ) )\n $icontag = '';\n\n $columns = intval($columns);\n\n $selector = \"gallery-{$instance}\";\n\n $gallery_style = $gallery_div = '';\n\n $gallery_div = \"<section id='$selector' class='gallery gal-col-{$columns} clearfix'>\";\n $output = apply_filters( 'gallery_style', $gallery_style . \"\\n\\t\\t\" . $gallery_div );\n\n $i = 0;\n foreach ( $attachments as $id => $attachment ) {\n $link = isset($attr['link']) && 'file' == $attr['link'] ? wp_get_attachment_link($id, $size, false, false) : wp_get_attachment_link($id, $size, true, false);\n $link = str_replace( '<a href', '<a rel=\"'. $selector .'\" href', $link );\n\n $output .= \"\n <{$itemtag} class='gallery-item'>\";\n $output .= \"\n $link\n \";\n if ( $captiontag && trim($attachment->post_excerpt) ) {\n $output .= \"\n <{$captiontag} class='wp-caption-text gallery-caption'>\n \" . wptexturize($attachment->post_excerpt) . \"\n </{$captiontag}>\";\n }\n $output .= \"</{$itemtag}>\";\n }\n\n $output .= \"\n </section>\\n\";\n\n return $output;\n }",
"public function insert_gallery_shortcode() {\n\t\t\n\t\tcheck_ajax_referer( 'daylife-gallery-add-nonce', 'nonce' );\n\t\t// TODO: Update to insert ids into shortcode so it works with new media tool\n\t\techo '[gallery]';\n\t\tdie();\n\n\t}",
"function builder_custom_post_gallery( $output, $attr ) {\n\tglobal $post, $wp_locale;\n\t\n\tstatic $instance = 0;\n\t$instance++;\n\t\n\t\n\t// We're trusting author input, so let's at least make sure it looks like a valid orderby statement\n\tif ( isset( $attr['orderby'] ) ) {\n\t\t$attr['orderby'] = sanitize_sql_orderby( $attr['orderby'] );\n\t\tif ( empty( $attr['orderby'] ) )\n\t\t\tunset( $attr['orderby'] );\n\t}\n\t\n\t$defaults = array(\n\t\t'builder' => 'on',\n\t\t'captiontag' => 'dd',\n\t\t'columns' => '',\n\t\t'exclude' => '',\n\t\t'icontag' => 'dt',\n\t\t'id' => $post->ID,\n\t\t'include' => '',\n\t\t'itemtag' => 'dl',\n\t\t'link' => 'attachment',\n\t\t'margin' => '5px',\n\t\t'order' => 'ASC',\n\t\t'orderby' => 'menu_order ID',\n\t\t'size' => 'thumbnail',\n\t);\n\t$defaults = apply_filters( 'builder_filter_gallery_default_attributes', $defaults );\n\t\n\t$attr = shortcode_atts( $defaults, $attr );\n\textract( $attr );\n\t\n\tif ( 'off' == $builder )\n\t\treturn $output;\n\t\n\tif ( 'auto' != $columns ) {\n\t\tif ( ! is_numeric( $columns ) )\n\t\t\t$columns = '';\n\t\telse if ( $columns < 1 )\n\t\t\t$columns = 1;\n\t\t\n\t\tif ( empty( $columns ) ) {\n\t\t\tif ( 'auto' == builder_get_theme_setting( 'gallery_default_render_method' ) )\n\t\t\t\t$columns = 'auto';\n\t\t\telse\n\t\t\t\t$columns = 3;\n\t\t}\n\t}\n\t\n\t$id = intval( $id );\n\tif ( 'RAND' === $order )\n\t\t$orderby = 'none';\n\t\n\tif ( ! empty( $include ) ) {\n\t\t$include = preg_replace( '/[^0-9,]+/', '', $include );\n\t\t$_attachments = get_posts( array( 'include' => $include, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby ) );\n\t\t\n\t\t$attachments = array();\n\t\tforeach ( $_attachments as $key => $val )\n\t\t\t$attachments[$val->ID] = $_attachments[$key];\n\t}\n\telse if ( ! empty( $exclude ) ) {\n\t\t$exclude = preg_replace( '/[^0-9,]+/', '', $exclude );\n\t\t$attachments = get_children( array( 'post_parent' => $id, 'exclude' => $exclude, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby ) );\n\t}\n\telse {\n\t\t$attachments = get_children( array( 'post_parent' => $id, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby ) );\n\t}\n\t\n\tif ( empty( $attachments ) )\n\t\treturn '';\n\t\n\tif ( is_feed() ) {\n\t\t$output = \"\\n\";\n\t\tforeach ( $attachments as $att_id => $attachment )\n\t\t\t$output .= wp_get_attachment_link( $att_id, $size, true ) . \"\\n\";\n\t\treturn $output;\n\t}\n\t\n\t$itemtag = tag_escape( $itemtag );\n\t$captiontag = tag_escape( $captiontag );\n\t$float = ( 'rtl' === $wp_locale->text_direction ) ? 'right' : 'left';\n\t\n\t$selector = \"gallery-{$instance}\";\n\t$size_class = sanitize_html_class( $size );\n\t\n\tif ( ( 'auto' != $columns ) && apply_filters( 'use_default_gallery_style', true, $attr ) ) {\n\t\t$itemwidth = 100 / $columns;\n\t\t\n\t\tob_start();\n\t\t\n?>\n\t<style type=\"text/css\" scoped=\"scoped\">\n\t\t#<?php echo $selector; ?> {\n\t\t\tclear: both;\n\t\t}\n\t\t#<?php echo $selector; ?> .gallery-item-wrapper {\n\t\t\tfloat: <?php echo $float; ?>;\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t\twidth: <?php echo $itemwidth; ?>%;\n\t\t}\n\t\t#ie6 #<?php echo $selector; ?> .gallery-item-wrapper,\n\t\t#ie7 #<?php echo $selector; ?> .gallery-item-wrapper {\n\t\t\twidth: <?php echo floor( $itemwidth ); ?>%;\n\t\t}\n\t\t#<?php echo $selector; ?> .gallery-item {\n\t\t\tdisplay: block;\n\t\t\tfloat: none;\n\t\t\tmargin: <?php echo $margin; ?>;\n\t\t\twidth: auto !important;\n\t\t}\n\t\t#ie6 #<?php echo $selector; ?> .gallery-item {\n\t\t\tdisplay: inline;\n\t\t}\n\t\t#<?php echo $selector; ?> .gallery-icon a {\n\t\t\tdisplay: block;\n\t\t\tline-height: 0;\n\t\t}\n\t\t#<?php echo $selector; ?> img {\n\t\t\twidth: 100% !important;\n\t\t\tmax-width: 100% !important;\n\t\t\theight: auto !important;\n\t\t}\n\t\t#<?php echo $selector; ?> .gallery-caption {\n\t\t\toverflow: hidden;\n\t\t}\n\t\t#ie6 #<?php echo $selector; ?> .gallery-caption {\n\t\t\tword-wrap: break-word;\n\t\t}\n\t</style>\n<?php\n\t\t\n\t\t$output .= ob_get_clean();\n\t}\n\t\n\t$output .= \"<div id='$selector' class='gallery galleryid-$id gallery-columns-$columns gallery-size-$size_class clearfix'>\\n\";\n\t\n\t$output = apply_filters( 'gallery_style', $output );\n\t\n\t\n\t$count = 0;\n\tif($columns == 0) $columns = 3;\n\t\n\tforeach ( $attachments as $id => $attachment ) {\n\t\tif ( 'file' == $attr['link'] )\n\t\t\t$link = wp_get_attachment_link( $id, $size );\n\t\telse if ( 'none' == $attr['link'] )\n\t\t\t$link = wp_get_attachment_image( $id, $size );\n\t\telse\n\t\t\t$link = wp_get_attachment_link( $id, $size, true );\n\t\t\n\t\tif ( $captiontag && trim( $attachment->post_excerpt ) ) {\n\t\t\t$gallery_item_wrapper_class = 'gallery-item-wrapper gallery-item-wrapper-with-caption';\n\t\t\t$gallery_item_class = 'gallery-item gallery-item-with-caption';\n\t\t}\n\t\telse {\n\t\t\t$gallery_item_wrapper_class = 'gallery-item-wrapper';\n\t\t\t$gallery_item_class = 'gallery-item';\n\t\t}\n\t\t\n\t\tif ( is_numeric( $columns ) )\n\t\t\t$output .= \"<div class='$gallery_item_wrapper_class'>\\n\";\n\t\t\n\t\t$output .= \"<{$itemtag} class='$gallery_item_class'>\";\n\t\t$output .= \"\n\t\t\t<$icontag class='gallery-icon'>\n\t\t\t\t$link\n\t\t\t</$icontag>\";\n\t\tif ( $captiontag && trim( $attachment->post_excerpt ) ) {\n\t\t\t$output .= \"\n\t\t\t\t<$captiontag class='gallery-caption'>\n\t\t\t\t\" . wptexturize($attachment->post_excerpt) . \"\n\t\t\t\t</$captiontag>\";\n\t\t}\n\t\t$output .= \"</{$itemtag}>\\n\";\n\t\t\n\t\tif ( is_numeric( $columns ) )\n\t\t\t$output .= \"</div>\\n\";\n\t\t\n\t\tif ( is_numeric( $columns ) && ( 0 == ( ++$count % $columns ) ) )\n\t\t\t$output .= '<br style=\"clear: both\" />';\n\t}\n\t\n\tif ( is_numeric( $columns ) && ( 0 != ( $count % $columns ) ) )\n\t\t$output .= '<br style=\"clear: both\" />';\n\t\n\t$output .= \"</div>\\n\";\n\t\n\t\n\treturn $output;\n}",
"function endcore_gallery_shortcode($attr) {\n $post = get_post();\n\n static $instance = 0;\n $instance++;\n\n if ( ! empty( $attr['ids'] ) ) {\n // 'ids' is explicitly ordered, unless you specify otherwise.\n if ( empty( $attr['orderby'] ) )\n $attr['orderby'] = 'post__in';\n $attr['include'] = $attr['ids'];\n }\n\n // Allow plugins/themes to override the default gallery template.\n $output = apply_filters('post_gallery', '', $attr);\n if ( $output != '' )\n return $output;\n\n // We're trusting author input, so let's at least make sure it looks like a valid orderby statement\n if ( isset( $attr['orderby'] ) ) {\n $attr['orderby'] = sanitize_sql_orderby( $attr['orderby'] );\n if ( !$attr['orderby'] )\n unset( $attr['orderby'] );\n }\n\n extract(shortcode_atts(array(\n 'order' => 'ASC',\n 'orderby' => 'menu_order ID',\n 'id' => $post ? $post->ID : 0,\n 'itemtag' => 'dl',\n 'icontag' => 'dt',\n 'captiontag' => 'dd',\n 'columns' => 3,\n 'size' => 'thumbnail',\n 'include' => '',\n 'exclude' => '',\n 'link' => ''\n ), $attr, 'gallery'));\n\n $id = intval($id);\n if ( 'RAND' == $order )\n $orderby = 'none';\n\n if ( !empty($include) ) {\n $_attachments = get_posts( array('include' => $include, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) );\n\n $attachments = array();\n foreach ( $_attachments as $key => $val ) {\n $attachments[$val->ID] = $_attachments[$key];\n }\n } elseif ( !empty($exclude) ) {\n $attachments = get_children( array('post_parent' => $id, 'exclude' => $exclude, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) );\n } else {\n $attachments = get_children( array('post_parent' => $id, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) );\n }\n\n if ( empty($attachments) )\n return '';\n\n if ( is_feed() ) {\n $output = \"\\n\";\n foreach ( $attachments as $att_id => $attachment )\n $output .= wp_get_attachment_link($att_id, $size, true) . \"\\n\";\n return $output;\n }\n\n $itemtag = tag_escape($itemtag);\n $captiontag = tag_escape($captiontag);\n $icontag = tag_escape($icontag);\n $valid_tags = wp_kses_allowed_html( 'post' );\n if ( ! isset( $valid_tags[ $itemtag ] ) )\n $itemtag = 'dl';\n if ( ! isset( $valid_tags[ $captiontag ] ) )\n $captiontag = 'dd';\n if ( ! isset( $valid_tags[ $icontag ] ) )\n $icontag = 'dt';\n\n $columns = intval($columns);\n $itemwidth = $columns > 0 ? floor(100/$columns) : 100;\n $float = is_rtl() ? 'right' : 'left';\n\n $selector = \"gallery-{$instance}\";\n\n $gallery_style = $gallery_div = '';\n if ( apply_filters( 'use_default_gallery_style', true ) )\n $gallery_style = \"\n\t\t<style type='text/css'>\n\t\t\t#{$selector} {\n\t\t\t\tmargin: auto;\n\t\t\t}\n\t\t\t#{$selector} .gallery-item {\n\t\t\t\tmargin-top: 10px;\n\t\t\t\ttext-align: center;\n\t\t\t}\n\t\t\t#{$selector} img {\n\t\t\t\tborder: 2px solid #cfcfcf;\n\t\t\t}\n\t\t\t#{$selector} .gallery-caption {\n\t\t\t\tmargin-left: 0;\n\t\t\t}\n\t\t\t/* see gallery_shortcode() in wp-includes/media.php */\n\t\t</style>\";\n $size_class = sanitize_html_class( $size );\n $gallery_div = \"<div id='$selector' class='row gallery galleryid-{$id} gallery-size-{$size_class}'>\";\n $output = apply_filters( 'gallery_style', $gallery_style . \"\\n\\t\\t\" . $gallery_div );\n\n $i = 1;\n $numberofcolumns = $columns;\n $classes = twitterbootstrap_galleries_get_grid_classes($numberofcolumns);\n\n foreach ( $attachments as $id => $attachment ) {\n if ( ! empty( $link ) && 'file' === $link )\n $image_output = wp_get_attachment_link( $id, $size, false, false );\n elseif ( ! empty( $link ) && 'none' === $link )\n $image_output = wp_get_attachment_image( $id, $size, false );\n else\n $image_output = wp_get_attachment_link( $id, $size, true, false );\n $image_output = str_replace(\"<a\",\"<a title='\" . wptexturize($attachment->post_excerpt) . \"'\", $image_output);\n\n $image_output = preg_replace('/height=\"[0-9]+\"/','',$image_output);\n $image_output = preg_replace('/width=\"[0-9]+\"/','',$image_output);\n $image_output = str_replace('class=\"', 'class=\"img-responsive ', $image_output);\n $image_meta = wp_get_attachment_metadata( $id );\n\n $orientation = '';\n if ( isset( $image_meta['height'], $image_meta['width'] ) )\n $orientation = ( $image_meta['height'] > $image_meta['width'] ) ? 'portrait' : 'landscape';\n\n $output .= \"<div class='gallery-item \".$classes.\"'>\";\n $output .= \"\n\t\t\t<div class='gallery-icon {$orientation}'>\n\t\t\t\t$image_output\n\t\t\t</div>\";\n if ( $captiontag && trim($attachment->post_excerpt) ) {\n $output .= \"\n\t\t\t\t<{$captiontag} class='wp-caption-text gallery-caption'>\n\t\t\t\t\" . wptexturize($attachment->post_excerpt) . \"\n\t\t\t\t</{$captiontag}>\";\n }\n $output .= \"</div>\";\n\n if($numberofcolumns == 6)\n {\n if(0 == ($i % 6)){$output .= '<div class=\"clearfix visible-md visible-lg\"></div>'; }\n if(0 == ($i % 2)){$output .= '<div class=\"clearfix visible-xs\"></div>'; }\n }\n elseif($numberofcolumns == 4)\n {\n if(0 == ($i % 4)){$output .= '<div class=\"clearfix visible-md visible-lg\"></div>'; }\n }\n elseif($numberofcolumns == 4)\n {\n if(0 == ($i % 4)){$output .= '<div class=\"clearfix visible-md visible-lg\"></div>'; }\n if(0 == ($i % 2)){$output .= '<div class=\"clearfix visible-sm\"></div>'; }\n }\n elseif($numberofcolumns == 3)\n {\n if(0 == ($i % 3)){$output .= '<div class=\"clearfix visible-md visible-lg\"></div>'; }\n }\n elseif($numberofcolumns == 31)\n {\n if(0 == ($i % 3)){$output .= '<div class=\"clearfix visible-md visible-lg\"></div>'; }\n if(0 == ($i % 2)){$output .= '<div class=\"clearfix visible-sm\"></div>'; }\n }\n elseif($numberofcolumns == 2)\n {\n if(0 == ($i % 2)){$output .= '<div class=\"clearfix invisible-xs\"></div>'; }\n }\n $i++;\n }\n\n $output .= \"\n\t\t</div>\\n\";\n\n return $output;\n}",
"protected function _content_template() {\n ?>\n\n\n\n <section id=\"intro\">\n\n <div class=\"intro-content\">\n <h2>{{{settings.title}}}</h2>\n <div>\n <a href=\"#about\" class=\"btn-get-started scrollto\">\n {{{settings.button1_text}}}\n </a>\n <a href=\"#portfolio\" class=\"btn-projects scrollto\">\n {{{settings.button2_text}}}\n </a>\n </div>\n </div>\n\n <div id=\"intro-carousel\" class=\"owl-carousel\" >\n\n <# _.each( settings.gallery, function( image ) { #>\n\n <div class=\"item\" style=\"background-image: url('{{ image.url }}');\"></div>\n <# }); #>\n\n </div>\n\n </section><!-- #intro -->\n \n <?php\n }",
"function wp_mobile_gallery( $string, $attr ) {\n\tglobal $post;\n\tif ( isset($attr['orderby']) ) {\n\t\t$attr['orderby'] = sanitize_sql_orderby($attr['orderby']);\n\t\tif ( !$attr['orderby'] )\n\t\t\tunset($attr['orderby']);\n\t}\n\n\textract(shortcode_atts( array(\n\t\t'order' => 'ASC',\n\t\t'orderby' => 'menu_order ID',\n\t\t'id' => $post->ID,\n\t\t'itemtag' => 'dl',\n\t\t'icontag' => 'dt',\n\t\t'captiontag' => 'dd',\n\t\t'columns' => 1,\n\t\t'size' => 'thumbnail',\n\t), $attr ));\n\n\t$columns = 1;\n\t$id = intval($id);\n if ( 'RAND' == $order )\n $orderby = 'none';\n\t$attachments = get_children( array('post_parent' => $id, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) );\n\tif ( empty($attachments) )\n\t\treturn null;\n\n\tif ( is_feed() ) {\n\t\t$output = \"\\n\";\n\t\tforeach ( $attachments as $id => $attachment )\n\t\t\t$output .= wp_get_attachment_link( $id, $size, true ) . \"\\n\";\n\t\treturn $output;\n\t}\n\n\t$listtag = tag_escape($listtag);\n\t$itemtag = tag_escape($itemtag);\n\t$captiontag = tag_escape($captiontag);\n\t$columns = intval($columns);\n\t$itemwidth = $columns > 0 ? floor(100/$columns) : 100;\n\n\t$output = apply_filters( 'gallery_style', \"\\n\" . '<div class=\"gallery\">', 9 ); // Available filter: gallery_style\n\n\tforeach ( $attachments as $id => $attachment ) {\n\t\t$img_lnk = get_attachment_link($id);\n\t\t$img_src = wp_get_attachment_image_src( $id, $size );\n\t\t$img_src = $img_src[0];\n\t\t$img_alt = $attachment->post_excerpt;\n\t\tif ( $img_alt == null )\n\t\t\t$img_alt = $attachment->post_title;\n\t\t$img_rel = apply_filters( 'gallery_img_rel', 'attachment' ); // Available filter: gallery_img_rel\n\t\t$img_class = apply_filters( 'gallery_img_class', 'gallery-image' ); // Available filter: gallery_img_class\n\n\t\t$output .= \"\\n\\t\" . '<' . $itemtag . ' class=\"gallery-item gallery-columns-' . $columns .'\">';\n\t\t$output .= \"\\n\\t\\t\" . '<' . $icontag . ' class=\"gallery-icon\"><a href=\"' . $img_lnk . '\" title=\"' . $img_alt . '\" rel=\"' . $img_rel . '\"><img src=\"' . $img_src . '\" alt=\"' . $img_alt . '\" class=\"' . $img_class . ' attachment-' . $size . '\" /></a></' . $icontag . '>';\n\n\t\tif ( $captiontag && trim($attachment->post_excerpt) ) {\n\t\t\t$output .= \"\\n\\t\\t\" . '<' . $captiontag . ' class=\"gallery-caption\">' . $attachment->post_excerpt . '</' . $captiontag . '>';\n\t\t}\n\n\t\t$output .= \"\\n\\t\" . '</' . $itemtag . '>';\n\t\tif ( $columns > 0 && ++$i % $columns == 0 )\n\t\t\t$output .= \"\\n</div>\\n\" . '<div class=\"gallery\">';\n\t}\n\t$output .= \"\\n</div>\\n\";\n\n\treturn $output;\n}",
"public function add_image_template($data = array()) \n\t{\n\t\t$this->admin_header();\n\t\t\n\t\t//fetch the total number of categories\n\t\t$config['total_num_image'] = $this->Admin_model->fetch_all_rows('blog_images');\n\t\t\n\t\t//fetch the total number of tags\n\t\t$data['total_num_blogs'] = $this->Admin_model->fetch_all_rows('blog');\n\t\t\n\t\t//$config['total_rows'] = $this->Admin_model->fetch_all_rows('food');\n\t\t \n\t\t$config['base_url'] = site_url(\"Admin/image_list/\");\n\t\t$config['per_page'] = 60;\n\t\t$config['uri_segment'] = '3';\n\t\t$config['num_links'] = round($config['total_num_image'] / $config['per_page']);\n\t\t\n\t\t$config['full_tag_open'] = '<ul class=\"pagination\">';\n\t\t$config['full_tag_close'] = '</ul>';\n\t\t\n\t\t$config['first_link'] = FALSE;\n\t\t\n\t\t$config['last_link'] = FALSE;\n\t\t\n\t\t$config['next_link'] = FALSE;\n\t\t\n\t\t$config['prev_link'] = FALSE;\n\t\t\n\t\t$config['cur_tag_open'] = '<li class=\"active\"><a href=\"#\">';\n\t\t$config['cur_tag_close'] = '</li>';\n\t\t\n\t\t$config['num_tag_open'] = '<li>';\n\t\t$config['num_tag_close'] = '</li>';\n\t\t\n\t\t$this->pagination->initialize($config);\n\t\t\n\t\t$page_number = $this->uri->segment(3);\n\t\t$data['images'] = $this->Admin_model->fetch_image($config['per_page'], $page_number);\n\t\t\n\t\t$data['total_num_pages'] = ceil($config['total_num_image'] / $config['per_page']);\n\t\t$data['total_num_rows'] = $config['total_num_image'];\n\t\t\n\t\t$url_segments = $this->uri->total_segments();\n\t\t$data['page_num'] = ($url_segments !== 3) ? 1 : $this->uri->segment(3);\n\t\t\n\t\t$data['header'] = $this->load->view('templates/admin_header', $data, TRUE);\n\t\t$data['footer'] = $this->load->view('templates/admin_footer', '', TRUE);\n\t\t$this->load->view('admins/image_list', $data);\n\t}",
"function cs_pb_gallery($die = 0){\n\tglobal $cs_node, $count_node, $post;\n\tif ( isset($_POST['action']) ) {\n\t\t\t$name = $_POST['action'];\n\t\t\t$counter = $_POST['counter'];\n\t\t\t$gallery_element_size = '50';\n\t\t\t$cs_gal_header_title_db = '';\n\t\t\t$cs_gal_view_all_db = '';\n\t\t\t$cs_gal_view_all_url_db = '';\n\t\t\t$cs_gal_layout_db = '';\n\t\t\t$cs_gal_album_db = '';\n \t\t\t$cs_gal_desc_db = '';\n\t\t\t$cs_gal_pagination_db = '';\n\t\t\t$cs_gal_media_per_page_db = get_option(\"posts_per_page\");\n\t}\n\telse {\n\t\t$name = $cs_node->getName();\n\t\t\t$count_node++;\n\t\t\t$gallery_element_size = $cs_node->gallery_element_size;\n\t\t\t$cs_gal_header_title_db = $cs_node->header_title;\n\t\t\t$cs_gal_view_all_db = $cs_node->view_all;\n\t\t\t$cs_gal_view_all_url_db = $cs_node->view_all_url;\n\t\t\t$cs_gal_layout_db = $cs_node->layout;\n\t\t\t$cs_gal_album_db = $cs_node->album;\n \t\t\t$cs_gal_desc_db = $cs_node->desc;\n\t\t\t$cs_gal_pagination_db = $cs_node->pagination;\n\t\t\t$cs_gal_media_per_page_db = $cs_node->media_per_page;\n\t\t\t\t$counter = $post->ID.$count_node;\n\t}\n?> \n\t<div id=\"<?php echo $name.$counter?>_del\" class=\"column parentdelete column_<?php echo $gallery_element_size?>\" item=\"gallery\" data=\"<?php echo element_size_data_array_index($gallery_element_size)?>\" >\n\t\t<div class=\"column-in\">\n <h5><?php echo ucfirst(str_replace(\"cs_pb_\",\"\",$name))?></h5>\n <input type=\"hidden\" name=\"gallery_element_size[]\" class=\"item\" value=\"<?php echo $gallery_element_size?>\" >\n <a href=\"javascript:hide_all('<?php echo $name.$counter?>')\" class=\"options\">Options</a> \n <a href=\"#\" class=\"delete-it btndeleteit\">Del</a> \n <a class=\"decrement\" onclick=\"javascript:decrement(this)\">Dec</a> \n <a class=\"increment\" onclick=\"javascript:increment(this)\">Inc</a>\n\t\t</div>\n <div class=\"poped-up\" id=\"<?php echo $name.$counter?>\" style=\"border:none; background:#f8f8f8;\" >\n <div class=\"opt-head\">\n <h5>Edit Gallery Options</h5>\n <a href=\"javascript:show_all('<?php echo $name.$counter?>')\" class=\"closeit\"> </a>\n </div>\n <div class=\"opt-conts\">\n \t<ul class=\"form-elements\">\n <li class=\"to-label\"><label>Gallery Header Title</label></li>\n <li class=\"to-field\">\n <input type=\"text\" name=\"cs_gal_header_title[]\" class=\"txtfield\" value=\"<?php echo htmlspecialchars($cs_gal_header_title_db)?>\" />\n <p>Please enter gallery header title.</p>\n </li> \n </ul>\n <ul class=\"form-elements\">\n <li class=\"to-label\"><label>View All Title</label></li>\n <li class=\"to-field\">\n <input type=\"text\" name=\"cs_gal_view_all[]\" class=\"txtfield\" value=\"<?php echo htmlspecialchars($cs_gal_view_all_db)?>\" />\n <p>Please enter the title.</p>\n </li> \n </ul>\n <ul class=\"form-elements\">\n <li class=\"to-label\"><label>View All URL</label></li>\n <li class=\"to-field\">\n <input type=\"text\" name=\"cs_gal_view_all_url[]\" class=\"txtfield\" value=\"<?php echo htmlspecialchars($cs_gal_view_all_url_db)?>\" />\n <p>Please enter the URL for view all.</p>\n </li> \n </ul>\n <ul class=\"form-elements\">\n <li class=\"to-label\"><label>Choose Gallery Layout</label></li>\n <li class=\"to-field\">\n <select name=\"cs_gal_layout[]\" class=\"dropdown\">\n <option value=\"gallery-4-col\" <?php if($cs_gal_layout_db==\"gallery-4-col\")echo \"selected\";?> >4 Column</option>\n <option value=\"gallery-3-col\" <?php if($cs_gal_layout_db==\"gallery-3-col\")echo \"selected\";?> >3 Column</option>\n <option value=\"gallery-2-col\" <?php if($cs_gal_layout_db==\"gallery-2-col\")echo \"selected\";?> >2 Column</option>\n <option value=\"gallery-two-col-with-title\" <?php if($cs_gal_layout_db==\"gallery-two-col-with-title\")echo \"selected\";?> >2 Column - Gallery with title</option>\n </select>\n \n <p>Select gallery layout, single column, double column, thriple column or four column.</p>\n </li>\n </ul>\n <ul class=\"form-elements\">\n <li class=\"to-label\"><label>Choose Gallery/Album</label></li>\n <li class=\"to-field\">\n <select name=\"cs_gal_album[]\" class=\"dropdown\">\n \t<option value=\"0\">-- Select Gallery --</option>\n <?php\n $query = array( 'posts_per_page' => '-1', 'post_type' => 'cs_gallery', 'orderby'=>'ID', 'post_status' => 'publish' );\n $wp_query = new WP_Query($query);\n while ($wp_query->have_posts()) : $wp_query->the_post();\n ?>\n <option <?php if($post->post_name==$cs_gal_album_db)echo \"selected\";?> value=\"<?php echo $post->post_name; ?>\"><?php echo get_the_title()?></option>\n <?php\n endwhile;\n ?>\n </select>\n <p>Select gallery album to show images.</p>\n </li>\n </ul>\n <ul class=\"form-elements\">\n <li class=\"to-label\"><label>Show Description</label></li>\n <li class=\"to-field\">\n <select name=\"cs_gal_desc[]\" class=\"dropdown\">\n <option <?php if($cs_gal_desc_db==\"On\")echo \"selected\";?> >On</option>\n <option <?php if($cs_gal_desc_db==\"Off\")echo \"selected\";?> >Off</option>\n </select>\n </li>\n </ul>\n <ul class=\"form-elements\">\n <li class=\"to-label\"><label>Pagination</label></li>\n <li class=\"to-field\">\n <select name=\"cs_gal_pagination[]\" class=\"dropdown\" >\n <option <?php if($cs_gal_pagination_db==\"Show Pagination\")echo \"selected\";?> >Show Pagination</option>\n <option <?php if($cs_gal_pagination_db==\"Single Page\")echo \"selected\";?> >Single Page</option>\n </select>\n </li>\n </ul>\n\t\t\t\t<ul class=\"form-elements\" >\n <li class=\"to-label\"><label>No. of Media Per Page</label></li>\n <li class=\"to-field\">\n \t<input type=\"text\" name=\"cs_gal_media_per_page[]\" class=\"txtfield\" value=\"<?php echo $cs_gal_media_per_page_db; ?>\" />\n <p>To display all the records, leave this field blank.</p>\n </li>\n </ul>\n <ul class=\"form-elements noborder\">\n <li class=\"to-label\"></li>\n <li class=\"to-field\">\n \t<input type=\"hidden\" name=\"cs_orderby[]\" value=\"gallery\" />\n <input type=\"button\" value=\"Save\" style=\"margin-right:10px;\" onclick=\"javascript:show_all('<?php echo $name.$counter?>')\" />\n </li>\n </ul>\n </div>\n </div>\n </div>\n<?php\n\tif ( $die <> 1 ) die();\n}",
"function tmnf_gallery_shortcode( $attr ) {\n\t$tmnf = get_option( 'tmnf_gallery' );\n\n\n\t$post = get_post();\n\n\tstatic $instance = 0;\n\t$instance++;\n\n\tif ( ! empty( $attr[ 'ids' ] ) ) {\n\t\t// 'ids' is explicitly ordered, unless you specify otherwise.\n\t\tif ( empty( $attr[ 'orderby' ] ) )\n\t\t\t$attr[ 'orderby' ] = 'post__in';\n\t\t$attr[ 'include' ] = $attr[ 'ids' ];\n\t}\n\n\t// Allow plugins/themes to override the default gallery template.\n\t$output = apply_filters( 'post_gallery', '', $attr );\n\tif ( $output != '' )\n\t\treturn $output;\n\n\t// We're trusting author input, so let's at least make sure it looks like a valid orderby statement\n\tif ( isset( $attr[ 'orderby' ] ) ) {\n\t\t$attr[ 'orderby' ] = sanitize_sql_orderby( $attr[ 'orderby' ] );\n\t\tif ( !$attr[ 'orderby' ] )\n\t\t\tunset( $attr[ 'orderby' ] );\n\t}\n\n\textract( shortcode_atts( array(\n\t\t'order' => 'ASC',\n\t\t'orderby' => 'menu_order ID',\n\t\t'id' => $post->ID,\n\t\t'columns' => 3,\n\t\t'size' => 'tabs',\n\t\t'include' => '',\n\t\t'exclude' => ''\n\t), $attr ) );\n\n\t$id = intval( $id );\n\tif ( 'RAND' == $order )\n\t\t$orderby = 'none';\n\n\tif ( !empty( $include ) ) {\n\t\t$_attachments = get_posts( array('include' => $include, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) );\n\n\t\t$attachments = array();\n\t\tforeach ( $_attachments as $key => $val ) {\n\t\t\t$attachments[$val->ID] = $_attachments[$key];\n\t\t}\n\t} elseif ( !empty( $exclude ) ) {\n\t\t$attachments = get_children( array('post_parent' => $id, 'exclude' => $exclude, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) );\n\t} else {\n\t\t$attachments = get_children( array('post_parent' => $id, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) );\n\t}\n\n\tif ( empty( $attachments ) )\n\t\treturn '';\n\n\n\tob_start();\n\techo '<div class=\"flexslider singleslider\">',\"\\n\",\n\t '<div class=\"tmnf_slideshow_menu\" class=\"clearfix\">',\n\n \"\\t\",'<div class=\"slideshow_nav\">',\"\\n\",\n \"\\t\",'<ul class=\"flex-direction-nav\">',\"\\n\",\n \"\\t\",'<li>',\"\\n\",\n \t\t\t\t\t\t\"\\t\\t\",'<a href=\"#\" class=\"prev\" title=\"Previous\">Previous</a>',\"\\n\",\n \t\t\t\t\t\t\"\\t\",'</li>',\"\\n\",\n \t\t\t\t\t\t\"\\t\",'<li>',\"\\n\",\n \t\t\t\t\t\t\"\\t\\t\",'<a href=\"#\" class=\"next\" title=\"Next\">Next</a>',\"\\n\",\n \t\t\t\t\t\t\"\\t\",'</li>',\"\\n\",\n \t\t\t\t\t\"\\t\",'</ul>',\"\\n\",\n \t\t\t\t\t\"\\t\",'</div>',\"\\n\",\n\n\t\t\t\t'</div>',\n\t\t\t\t'<div class=\"clear\"></div>';\n\n\t\techo \"\\n\",'<ul class=\"slides\">',\"\\n\";\n\n\t\tforeach ( $attachments as $id => $attachment ) {\n\t\t\t$attachmentimage = wp_get_attachment_image( $id, 'large');\n\t\t\t$description = $attachment->post_title;\n\t\t\techo \"\\t\",'<li>',\"\\n\";\n\t\t\techo \"\\t\\t\",$attachmentimage.apply_filters( 'the_title', isset( $parent->post_title ) );\n\t\t\tif ( isset( $description ) )\n\t\t\t\techo \"\\t\\t\",'<div class=\"flex-caption\">'.$description.'</div>';\n\t\t\techo \"\\t\",'</li>',\"\\n\";\n\t\t}\n\t\techo '</ul><!-- .slides -->',\n\n\n\t\t\t\t\t'<div class=\"clearfix\"></div>',\n\t\t\t\t\t'<div id=\"slideshowloader\"></div>';\n\n\n\t\techo '</div><!-- .flexslider -->',\"\\n\";\n\t\t\t\techo '<ul class=\"tmnf_slideshow_thumbnails\">';\n\n\t\tforeach ( $attachments as $id => $attachment ) {\n\t\t\t$attachmentimage = wp_get_attachment_image( $id, 'thumbnail' );\n\t\t\techo \"\\t\",'<li><a href=\"#\">';\n\t\t\techo \"\\t\\t\",$attachmentimage.apply_filters( 'the_title', isset( $parent->post_title ) );\n\t\t\techo \"\\t\",'</a></li>';\n\t\t}\n\n\t\techo\t'</ul>',\"\\n\";\n\t\t\n\t\twp_enqueue_script('jquery.flexslider-min', get_template_directory_uri() .'/js/jquery.flexslider-min.js','','', true);\n\t\twp_enqueue_script('jquery.flexslider.start.single', get_template_directory_uri() .'/js/jquery.flexslider.start.single.js','','', true);\n\t\t$gallery = ob_get_clean();\n\t\treturn $gallery;\n\t\tob_end_clean();\n }",
"function mgc_setup() {\n\n // This theme styles the visual editor with editor-style.css to match the theme style.\n add_editor_style();\n\n // This theme uses post thumbnails\n add_theme_support( 'post-thumbnails' );\n\n // Add default posts and comments RSS feed links to head\n add_theme_support( 'automatic-feed-links' );\n\n // set post thumbnail sizes for various post types\n set_post_thumbnail_size( 160, 160, true );\n add_image_size( 'project-feature', 940, 310 ); \n add_image_size( 'large', 620, 9999 );\n add_image_size( 'medium', 340, 9999 );\n\n}",
"function extendPostGridTemplate($motopressCELibrary) {\n // get Post Grid from the library\n $postGridObj = &$motopressCELibrary->getObject(MPCEShortcode::PREFIX . 'posts_grid');\n if ($postGridObj) {\n $template = &$postGridObj->getParameter('template');\n // add custom template to the list\n $template['list']['themes/coffeehot/motopress/templates/machine_post_grid.php'] = __('Machine Post Grid', 'coffeehot');\n $template['list']['themes/coffeehot/motopress/templates/machine_post_grid_carousel.php'] = __('Machine Post Grid Carousel', 'coffeehot');\n }\n}",
"public function addTemplate($galleryTemplates) {\r\n $galleryTemplates[] = [\r\n 'slug' => 'mvvwb-gallery',\r\n 'name' => __('MVVWB', 'mvvwb-gallery'),\r\n 'preview_support' => true,\r\n 'preview_css' => MVVWB_GALLERY_TEMPLATE_BASE . 'style.css',\r\n 'fields' => [\r\n [\r\n 'id' => 'thumbnail_dimensions',\r\n 'title' => __('Thumbnail Size', 'mvvwb-gallery'),\r\n 'desc' => __('Choose the size of your thumbs.', 'mvvwb-gallery'),\r\n 'type' => 'thumb_size',\r\n 'default' => [\r\n 'width' => get_option('thumbnail_size_w'),\r\n 'height' => get_option('thumbnail_size_h'),\r\n 'crop' => true\r\n ]\r\n ],\r\n [\r\n 'id' => 'thumbnail_link',\r\n 'title' => __('Thumbnail Link', 'mvvwb-gallery'),\r\n 'default' => 'image' ,\r\n 'type' => 'thumb_link',\r\n 'spacer' => '<span class=\"spacer\"></span>',\r\n 'desc' => __('You can choose to either link each thumbnail to the full size image or to the image\\'s attachment page.', 'mvvwb-gallery')\r\n ]\r\n ]\r\n ];\r\n \r\n return $galleryTemplates;\r\n }",
"function register_port_gallery_widget() {\n register_widget( 'port_gallery' );\n}",
"function gs_theme_setup() {\r\n\r\n\t/**\r\n\t * Load the theme functions library\r\n\t */\r\n\trequire_once('inc/library.php');\r\n\r\n\t/**\r\n\t * Load custom post types\r\n\t */\r\n\trequire_once('inc/cpt.slides.php'); \r\n\r\n\t/**\r\n\t * Load custom widgets\r\n\t */\r\n\trequire_once('inc/widget.feature-box/widget.feature-box.php'); \r\n\trequire_once('inc/widget.gs-recent-posts/widget.gs-recent-posts.php'); \r\n\r\n\t/**\r\n\t * Load custom admin features\r\n\t */\r\n\trequire_once('inc/admin/admin-branding.php'); \r\n\trequire_once('inc/admin/admin-menu.php'); \r\n\trequire_once('inc/admin/dashboard.recent-drafts.php'); \r\n\trequire_once('inc/admin/remove-dashboard-widgets.php'); \r\n\trequire_once('inc/admin/remove-default-widgets.php'); \r\n\trequire_once('inc/admin/tinymce-editor.php'); \r\n\trequire_once('inc/admin/user-capabilities.php'); \r\n\r\n \t/**\r\n * Removes WordPress version number from the document head (for security).\r\n\t *\r\n */\t\r\n\tremove_action('wp_head', 'wp_generator');\r\n\r\n \t/**\r\n * Registers theme menus.\r\n */\t\r\n\tregister_nav_menu('main', 'Main Navigation Menu');\r\n\t//register_nav_menu('Your Menu Name', 'Your Menu Description');\r\n\r\n \t/**\r\n * Registers thumbnail and featured image sizes.\r\n */\t\r\n\tadd_theme_support( 'post-thumbnails' );\r\n\tset_post_thumbnail_size( 150, 150, true ); // Normal post thumbnails\r\n\tadd_image_size( 'slide', 960, 300, true );\r\n\t//add_image_size( 'custom-thumb-name', 150, 150, true ); \r\n\r\n}",
"function x_custom_post_formats() {\n\tadd_theme_support( 'post-formats', array( 'image', 'gallery' ) );\n}",
"function get_gallery_single_template( $single_template ) {\n\n\tglobal $post;\n\n\tif ( $post->post_type == 'gallery' ) {\n\t\t$single_template = dirname( __FILE__ ) . '/templates/single-gallery.php';\n\t}\n\treturn $single_template;\n}",
"function druplex_field__field_blog_images($variables) {\n\n $output = '<div class=\"flexslider\"><ul class=\"slides\">';\n\n foreach ($variables['items'] as $delta => $item) {\n $output .= '<li>' . drupal_render($item) . '</li>';\n }\n\n $output .= '</ul></div>';\n \n return $output;\n}",
"function neobeat_include_masonry_scripts() {\n\t\twp_enqueue_script( 'isotope' );\n\t\twp_enqueue_script( 'packery' );\n\t}",
"function add_magazine_columns_css() {\n\tglobal $post;\n\tif ( is_singular() ) {\n\t\t$content = $post->post_content;\n\t\tif ( stristr( $content, '<!--column-->' ) ) {\n\t\t\t?>\n<!-- Magazine Columns CSS -->\n<style type='text/css'>\n#magazine-columns{margin:0 -20px;margin-bottom:1em;overflow:hidden}\n.column {float:left;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;padding:0 20px}\n.column.c2{width:50%}\n.column.c3{width:33.33%}\n.column.c4{width:25%}\n.column.c5{width:20%}\n.column p:first-child{margin-top:0}\n.column p:last-child{margin-bottom:0}\n.column img{max-width:100%;height:auto}\n</style>\n<!-- /Magazine Columns CSS -->\n\t\t\t<?php\n\t\t}\n\t}\n}",
"function mss_gallery_shortcode($attr) {\n\tglobal $post, $wp_locale;\n\n\tstatic $instance = 0;\n\t$instance++;\n\n\t// Allow plugins/themes to override the default gallery template.\n\t$output = apply_filters('post_gallery', '', $attr);\n\tif ( $output != '' )\n\t\treturn $output;\n\n\t// We're trusting author input, so let's at least make sure it looks like a valid orderby statement\n\tif ( isset( $attr['orderby'] ) ) {\n\t\t$attr['orderby'] = sanitize_sql_orderby( $attr['orderby'] );\n\t\tif ( !$attr['orderby'] )\n\t\t\tunset( $attr['orderby'] );\n\t}\n\n\textract(shortcode_atts(array(\n\t\t'order' => 'ASC',\n\t\t'orderby' => 'menu_order ID',\n\t\t'id' => $post->ID,\n\t\t'imagetag' => 'div',\n\t\t'linktag' => 'a',\n\t\t'imagetitle' => $post->title,\n\t\t'captiontag' => 'div',\n\t\t'columns' => 3,\n\t\t'size' => 'large',\n\t\t'include' => '',\n\t\t'exclude' => ''\n\t), $attr));\n\n\t$id = intval($id);\n\tif ( 'RAND' == $order )\n\t\t$orderby = 'none';\n\n\tif ( !empty($include) ) {\n\t\t$include = preg_replace( '/[^0-9,]+/', '', $include );\n\t\t$_attachments = get_posts( array('include' => $include, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) );\n\n\t\t$attachments = array();\n\t\tforeach ( $_attachments as $key => $val ) {\n\t\t\t$attachments[$val->ID] = $_attachments[$key];\n\t\t}\n\t} elseif ( !empty($exclude) ) {\n\t\t$exclude = preg_replace( '/[^0-9,]+/', '', $exclude );\n\t\t$attachments = get_children( array('post_parent' => $id, 'exclude' => $exclude, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) );\n\t} else {\n\t\t$attachments = get_children( array('post_parent' => $id, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) );\n\t}\n\n\tif ( empty($attachments) )\n\t\treturn '';\n\n\tif ( is_feed() ) {\n\t\t$output = \"\\n\";\n\t\tforeach ( $attachments as $att_id => $attachment )\n\t\t\t$output .= wp_get_attachment_link($att_id, $size, true) . \"\\n\";\n\t\treturn $output;\n\t}\n\n\t$itemtag = tag_escape($itemtag);\n\t$captiontag = tag_escape($captiontag);\n\t$columns = intval($columns);\n\t$float = $wp_locale->text_direction == 'rtl' ? 'right' : 'left';\n\n\t$selector = \"gallery-{$instance}\";\n\n\t$output = apply_filters('gallery_style', \"\n\t\t<div id='{$selector}' class='carousel slide'><div class='carousel-inner'>\");\n // $output = $selector;\n\t$i = 0;\n\tforeach ( $attachments as $id => $attachment ) {\n\t\tif ($i == 0) {\n\t\t $active = 'active';\n\t\t} else{\n\t\t $active = '';\n\t\t}\n\n\t\t$link = isset($attr['link']) && 'file' == $attr['link'] ? wp_get_attachment_image($id, $size, false, false) : wp_get_attachment_image($id, $size, true, false);\n\n\t\t$output .= \"<{$imagetag} class='item \".$active.\"'>\";\n\t\t$output .= \"<{$linktag}>$link</{$linktag}>\";\n if ( $captiontag && trim($attachment->post_excerpt) ) {\n \t\t$output .= \"\n \t\t\t<{$captiontag} class='carousel-caption'><p>\n \t\t\t\" . wptexturize($attachment->post_excerpt) . \"\n \t\t\t</p></{$captiontag}>\";\n \t}\n\t\t$output .= \"</{$imagetag}>\";\n\n\t\t$i++;\n\t}\n\n\t$output .= \"</div>\";\n\t$output .= \"<a class='carousel-control left' href='#{$selector}' data-slide='prev'>‹</a>\n <a class='carousel-control right' href='#{$selector}' data-slide='next'>›</a>\\n\";\n\t$output .= \"</div>\";\n\n\n\n\treturn $output;\n}",
"function hmg_the_gallery ( $post_id = null, $size = array(), $before = null, $after = null, $link_images = true, $featured = true ) {\n\t\n\tif( null == $post_id )\n\t\t$post_id = get_the_id();\n\n\tforeach( hmg_get_gallery_images( $post_id, $size, $featured ) as $attachment_id => $image ) :\n\t\n\t\tif( empty( $image ) )\n\t\t\tcontinue;\n\t\n\t\techo $before;\n\t\t\n\t\tif( $link_images ) : \n\t\t\n\t\t\t?>\n\t\n\t\t\t<a href=\"<?php echo reset( wp_get_attachment_image_src( $attachment_id, 'full' ) ); ?>\" rel=\"hm-gallery-<?php echo $post_id; ?>\">\n\t\t\t\t<?php echo $image; ?>\n\t\t\t</a>\n\t\t\n\t\t\t<?php\n\t\t\n\t\telse :\n\n\t\t\techo $image; \n\t\t\n\t\tendif;\n\n\t\techo $after;\n\t\n\tendforeach;\n\n}",
"function banner_images_init() {\n\n\t$args = array(\n\n\t\t'label' => 'Banner Image',\n\n\t\t'public' => true,\n\n\t\t'show_ui' => true,\n\n\t\t'capability_type' => 'post',\n\n\t\t'hierarchical' => false,\n\n\t\t'rewrite' => array('slug' => 'banner'),\n\n\t\t'query_var' => true,\n\n\t\t'menu_icon' => 'dashicons-format-gallery',\n\n\t\t'supports' => array(\n\n\t\t\t'title', \n\n\t\t\t'thumbnail',\n\n\t\t)\n\n\t);\n\n\tregister_post_type( 'banner', $args );\n\n}",
"function accouk_photo_gallery($atts) {\n\n $thumbnails_html = \"\";\n $i = 0;\n\n // Get image IDs\n $args = array(\n 'post_type' => 'attachment',\n 'post_mime_type' => 'image',\n 'posts_per_page' => -1,\n 'post_parent' => get_the_ID(),\n 'order' => 'ASC',\n 'fields' => 'ids'\n ); \n\n // Option to hide thumbnails and just have an open gallery button\n $a = shortcode_atts(array(\n 'hide_thumbnails' => false\n\t), $atts);\n\n if($a['hide_thumbnails']) {\n $hide_thumbnails = true;\n }\n\n $attachment_ids = get_posts($args);\n\n // Render the thumbnail gallery\n foreach($attachment_ids as $attachment_id) {\n\n $thumbnail = wp_get_attachment_image_src($attachment_id, 'uncropped_s', false);\n $full_img = wp_get_attachment_image_src($attachment_id, 'uncropped_xl', false);\n $img_meta = wp_get_attachment_metadata($attachment_id);\n\n $thumbnail_src = $thumbnail[0];\n $full_img_src = $full_img[0];\n $full_img_w = $full_img[1];\n $full_img_h = $full_img[2];\n\n $id = \"pg-img-\" . $i;\n $alt = trim(strip_tags(get_post_meta($attachment_id, '_wp_attachment_image_alt', true)));\n $caption = wp_get_attachment_caption($attachment_id);\n\n $srcset = \"\";\n\n if(is_array($img_meta)) {\n $size_array = array(absint($full_img_w), absint($full_img_h));\n $srcset = wp_calculate_image_srcset($size_array, $full_img_src, $img_meta, $attachment_id);\n }\n\n ob_start();\n include('templates/photo-gallery-thumbnail.php');\n $thumbnails_html .= ob_get_contents();\n ob_end_clean();\n\n $i++;\n\n }\n\n // Output with template\n ob_start();\n include('templates/photo-gallery.php');\n $element = ob_get_contents();\n ob_end_clean();\n\n\treturn $element;\n}",
"function origami_gallery($contents, $attr){\n\tif(!siteorigin_setting('display_gallery')) return $contents;\n\n\tif(!empty($attr['type']) && $attr['type'] == 'default') return '';\n\n\tif(siteorigin_panels_is_home() && empty($attr['ids'])){\n\t\t// Display the default Origami gallery\n\t\treturn origami_gallery_default();\n\t}\n\n\tglobal $post;\n\t\n\tstatic $instance = 0;\n\t$instance++;\n\n\t// We're trusting author input, so let's at least make sure it looks like a valid orderby statement\n\tif ( isset( $attr['orderby'] ) ) {\n\t\t$attr['orderby'] = sanitize_sql_orderby( $attr['orderby'] );\n\t\tif ( !$attr['orderby'] )\n\t\t\tunset( $attr['orderby'] );\n\t}\n\n\t/**\n\t * @var $order\n\t * @var $orderby\n\t * @var $id\n\t * @var $itemtag\n\t * @var $icontag\n\t * @var $captiontag\n\t * @var $size\n\t * @var $include\n\t * @var $exclude\n\t * @var $wp_default\n\t * @var $target_blank\n\t */\n\textract(shortcode_atts(array(\n\t\t'order' => 'ASC',\n\t\t'orderby' => 'menu_order ID',\n\t\t'id' => $post->ID,\n\t\t'itemtag' => 'dl',\n\t\t'icontag' => 'dt',\n\t\t'captiontag' => 'dd',\n\t\t'columns' => 3,\n\t\t'size' => 'origami-slider',\n\t\t'include' => '',\n\t\t'exclude' => '',\n\t\t'wp_default' => false,\n\t\t'target_blank' => false,\n\t), $attr));\n\t\n\t// This gallery has requested to use the WordPress default gallery\n\tif($wp_default) return $contents;\n\n\t$id = intval($id);\n\tif ( 'RAND' == $order )\n\t\t$orderby = 'none';\n\n\tif ( !empty($include) ) {\n\t\t$include = preg_replace( '/[^0-9,]+/', '', $include );\n\t\t$_attachments = get_posts( array('include' => $include, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) );\n\n\t\t$attachments = array();\n\t\tforeach ( $_attachments as $key => $val ) {\n\t\t\t$attachments[$val->ID] = $_attachments[$key];\n\t\t}\n\t}\n\telseif ( !empty($exclude) ) {\n\t\t$exclude = preg_replace( '/[^0-9,]+/', '', $exclude );\n\t\t$attachments = get_children( array('post_parent' => $id, 'exclude' => $exclude, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) );\n\t}\n\telse {\n\t\t$attachments = get_children( array('post_parent' => $id, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) );\n\t}\n\n\tif ( empty($attachments) ) return '';\n\n\t// This is the custom stuff\n\n\t// Create the gallery content\n\t$return = '';\n\t$return .= '<div class=\"flexslider-wrapper\">';\n\t$return .= '<div class=\"flexslider\">';\n\t$return .= '<ul class=\"slides\">';\n\tforeach($attachments as $attachment){\n\t\t$return .= '<li>';\n\t\t$return .= apply_filters('origami_slide_before', '', $attachment, $target_blank);\n\t\t$return .= wp_get_attachment_image($attachment->ID, $size, false, array('class' => 'slide-image'));\n\t\tif($attachment->post_excerpt){\n\t\t\t$return .= '<div class=\"flex-caption\">' . $attachment->post_excerpt . '</div>';\n\t\t}\n\t\t$return .= apply_filters('origami_slide_after', '', $attachment, $target_blank);\n\t\t$return .= '</li>';\n\t}\n\t$return .= '</ul>';\n\t$return .= '</div>';\n\t$return .= '</div>';\n\n\treturn $return;\n}",
"function _latest_posts4 ( $options )\n\t{\n\t\n\t\t\n\t\t$element_size = zn_get_size( $options['_sizer'] );\n\t\n\t?>\n\t\n\t\t\t\t\t\t\t\n\t\t<div class=\"<?php echo $element_size['sizer'];?>\">\n\t\t\t<div class=\"latest_posts default-style\">\n\t\t\t\n\t\t\t\t<div class=\"row zn_content_no_margin\">\n\t\t\t\t\t<div class=\"<?php echo $element_size['sizer'];?>\">\n\t\t\t\t\t\t<h3 class=\"m_title\">\n\t\t\t\t\t\t\t<?php echo $options['lp_title'];?>\n\t\t\t\t\t\t</h3>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"row zn_content_no_margin\">\n\t\t\t\t<?php\n\t\t\t\t\n\t\t\t\t\twp_reset_query();\n\t\t\t\t\tglobal $post;\n\t\t\t\t\t//print_r($options['lp_blog_categories']) ;\n\t\t\t\t\t// Check what categories were selected..if any \n\t\t\t\t\tif ( !empty ( $options['lp_blog_categories'] ) ) {\n\t\t\t\t\t\t$blog_category = implode(',',$options['lp_blog_categories']);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$blog_category = '0';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// HOW MANY POSTS\n\t\t\t\t\tif ( isset ( $options['lp_num_posts'] ) ) {\n\t\t\t\t\t\t$num_posts = $options['lp_num_posts'];\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$num_posts = '3';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Start the query\n\t\t\t\t\tquery_posts( array ( 'posts_per_page' => $num_posts , 'cat' => $blog_category ) );\n\t\t\t\t\t\n\t\t\t\t\t// GET THE NUMBER OF TOTAL POSTS RETURNED\n\t\t\t\t\tglobal $wp_query;\n\t\t\t\t\t\n\t\t\t\t\t// Start the loop\n\t\t\t\t\twhile( have_posts() ){\n\n\t\t\t\t\t\tthe_post(); \n\t\t\t\t\t\t\n\t\t\t\t\t\techo '<div class=\"span4 post\">';\t\n\n\t\t\t\t\t\t\t$image = '';\n\t\t\t\t\t\t\t// Create the featured image html\n\t\t\t\t\t\t\tif ( has_post_thumbnail( $post->ID ) ) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$thumb = get_post_thumbnail_id($post->ID) ;\n\t\t\t\t\t\t\t\t$f_image = wp_get_attachment_url($thumb) ;\n\t\t\t\t\t\t\t\tif ( !empty ( $f_image ) ) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$feature_image = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );\n\t\t\t\t\t\t\t\t\t$image = vt_resize( '', $f_image , 370,200 , true );\n\t\t\t\t\t\t\t\t\t$image = '<a href=\"'.get_permalink().'\" class=\"hoverBorder plus\"><img src=\"'.$image['url'].'\" width=\"'.$image['width'].'\" height=\"'.$image['height'].'\" alt=\"\"/><h6>'.__(\"Read more\",THEMENAME).' +</h6></a>';\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\techo $image;\n\t\t\t\t\t\t\n\t\t\t\t\t\t\techo '<em>';\n\t\t\t\t\t\t\t\tthe_time('d F Y');\n\t\t\t\t\t\t\t\techo ' '.__(\"By\",THEMENAME);\n\t\t\t\t\t\t\t\techo ' '.get_the_author();\n\t\t\t\t\t\t\t\techo ' '.__(\"in\",THEMENAME).' ';\n\t\t\t\t\t\t\t\tthe_category(\", \");\n\t\t\t\t\t\t\techo '</em>';\n\n\t\t\t\t\t\t\techo '<h3 class=\"m_title\"><a href=\"'.get_permalink().'\">'.get_the_title().'</a></h3>';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\techo '</div>';\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\twp_reset_query();\n\t\t\t\t\t\n\t\t\t\t?>\n\t\t\t\t</div>\n\t\t\t</div><!-- end // latest posts style 2 -->\n\t\t</div>\n\n\t<?php\n\t}",
"function thirdtheme_photo_page()\n {\n add_theme_support('post-thumbnails');\n add_image_size('medium',400,400);\n $args = array(\n 'labels' => array('name' =>__('photo page'),\n 'add_new' =>__('add new photo')),\n \n 'public' => true,\n 'menu_icon' =>'dashicons-format-image',\n 'show_in_menu' => true,\n 'has_archive' => true,\n 'supports' => array( 'title','thumbnail')); \n register_post_type('photo',$args);\n }",
"function sandbox_gallery($attr) {\n\tglobal $post;\n\t// Sets our defaults for the Sandbox gallery short code\n\textract( shortcode_atts(\n\t\tarray(\n\t\t\t'orderby' => 'menu_order ASC, ID ASC',\n\t\t\t'id' => $post->ID,\n\t\t\t'itemtag' => 'dl',\n\t\t\t'icontag' => 'dt',\n\t\t\t'captiontag' => 'dd',\n\t\t\t'columns' => 3,\n\t\t\t'size' => 'thumbnail',\n\t\t),\n\t\t$attr ) );\n\t$id = intval($id);\n\t$orderby = addslashes($orderby);\n\t$attachments = get_children(\"post_parent=$id&post_type=attachment&post_mime_type=image&orderby=\\\"{$orderby}\\\"\");\n\t// If we have nothing, show nothing\n\tif ( empty($attachments) )\n\t\treturn '';\n\t// Shows simple image links when viewed in a feed\n\tif ( is_feed() ) {\n\t\t$output = \"\\n\";\n\t\tforeach ( $attachments as $id => $attachment )\n\t\t\t$output .= wp_get_attachment_link( $id, $size, true ) . \"\\n\";\n\t\treturn $output;\n\t}\n\t$listtag = tag_escape($listtag);\n\t$itemtag = tag_escape($itemtag);\n\t$captiontag = tag_escape($captiontag);\n\t$columns = intval($columns);\n\t// Divides number of columns for even widths\n\t$itemwidth = $columns > 0 ? floor(100/$columns) : 100;\n\t// Let's begin our gallery\n\t$output = apply_filters( \"gallery_style\", \"<div class='gallery gallery-set-1'>\" );\n\t// We're using pretty much the same code from ../wp-includes/media.php\n\tforeach ( $attachments as $id => $attachment ) {\n\t\t$link = wp_get_attachment_link( $id, $size, true );\n\t\t// This is our 'wrapper' for each gallery item\n\t\t$output .= \"<{$itemtag} class='gallery-item' style='width:{$itemwidth}%;'>\";\n\t\t// And now we have the actual image link\n\t\t$output .= \"<{$icontag} class='gallery-icon'>$link</{$icontag}>\";\n\t\t// Next, show the image caption if present\n\t\tif ( $captiontag && trim($attachment->post_excerpt) ) {\n\t\t\t$output .= \"<{$captiontag} class='gallery-caption'>{$attachment->post_excerpt}</{$captiontag}>\";\n\t\t}\n\t\t// Close the gallery item 'wrapper'\n\t\t$output .= \"</{$itemtag}>\";\n\t\t// Start a new gallery set for our 'columns'\n\t\tif ( $columns > 0 && ++$i % $columns == 0 ) {\n\t\t\t$gallery_count = 2;\n\t\t\t$output .= \"\\n</div>\\n<div class='gallery gallery-set-\" . $gallery_count . \"'>\\n\";\n\t\t\t$gallery_count++;\n\t\t}\n\t}\n\t// Ends our gallery\n\t$output .= \"</div>\\n\";\n\t// And spits out the chewed up code\n\treturn $output;\n}",
"function launchpad_gallery_shortcode($attr) {\n\t// Defaults.\n\t$linkto = 'post'; // Also file and none.\n\t$columns = 3;\n\t\n\t// Trim the attributes.\n\tforeach($attr as $k => $v) {\n\t\t$attr[$k] = trim($v);\n\t}\n\t\n\t// Return if no ids are present.\n\tif($attr['ids'] === '') {\n\t\treturn '';\n\t}\n\t\n\t// Normalize the columns.\n\tif($attr['columns']) {\n\t\t$columns = (int) $attr['columns'];\n\t\tif($columns < 1) {\n\t\t\t$columns = 3;\n\t\t}\n\t}\n\t\n\t// Determine the linkto, emulating WordPress's default behavior (I think).\n\tswitch($attr['link']) {\n\t\tdefault:\n\t\t\t$linkto = 'post';\n\t\tbreak;\n\t\tcase 'file':\n\t\t\t$linkto = 'file';\n\t\tbreak;\n\t\tcase 'none':\n\t\t\t$linkto = 'none';\n\t\tbreak;\n\t}\n\t\n\t// Create the container element.\n\t$ret = '<figure class=\"gallery gallery-columns-' . $columns . '\">';\n\t\n\t// Get the IDs as an array.\n\t$ids = explode(',', $attr['ids']);\n\t\n\t// Shuffle them if the order is random.\n\tif($attr['orderby'] === 'rand') {\n\t\tshuffle($ids);\n\t}\n\t\n\t// Loop the IDs.\n\tforeach($ids as $id) {\n\t\t// Get each gallery source.\n\t\t$thumb = wp_get_attachment_image_src($id, 'gallery');\n\t\t\n\t\t// If the link is to the post, generate the link.\n\t\tif($linkto === 'post') {\n\t\t\t$full_image = get_post($id);\n\t\t\t$ret .= '<a href=\"' . get_permalink($full_image->ID) . '\">';\n\t\t\n\t\t// If the link is to a file, generate the file link.\n\t\t} else if($linkto === 'file') {\n\t\t\t$full_image = wp_get_attachment_image_src($id, 'full');\n\t\t\t$ret .= '<a href=\"' . $full_image[0] . '\">';\n\t\t}\n\t\t\n\t\t// Generate the gallery image.\n\t\t$ret .= '<figure>';\n\t\t$ret .= '<img src=\"' . $thumb[0] . '\" width=\"' . $thumb[1] . '\" height=\"' . $thumb[2] . '\" alt=\"\">';\n\t\t$ret .= '</figure>';\n\t\t\n\t\t// Close the link if required.\n\t\tif($linkto !== 'none') {\n\t\t\t$ret .= '</a>';\n\t\t}\n\t}\n\t\n\t// Close the container.\n\t$ret .= '</figure>';\n\t\n\treturn $ret;\n}",
"function init() {\n if( !is_object( $this->ipsclass->compiled_templates['skin_gallery_imagelisting'] ) ) {\n \t$this->ipsclass->load_template('skin_gallery_imagelisting');\n }\n $this->img_html = $this->ipsclass->compiled_templates[ 'skin_gallery_imagelisting' ];\n }",
"function gallery_post_type() {\n\n $labels = array(\n 'name' => _x( 'Galerías', 'Post Type General Name', 'text_domain' ),\n 'singular_name' => _x( 'Galería', 'Post Type Singular Name', 'text_domain' ),\n 'menu_name' => __( 'Galerías', 'text_domain' ),\n 'name_admin_bar' => __( 'Galería', 'text_domain' ),\n 'archives' => __( 'Archivo de Galerías', 'text_domain' ),\n 'parent_item_colon' => __( 'Galería superior:', 'text_domain' ),\n 'all_items' => __( 'Todas las Galerías', 'text_domain' ),\n 'add_new_item' => __( 'Agregar Galería nueva', 'text_domain' ),\n 'add_new' => __( 'Agregar nueva', 'text_domain' ),\n 'new_item' => __( 'Galería nueva', 'text_domain' ),\n 'edit_item' => __( 'Editar Galería', 'text_domain' ),\n 'update_item' => __( 'Actualizar Galería', 'text_domain' ),\n 'view_item' => __( 'Ver Galería', 'text_domain' ),\n 'search_items' => __( 'Buscar Galería', 'text_domain' ),\n 'not_found' => __( 'No encontrado', 'text_domain' ),\n 'not_found_in_trash' => __( 'No encontrado en la papelera', 'text_domain' ),\n 'featured_image' => __( 'Imagen destacada', 'text_domain' ),\n 'set_featured_image' => __( 'Establecer imagen destacada', 'text_domain' ),\n 'remove_featured_image' => __( 'Quitar imagen destacada', 'text_domain' ),\n 'use_featured_image' => __( 'Usar como imagen destacada', 'text_domain' ),\n 'insert_into_item' => __( 'Insertar en Galería', 'text_domain' ),\n 'uploaded_to_this_item' => __( 'Cargar en esta Galería', 'text_domain' ),\n 'items_list' => __( 'Lista de Galerías', 'text_domain' ),\n 'items_list_navigation' => __( 'Navegar lista de Galerías', 'text_domain' ),\n 'filter_items_list' => __( 'Filtrar lista de Galerías', 'text_domain' ),\n );\n $rewrite = array(\n 'slug' => 'galeria',\n 'with_front' => true,\n 'pages' => true,\n 'feeds' => true,\n );\n $args = array(\n 'label' => __( 'Galería', 'text_domain' ),\n 'description' => __( 'Galerías de fotos & videos', 'text_domain' ),\n 'labels' => $labels,\n 'supports' => array( 'title', 'editor', 'thumbnail', ),\n 'taxonomies' => array( 'artistas' ),\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'menu_position' => 5,\n 'menu_icon' => 'dashicons-format-gallery',\n 'show_in_admin_bar' => true,\n 'show_in_nav_menus' => true,\n 'can_export' => true,\n 'has_archive' => true, \n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'rewrite' => $rewrite,\n 'capability_type' => 'page',\n );\n register_post_type( 'gallery', $args );\n\n}",
"function lbe_gallery_shortcode($output, $attr)\r\n{\r\n $post = get_post();\r\n\r\n static $instance = 0;\r\n $instance++;\r\n\r\n // We're trusting author input, so let's at least make sure it looks like a valid orderby statement\r\n if ( isset( $attr['orderby'] ) ) {\r\n $attr['orderby'] = sanitize_sql_orderby( $attr['orderby'] );\r\n if ( !$attr['orderby'] )\r\n unset( $attr['orderby'] );\r\n }\r\n \r\n extract(shortcode_atts(array(\r\n\t\t'order' => 'ASC',\r\n\t\t'orderby' => 'menu_order ID',\r\n\t\t'id' => $post->ID,\r\n\t\t'itemtag' => 'dl',\r\n\t\t'icontag' => 'dt',\r\n\t\t'captiontag' => 'dd',\r\n\t\t'columns' => 3,\r\n\t\t'size' => 'thumbnail',\r\n\t\t'include' => '',\r\n\t\t'exclude' => ''\r\n ), $attr));\r\n\r\n $id = intval($id);\r\n if ( 'RAND' == $order )\r\n $orderby = 'none';\r\n\r\n if ( !empty($include) ) {\r\n $_attachments = get_posts( array('include' => $include, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) );\r\n\r\n $attachments = array();\r\n foreach ( $_attachments as $key => $val ) {\r\n $attachments[$val->ID] = $_attachments[$key];\r\n }\r\n } elseif ( !empty($exclude) ) {\r\n $attachments = get_children( array('post_parent' => $id, 'exclude' => $exclude, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) );\r\n } else {\r\n $attachments = get_children( array('post_parent' => $id, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) );\r\n }\r\n\r\n if ( empty($attachments) )\r\n return '';\r\n\r\n if ( is_feed() ) {\r\n $output = \"\\n\";\r\n foreach ( $attachments as $att_id => $attachment )\r\n $output .= wp_get_attachment_link($att_id, $size, true) . \"\\n\";\r\n return $output;\r\n }\r\n\r\n $itemtag = tag_escape($itemtag);\r\n $captiontag = tag_escape($captiontag);\r\n $columns = intval($columns);\r\n $itemwidth = $columns > 0 ? floor(100/$columns) : 100;\r\n\t$float = is_rtl() ? 'right' : 'left';\r\n\r\n\t$selector = \"gallery-{$instance}\";\r\n\r\n $gallery_style = $gallery_div = '';\r\n if ( apply_filters( 'use_default_gallery_style', true ) )\r\n $gallery_style = \"\r\n <style type='text/css'>\r\n #{$selector} {\r\n margin: auto;\r\n }\r\n #{$selector} .gallery-item {\r\n float: {$float};\r\n margin-top: 10px;\r\n text-align: center;\r\n width: {$itemwidth}%;\r\n }\r\n #{$selector} img {\r\n border: 2px solid #cfcfcf;\r\n }\r\n #{$selector} .gallery-caption {\r\n margin-left: 0;\r\n }\r\n </style>\r\n <!-- see lbe_gallery_shortcode() in wp-content/plugins/wp-lightbox/plugin-lightbox.php -->\";\r\n $size_class = sanitize_html_class( $size );\r\n $gallery_div = \"<div id='$selector' class='gallery galleryid-{$id} gallery-columns-{$columns} gallery-size-{$size_class}'>\";\r\n $output = apply_filters( 'gallery_style', $gallery_style . \"\\n\\t\\t\" . $gallery_div );\r\n\r\n\t$i = 0;\r\n foreach ( $attachments as $id => $attachment ) {\r\n //$link = wp_get_attachment_link($id);\r\n \r\n $attachment_meta = get_post_meta($id, '_lbe-image-link', true);\r\n $a_img = ($attachment_meta) ? $attachment_meta : wp_get_attachment_url($id);\r\n\r\n // Attachment page ID\r\n // $att_page = get_attachment_link($id);\r\n\r\n // Returns array\r\n $img = wp_get_attachment_image_src($id, $size); \r\n \r\n $title = trim($attachment->post_excerpt) ? wptexturize($attachment->post_excerpt) : $attachment->post_title;\r\n\r\n $output .= \"<{$itemtag} class='gallery-item'>\";\r\n $output .= \"\r\n <{$icontag} class='gallery-icon'>\r\n <a href=\\\"{$a_img}\\\" title=\\\"{$title}\\\" rel=\\\"{$selector}\\\" class=\\\"lightbox evolution\\\">\r\n <img src=\\\"{$img[0]}\\\" width=\\\"{$img[1]}\\\" height=\\\"{$img[2]}\\\" alt=\\\"{$title}\\\" />\r\n </a>\r\n </{$icontag}>\";\r\n\t\tif ( $captiontag && trim($attachment->post_excerpt) ) {\r\n\t\t\t$output .= \"\r\n\t\t\t\t<{$captiontag} class='wp-caption-text gallery-caption'>\r\n\t\t\t\t\" . wptexturize($attachment->post_excerpt) . \"\r\n\t\t\t\t</{$captiontag}>\";\r\n\t\t}\r\n \r\n $output .= \"</{$itemtag}>\";\r\n if ( $columns > 0 && ++$i % $columns == 0 )\r\n $output .= '<br style=\"clear: both\" />';\r\n }\r\n\r\n $output .= \"\r\n <br style='clear: both;' />\r\n </div>\\n\";\r\n\r\n return $output;\r\n}",
"function wpdocs_codex_Gallerie_init() {\r\n $labels = array(\r\n 'name' => _x( 'Mes Galleries', 'Post type general name', 'textdomain' ),\r\n 'singular_name' => _x( 'Gallerie', 'Post type singular name', 'textdomain' ),\r\n 'menu_name' => _x( 'Mes Galleries', 'Admin Menu text', 'textdomain' ),\r\n 'name_admin_bar' => _x( 'Gallerie', 'Ajouter une Gallerie', 'textdomain' ),\r\n 'add_new' => __( 'Ajouter une Gallerie', 'textdomain' ),\r\n 'add_new_item' => __( 'Ajouter une Gallerie', 'textdomain' ),\r\n 'new_item' => __( 'Nouvelle Gallerie', 'textdomain' ),\r\n 'edit_item' => __( 'Editer Gallerie', 'textdomain' ),\r\n 'view_item' => __( 'Voir mes Gallerie', 'textdomain' ),\r\n 'all_items' => __( 'Toutes Mes Galleries', 'textdomain' ),\r\n 'search_items' => __( 'Rechercher des Galleries', 'textdomain' ),\r\n 'parent_item_colon' => __( 'Parent Mes Galleries:', 'textdomain' ),\r\n 'not_found' => __( 'Pas de Galleries trouvé.', 'textdomain' ),\r\n 'not_found_in_trash' => __( 'Pas de Galleries trouvé dans la corbeille.', 'textdomain' ),\r\n 'featured_image' => _x( 'Gallerie Cover Image', 'Overrides the “Featured Image” phrase for this post type. Added in 4.3', 'textdomain' ),\r\n 'set_featured_image' => _x( 'Set cover image', 'Overrides the “Set featured image” phrase for this post type. Added in 4.3', 'textdomain' ),\r\n 'remove_featured_image' => _x( 'Remove cover image', 'Overrides the “Remove featured image” phrase for this post type. Added in 4.3', 'textdomain' ),\r\n 'use_featured_image' => _x( 'Use as cover image', 'Overrides the “Use as featured image” phrase for this post type. Added in 4.3', 'textdomain' ),\r\n 'archives' => _x( 'Gallerie archives', 'The post type archive label used in nav menus. Default “Post Archives”. Added in 4.4', 'textdomain' ),\r\n 'insert_into_item' => _x( 'Insert into Gallerie', 'Overrides the “Insert into post”/”Insert into page” phrase (used when inserting media into a post). Added in 4.4', 'textdomain' ),\r\n 'uploaded_to_this_item' => _x( 'Uploaded to this Gallerie', 'Overrides the “Uploaded to this post”/”Uploaded to this page” phrase (used when viewing media attached to a post). Added in 4.4', 'textdomain' ),\r\n 'filter_items_list' => _x( 'Filter Mes Galleries list', 'Screen reader text for the filter links heading on the post type listing screen. Default “Filter posts list”/”Filter pages list”. Added in 4.4', 'textdomain' ),\r\n 'items_list_navigation' => _x( 'Mes Galleries list navigation', 'Screen reader text for the pagination heading on the post type listing screen. Default “Posts list navigation”/”Pages list navigation”. Added in 4.4', 'textdomain' ),\r\n 'items_list' => _x( 'Mes Galleries list', 'Screen reader text for the items list heading on the post type listing screen. Default “Posts list”/”Pages list”. Added in 4.4', 'textdomain' ),\r\n );\r\n \r\n $args = array(\r\n 'labels' => $labels,\r\n 'public' => true,\r\n 'publicly_queryable' => true,\r\n 'show_ui' => true,\r\n 'show_in_menu' => true,\r\n 'query_var' => true,\r\n 'rewrite' => array( 'slug' => 'Gallerie' ),\r\n 'capability_type' => 'post',\r\n 'has_archive' => true,\r\n 'hierarchical' => false,\r\n 'menu_position' => null,\r\n 'supports' => array( 'title', 'author', 'thumbnail', 'excerpt', 'comments' ),\r\n );\r\n \r\n register_post_type( 'gallerie', $args );\r\n}",
"function buildGallery ()\t{\n\t\t\t// Get the needed Information\n\t\t\t\n\t\t}",
"function BH_register_posttype_gallery() {\r\n\r\n\t$labels = array(\r\n\t\t'name'\t\t\t\t\t=> 'Galleries',\r\n\t\t'singular_name'\t\t\t=> 'Gallery',\r\n\t\t'menu_name'\t\t\t\t=> 'Galleries',\r\n\t\t'all_items'\t\t\t\t=> 'All Galleries',\r\n\t\t'add_new'\t\t\t\t=> 'Add New',\r\n\t\t'add_new_item'\t\t\t=> 'Add New Gallery',\r\n\t\t'edit_item'\t\t\t\t=> 'Edit Gallery',\r\n\t\t'new_item'\t\t\t\t=> 'New Gallery',\r\n\t\t'view_item'\t\t\t\t=> 'View Gallery',\r\n\t\t'search_items'\t\t\t=> 'Search Galleries',\r\n\t\t'not_found'\t\t\t\t=> 'No Galleries Found',\r\n\t\t'not_found_in_trash'\t=> 'No Galleries Found in Trash'\r\n\t);\r\n\t\r\n\t$args = array(\r\n\t\t'labels'\t\t\t\t=> $labels,\r\n\t\t'public'\t\t\t\t=> true,\r\n\t\t'exclude_from_search'\t=> false,\r\n\t\t'publicly_queryable'\t=> true,\r\n\t\t'show_ui'\t\t\t\t=> true,\r\n\t\t'show_in_nav_menus'\t\t=> true,\r\n\t\t'show_in_menu'\t\t\t=> true,\r\n\t\t'show_in_admin_bar'\t\t=> true,\r\n\t\t'menu_position'\t\t\t=> 21,\r\n\t\t'menu_icon'\t\t\t\t=> null,\r\n\t\t'capability_type'\t\t=> 'post',\r\n\t\t'hierarchical'\t\t\t=> false,\r\n\t\t'supports'\t\t\t\t=> array('title'),\r\n\t\t'taxonomies'\t\t\t=> array(),\r\n\t\t'has_archive'\t\t\t=> true,\r\n\t\t'rewrite'\t\t\t\t=> array('slug' => 'gallery', 'with_front' => false),\r\n\t\t'query_var'\t\t\t\t=> true\r\n\t);\r\n\tregister_post_type( 'gallery', $args );\r\n\r\n}",
"public function meta_box_gallery_code_callback( $post ) {\n\n // Load view\n $this->base->load_admin_partial( 'metabox-gallery-code', array(\n 'post' => $post,\n 'gallery_data' => get_post_meta( $post->ID, '_eg_gallery_data', true ),\n ) );\n\n }",
"function get_gallery_archive_template( $archive_template ) {\n\n\tglobal $post;\n\n\tif ( is_post_type_archive( 'gallery' ) ) {\n\t\t$archive_template = dirname( __FILE__ ) . '/templates/archive-gallery.php';\n\t}\n\treturn $archive_template;\n}",
"function svl_gallery_func() {\n\n\t$labels = array(\n\t\t'name' => _x( 'Gallery Filter', 'Post Type General Name', 'devvn' ),\n\t\t'singular_name' => _x( 'Gallery Filter', 'Post Type Singular Name', 'devvn' ),\n\t\t'menu_name' => __( 'Gallery Filter', 'devvn' ),\n\t\t'name_admin_bar' => __( 'Gallery Filter', 'devvn' ),\n\t\t'archives' => __( 'Gallery', 'devvn' ),\n\t\t'attributes' => __( 'Item Attributes', 'devvn' ),\n\t\t'parent_item_colon' => __( 'Parent Item:', 'devvn' ),\n\t\t'all_items' => __( 'All Items', 'devvn' ),\n\t\t'add_new_item' => __( 'Add New Item', 'devvn' ),\n\t\t'add_new' => __( 'Add New', 'devvn' ),\n\t\t'new_item' => __( 'New Item', 'devvn' ),\n\t\t'edit_item' => __( 'Edit Item', 'devvn' ),\n\t\t'update_item' => __( 'Update Item', 'devvn' ),\n\t\t'view_item' => __( 'View Item', 'devvn' ),\n\t\t'view_items' => __( 'View Items', 'devvn' ),\n\t\t'search_items' => __( 'Search Item', 'devvn' ),\n\t\t'not_found' => __( 'Not found', 'devvn' ),\n\t\t'not_found_in_trash' => __( 'Not found in Trash', 'devvn' ),\n\t\t'featured_image' => __( 'Featured Image', 'devvn' ),\n\t\t'set_featured_image' => __( 'Set featured image', 'devvn' ),\n\t\t'remove_featured_image' => __( 'Remove featured image', 'devvn' ),\n\t\t'use_featured_image' => __( 'Use as featured image', 'devvn' ),\n\t\t'insert_into_item' => __( 'Insert into item', 'devvn' ),\n\t\t'uploaded_to_this_item' => __( 'Uploaded to this item', 'devvn' ),\n\t\t'items_list' => __( 'Items list', 'devvn' ),\n\t\t'items_list_navigation' => __( 'Items list navigation', 'devvn' ),\n\t\t'filter_items_list' => __( 'Filter items list', 'devvn' ),\n\t);\n\t$rewrite = array(\n\t\t'slug' => 'exhibitor-catalogue',\n\t\t'with_front' => true,\n\t\t'pages' => true,\n\t\t'feeds' => false,\n\t);\n\t$args = array(\n\t\t'label' => __( 'Gallery Filter', 'devvn' ),\n\t\t'description' => __( 'Post Type Description', 'devvn' ),\n\t\t'labels' => $labels,\n\t\t'supports' => array( 'title', 'thumbnail', ),\n\t\t'taxonomies' => array( 'gallery-country', ' gallery-company' ),\n\t\t'hierarchical' => false,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'menu_position' => 5,\n\t\t'menu_icon' => 'dashicons-images-alt',\n\t\t'show_in_admin_bar' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'can_export' => true,\n\t\t'has_archive' => true,\t\t\n\t\t'exclude_from_search' => true,\n\t\t'publicly_queryable' => true,\n\t\t'rewrite' => $rewrite,\n\t\t'capability_type' => 'page',\n\t);\n\tregister_post_type( 'gallery', $args );\n\n}",
"function theme_content($type) {\n global $theme;\n\n $id = (isset($_REQUEST['id'])) ? intval($_REQUEST['id']) : 0;\n $type = filter_var($type);\n $output = '';\n\n switch ($type) {\n\n case 'image'; // gallery image\n $image = new UN_Gallery();\n $bload = $image->load($id);\n if ($bload) {\n $output .= '<img alt=\"'.$image->origname . '\" src=\"'. LC_UPLOAD . $image->filename.'\"/>'; \n }\n break;\n\n case 'gallery': // gallery thumbnails\n $gallery = new UN_Gallery();\n $where = ' a.catid = '. $id;\n $res = $gallery->pager($pager, $numrows, null, $where);\n\n if ($res) {\n $output .= '<p>';\n while($row = $res->fetch()) {\n $url = 'popup.php?t=image&id='.$row['imgid'].theme_global_url();\n $output .= '<a href=\"'.$url.'\"'.\n ' target=\"_blank\" onClick=\"openWindow(\\''.$url.'\\');return false\"><img alt=\"'.$row['origname'] .\n '\" src=\"'. LC_UPLOAD . 'thumb_'. $row['filename'].'\" border=\"0\" vspace=\"6\" hspace=\"6\"/></a>'; \n } \n $output .= '</p>';\n }\n $output .= $pager->display();\n break;\n\n case 'categories': // gallery categories\n $cat = new UN_GalleryCat();\n $aCats = $cat->getGalleryCats();\n $aTranslations = array();\n $langid = 0;\n if(isset($_REQUEST['langid'])) {\n $langid = (int)$_REQUEST['langid'];\n $tr = new UN_Translate();\n $aTranslations = $tr->getAllTexts($langid);\n }\n foreach($aCats as $catid=>$cattitle) {\n $cattitle = ($langid > 0 && isset($aTranslations[$catid]['gallerycat'])) ? \n $aTranslations[$catid]['gallerycat'] :\n $cattitle;\n $output .= '<p><a href=\"index.php?t=gallery&id='. $catid . theme_global_url(). '\"> ' . $cattitle . '</a></p>';\n }\n break;\n case 'page':// content\n $page = new UN_Content();\n $bload = $page->load($id); \n if ($bload) {\n $output .= '<h2 id=\"title\">'.$page->pagetitle.'</h2>'.$page->pagedetail;\n }\n break;\n case 'news':// news\n $news = new UN_News();\n if ($id > 0) { // load specific news\n $bload = $news->load($id); \n if ($bload) {\n $output .= '<h2 id=\"title\">'.$news->newstitle.'</h2>'.$news->newsdetail;\n }\n } else {\n // load all news with paginate\n $langid = (isset($_REQUEST['langid'])) ? intval($_REQUEST['langid']) : 0;\n $where = ($langid > 0) ? ' langid='.$langid : '';\n $res = $news->pager($pager, $numrows, null, $where); \n if ($res) {\n $output .= '<h2 id=\"title\">'._('News').'</h2>';\n while($row = $res->fetch()) {\n $output .= '<p><a href=\"index.php?t=news&id='. \n $row['newsid'].theme_global_url().'\">'.$row['newstitle'].'</a></p><p>' .\n truncate(clearCodes($row['newsdetail']),400) .'</p>'; \n }\n $output .= $pager->display();\n }// end res\n } // end else\n break;\n }\n return $output;\n}",
"function gcd_setup() {\r\n\r\n // Enable support for Post Thumbnails, and declare two sizes.\r\n add_theme_support( 'post-thumbnails' );\r\n set_post_thumbnail_size( 672, 372, true );\r\n add_image_size( 'twentyfourteen-full-width', 1038, 576, true );\r\n add_image_size('home-post',215, 215, true);\r\n add_image_size('project-gallery', 612, 405, true);\r\n add_image_size('article', 960, 230, true);\r\n\r\n // This theme uses wp_nav_menu() in two locations.\r\n register_nav_menus( array(\r\n 'primary' => __( 'Top primary menu', 'twentyfourteen' ),\r\n 'secondary' => __( 'Secondary menu in left sidebar', 'twentyfourteen' ),\r\n ) );\r\n\r\n /*\r\n * Switch default core markup for search form, comment form, and comments\r\n * to output valid HTML5.\r\n */\r\n add_theme_support( 'html5', array(\r\n 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption'\r\n ) );\r\n\r\n /*\r\n * Enable support for Post Formats.\r\n * See http://codex.wordpress.org/Post_Formats\r\n */\r\n add_theme_support( 'post-formats', array(\r\n 'aside', 'image', 'video', 'audio', 'quote', 'link', 'gallery',\r\n ) );\r\n\r\n // This theme allows users to set a custom background.\r\n add_theme_support( 'custom-background', apply_filters( 'twentyfourteen_custom_background_args', array(\r\n 'default-color' => 'f5f5f5',\r\n ) ) );\r\n\r\n // Add support for featured content.\r\n add_theme_support( 'featured-content', array(\r\n 'featured_content_filter' => 'twentyfourteen_get_featured_posts',\r\n 'max_posts' => 6,\r\n ) );\r\n\r\n // This theme uses its own gallery styles.\r\n add_filter( 'use_default_gallery_style', '__return_false' );\r\n}",
"function masonry_load_more_ajax(){\r\n\t\r\n\tif($_POST['action'] = 'masonry_load_more'){\r\n\t\t\r\n\t\t//Begin get_posts query\r\n\t\t$query_attachments = get_posts(array(\r\n\t\t\t'include' => $_POST['query_ids'],\r\n\t\t\t'post_type' => 'attachment',\r\n\t\t\t'post_mime_type' => 'image',\r\n\t\t));\r\n\t\t\r\n\t\t//Define empty array\r\n\t\t$output_attachments = array();\r\n\t\t\r\n\t\t//Place all the ids in the array\r\n\t\t//The empty array now becomes an array of objects\r\n\t\tforeach ( $query_attachments as $key => $val ) {\r\n\t\t\t\r\n\t\t\t//Place it as a variable object\r\n\t\t\t$attachment_object = $query_attachments[$key];\r\n\t\t\t\r\n\t\t\t//Add the new alt_text object property\r\n\t\t\t$attachment_object->alt_text = get_post_meta($val->ID, '_wp_attachment_image_alt', true);\r\n\t\t\t\r\n\t\t\t//Get the medium size of the attachment\r\n\t\t\t$attachment_object->post_thumbnail = wp_get_attachment_image_src($val->ID, $_POST['thumbnail_size']);\r\n\t\t\t\r\n\t\t\t//Get attachment url in full size\r\n\t\t\t$attachment_object->post_full_image = wp_get_attachment_url($val->ID);\r\n\t\t\t\r\n\t\t\t//Finally add it to the array\r\n\t\t\t$output_attachments[$val->ID] = $attachment_object;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//Create new object and place the values\r\n\t\t$new_object = new stdClass();\r\n\t\t$new_object->query_ids = $output_attachments;\r\n\t\t$new_object->instance = $_POST['instance'];\r\n\t\t$new_object->thumbnail_size = $_POST['thumbnail_size'];\r\n\t\t\r\n\t}\r\n\t\r\n\tprint_r( json_encode( $new_object ) );\r\n\texit;\r\n\t\r\n}",
"function fielding_post_gallery($output, $attr) {\n\tglobal $post;\n\n\t$gallery_id = 'gallery_' . uniqid();\n\n\tif ( isset( $attr['orderby'] ) ) {\n\t\t$attr['orderby'] = sanitize_sql_orderby( $attr['orderby'] );\n\t\tif ( ! $attr['orderby'] ) {\n\t\t\tunset( $attr['orderby'] );\n\t\t}\n\t}\n\n\textract( shortcode_atts( array(\n\t\t'order' => 'ASC',\n\t\t'orderby' => 'menu_order ID',\n\t\t'id' => $post->ID,\n\t\t'itemtag' => 'dl',\n\t\t'icontag' => 'dt',\n\t\t'captiontag' => 'dd',\n\t\t'columns' => 3,\n\t\t'size' => 'thumbnail',\n\t\t'include' => '',\n\t\t'exclude' => '',\n\t), $attr ) );\n\n\t$id = intval( $id );\n\n\tif ( 'RAND' == $order ) {\n\t\t$orderby = 'none';\n\t}\n\n\tif ( ! empty( $include ) ) {\n\t\t$include = preg_replace( '/[^0-9,]+/', '', $include );\n\t\t$_attachments = get_posts(\tarray(\n\t\t\t'include' => $include,\n\t\t\t'post_status' => 'inherit',\n\t\t\t'post_type' => 'attachment',\n\t\t\t'post_mime_type' => 'image',\n\t\t\t'order' => $order,\n\t\t\t'orderby' => $orderby,\n\t\t) );\n\n\t\t$attachments = array();\n\t\tforeach ( $_attachments as $key => $val ) {\n\t\t\t$attachments[ $val->ID ] = $_attachments[ $key ];\n\t\t}\n\t}\n\n\tif ( empty( $attachments ) ) {\n\t\treturn '';\n\t}\n\n\t$count = count( $attachments );\n\t$image = array_shift( $attachments );\n\t$meta = fielding_lightbox_meta( array(\n\t\t\"id\" => $image->ID,\n\t\t\"title\" => $image->post_title,\n\t\t\"caption\" => $image->post_excerpt\n\t) );\n\n\t$output = '</div>';\n\n\t$output .= '<div class=\"gallery_large margined_md\">';\n\t$output .= '<a class=\"js-lightbox gallery_large_link\" href=\"' . $image->guid . '\" title=\"' . $image->post_excerpt . '\" data-lightbox-gallery=\"' . $gallery_id . '\" data-lightbox-meta=\"' . fielding_json_attribute( $meta, false ) . '\">';\n\t$output .= '<figure class=\"gallery_large_figure\">';\n\t$output .= fielding_responsive_image( fielding_image_gallery_large( $image->ID ), 'gallery_large_image', '', false );\n\t$output .= '<figcaption class=\"gallery_large_caption\">' . $image->post_excerpt . '</figcaption>';\n\t$output .= '</figure>';\n\t$output .= '<div class=\"gallery_large_meta image_count\">';\n\t$output .= '<span class=\"icon icon_expand\"></span>';\n\t$output .= '<span class=\"image_count_data\">';\n\t$output .= '<span class=\"image_count_text\">View Photos</span>';\n\t$output .= '<span class=\"image_count_number\">' . $count . ' Photos</span>';\n\t$output .= '</span>';\n\t$output .= '</div>';\n\t$output .= '</a>';\n\t$output .= '<div class=\"visually_hidden\">';\n\n\tforeach ( $attachments as $id => $image ) {\n\t\t$meta = fielding_lightbox_meta( array(\n\t\t\t\"id\" => $image->ID,\n\t\t\t\"title\" => $image->post_title,\n\t\t\t\"caption\" => $image->post_excerpt\n\t\t) );\n\t\t$output .= '<a href=\"' . $image->guid . '\" title=\"' . $image->post_excerpt . '\" data-lightbox-gallery=\"' . $gallery_id . '\" data-lightbox-meta=\"' . fielding_json_attribute( $meta, false ) . '\">' . $image->post_excerpt . '</a>';\n\t}\n\n\t$output .= '</div>';\n\t$output .= '</div>';\n\n\t$output .= '<div class=\"typography padded_content margined_md_bottom\">';\n\n\treturn $output;\n}",
"function iskyvideo_gallery($output = \"\", $attr, $content = false, $tag = false) {\n\tif ( isset( $attr['orderby'] ) ) {\n\t\t$attr['orderby'] = sanitize_sql_orderby( $attr['orderby'] );\n\t\tif ( !$attr['orderby'] )\n\t\t\tunset( $attr['orderby'] );\n\t}\n\n\textract(shortcode_atts(array(\n\t\t'order' => 'ASC',\n\t\t'orderby' => 'menu_order ID',\n\t\t'id' => $post ? $post->ID : 0,\n\t\t'size' => 'medium',\n\t\t'include' => '',\n\t\t'exclude' => '',\n\t\t'link' => ''\n\t), $attr, 'gallery'));\n\n\t$id = intval($id);\n\tif ( 'RAND' == $order )\n\t\t$orderby = 'none';\n\n\tif ( !empty($include) ) {\n\t\t$_attachments = get_posts( array('include' => $include, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) );\n\n\t\t$attachments = array();\n\t\tforeach ( $_attachments as $key => $val ) {\n\t\t\t$attachments[$val->ID] = $_attachments[$key];\n\t\t}\n\t} elseif ( !empty($exclude) ) {\n\t\t$attachments = get_children( array('post_parent' => $id, 'exclude' => $exclude, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) );\n\t} else {\n\t\t$attachments = get_children( array('post_parent' => $id, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) );\n\t}\n\n\tif ( empty($attachments) )\n\t\treturn '';\n\n\tif ( is_feed() ) {\n\t\t$output = \"\\n\";\n\t\tforeach ( $attachments as $att_id => $attachment )\n\t\t\t$output .= wp_get_attachment_link($att_id, $size, true) . \"\\n\";\n\t\treturn $output;\n\t}\n\n\t$i = 0;\n $output .= \"<ul class=\\\"grid\\\">\";\n\tforeach ( $attachments as $id => $attachment ) {\n\t\tif ( ! empty( $link ) && 'file' === $link )\n\t\t\t$image_output = wp_get_attachment_link( $id, $size, false, false );\n\t\telseif ( ! empty( $link ) && 'none' === $link )\n\t\t\t$image_output = wp_get_attachment_image( $id, $size, false );\n\t\telse\n\t\t\t$image_output = wp_get_attachment_link( $id, $size, true, false );\n\n\t\t$image_meta = wp_get_attachment_metadata( $id );\n\n\t\t$orientation = '';\n\t\tif ( isset( $image_meta['height'], $image_meta['width'] ) )\n\t\t\t$orientation = ( $image_meta['height'] > $image_meta['width'] ) ? 'portrait' : 'landscape';\n\n\t\t$output .= \"<li class='gallery-item'>\";\n\t\t$output .= $image_output;\n\t\t$output .= \"</li>\";\n\t\t\n\t}\n $output .= \"</ul>\";\n\treturn $output;\n}",
"function cs_post_attachments($gallery_meta_form){\r\n \t\t$galleryConter \t\t= rand(40, 9999999);\r\n\t?>\t\t\r\n \t<div class=\"to-social-network\">\r\n <div class=\"gal-active\">\r\n <div class=\"clear\"></div>\r\n <div class=\"dragareamain\">\r\n <div class=\"placehoder\">Gallery is Empty. Please Select Media <img src=\"<?php echo esc_url(get_template_directory_uri().'/include/assets/images/bg-arrowdown.png');?>\" alt=\"\" />\r\n </div>\r\n <ul id=\"gal-sortable\" class=\"gal-sortable-<?php echo esc_attr($gallery_meta_form);?>\">\r\n <?php \r\n global $cs_node, $cs_xmlObject, $cs_counter,$post;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ( $gallery_meta_form == 'gallery_slider_meta_form'){\r\n\t\t\t\t\t\t\t$type\t= 'gallery_slider';\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$type\t= 'gallery';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$cs_counter_gal = 0;\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\tif(count($cs_xmlObject->$type)>0){\r\n\t\t\t\t\t\t\tforeach ( $cs_xmlObject->$type as $cs_node ){\r\n\t\t\t\t\t\t\t\t$cs_counter_gal++;\r\n\t\t\t\t\t\t\t\t$cs_counter = $post->ID.$cs_counter_gal;\r\n\t\t\t\t\t\t\t\tif ($type == 'gallery_slider'){\r\n\t\t\t\t\t\t\t\t\tcs_slider_clone();\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tcs_gallery_clone();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n ?>\r\n </ul>\r\n </div>\r\n </div>\r\n <div class=\"to-social-list\">\r\n <div class=\"soc-head\">\r\n <h5>Select Media</h5>\r\n <div class=\"right\">\r\n <?php if ( $gallery_meta_form == 'gallery_slider_meta_form'){ ?>\r\n\t\t\t\t\t\t\t <input type=\"button\" class=\"button reload\" value=\"Reload\" onclick=\"refresh_media_slider(<?php echo esc_attr($galleryConter);?>)\" />\r\n <?php } else {?>\r\n <input type=\"button\" class=\"button reload\" value=\"Reload\" onclick=\"refresh_media(<?php echo esc_attr($galleryConter);?>)\" />\r\n <?php } ?>\r\n <input id=\"cs_log\" name=\"cs_logo\" type=\"button\" class=\"uploadfile button\" value=\"Upload Media\" />\r\n </div>\r\n <div class=\"clear\"></div>\r\n </div>\r\n <div class=\"clear\"></div>\r\n <script type=\"text/javascript\">\r\n function show_next(page_id, total_pages){\r\n //var dataString = 'action=media_pagination&id='+id+'&func='+func+'&page_id='+page_id+'&total_pages='+total_pages;\r\n\t\t\t\t\t\t\tvar dataString = 'action=media_pagination&page_id='+page_id+'&total_pages='+total_pages;\r\n\t\t\t\t\t\t\t/*if (func == 'slider') {\r\n\t\t\t\t\t\t\t\tvar\tpagination\t= 'pagination_slider';\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tvar\tpagination\t= 'pagination_clone';\r\n\t\t\t\t\t\t\t}*/\r\n jQuery(\"#pagination\").html(\"<img src='<?php echo esc_js(esc_url(get_template_directory_uri().'/include/assets/images/ajax_loading.gif'))?>' />\");\r\n jQuery.ajax({\r\n type:'POST', \r\n url: \"<?php echo esc_js(esc_url(admin_url('admin-ajax.php')));?>\",\r\n data: dataString,\r\n success: function(response) {\r\n jQuery(\"#pagination\").html(response);\r\n }\r\n });\r\n }\r\n function slider_show_next(page_id, total_pages){\r\n //var dataString = 'action=media_pagination&id='+id+'&func='+func+'&page_id='+page_id+'&total_pages='+total_pages;\r\n\t\t\t\t\t\t\tvar dataString = 'action=slider_media_pagination&page_id='+page_id+'&total_pages='+total_pages;\r\n\t\t\t\t\t\t\t/*if (func == 'slider') {\r\n\t\t\t\t\t\t\t\tvar\tpagination\t= 'pagination_slider';\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tvar\tpagination\t= 'pagination_clone';\r\n\t\t\t\t\t\t\t}*/\r\n jQuery(\".pagination_slider\").html(\"<img src='<?php echo esc_js(esc_url(get_template_directory_uri()))?>/include/assets/images/ajax_loading.gif' />\");\r\n jQuery.ajax({\r\n type:'POST', \r\n url: \"<?php echo esc_js(esc_url(admin_url('admin-ajax.php')));?>\",\r\n data: dataString,\r\n success: function(response) {\r\n jQuery(\".pagination_slider\").html(response);\r\n }\r\n });\r\n }\r\n\t\t\t\t\t\tfunction refresh_media(id){\r\n var dataString = 'action=media_pagination&id='+id+'&func=slider';\r\n jQuery(\".pagination_clone\").html(\"<img src='<?php echo esc_js(esc_url(get_template_directory_uri()))?>/include/assets/images/ajax_loading.gif' />\");\r\n jQuery.ajax({\r\n type:'POST', \r\n url: \"<?php echo esc_js(esc_url(admin_url('admin-ajax.php')));?>\",\r\n data: dataString,\r\n success: function(response) {\r\n jQuery(\".pagination_clone\").html(response);\r\n }\r\n });\r\n }\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tfunction refresh_media_slider(id){\r\n var dataString = 'action=slider_media_pagination&id='+id+'&func=slider';\r\n jQuery(\".pagination_slider\").html(\"<img src='<?php echo esc_js(esc_url(get_template_directory_uri()))?>/include/assets/images/ajax_loading.gif' />\");\r\n jQuery.ajax({\r\n type:'POST', \r\n url: \"<?php echo esc_js(esc_url(admin_url('admin-ajax.php')));?>\",\r\n data: dataString,\r\n success: function(response) {\r\n jQuery(\".pagination_slider\").html(response);\r\n }\r\n });\r\n }\r\n </script>\r\n <script>\r\n jQuery(document).ready(function($) {\r\n $(\".gal-sortable-<?php echo esc_js($galleryConter);?>\").sortable({\r\n cancel:'li div.poped-up',\r\n });\r\n //$(this).append(\"#gal-sortable\").clone() ;\r\n });\r\n var counter = 0;\r\n var count_items = <?php echo esc_js($cs_counter_gal)?>;\r\n if ( count_items > 0 ) {\r\n jQuery(\".dragareamain\") .addClass(\"noborder\");\t\r\n }\r\n\r\n function clone(path,id){\r\n counter = counter + 1;\r\n\t\t\t\t\t\t\t\tvar cls = 'gal-sortable-gallery_meta_form';\r\n var dataString = 'path='+path+'&counter='+counter+'&action=gallery_clone';\r\n jQuery(\".\"+cls).append(\"<li id='loading'><img src='<?php echo esc_js(esc_url(get_template_directory_uri()))?>/include/assets/images/ajax_loading.gif' /></li>\");\r\n jQuery.ajax({\r\n type:'POST', \r\n url: \"<?php echo esc_js(esc_url(admin_url('admin-ajax.php')));?>\",\r\n data: dataString,\r\n success: function(response) {\r\n jQuery(\"#loading\").remove();\r\n jQuery(\".\"+cls).append(response);\r\n count_items = jQuery(\".\"+cls +' '+\"li\") .length;\r\n if ( count_items > 0 ) {\r\n jQuery(\".dragareamain\") .addClass(\"noborder\");\t\r\n }\r\n }\r\n });\r\n }\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tfunction slider(path,id){\r\n counter = counter + 1;\r\n\t\t\t\t\t\t\t\tvar cls = 'gal-sortable-gallery_slider_meta_form';\r\n var dataString = 'path='+path+'&counter='+counter+'&action=slider_clone';\r\n jQuery(\".\"+cls).append(\"<li id='loading'><img src='<?php echo esc_js(esc_url(get_template_directory_uri()))?>/include/assets/images/ajax_loading.gif' /></li>\");\r\n jQuery.ajax({\r\n type:'POST', \r\n url: \"<?php echo esc_js(esc_url(admin_url('admin-ajax.php')));?>\",\r\n data: dataString,\r\n success: function(response) {\r\n jQuery(\"#loading\").remove();\r\n jQuery(\".\"+cls).append(response);\r\n count_items = jQuery(\".\"+cls +' '+\"li\") .length;\r\n if ( count_items > 0 ) {\r\n jQuery(\".dragareamain\") .addClass(\"noborder\");\t\r\n }\r\n }\r\n });\r\n }\r\n function del_this(div,id){\r\n jQuery(\"#\"+div+' '+\"#\"+id).remove();\r\n count_items = jQuery(\"#gal-sortable li\") .length;\r\n if ( count_items == 0 ) {\r\n jQuery(\".dragareamain\") .removeClass(\"noborder\");\t\r\n }\r\n }\r\n </script>\r\n \t\t\t\t\t<?php if ( $gallery_meta_form == 'gallery_slider_meta_form'){ ?>\r\n\t\t\t\t\t\t\t <div id=\"pagination\" class=\"pagination_slider\"><?php slider_media_pagination($gallery_meta_form,'slider');?></div>\r\n <?php } else {?>\r\n <div id=\"pagination\" class=\"pagination_clone\"><?php media_pagination($gallery_meta_form,'clone');?></div>\r\n <?php \r\n \t\t\t\t\t} ?>\r\n \r\n <input type=\"hidden\" name=\"<?php echo esc_attr($gallery_meta_form);?>\" value=\"1\" />\r\n <div class=\"clear\"></div>\r\n </div>\r\n </div>\r\n <?php\t\r\n}",
"function logo_gallery($atts){\n extract( shortcode_atts( array(\n 'rows' => 4,\n 'columns' => 4,\n 'fade_in' => 'random',\n 'animate' => false,\n 'item_height' => '120px',\n ), $atts ) );\n \n $args = array(\n 'post_type' => $this->cpt,\n 'orderby' => rand,\n );\n switch($animate){\n case true:\n case 'random':\n $args['posts_per_page'] = -1;\n break;\n case false:\n $args['posts_per_page'] = $rows * $columns;\n break;\n }\n $clients = get_posts($args);\n $ret = false;\n foreach($clients AS $client){\n $logo_image = wp_get_attachment_image_src( get_post_thumbnail_id($client->ID), 'logo' );\n $logo_url = $logo_image[0];\n switch($fade_in){\n case 'rand':\n case 'random':\n $fade = rand(1,50).'00ms';\n break;\n case is_numeric($fade_in):\n $fade = $fade_in.'ms';\n break;\n case true:\n $fade = '2000ms';\n break;\n case false:\n default:\n $fade = '1ms';\n break;\n }\n if($i < $rows * $columns){\n $ret .= '<div class=\"col-md-'. 12/$columns .' col-sm-1 item-wrapper\" style=\"-webkit-transition-delay: '.$fade.';-moz-transition-delay: '.$fade.';-ms-transition-delay: '.$fade.';-o-transition-delay: '.$fade.';transition-delay: '.$fade.';\"><div class=\"item\" style=\"background-image:url('.$logo_url.');\"></div></div>';\n } else {\n \n }\n $i++;\n }\n $ret = '<div class=\"msdlab_logo_gallery\">'.$ret.'</div>';\n $ret .= '\n <style>\n .msdlab_logo_gallery .item-wrapper {\n height:'.$item_height.';\n opacity: 0;\n padding: 2rem 4rem;\n /* For Safari 3.1 to 6.0 */\n -webkit-transition-property: all;\n -webkit-transition-duration: 2s;\n -webkit-transition-timing-function: ease-in-out;\n -moz-transition-property: all;\n -moz-transition-duration: 2s;\n -moz-transition-timing-function: ease-in-out;\n -ms-transition-property: all;\n -ms-transition-duration: 2s;\n -ms-transition-timing-function: ease-in-out;\n -o-transition-property: all;\n -o-transition-duration: 2s;\n -o-transition-timing-function: ease-in-out;\n /* Standard syntax */\n transition-property: all;\n transition-duration: 2s;\n transition-timing-function: ease-in-out;\n }\n .msdlab_logo_gallery .item-wrapper .item {\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center center;\n height: 100%;\n width: 100%;\n }\n\n </style>\n <script>\n jQuery(document).ready(function($) { \n $(\".msdlab_logo_gallery .item-wrapper\").css(\"opacity\",1);\n });\n </script>';\n return $ret;\n }",
"function gallery_styles() {\r\n $gallery_path = get_bloginfo('wpurl').\"/wp-content/plugins/featured-content-gallery/\";\r\n\r\n /* The xhtml header code needed for gallery to work: */\r\n\t$galleryscript = \"\r\n\t<!-- begin gallery scripts -->\r\n <link rel=\\\"stylesheet\\\" href=\\\"\".$gallery_path.\"css/jd.gallery.css.php\\\" type=\\\"text/css\\\" media=\\\"screen\\\" charset=\\\"utf-8\\\"/>\r\n\t<link rel=\\\"stylesheet\\\" href=\\\"\".$gallery_path.\"css/jd.gallery.css\\\" type=\\\"text/css\\\" media=\\\"screen\\\" charset=\\\"utf-8\\\"/>\r\n\t<script type=\\\"text/javascript\\\" src=\\\"\".$gallery_path.\"scripts/mootools.v1.11.js\\\"></script>\r\n\t<script type=\\\"text/javascript\\\" src=\\\"\".$gallery_path.\"scripts/jd.gallery.js.php\\\"></script>\r\n\t<script type=\\\"text/javascript\\\" src=\\\"\".$gallery_path.\"scripts/jd.gallery.transitions.js\\\"></script>\r\n\t<!-- end gallery scripts -->\\n\";\r\n\t\r\n\t/* Output $galleryscript as text for our web pages: */\r\n\techo($galleryscript);\r\n}",
"public function add_gallery()\n {\n \treturn view('backend/add_gallery');\n }",
"function gallery(){\n $str=\"\";\n $str.= \"<div class='gallery'>\";\n foreach (glob(\"*.{jpg,png,gif,JPG,jpeg}\",GLOB_BRACE) as $filename) {\n echo '<a data-fancybox=\"gallery\" href=\"'.$filename.'\"><img class=\"thumbnail\" src=\"'.$filename.'\"></a>';\n }\n $str.= \"</div>\";\n echo $str;\n}",
"function get_gallery_article($thisPost){\n $id = $thisPost->ID;\n $title = $thisPost->post_title;\n $image = get_the_post_thumbnail_url($id)?get_the_post_thumbnail_url($id):DF_IMAGE. '/noimage.png';\n $link = get_permalink($id);\n // $terms = get_the_terms( $post->ID, 'publication_category' );\n $data_taxaonomy = get_the_terms($id, 'categories-gallery');\n ?>\n <div class=\"gallery--cont-image\" data-post_id = \"<?php echo $id;?>\" data-slug = \"<?php echo $data_taxaonomy[0]->slug; ?>\">\n <div class=\"background--hidden\"></div>\n <?php \n $data_taxaonomy = get_the_terms($thisPost, 'categories-gallery');\n if(check_taxaonomy($data_taxaonomy) == true):\n ?>\n <div class=\"background-360\">\n <div class=\"content-group\">\n <div class=\"cont-icon\"><img src=\"<?php echo DF_IMAGE.'/icon-3d.png';?>\" alt=\"icon-3d\" /></div>\n <div class=\"cont-text\">EXPLORE 3D SPACE</div>\n </div>\n </div>\n <?php\n endif;\n ?>\n <a href=\"<?php echo $link;?>\">\n <img src=\"<?php echo $image;?>\" alt=\"image-work-page\"/>\n </a>\n </div>\n <?php\n}",
"protected function render() {\t\t\n\t\t\n\t\t$settings = $this->get_settings();\n\t\t\n\t\t// start printing gallery\n\t\t$current_size = 0;\n\t\t$settings['num-fetch'] = empty($settings['num-fetch'])? 9999: intval($settings['num-fetch']);\n\t\t$paged = (get_query_var('paged'))? get_query_var('paged') : 1;\n\t\t$num_page = ceil(sizeof($settings['slider']) / $settings['num-fetch']);?>\n\t\t<div class=\"wpha-item-holder main-gallery-wrapper main-gallery-<?php echo esc_attr( $this->get_id() ); ?>\">\n\t\t\t<?php \n\t\t\t\n\t\t\techo '\n\t\t\t<div class=\"row\">\n\t\t\t<div class=\"col-md-12 wpha-listing-item gallery-slider kode-style-gal-'.esc_attr($settings['style']).' kode-gallery kode-gutter-gallery bottom-spacer\">';\n\t\t\t\n\t\t\tif($settings['style'] == 'simple-gallery'){\n\t\t\t\t\n\t\t\t\techo '<div class=\"kode-item\">';\t\n\t\t\t\t\n\t\t\t\tforeach($settings['slider'] as $slide_id => $slides){\n\t\t\t\t\tif( ($current_size >= ($paged - 1) * $settings['num-fetch']) &&\n\t\t\t\t\t\t($current_size < ($paged) * $settings['num-fetch']) ){\n\n\t\t\t\t\t\tif( !empty($current_size) && ($current_size % $settings['gallery-columns'] == 0) ){\n\t\t\t\t\t\t\techo '<div class=\"clear\"></div>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$image_id = $this->wpjb_get_image_id($slides['main_gallery_settings_slide']['url']);\n\t\t\t\t\t\t$image_src = wp_get_attachment_image_src($image_id, $settings['thumbnail-size']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$image_src = '';\n\t\t\t\t\t\tif(!empty($slides['main_gallery_settings_slide']['id'])){\n\t\t\t\t\t\t\t$image_id = $this->wpjb_get_image_id($slides['main_gallery_settings_slide']['url']);\n\t\t\t\t\t\t\t$image_src = wp_get_attachment_image_src($image_id, $settings['thumbnail-size']);\n\t\t\t\t\t\t\t$image_src = $image_src[0];\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$image_src = $slides['main_gallery_settings_slide']['url'];\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\techo '\n\t\t\t\t\t\t<div class=\"gallery-item columns ' . wpha_get_column_class_updated('1/' . $settings['gallery-columns']) . '\">\n\t\t\t\t\t\t\t<div class=\"kode_gallery_fig\">\n\t\t\t\t\t\t\t\t<figure class=\"them_overlay\">\n\t\t\t\t\t\t\t\t\t<img src=\"'.esc_url($image_src).'\" alt=\"\">\n\t\t\t\t\t\t\t\t\t<a class=\"hvr-ripple-out\" data-rel=\"prettyphoto[]\" href=\"'.esc_url($image_src).'\"><i class=\"fa fa-expand\"></i></a>\n\t\t\t\t\t\t\t\t</figure>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>'; // gallery column\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t$current_size ++;\n\t\t\t\t}\n\t\t\t\techo '<div class=\"clearfix clear\"></div>';\n\t\t\t\techo '</div>'; // kode-gallery-item\n\t\t\t}else if($settings['style'] == 'gallery-slider'){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\techo '<div data-margin=\"0\" data-slide=\"'.esc_attr($settings['gallery-columns']).'\" data-small-slide=\"'.esc_attr($settings['gallery-columns']).'\" class=\"owl-carousel-item owl-theme-item kode_video_list\">';\n\t\t\t\t\n\t\t\t\tforeach($settings['slider'] as $slide_id => $slides){\n\t\t\t\t\tif( ($current_size >= ($paged - 1) * $settings['num-fetch']) &&\n\t\t\t\t\t\t($current_size < ($paged) * $settings['num-fetch']) ){\n\n\t\t\t\t\t\tif( !empty($current_size) && ($current_size % $settings['gallery-columns'] == 0) ){\n\t\t\t\t\t\t\techo '';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$image_src = '';\n\t\t\t\t\t\tif(!empty($slides['main_gallery_settings_slide']['id'])){\n\t\t\t\t\t\t\t$image_id = $this->wpjb_get_image_id($slides['main_gallery_settings_slide']['url']);\n\t\t\t\t\t\t\t$image_src = wp_get_attachment_image_src($image_id, $settings['thumbnail-size']);\n\t\t\t\t\t\t\t$image_src = $image_src[0];\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$image_src = $slides['main_gallery_settings_slide']['url'];\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\techo '\n\t\t\t\t\t\t<div class=\"items columns\">\n\t\t\t\t\t\t\t<img src=\"'.esc_url($image_src).'\" alt=\"\" />\n\t\t\t\t\t\t</div>'; // gallery item\n\t\t\t\t\t}\n\t\t\t\t\t$current_size ++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\techo '</div>'; // kode-gallery-item\n\n\t\t\t}\n\t\t\t\n\t\t\tif( $settings['pagination'] == true ){\n\t\t\t\techo baldiyaat_get_pagination($num_page, $paged);\n\t\t\t}\n\t\t\t\n\t\techo '</div></div></div>'; // kode-gallery-item\n\t\t\n\t\t\n\t}",
"function logo_gallery_js($atts){\n extract( shortcode_atts( array(\n 'rows' => 4,\n 'columns' => 4,\n 'fade_in' => 'random',\n 'animate' => false,\n 'item_height' => '120px',\n ), $atts ) );\n \n $args = array(\n 'post_type' => $this->cpt,\n 'orderby' => rand,\n );\n $grid_cells_count = $rows * $columns;\n $i = 1;\n while($i <= $grid_cells_count){\n $grid .= '<div class=\"col-md-'. 12/$columns .' col-sm-1 item-wrapper\"><div class=\"item item-'.$i.'\"></div></div>';\n $i++;\n }\n \n \n \n switch($animate){\n case true:\n case 'random':\n $args['posts_per_page'] = -1;\n break;\n case false:\n $args['posts_per_page'] = $grid_cells_count;\n break;\n }\n $clients = get_posts($args);\n $ret = false;\n foreach($clients AS $client){\n $logo_image = wp_get_attachment_image_src( get_post_thumbnail_id($client->ID), 'logo' );\n $logo_array[] = $logo_image[0];\n }\n $ret = '<div class=\"msdlab_logo_gallery\">'.$grid.'</div>';\n $ret .= '\n <style>\n .msdlab_logo_gallery .item-wrapper {\n height: 120px;\n padding: 2rem 4rem;\n }\n .msdlab_logo_gallery .item-wrapper .item {\n display: none;\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center center;\n height: 100%;\n width: 100%;\n }\n </style>\n <script>\n var img_array = '.json_encode($logo_array).';\n console.log(img_array);\n jQuery(document).ready(function($) {\n //initial load\n $(\".msdlab_logo_gallery .item-wrapper .item\").each(function(){\n var faderate = Math.floor(Math.random() * 5000) + 1000;\n $(this).delay(faderate).load_bkg();\n });\n $(\".msdlab_logo_gallery .item-wrapper .item\").click(function(){\n $(this).load_bkg();\n });\n });\n </script>';\n return $ret;\n }",
"function mgl_instagram_templates($withKey = false)\n{\n // Define the builtin templates\n $builtinTemplates = array('default', 'instagram', 'dark', 'elegant', 'whiteslide', 'darkslide', 'basic');\n // Set theme templates, custom templates and child theme templates lists as empty array\n $themeTemplates = $customTemplates = $childThemeTemplates = array();\n // Get child theme templates directory\n $childThemeTemplatesDirectory = get_stylesheet_directory() . '/mgl-instagram-gallery';\n // Get theme templates directory\n $themeTemplatesDirectory = get_template_directory() . '/mgl-instagram-gallery';\n // Get gallery options\n $instagramGalleryOptions = get_option('MGLInstagramGallery_option_name');\n // Define files to ignore when searching for templates\n $weeds = array('.', '..', '.DS_Store');\n\n // If there are custom templates stored, get them\n // TODO: Change $instagramGalleryOptions['settings']['custom_templates'] and get it as a param\n if (isset($instagramGalleryOptions['settings']['custom_templates'])) {\n // Get custom template list from stored custom templates\n $customTemplates = explode(',', $instagramGalleryOptions['settings']['custom_templates']);\n }\n\n if (file_exists($childThemeTemplatesDirectory)) {\n // Find child theme templates\n // TODO: Check why we are not using this child theme templates\n $childThemeTemplates = array_diff(scandir($childThemeTemplatesDirectory), $weeds);\n }\n\n if (file_exists($themeTemplatesDirectory)) {\n // Find theme templates\n $themeTemplates = array_diff(scandir($themeTemplatesDirectory), $weeds);\n }\n // Merge all templates in one list\n $templates = array_merge($builtinTemplates, $themeTemplates, $childThemeTemplates, $customTemplates);\n // Trim template names to avoid file names errors\n $templates = array_map('trim', $templates);\n // Delete duplicated names on the list. It prevents get template names twice if custom templates overwrite previous ones\n $templates = array_unique($templates);\n // Delete empty values on templates list\n $templates = array_filter( $templates );\n\n if ($withKey) {\n // Add template values as template keys as well\n $templates = array_combine( $templates, $templates);\n }\n\n return $templates;\n}",
"function theme_shortcode_gallery( $output, $attr ) {\n\tglobal $post;\n\n\tstatic $cleaner_gallery_instance = 0;\n\t$cleaner_gallery_instance++;\n\n\t/* We're not worried abut galleries in feeds, so just return the output here. */\n\tif ( is_feed() )\n\t\treturn $output;\n\n\t/* Orderby. */\n\tif ( isset( $attr['orderby'] ) ) {\n\t\t$attr['orderby'] = sanitize_sql_orderby( $attr['orderby'] );\n\t\tif ( !$attr['orderby'] )\n\t\t\tunset( $attr['orderby'] );\n\t}\n\t\n\t/* Default gallery settings. */\n\t$defaults = array(\n\t\t'order' => 'ASC',\n\t\t'orderby' => 'menu_order ID',\n\t\t'id' => $post->ID,\n\t\t'link' => '',\n\t\t'itemtag' => 'dl',\n\t\t'icontag' => 'dt',\n\t\t'captiontag' => 'dd',\n\t\t'columns' => 3,\n\t\t'caption' => 'false',\n\t\t'lightboxtitle' => 'caption',//title,caption,none\n\t\t'size' => 'thumbnail',\n\t\t'include' => '',\n\t\t'exclude' => '',\n\t\t'numberposts' => -1,\n\t\t'offset' => ''\n\t);\n\t\n\t/* Merge the defaults with user input. Make sure $id is an integer. */\n\t$attr = shortcode_atts( $defaults, $attr );\n\textract( $attr );\n\t$id = intval( $id );\n\n\t/* Arguments for get_children(). */\n\t$children = array(\n\t\t'post_parent' => $id,\n\t\t'post_status' => 'inherit',\n\t\t'post_type' => 'attachment',\n\t\t'post_mime_type' => 'image',\n\t\t'order' => $order,\n\t\t'orderby' => $orderby,\n\t\t'exclude' => $exclude,\n\t\t'include' => $include,\n\t\t'numberposts' => $numberposts,\n\t\t'offset' => $offset,\n\t);\n\n\t/* Get image attachments. If none, return. */\n\t$attachments = get_children( $children );\n\n\tif ( empty( $attachments ) )\n\t\treturn '';\n\n\t/* Properly escape the gallery tags. */\n\t$itemtag = tag_escape( $itemtag );\n\t$icontag = tag_escape( $icontag );\n\t$captiontag = tag_escape( $captiontag );\n\t$i = 0;\n\n\t/* Count the number of attachments returned. */\n\t$attachment_count = count( $attachments );\n\n\t/* If there are fewer attachments than columns, set $columns to $attachment_count. */\n\t//$columns = ( ( $columns <= $attachment_count ) ? intval( $columns ) : intval( $attachment_count ) );\n\n\t/* Open the gallery <div>. */\n\t$output = \"\\n\\t\\t\\t<div id='gallery-{$id}-{$cleaner_gallery_instance}' class='gallery gallery-{$id}'>\";\n\n\t/* Loop through each attachment. */\n\tforeach ( $attachments as $id => $attachment ) {\n\n\t\t/* Open each gallery row. */\n\t\tif ( $columns > 0 && $i % $columns == 0 )\n\t\t\t$output .= \"\\n\\t\\t\\t\\t<div class='gallery-row'>\";\n\n\t\t/* Open each gallery item. */\n\t\t$output .= \"\\n\\t\\t\\t\\t\\t<{$itemtag} class='gallery-item col-{$columns}'>\";\n\n\t\t/* Open the element to wrap the image. */\n\t\t$output .= \"\\n\\t\\t\\t\\t\\t\\t<{$icontag} class='gallery-icon'>\";\n\n\t\t/* Add the image. */\n\t\t$img_lnk = wp_get_attachment_image_src($id, 'full');\n\t\t$img_lnk = $img_lnk[0];\n\n\t\t$img_src = wp_get_attachment_image_src( $id, $size );\n\t\t$img_src = $img_src[0];\n\t\t\n\t\t$img_alt = wptexturize( esc_html($attachment->post_excerpt) );\n\t\t\n\t\tif ( $img_alt == null )\n\t\t\t$img_alt = $attachment->post_title;\n\t\tswitch($lightboxtitle){\n\t\t\tcase 'caption':\n\t\t\t\t$lightbox_title = wptexturize( esc_html($attachment->post_excerpt) );\n\t\t\t\tbreak;\n\t\t\tcase 'title':\n\t\t\t\t$lightbox_title = $attachment->post_title;\n\t\t\t\tbreak;\n\t\t\tcase 'none':\n\t\t\tdefault:\n\t\t\t\t$lightbox_title = '';\n\t\t}\n\t\t$img_class = apply_filters( 'gallery_img_class', (string) 'gallery-image' ); // Available filter: gallery_img_class\n\t\t$img_rel = 'group-' . $post->ID;\n\t\t$image = '<img src=\"' . $img_src . '\" alt=\"' . $img_alt . '\" class=\"' . $img_class . ' attachment-' . $size . '\" />';\n\t\t\n\t\tif(isset( $attr['link'] ) && 'file' == $attr['link']){\n\t\t\t$image = '<a href=\"' . $img_lnk . '\" class=\"lightbox image_icon_zoom gallery-image-wrap\" title=\"' . $lightbox_title . '\" rel=\"' . $img_rel . '\">'.$image.'</a>';\n\t\t}else{\n\t\t\t$image = '<a href=\"' . get_attachment_link($id) . '\" class=\"gallery-image-wrap\" title=\"' . $lightbox_title . '\" rel=\"' . $img_rel . '\">'.$image.'</a>';\n\t\t}\n\t\t\n\t\t$output .= $image;\n\t\t\n\t\t/* Close the image wrapper. */\n\t\t$output .= \"</{$icontag}>\";\n\t\t\n\t\t/* Get the caption. */\n\t\tif($caption != 'false'){\n\t\t\t/* If image caption is set. */\n\t\t\tif ( !empty( $img_alt ) )\n\t\t\t\t$output .= \"\\n\\t\\t\\t\\t\\t\\t<{$captiontag} class='gallery-caption'>{$img_alt}</{$captiontag}>\";\n\t\t}\t\t\n\n\t\t/* Close individual gallery item. */\n\t\t$output .= \"\\n\\t\\t\\t\\t\\t</{$itemtag}>\";\n\n\t\t/* Close gallery row. */\n\t\tif ( $columns > 0 && ++$i % $columns == 0 )\n\t\t\t$output .= \"\\n\\t\\t\\t\\t</div>\";\n\t}\n\n\t/* Close gallery row. */\n\tif ( $columns > 0 && $i % $columns !== 0 )\n\t\t$output .= \"\\n\\t\\t\\t</div>\";\n\n\t/* Close the gallery <div>. */\n\t$output .= \"\\n\\t\\t\\t</div><!-- .gallery -->\\n\";\n\n\t/* Return out very nice, valid HTML gallery. */\n\treturn $output;\n}",
"function wp_fathom_clean_setup() {\n\t\n\tadd_theme_support( 'post-formats',\n array( 'article' )\n );\n\n\tadd_theme_support( 'post-thumbnails' );\n\n // register_nav_menu( 'first', 'first' );\n \n\t// set_post_thumbnail_size( 505, 400, true );\n\t\n // add_image_size( 'square', 160, 160, true );\n \n\n}",
"function fgallery_shortcode_handler($atts, $content = null){\n // set default params if not present\n extract(shortcode_atts( array(\n 'id' => 0,\n 'w' => 450,\n 'h' => 385,\n 'bg' => 'ffffff',\n 't' => 0,\t\n 'align' => '',\n 'thumb' => '',\n 'title' => '',\n 'margin' => '0px',\n 'ex' => 1,\n 'conf' => 0,\n ), $atts ));\n // choose insertion type\n if ($t < 0 || $t > 2) {\n $t = 0;\n }\n if (!is_numeric($ex) || $ex > 2 || $ex < 0 )\n $ex = 1;\n // check if the gallery exist\n if ($id > 0) {\n $album = fgallery_get_album($id);\n if (empty($album)) {\n return '[fgallery 404 Not found]';\n }\n } else {\n return '[fgallery 404 Not found]';\n }\n // different output for different insert type\n switch ($t) {\n case '0' : \n $rand = uniqid();\n $path = fgallery_search_flash_path($album);\n // if gallery should be aligned\n if (isset($align)) {\n switch ($align) {\n case 'left' : case 'right' :\n $align_text = 'float:'.$align;\n break;\n case 'center' :\n $margin = $margin.' auto';\n default:\n $align_text = '';\n break;\n }\n }\n if (!$conf){\n $flashcontent = 'flashcontent_'.$id.$rand;\n } else {\n $flashcontent = 'flashcontent';\n }\n $gallery_snippet = '<div style=\"width:'.$w.'px;margin:'.$margin.';'.$align_text.'\" class=\"fgallery_'.$id.'\">\n <script type=\"text/javascript\">\n if (swfobject.getFlashPlayerVersion().release) {\n var flashvars = {settings: \"'.fgallery_get_config_url($id).'\",';\n if ($album['gall_type'] == 13){\n $gallery_snippet .= 'publications: \"'.fgallery_get_publ_url($id).'\",';\n // $gallery_snippet .= 'style: \"http://localhost/wp/wp-content/plugins/1-flash-gallery/swf/style.css\",';\n }\n $gallery_snippet .= 'images : \"'.fgallery_get_images_url($id).'\"};\n var params = {bgcolor: \"#'.$bg.'\", allowFullScreen: \"true\", wmode: \"transparent\"};\n swfobject.embedSWF(\"'.$path.'\", \"'.$flashcontent.'\", \"'.$w.'\", \"'.$h.'\", \"10.0.0\",false, flashvars, params);\n } else {\n jQuery(document).ready(function(){\n jQuery(\"#myGallery_'.$id.$rand.'\").photoGallery({gall_id : \"'.$id.'\"});\n });\n }\n </script>\n <div id=\"'.$flashcontent.'\">\n <div id=\"myGallery_'.$id.$rand.'\" class=\"configurator\" style=\"height:'.$h.'px ;width: '.$w.';\"></div>\n </div>';\n $gallery_snippet .= '<div class=\"flash_text\"><p class=\"image_text\"></p></div>';\n if (get_option('1_flash_gallery_'.fgallery_get_flash_type($album)) == '') {\n $gallery_snippet .= '<div class=\"fgallery_message\">'.fgallery_slideshow($album).'</div>';\n }\n break;\n case '1' : \n if ($title == '') {\n $insert_text = $album['gall_name'];\n } else {\n $insert_text = $title;\n }\n $gallery_snippet = '<a href=\"'.fgallery_view_gallery_url($id, $w, $h, $bg).'\"\n class=\"thickbox\" title=\"'.$album['gall_name'].'\">'.$insert_text.'</a>';\n if ($ex == 1) \n $gallery_snippet .= '<p>'.fgallery_get_album_attributes($album, false).'</p>';\n break;\n case '2' :\n $gallery_snippet = '<a href=\"'.fgallery_view_gallery_url($id, $w, $h, $bg).'\"\n class=\"thickbox\" title=\"'.$album['gall_name'].'\">'.fgallery_get_album_cover($album, $thumb).'</a>';\n switch ($ex) {\n case 0:\n $gallery_snippet .= '';\n break;\n case 1:\n $gallery_snippet .= '<p>'.$album['gall_name'].'</p><p>'.fgallery_get_album_attributes($album, false).'</p>';\n break;\n case 2: \n $gallery_snippet .= '<p>'.$album['gall_name'].'</p>';\n break;\n default:\n $gallery_snippet .= '<p>'.$album['gall_name'].'</p><p>'.fgallery_get_album_attributes($album, false).'</p>';\n break;\n } \n \n break;\n }\n\n return $gallery_snippet;\n}"
] | [
"0.6735096",
"0.6649736",
"0.6622598",
"0.6499259",
"0.6481037",
"0.64391905",
"0.64087397",
"0.63375896",
"0.6336379",
"0.6266598",
"0.6247687",
"0.62358123",
"0.6213242",
"0.6207902",
"0.6183024",
"0.6178521",
"0.61648464",
"0.6153471",
"0.6149904",
"0.6101552",
"0.6085639",
"0.6083124",
"0.6078112",
"0.60700935",
"0.60651475",
"0.6021703",
"0.6017581",
"0.60113174",
"0.60104614",
"0.6006619",
"0.598966",
"0.59558374",
"0.59470594",
"0.59130096",
"0.5905296",
"0.59004056",
"0.58969104",
"0.58939713",
"0.5891447",
"0.58911186",
"0.5890805",
"0.58882165",
"0.58838755",
"0.5882464",
"0.58658457",
"0.586547",
"0.5851303",
"0.5849236",
"0.5834253",
"0.58342105",
"0.5831873",
"0.5829914",
"0.58292705",
"0.5818111",
"0.58166325",
"0.58115333",
"0.57988524",
"0.57920605",
"0.5786407",
"0.5772099",
"0.5768323",
"0.57668203",
"0.57658875",
"0.57548815",
"0.5743841",
"0.57383376",
"0.5733757",
"0.5731956",
"0.5728666",
"0.57135904",
"0.56949806",
"0.5693355",
"0.56777436",
"0.566804",
"0.566724",
"0.5667014",
"0.5659982",
"0.56489474",
"0.5648383",
"0.5647897",
"0.5643149",
"0.5643148",
"0.56386596",
"0.56383747",
"0.56318074",
"0.5622055",
"0.5616027",
"0.5613584",
"0.5596687",
"0.55964816",
"0.55928516",
"0.5586258",
"0.55837286",
"0.55836767",
"0.55750334",
"0.55732715",
"0.5566761",
"0.55624104",
"0.55618066",
"0.55577135"
] | 0.7878293 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.